Think i've found a mistake

Taurean

Chieftain
Joined
Apr 28, 2023
Messages
15
Ironclads and destroyer are listed to have 1 as firepower. But they destroy any unit with 1 in hitpoints. This should entail them having 2 in firepower, shouldn't it? Have not tested this widely with all units, just these two units i've observed this with.
 
Ironclads and destroyer are listed to have 1 as firepower. But they destroy any unit with 1 in hitpoints. This should entail them having 2 in firepower, shouldn't it? Have not tested this widely with all units, just these two units i've observed this with.
What version of the game are you using? I remember noticing that units with 3 (really 30) hitpoints tended to defeat units with 1 hitpoint in one hit, regardless of their firepower. This was in 'Classic' (v2.42) version of civ.

The way combat is supposed to work is that if the attacker has attack value A, and defender has attack value D, the attacker "rolls an A side die", and the defender "rolls a D side die", and the highest number wins the round of combat, and does its firepower in damage to the loser. When someone runs out of HP, the combat is over.

This is how it works for Test of Time. I just assumed that in classic, the game did fewer rounds with higher stakes in each round, so 3 HP made one round of combat enough to kill a 1HP unit. However, I never bothered to test this, since it didn't impact my gameplay.
 
What version of the game are you using? I remember noticing that units with 3 (really 30) hitpoints tended to defeat units with 1 hitpoint in one hit, regardless of their firepower. This was in 'Classic' (v2.42) version of civ.

The way combat is supposed to work is that if the attacker has attack value A, and defender has attack value D, the attacker "rolls an A side die", and the defender "rolls a D side die", and the highest number wins the round of combat, and does its firepower in damage to the loser. When someone runs out of HP, the combat is over.

This is how it works for Test of Time. I just assumed that in classic, the game did fewer rounds with higher stakes in each round, so 3 HP made one round of combat enough to kill a 1HP unit. However, I never bothered to test this, since it didn't impact my gameplay.
Thank you again for answering. Not sure if i understand the A and D dice rolling thing.

I forgot to write, they destroy the unit with 1 in hit points, in 1 battle turn. I.e. not 2 as they should. But you understood that, it seems.

I play Civ 2 gold multiplayer. I guess it is a very original version since i don't play modified versions and such - it just confuses everything so much more.
 
When talking about battle turn, are you refering to the animation displayed ?
 
Last edited:
When talking aboit battle turn, are you refering to the animation displayed ?
Yes. when you attack someone and that black .. painbrush animation that displays ^^ When someone with firepower 2 attacks someone with 1 in hitpoints, they destroy it in one animation. And that happens if i haven't got the marco polo's embassy early on and not made contact with all civs, and one of those civs has gotten ironclads or destroyers .. and occasionally pass one of my cities with 1 hit point military units and attack, they destroy it in 1 animation. Yet they have listed 1 as firepower. That is obviously a mistake.
 
There could be something with the battle animation display behind that.

Someone may look more into its behaviour in ToT considering lua's ability to divide fights at the battle round level.

It may then match your observations in MGE ?
 
There could be something with the battle animation display behind that.

Someone may look more into its behaviour in ToT considering lua's ability to divide fights at the battle round level.

It may then match your observations in MGE ?
Nah, it's the normal animation, the black spot that appears after every mini-confrontation. I haven't played different versions of civ2, i didn't know there were any others ...
 
Nah, it's the normal animation, the black spot that appears after every mini-confrontation. I haven't played different versions of civ2, i didn't know there were any others ...
In my TES scenario, the "battle sound option" gives a clear division of battle rounds, slowing down battles.
We can observe that the animation is NOT launched for each round.

Which is logic, indeed. I didn't go further to look into it thought.
 
Just as a very simple scenario, go to 2:00 in this video, then you see what i mean about that black paintbrush animation. I just don't know what to name it:

 
I've done more testing now, and it is right. The destroyer ship destroys units with 1 hit point in 1 hit, units with 2 hit points in 2 hits and so on. The same as ironclad. So that number listing ironclad as having only 1 firepower is wrong.
 
