Page 1 of 1
Creation Event for Biter nest and worms
Posted: Thu Nov 03, 2016 6:41 am
by Veden
Would it be possible to expose an event for when biter nest and worms are created?
Something similar to on_built_entity
It would be much more efficient than scanning the map using calls to find entities.
Re: Creation Event for Biter nest and worms
Posted: Thu Nov 03, 2016 7:50 am
by Rseding91
That's just map generation. Listen to the chunk generated event.
Re: Creation Event for Biter nest and worms
Posted: Thu Nov 03, 2016 4:48 pm
by Veden
That works great for the initial scan.
The problem is when the AI creates bases during the course of a game after the chunks have been generated.
In order to keep the mod state current with the map, I'm forced to do a slow scan because I can't tell when or where new bases are created outside freshly generated chunks.
The other option is to turn off the ai_controllable for the enemy force and run all custom logic for building bases in order to track when and where they are created outside freshly generated chunks.
Re: Creation Event for Biter nest and worms
Posted: Thu Nov 03, 2016 5:47 pm
by orzelek
I had an interface request at some point to generate event when enemies are going to build a base to allow mods to potentially replace that base with custom one. I think it got lost in the mists of request forum.
For you it would be neough to get info that base has been built - it would also work to potentially replace that base with custom one for other mods.
Re: Creation Event for Biter nest and worms
Posted: Mon Nov 07, 2016 2:02 pm
by Rseding91
Added for 0.15.