is it possible?

Kasdar

Warlord
Joined
Jul 29, 2006
Messages
268
Location
Minnesota
I am wondering if it is possible to mod in a building that will increase the attack range of a city. I want to add a building that when built in a city will increase its attack range by 1. I couldnt figure out a way to do this with just xml so I am guessing that I would have to do it with LUA but I know absolutely nothing about LUA, if anyone can provide me with directions or write up the code I would need to do this, I would be very appreciative.
 
Well first you need to find where the city bombard data lay. If it's in the XML then yes it can be done in Lua easily. If it's in Lua then it can still be done in Lua, but it'll be a little more complicated. Finally if you just can't find it then that means it's hardcoded into the DLL and cannot be changed.
 
It's in the DLL. The only functions dealing with city attack range are the ones that tell you whether a city has attacked yet or whether it can reach a certain hex, and these are all queries instead of sets.

The global city attack range is set in GlobalDefines, and you could in theory modify this by artificially increasing that value whenever a city is selected and setting it back afterwards. But this'd be tremendously problematic, especially with the AI.
 
Back
Top Bottom