Well, here is a Vincentz Rangestrike1.0
Range 1: Cannon and Destroyer
Range 2: Artillery and Battleship
Range 3: Mobile Artillery and Missile Cruiser
All set to be able to do 100% airdamage but that can of course be changed.
Including the 3 SDK changed files commented as //Vincentz Rangestrike (though I couldnt have done it without you guys
)
edit : oh, forgot, I also set the Machinegunner to range 1. Could also be interesting for subs, helicopters, you name it
+
Edit :
Just a little info on how to :
firstly I added a
// && (getDomainType() != DOMAIN_SEA)) This can be unchecked or changed if some condition should be normal attack instead of ranged (in this case its of course if unit is oceangoing)
To make a unit rangestriked it needs 3 changes in the CIV4UnitInfos.xml.
<iAirRange> is the distance it can shoot
<iAirCombat> is the strength of the attack (I randomized it so it goes 0-100% of the amount)
<iAirCombatLimit> is the max % of damage it can do to a unit
besides that, which are tags already in the XML, there is another value in GlobalDefines to adjust the strength for all Rangestrikers: <DefineName>RANGE_COMBAT_DAMAGE</DefineName>
EDIT : in cvUnit.cpp there is a slight mistake when making the vanilla SDK files
it should be
PHP:
if (!canMove() && getMoves() > 0)
{
return false;
}
// Vincentz Rangestrike start
if (isCargo())
{
return false;
}
// Vincentz Rangestrike end
return true;
}
not gonna upload the right one right now, as I have sick wife and baby needs some loving