[en] - Modding Corner > Coding

Changing the damage on towers

(1/3) > >>

Titan:
Hey, I am fairly new to coding and I wanted to tweek/change the damage dealt by the 'AmonSulTower' and 'AmonSulTower2' buildings for my new map as I find their damage per shot to be too high.

Some detailed help on where to find it and how to implement it would be very much appreciated!  :)

Prinz von Dol Amroth:
Open your object.ini and search its WeaponSet.
Open the data\ini\weapon.ini and search the Weapon (AmonSulArrowTowerBow).
If the Weapon has a ProjectileNugget, search its WarheadTemplateName.
The damage value is normally in a DamageNugget block.

--- Code: --- DamageNugget                       
Damage        = KEEP_BOW_UPGRADED_DAMAGE
Radius        = 0.0 // HitStoredTarget means we hurt the person we launched at.  And nobody else.  So a miss hurts nobody.
DelayTime     = 0
DamageType    = FLAME
DamageFXType  = FLAME
DeathType     = BURNED
End
DamageNugget                        // A basic Nugget that just does damage
Damage        = KEEP_BOW_DAMAGE
;DamageScalar  = 0% NONE +EntMoot +ElvenEntMoot
Radius        = 0.0 // HitStoredTarget means we hurt the person we launched at.  And nobody else.  So a miss hurts nobody.
DelayTime     = 0
DamageType    = STRUCTURAL // Moving all structure-based weapons over to Structural Damage for balance reasons - GB
DamageFXType  = GOOD_ARROW_PIERCE
DeathType     = NORMAL
End
--- Ende Code ---
We have two DamageNugget blocks, so we have two Damage Values (A normal DamageType and a FLAME DamageType.)
You can write your desired Damage behind "Damage =" or you can change the Value of the MACRO_NAME, a variable, KEEP_BOW_UPGRADED_DAMAGE in the data\ini\gamedata.ini

--- Code: ---#define KEEP_BOW_UPGRADED_DAMAGE 20
--- Ende Code ---

Edit:
If you only want to modify your map, with a map.ini, then you have to do following:
You can't modify Weapons with Projectiles in map.ini. So you add a Modifier to you Object, which decreases its damage.

--- Code: ---ModifierList MyDamageBonus
Modifier = DAMAGE_MULT X% //100% change nothing. 0% is no Damage. 200% is double Damage
Duration = 0 //Always
End
Object XY
AddModule
Behavior = AttributeModifierUpgrade ModuleTag_PvDAiscool
TriggeredBy = Upgrade_Upgrade_AllFactionUpgrade //Always
AttributeModifier = MyDamageBonus
End
End
End
--- Ende Code ---

Titan:
Thank you for your help!  xD

Can I create a map.ini file with just, the code you sent me in the edited version? Or do I need to include more?

Prinz von Dol Amroth:
You only need my second Code. But you have to replace XY in "Object XY" to your Objectname and X in "X%"to an integer value. If you want to change both Objects, you have to add a second "Object XY ... End".

Titan:
Hmm, when I tried replacing XY with 'AmonSulTower' or 'AmonSulTower2' which is the names of the objects in the world builder, I got a fatal error message when launching the game, stating that there was something wrong with the map.ini file.

So which object am I going to refer to? The 'AmonSulArrowTowerBow'?

Navigation

[0] Themen-Index

[#] Nächste Seite

Zur normalen Ansicht wechseln