Ironclads and destroyer are listed to have 1 as firepower. But they destroy any unit with 1 in hitpoints. This should entail them having 2 in firepower, shouldn't it? Have not tested this widely with all units, just these two units i've observed this with.
I forgot to write, they destroy the unit with 1 in hit points, in 1 battle turn. I.e. not 2 as they should.
I've done more testing now, and it is right. The destroyer ship destroys units with 1 hit point in 1 hit, units with 2 hit points in 2 hits and so on. The same as ironclad. So that number listing ironclad as having only 1 firepower is wrong.
You are wrong. You shouldn't rely on animation because the black "splash" is not animated on every dice roll (combat round). I did some debugging and it seems that splash is displayed when integer division HP / X changes (EDIT: integer division HP Lost / X changes). Where X = 5 if both attacker and defender max HP are less than 30 (3 in RULES.TXT), and X = 10 otherwise.
So for Ironclad and Destroyer X = 10. And for any destroyed unit with 10HP (1 in RULES.TXT) splash will be displayed only once.
If you change X to 1 then splash is displayed every HP loss. It looks like that then.
Destroyer:
7.gif

Ironclad:
8.gif

In both cases Caravel with 10HP (1 in RULES.TXT) is destroyed in 10 splashes.
If you want to see for yourself, and you have Civ2 MGE 5.4.0f CIV2.EXE size 2489344 bytes, then change
from 01 to 03 at offset 0x00181ADE
from 00 to 03 at offset 0x00181AED
Before:
1683983109521.png

After:
1683983140320.png

Remember to backup your CIV2.EXE and revert it after experimenting.
 
Last edited:
You are wrong. You shouldn't rely on animation because the black "splash" is not animated on every dice roll (combat round). I did some debugging and it seems that splash is displayed when integer division HP / X changes. Where X = 5 if both attacker and defender max HP are less than 30 (3 in RULES.TXT), and X = 10 otherwise.
So for Ironclad and Destroyer X = 10. And for any destroyed unit with 10HP (1 in RULES.TXT) splash will be displayed only once.
If you change X to 1 then splash is displayed every HP loss. It looks like that then.
Destroyer:
View attachment 661997
Ironclad:
View attachment 661998
In both cases Caravel with 10HP (1 in RULES.TXT) is destroyed in 10 splashes.
If you want to see for yourself, and you have Civ2 MGE 5.4.0f CIV2.EXE size 2489344 bytes, then change
from 01 to 03 at offset 0x00181ADE
from 00 to 03 at offset 0x00181AED
Before:
View attachment 662000
After:
View attachment 662001
Remember to backup your CIV2.EXE and revert it after experimenting.
Okay, thank you for providing all that. But i still don't understand. I don't think i am wrong. It seems to me you proved my point instead of anything else.

Also, using both destroyer and ironclad is futile because both have 2 in firepower. You should have changed the firepower ratings, have one with 1 fp and one with 2 fp.

If the splash animation is not displayed every battle turn, dice roll or whatever we want to call it - what is it then that makes it display? It seems to me it is simply displayed every turn, but what makes it display on which unit, is which unit loses the most hit points. You see sometimes the destroyer and ironclad loses a round.

Or let's put it this way: How many frames does the game run at, and how many frames does it take for a battle to finish - based on the units' hit points? If the units' hit point bars were reduced at a flowing rate, and not at a choppy rate, it would be easier to see. But i don't think the game runs at any frame rate, during battles.

If you could, you can do this:
1) Ironclad (2 fp) vs warrior (1 hp). Will die in 1 hit.
2) Ironclad (2 fp) vs musketeer with 1 defense (2 hp). Will die in 2 hits.
3) Ironclad (2 fp) vs mechanized infantry with 1 defense. (3 hp). Will die in 3 hits.

Preferably heighten the ironclad's attack rating from 4 to 20 or something.

If the ironclad is set to have 1 in firepower, it will be different. The warrior will then die in 2 hits, the musketeer in 4 hits, the mechanized infantry in 6 hits.

