Slightly modifying the Babylon Bowman

Onionsoilder

Reaver
Joined
Mar 19, 2007
Messages
3,173
Alright, so I'm playing a mod that uses Minor Tribes(essentially the equivalent of Always War until you discover Writing). Now really a bad thing in and of itself. However, on Monarch and above, the A.I. starts with Archers. Now, Babylon is my neighbor.

...

I'll just let you think about that for a moment.

Now only does Hammy have Archers, while I only have Warriors, his Archers get +50% against melee units. Meaning it's essentially 4.5 :strength:(with a first strike, mind you) against my 3 :strength: warrior after all of the combat modifiers. There was nothing I could do, or have done differently. I lost the game.

Basically, I want to make sure that doesn't happen next game. I want to change the Bowman's +50% against Melee units to a +50% defense against Melee units. Now, I pulled up the Unit Infos XML and I'm looking at the bowman section right now, and it says:

<UnitCombatMods>
<UnitCombatMod>
<UnitCombatType>UNITCOMBAT_MELEE</UnitCombatType>
<iUnitCombatMod>50</iUnitCombatMod>
</UnitCombatMod>
</UnitCombatMods>

Now, I'm guessing this is the part that gives it +50% against melee. What I want to know, is how to change this to defense. Is it just

<UnitCombatType>UNITDEFENSE_MELEE</UnitCombatType>

or something else?
 
There should be an option called unitclassdefense or something like that. Look at hoplite or machine gun for exact name.

UnitCombat is just what bonus the unit gets against that unitclass.
 
Alright, I'll look for that.

EDIT: It didnt work, I changed it to:

<UnitClassDefenseMods>
<UnitClassDefenseMod>
<UnitClassType>UNITCLASS_MELEE</UnitClassType>
<iUnitClassMod>50</iUnitClassMod>
</UnitClassDefenseMod>
</UnitClassDefenseMods>

But it doesn't add a melee defense. The combat bonus is gone, at least...

EDIT2: I changed it to


<UnitClassDefenseMods>
<UnitClassDefenseMod>
<UnitClassType>UNITCOMBAT_MELEE</UnitClassType>
<iUnitClassMod>50</iUnitClassMod>
</UnitClassDefenseMod>
</UnitClassDefenseMods>

And now it gets a 50% defense bonus... against Wolfs.
 
It got to be:
<UnitClassDefenseMods>
<UnitClassDefenseMod>
<UnitClassType>UNITCOMBAT_MELEE</UnitClassType>
<iUnitClassMod>50</iUnitClassMod>
</UnitClassDefenseMod>
</UnitClassDefenseMods>
 
Yeah, I tried that, now it just gives a bonus against wolves...

I might just give it something like +75% City Defense and forget about the melee thing completely.
 
Uh... I see... While the general bonus is to "<UnitCombatMods>" the attack/defence bonus goes to "<UnitClassDefenseMods>"... Nuts.
So you would need to give it separate bonus vs. each melee unit class...
 
Yeah... and on top of being a pain, it would look weird having

+50% versus Warrior
+50% versus Axeman
+50% versus Spearman
+50% versus Maceman
+50% versus Pikeman
+50% versus Swordsman

I settled for +60% Defense versus Swordsman.
 
I actually just got a better idea. Instead of making it a defense against Melee units, I made it so Bowmen start with Shock(But lack the +50% versus Melee units). This makes it so Bowmen aren't strong enough to demolish any warriors guarding a city, but carries their bonus onto later units, so the bonus is still powerful and not UP.
 
Back
Top Bottom