Page 1 of 1

Need help with LUA coding - detecting famines

Posted: Fri Nov 20, 2015 5:39 pm
by ahfretheim
Hey there,

Thanks for reading this message. I was just about to start coding LUA script for the first time in order to add an additional effect of a new form of government I made that isn't supported by the effects triggers (another way a Civil War can occur) and can't seem to find any information about how LUA would detect population loss due to famine. I did see information about effects triggered by an entire city being lost, but not about a single citizen being lost.

Re: Need help with LUA coding - detecting famines

Posted: Sat Nov 21, 2015 9:29 am
by cazfi
At the moment lua scripting interface does not provide complete access to game data, but things have been added in priority order. Since you have a real need for this feature, please open a wishlist (Severity: Wish) ticket about it:
http://gna.org/bugs/?func=additem&group=freeciv

This one is probably easy enough that we can still add it to freeciv-2.6 before the lua API freeze.

Re: Need help with LUA coding - detecting famines

Posted: Sun Nov 22, 2015 5:06 am
by ahfretheim
cazfi wrote:At the moment lua scripting interface does not provide complete access to game data, but things have been added in priority order. Since you have a real need for this feature, please open a wishlist (Severity: Wish) ticket about it:
http://gna.org/bugs/?func=additem&group=freeciv

This one is probably easy enough that we can still add it to freeciv-2.6 before the lua API freeze.
Thanks crazfi! I'll be sure to do that.