I'm working on a mod primarily for a friend of mine and myself. We want to have the ocassional "Godzilla Level" biter or spitter popup when a certain amount of enemies have been killed or a certain play time occurs in the game.
Problem is that I do not understand the unit spawner function. Also, when attempting to call "game.[literally anything]" inside that function it throws an error.
Any help in progressing my understanding on this one would be well appreciated.
Help understanding the "result_units" key of the spawner
Re: Help understanding the "result_units" key of the spawner
Bump. Any help?
If this doesn't work, then would it be possible to simply spawn the enemies somewhere? how would I go about placing the entity?
If this doesn't work, then would it be possible to simply spawn the enemies somewhere? how would I go about placing the entity?
Re: Help understanding the "result_units" key of the spawner
It sounds like you don't understand how the basics of Factorio modding work at this point
This may help explain the different pieces of modding: http://lua-api.factorio.com/latest/Data-Lifecycle.html
Specifically you're trying to reference "game" in the prototypes stage of loading and there is no game at that point to reference.
This may help explain the different pieces of modding: http://lua-api.factorio.com/latest/Data-Lifecycle.html
Specifically you're trying to reference "game" in the prototypes stage of loading and there is no game at that point to reference.
If you want to get ahold of me I'm almost always on Discord.
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Help understanding the "result_units" key of the spawner
Download Bob's Enemies mod.
Take a look at my code, specifically for Spawners, and Leviathan biter/spitter.
This is likely the sort of thing you're after. They'll only appear with end game evolution factors (0.99+)
Take a look at my code, specifically for Spawners, and Leviathan biter/spitter.
This is likely the sort of thing you're after. They'll only appear with end game evolution factors (0.99+)