[MODCOMP] Building Heal Rate

TheLopez

Deity
Joined
Jan 16, 2006
Messages
2,525
Location
Oregon
Building Heal Rate
By: TheLopez

Last Updated 08/20/10

Version: 0.3BtS
Patch Compatibility: Beyond the Sword v3.19
MP Compatible: ?
Download Mod v0.3BtS

Version: 0.2w
Patch Compatibility: Warlords v2.0.8.0
MP Compatible: ?
Download Mod v0.2w

Version: 0.1
Patch Compatibility: v1.61
MP Compatible: ?
Download Mod v0.1

Description:
This mod adds three new tags allowing buildings to heal units from a specific
domain, unit combat or unit class. By doing this buildings that provide healing
can target their healing powers instead of just being able to heal any unit.
For instance drydocks can now heal any ship while a specialized building like
tank factory could heal just armor units.

For instance the updated part of the drydock definition using the new tags
looks like:
Spoiler :

[PRE]
<DomainHealRateChanges>
<DomainHealRateChange>
<DomainType>DOMAIN_SEA</DomainType>
<iHealRateChange>10</iHealRateChange>
</DomainHealRateChange>
</DomainHealRateChanges>
<UnitClassHealRateChanges>
<UnitClassHealRateChange>
<UnitClassType>UNITCLASS_BATTLESHIP</UnitClassType>
<iHealRateChange>10</iHealRateChange>
</UnitClassHealRateChange>
</UnitClassHealRateChanges>
<UnitCombatHealRateChanges>
<UnitCombatHealRateChange>
<UnitCombatType>UNITCOMBAT_NAVAL</UnitCombatType>
<iHealRateChange>10</iHealRateChange>
</UnitCombatHealRateChange>
</UnitCombatHealRateChanges>
[/PRE]


-----Notes to Modmakers-----

If you want to use this mod component in your mod I have tried to make things
as easy as possible for you. In the XML files I have added
<!-- Building Heal Rate Start --> and
<!-- Building Heal Rate End --> in all of the places where changes
were made. In the SDK files I have added
// < Building Heal Rate Start > and
// < Building Heal Rate End > in all of the places where changes
were made.

-----Version Information-----

-----v0.3BtS------

- Updated to be compatible with Beyond the Sword v3.19 patch.

-----v0.2w------

- Updated to be compatible with Warlords v2.0.8.0 patch.

-----v0.1------

- Setup the Building Heal Rate infrastructure

- Added the new <DomainHealRateChanges> tag that allows the specification that
a building can heal units from a specific domain.

- Added the new <UnitClassHealRateChanges> tag that allows the specification
that a building can heal specific unit classes.

- Added the new <UnitCombatHealRateChanges> tag that allows the specification
that a building can heal units with a specific unit combat.

- As an example of how to use the new tags drydocks has been updated in the
CIV4BuildingInfos.xml file to provide a 10% healing bonus to sea units, 10%
healing bonus to naval units and 10% healing bonus to battleships.


-----===Credits & Thanks===-----

- Exavier - Composite Mod - readme.txt format

- Dom Pedro II -For the idea for this mod
 
Nice idea, I can see how this would greatly improve the strategic value of certain buildings. The following changes would be good in a mod

Hospitoal: Heals Domain Land
DryDock: Heals Domain Sea
AirForceBase (I belive you already moded an exp for Air building called AirForceBase): Heals Domain Air

Heal rate in an Owned city is base 25% with potential of 10-15% more if a units got Medic Promotes so I think 20% is rather reasonable.
 
And if you couple this with the upgradeable buildings mod then you can spread the effects across multiple buildings:
Dry Dock I: Heals domain sea - 5%
Dry Dock II: Heals domain sea - 5%
Dry Dock II: Heals domain sea - 10%

As for the Airforce Base, yes, I did add one in the Military Bases Mod... when I did people questioned my sanity since air units couldn't gain XP or promotions until my Air Forces Mod :D
 
Right now, my big debate in my mind is whether I want to split things even further and simply have Hospitals heal infantry units like Melee, Archers and Gunpowder units

And then Armor and Gunships could be healed more with some kind of mechanical building, and Mounted units could get a boost from Stables.

The problem that I foresee with that is that there will be a long period where Mounted units would have a distinct advantage over Infantry... unless, of course, you provided say a Barracks with a heal bonus as well for infantry.

In both cases, it would be best to make the heal bonus rather small... and another question: Would the heal bonuses of the buildings stack or would the game just accept the highest number?
 
Dom Pedro II said:
Right now, my big debate in my mind is whether I want to split things even further and simply have Hospitals heal infantry units like Melee, Archers and Gunpowder units

And then Armor and Gunships could be healed more with some kind of mechanical building, and Mounted units could get a boost from Stables.

The problem that I foresee with that is that there will be a long period where Mounted units would have a distinct advantage over Infantry... unless, of course, you provided say a Barracks with a heal bonus as well for infantry.

In both cases, it would be best to make the heal bonus rather small... and another question: Would the heal bonuses of the buildings stack or would the game just accept the highest number?

The healing bonuses would stack like it does today...
 
One must be careful then not to go overboard... hmm...

I also think that perhaps Forges should give a healing bonus to siege weaponry as well.

But I probably would not want to give more than 10% to the Barracks, Stable and Forge, and I'd probably go with something more like 5%... so it's a nice little bonus, but it's not the difference between victory and defeat.
 
Gerikes said:
Might want to watch your copy and paste :P


I don't know what you are talking about :mischief:
 
Perhaps the base heal rate for a City should be reduced to say 20% with the various buildings giving a 20% Bonus that stacks for up to 40%. In SMAC a Barracks/Naval Yard/AirBase had a very strong heal rate and it was quite usefull and important to ones strategy (ofcorse that game also had real bombardment to offset it)
 
Updated Warlords version to be compatible with the v2.0.8.0 patch.
 
Updated to with BtS v3.19 compatible version
 
Updated. Here's a screenie:
Spoiler :
buildinghealratecivilop.jpg
I noticed only 1 file (CvCity.cpp) was changed :)
 
@TL:

When I try to compile a debug DLL I get an error message in CvCity.cpp:

Code:
FAssert(m_piDomainHealRate(eIndex) >= 0);
Error:
Code:
CvCity.cpp(11144) : error C2064: term does not evaluate to a function taking 1 arguments

This seems to solve the error:
Code:
FAssert(m_piDomainHealRate[eIndex] >= 0);

What's correct :confused:
 
The second one... is that part of my code???

Which file is that in and on what line number?
 
It's in CvCity.cpp.

Line 9785: "FAssert(m_piDomainHealRate(eIndex) >= 0);"

Same errors for:

Line 9800: "FAssert(m_piUnitClassHealRate(eIndex) >= 0);"

and

Line 9815: "FAssert(m_piUnitCombatHealRate(eIndex) >= 0);"

Hope this helps.
 
It's in CvCity.cpp.

Line 9785: "FAssert(m_piDomainHealRate(eIndex) >= 0);"

Same errors for:

Line 9800: "FAssert(m_piUnitClassHealRate(eIndex) >= 0);"

and

Line 9815: "FAssert(m_piUnitCombatHealRate(eIndex) >= 0);"

Hope this helps.

Thanks... FYI if you compile in release mode you won't get compile errors....

updating the zip...
 
Back
Top Bottom