Unit Promotions

MarineCorps

Explosion!
Joined
Jun 26, 2003
Messages
8,187
Location
Cape Cod
I noticed that the Naval attack promotions never did anything so I tried to add NavalRangedAttackMod/LandRangedAttackMod to the Targeting and bombardment promotions however they crashed the game upon start. How do I add new promotions in?
 
I noticed that the Naval attack promotions never did anything so I tried to add NavalRangedAttackMod/LandRangedAttackMod to the Targeting and bombardment promotions however they crashed the game upon start. How do I add new promotions in?

There's no such thing as NavalRangedAttackMod or LandRangedAttackMod, so of course it would crash. You can't just add new variable names to the schema, unless you manually go in and edit the LUA to read those new entries.

Besides, those promotions work just fine already; you'll notice that they have an entry under the UnitPromotions_Domains table, instead of an entry in the basic UnitPromotions table. It's just how some of these work.
 
There's no such thing as NavalRangedAttackMod or LandRangedAttackMod, so of course it would crash. You can't just add new variable names to the schema, unless you manually go in and edit the LUA to read those new entries.

Yeah, I was kinda hoping that they already existed and just didn't get put in. I know just enough about programming to understand you can't create a new variable out of thin air.



Besides, those promotions work just fine already; you'll notice that they have an entry under the UnitPromotions_Domains table, instead of an entry in the basic UnitPromotions table. It's just how some of these work.

But those increase a naval units combat strength but naval units use ranged combat strength. Unless I've missed something, as I've never noticed the variable in the combat screen
 
But those increase a naval units combat strength but naval units use ranged combat strength. Unless I've missed something, as I've never noticed the variable in the combat screen

The combat screen doesn't work correctly, so don't go by what it says. For instance, at some point it starts being off by a pretty substantial amount; it'll say that your unit has a strength of 200+ and will win easily, while the actual outcome of the combat will reflect the true values. So just because the screen doesn't say the promotion is increasing your power doesn't mean it isn't.

If you want to know whether those promotion values really affect ranged combat, make a mod where you set the bonuses to some huge value, and then see if it actually changes how much damage is dealt. If you set it to +5000 or something and you're not one-shotting everything in sight, then you'll know it's not working, but if you are, then it's just a UI bug.
 
Top Bottom