size matters and unit promotions

sunrisereader

Warlord
Joined
Jan 2, 2015
Messages
187
I have just finished a campaign with size matters and like it a lot, instead of huge army stacks i can move around with smaller groups of merged units. But i noticed that that how the promotions are determined for the new unit is a complex. The base case seems to be that all promotions that all units have that get merged are the promotions the merged unit gets, the xp for the new unit is the average xp of the old units, and they get available promotions for different promotions.

There are also some promotions that the merged unit gets if only one of the 3 being merged have it like lead by noble/warlord and the morale one, is there a list/post somewhere explaining what the promotions are a unit will have post merge?

Also units get promotions sometimes on a battle victory what happens with those promotions on a merge?
 
It's 'free' promotions, from whatever source, that will be maintained if they are on the unit that initiates the merge. Battle victory promos are included in the 'free' category. Basically any promotion given to a unit outside of the process of experience points earning a level earning a selection are considered 'free' promos.

Otherwise I think you pretty much nailed the function on how it works. Took a lot of thinkin' to work out that logic chain let me tell you.
 
I have used this to give free promotions to some older units. Old units were more experienced but they had less free promotions (they were produced before my main military city got some nice buildings) while new units had tons of free promotions but less XP. If the leading unit is the unit with most (or the best) free promotions, they are given to the merged unit - and they remain when the unit is split back.

Of course, you need to merge the same units and you cannot mix units of different size (merged with normal, normal with split etc.) and quality (default quality with quality up).

I have not tested this but it seems this way one may attach e.g. a Great General, a Noble or both to a super huge stack of e.g. 81 units and then split them back to get 81 units led by a GG/Noble couple. And one may build much more than 15 national units (3->1, 9->3->1 etc. and the unit count is lowered). In my previous game I had 53 Spartan Warriors (after upgrade they were just Swordsmen with Heroic 1, so I merged an extra Swordsman to get 2 super-units of 27 super-Swordsmen).

Some other exploits:

- upgrade merged units and you will pay less
- disband split units and you will get more gold (disbanding of captured workers, siege units. etc. may be very profitable).

S.
 
I have used this to give free promotions to some older units. Old units were more experienced but they had less free promotions (they were produced before my main military city got some nice buildings) while new units had tons of free promotions but less XP. If the leading unit is the unit with most (or the best) free promotions, they are given to the merged unit - and they remain when the unit is split back.

Of course, you need to merge the same units and you cannot mix units of different size (merged with normal, normal with split etc.) and quality (default quality with quality up).

I have not tested this but it seems this way one may attach e.g. a Great General, a Noble or both to a super huge stack of e.g. 81 units and then split them back to get 81 units led by a GG/Noble couple. And one may build much more than 15 national units (3->1, 9->3->1 etc. and the unit count is lowered). In my previous game I had 53 Spartan Warriors (after upgrade they were just Swordsmen with Heroic 1, so I merged an extra Swordsman to get 2 super-units of 27 super-Swordsmen).

Some other exploits:

- upgrade merged units and you will pay less
- disband split units and you will get more gold (disbanding of captured workers, siege units. etc. may be very profitable).

S.

I had intended to eventually address the first and last exploits mentioned. The first by making only the first unit in the newly generated 3 from the original when splitting become the only one to get the free promos assigned to the original (then the rest should check to see if there are causes for them to independently gain free promos themselves, such as if they are in a city that is giving equipments and so on.) The problem is that it's still a wiggly issue when you start considering it could then be used to exploit rid a unit of a negative promotion so that's why it's setup like this. Though I might be able to eventually isolate at least 'leader' promos and handle them differently than anything else.

The last one is a matter of needing to adjust the way the calculation for gold is made - a % modifier is not sufficient.

The middle exploit, paying less for upgrading merged units, is actually intended. It's easier to assembly line the training effort when they're all undergoing training as a group.
 
IThough I might be able to eventually isolate at least 'leader' promos and handle them differently than anything else.

I think this would be the best solution - promos like led by Noble, led by Warlord and appriopriate trees would be left on the top unit only while the other ones would be given to all units. And this would make merging Spartan Warriors pointless, because (especially after upgrade) only the top Swordsman would be Heroic I.

