Lua combat hooks

Yakk

Cheftan
Joined
Mar 6, 2006
Messages
1,288
Anyone found the lua combat hooks?

I was thinking about writing up a "ranged unit duel" hack -- ranged units when they bombard a target that is also a ranged unit get counter-attacked.

Ideally, the goal is to give modern units a default range, and have battles at the modern era have "no mans lands" of empty hexes between them, with the riflemen "melee fighting" at range 2 with each other instead of at range 1. But first I want to play around with ranged-combat duels!
 
You will likely have to wait for the C++ code to do this.
 
But it sounds great! I always think it's weird when bowmen get shot by other bowmen... and don't simply fire back.
 
When the SDK mod tools are released, this would be fairly simple through LUA. When a specific unit combat type fires a bombard on a unit 2 tiles away and that unit also has a 2 range minimum bombard, tell it to do an auto bombard back to the original unit. This of course would not be taken into consideration by the combat turnout stats since not only is it in LUA and not the DLL, but you gotta spend more time putting such combat info into the combat stat window via DLL.
 
Top Bottom