Any way to change aircraft range via LUA?

ww2commander

Emperor
Joined
Aug 23, 2003
Messages
1,243
Location
Australia
Is there any way via LUA to change the range of an aircraft by a certain amount (either movement points or percentage)?

I looked through the modding wiki but everything under UNIT object dealing with aircraft range seems to be a boolean or return a range value. I do not want to modify attack/def modifiers, but rather movement.
 
You want to reduce it I suppose ?

I don't know if the "RangeChange" tag from promotions will allow negative value, but it's worth a try...

And if you want to raise range, I know it does works.
 
I considered doing it via promotion similar to the 'MovesChange' promotion discussion I posted a few days back, but the range across all the aircraft I am using varies greatly. I tried to apply ranges to aircraft based roughly on actual operational ranges....thus the varying ranges.

My preference would have been to apply an across the board 50% reduction, but if this can not be done then I might have to apply a different promotion that reduces ranged attack modifier by 50% (I confirmed this value uses a percentage).

Gedemon, if you were to penalize aircraft during winter weather, would you restrict their range (poor flying conditions) or range attack strength (too hard to target or hit enemy)?
 
On that subject, somewhere in my todo list there's a project involving covering some plots with clouds when selecting an aircraft to simulate meteorological conditions, but it's on hold as it will require either the DLL or taking total control of the AI aircraft.

I think I'll go for range attack strength in your case, or even both if doable.
 
Range Attack modifier is doable....but range is a mystery.

I am slowly getting the hang of LUA with the help of your code, so I am getting fancy with some of my scenario variables.
 
Back
Top Bottom