You can also continue the experiment with different units with 1, 2 or 3 firepower, and 1, 2 or 3 defense - all with heightened attack and lowered defense. You will then understand what i mean. Simply setting them to 10 hit points and 1 firepower won't teach you anything.
 
I think i also found out that mechanized infantry also have 2 in firepower, even though it is listed as 1. That's weird for so many units to have faulty numbers.
 
Also, using both destroyer and ironclad is futile because both have 2 in firepower. You should have changed the firepower ratings, have one with 1 fp and one with 2 fp.

If the splash animation is not displayed every battle turn, dice roll or whatever we want to call it - what is it then that makes it display? It seems to me it is simply displayed every turn, but what makes it display on which unit, is which unit loses the most hit points. You see sometimes the destroyer and ironclad loses a round.
In the standard rules.txt file, ironclads and destroyers both have 1 firepower, not 2.

Here, @FoxAhead isn't changing the rules, he's changing the game executable. The units all still have their standard statistics.

Based on what FoxAhead said, the game displays an explosion "when integer division HP / X changes", where X is 5 if both units have max HP less than 30, and 10 if either one has 30 or more HP. I suspect that FoxAhead meant to say that damage / X changes, otherwise going from 10HP to 9HP would cause an explosion to be displayed.

So, what does "when integer division damage / X changes" mean? Integer division means make the division, then drop the fraction part. So, 3/5 = 0, 6/5 = 1, 10/5 = 2, for example.

So, let us say that a musketeer is fighting a warrior. Both have less than 30 HP, so X = 5. At first, warriorDamage/X=0/5=0. The warrior starts to take damage. Once the warrior takes 5 damage, warriorDamage/X=5/5=1, so the integer division has changed, and the warrior is "hit" with an explosion. After reaching 10 damage, we have warriorDamage/X=10/5=2, the result of division changes, and the warrior takes another hit, and dies because damage equals hitpoints.

Now, let us consider ironclad fighting warrior. At first, warriorDamage/X=0/10=0. The warrior starts to take damage. This time, once the warrior takes 5 damage, warriorDamage/X=5/10=0, so integer division result hasn't changed, and the warrior is not "hit" yet. After reaching 10 damage, we have warriorDamage/10=10/10=1, so the result of the division finally changes, the warrior is consequently "hit" with an explosion, and immediately dies since it has taken 10 damage.

FoxAhead's example changed X to 1, so we could know for sure that this is what was happening, since we could see every hit inflict damage.

I think i also found out that mechanized infantry also have 2 in firepower, even though it is listed as 1. That's weird for so many units to have faulty numbers.
Both the game and the MGE Civilopedia read the numbers from the rules.txt file (well, I'm pretty sure the MGE Civilopedia reads them from the game, not independently from the rules). This means that these numbers can't be "mistakes" or "faulty." All that can be happening is that the game is doing something different because they have different HP. FoxAhead explained what this is.

If you think that there is something more going on, try having 20 legions attack 20 warriors, and record the damage the legions took (use cheat mode to change the HP, that will tell you the current damage). Then, do the same thing with ironclads attacking warriors. The ironclads health bars will barely move, but I expect the actual damage inflicted to be similar to the rates taken by the legions.
 
I suspect that FoxAhead meant to say that damage
Yes, there is a slight error here. The game stores information about the lost HP (or call it damage received), not the current HP. So the explosion animation appears when the value of lost HP crosses another threshold of X points. This explains why the attacking unit in my example (in the unmodified EXE) will not show explosion even if it exits battle with little damage - because its total damage has not reached a certain threshold. But this is all just clarification, and does not affect the fact that the animation is not displayed every combat round, and should not be used to judge the unit's firepower and other values.
In addition, I think @Taurean just misses some key rules of the combat system of the game. For example, that the in-game value of HP is equal to the value in RULES.TXT multiplied by 10. And also that the A and D values simply determine the odds of winning/losing a round. And also that FP is the damage that the winner of the round inflicts on his opponent.
There is a good Combat Guide that describes it all in detail.
 
Top Bottom