Strange Behavior

While testing a spell which should increase movement by +1 for every X air shards, I discoverd a strange behavior.

a) 1 air shard. Unit has movement 2, increased by air shards/10 = 0.1.

The display in the char screen shows the right decimal value of 0.1, but UnitStat_Moves shows 3.

The movement of the unit in the world window shows 2 und indeed the unit can only move 2 sqaures.

 

b) same with 2 air shards

The display in the char screen shows the right decimal value of 0.2, but UnitStat_Moves shows 3.

Now the movement of the unit in the world window shows 3 und indeed the unit can now move 3 sqaures.

 

So I tested a little deeper and discovered a strange rounding behavior:

 

 0 - 0.12 = 0

>0.12 = 1

 

Does this makes any sense?

3,313 views 3 replies
Reply #1 Top

One of my mods works with the move stat, and I've seen the behavior you describe.

 

The 2.2=3 thing can mean 3 moves, but when terrain modifiers and such come into play, the 2.2 is used, not 3.  As to the game's 'round off' point, it's been a bit since I worked on my engineers mod, so I'm not sure exactly where that point is off of the top of my head.

FYI, I was using a multiplier to reduce movement, to 'limit' the number of sections of road a mounted unit could build in a turn, so that I didn't have mounted roadbuilders building three sections of road per turn.  That is when I discovered the behavior you describe.

Reply #2 Top

 

Quoting tjashen, reply 1

 The 2.2=3 thing can mean 3 moves, but when terrain modifiers and such come into play, the 2.2 is used, not 3.

I never noticed a reduction in the movement display depending on the underground at start of turn. But I didn't test how far the unit really could walk. I will make up for this in the next days.

Engineers mod sounds good. Have to download it and take a closer look.

 

 

 

 

Reply #3 Top

I've found when I have a unit that has the default 2 moves, and I add a skill that gives +0.1 moves per level, at L1-L9 they have 3 Strategic Moves (according to the unit panel) and 2 Tactical Moves.  At L10, they have 3 Strategic and Tactical Moves.  At L11, they have 4 Strategic and 3 Tactical Moves, even though the amount of Moves is only 3.1.  So maybe when adding bonuses for shards is a little different than adding moves per level, or else there is a different cutoff for rounding up to the next Strategic move.