I think one should adjust unit count (and maintenence costs). And this modified unit count should be applied to national units - e.g. if you have 5 units of 3, you cannot train a new one but if you have 18 units of 1/3, you may still train 9.

S.
 
I think one should adjust unit count (and maintenence costs). And this modified unit count should be applied to national units - e.g. if you have 5 units of 3, you cannot train a new one but if you have 18 units of 1/3, you may still train 9.
Yeah... iirc there is actually an adjustment or an attempt to adjust but I'm not sure if it's mathematically done right or not. It's not an adjustment to the count but to the effective count of a particular unit and only tallies properly when there's enough fractions of units to add up to a total integer value... something like that. Those changes may have been erased by later debug efforts ... I don't even remember where it is in the code but after a few hrs of looking I could find it again I'm sure.

That reminds me... I really should spend some time teaching YOU to code... with your math skills you'd find a lot of the things I found difficult to be quite easy I'm sure.
 
Yeah... iirc there is actually an adjustment or an attempt to adjust but I'm not sure if it's mathematically done right or not.

I would do it in two ways: either using floating point numbers or couples of integers. Perhaps integers would be better (and definitely more accurate).

FP: add fractions, round (assuming some precision).

Integers: the number of units may be expressed as p/q where q is either 1 or 3 in some integer power (q=3^k where k is the number of subsequent divisions: if divided once, k=1, if divided twice, k=2 etc., ^k means the power of k).

If we add 2 numbers (p1,q1) and (p2,q2) in fact we add (p1/q1+p2/q2). To do this using integers, we must have the same denominator. Fortunately, denominators are simple (q1=3^k1 and q2=3^k2). We find maximum of {k1,k2} (let's say, k1), so dk=k1-k2>=0. Thus we have

k1=k2+dk => q1=3^k1=3^k2*3^dk

Now we write (p2,q2) in a different way:

p2->p2*3^dk, q2->q2*3^dk=q1 or (p2,q2)->(p2*3^dk,q1)

so we have the same denominator and we may get the result:

p1/q1+p2/q2 = p1/q1 + p2*3^dk/q1 = (p1+p2*3^dk)/q1

and the final result is

(p1+p2*3^dk,q1)

Of course, the fp result would be close to (p1+p2*3^dk)/q1. Actual representation may be different, e.g. I think it would be more convenient to use k instead of q, so one would have

(p,k) = p/3^k

That reminds me... I really should spend some time teaching YOU to code... with your math skills you'd find a lot of the things I found difficult to be quite easy I'm sure.

Well... please take into account that I am 40+, so I do not learn as quickly as at the times of Civ I. I may do some simple coding (I am not that bad at structural programming) but show me some object-like code and I am screwed.

S.
 
I'm fast approaching 60 but with a bit of concentration I can read it.:mischief: Of course I did do a degree in Pure Maths at university and used that sort of mathematics for most of my working life.
 
@Thunderbrd: so DH may be our translator ;) And if not, I may try to explain the final result, and maybe try to optimize it.

@DH: nice to see that. I am not a mathematican but physicists simply need to know maths and use it almost non stop. Usually a bit more complex one (derivatives, not too long integrals etc.).

Anyway, if you have similar problems, I may have a look at them.


S.

Edit: I have tested Lead by Warlord/Noble promo. I had 81 Tlatico (sp.?) War Priests merged to 1 unit and attached a Warlord (captured on AI) and a Noble. After Smithing I upgraded the super-unit to a Swordsman. After splitting it back I had many units led by both Noble and Warlord. BTW: it turned out it was enough to give them one more XP (easy with Raging Barbarians and Barbarian generals) to get the Quality Up promotion.

I have upgraded them for free (Art of War + Seti Pir) but upgrading 1 unit would be much cheaper than 81 units anyway - I think upgrade cost should depend on the truel number of units. Maybe some costs could be lower (these extra 20 gold may be applied only once) but it should be much more expensive to equip e.g. 81 Swordsmen in rifles than only 1 Swordsman.

One more thing: many players regard Unlimited XP as imbalanced. Actually I like this option but with Size Matters this is not that important - after Quality Up any unit loses its XP anyway.
 
Back
Top Bottom