Hi,
i'm trying to write an java-ai and i have a problem to find all units producing energy:
getResourceMake works to find advanced fusion and so...
and getUpkeep to find the solar-plants (in BA).
But wich property makes a Windmill produce Energy?
getMakesResource and getExtractsResource always returns zero...
See this table (BA 7.00):
http://pastebin.com/f3008861e
[JAVA-AI] How to get all energy producing Units?
Moderators: hoijui, Moderators
[JAVA-AI] How to get all energy producing Units?
Last edited by abma on 26 Aug 2009, 14:51, edited 1 time in total.
Re: How to get all energy producing Units?
Maybe getWindResourceGenerator (and getTidalResourceGenerator for tidals) will help you?
Re: How to get all energy producing Units?
yes, this was the function i searched thanks.
In short this does what i searched:
i was confused about the negative energy usage of a solarplant in the ba mod.
In short this does what i searched:
Code: Select all
if (UnitDef.getUpkeep(redID) *-1 +
UnitDef.getResourceMake(redID) + UnitDef.getWindResourceGenerator(redID) +
UnitDef.getTidalResourceGenerator(redID)) > 0 ) {
...
}
i was confused about the negative energy usage of a solarplant in the ba mod.
Re: [JAVA-AI] How to get all energy producing Units?
its a hack from the OTA engine that allows a solar to stop producing energy when it closes.