RSO and disable biter generation mid-game
-
- Fast Inserter
- Posts: 144
- Joined: Mon Mar 14, 2016 3:51 pm
- Contact:
RSO and disable biter generation mid-game
I found settings.global["rso-biter-generation"] in the source which controls whether biters are created. Can I disable this mid-game using the lua console, like changing ore settings?
Re: RSO and disable biter generation mid-game
There is a setting in Settings -> Mods -> MapDemosthenex wrote:I found settings.global["rso-biter-generation"] in the source which controls whether biters are created. Can I disable this mid-game using the lua console, like changing ore settings?
-
- Fast Inserter
- Posts: 144
- Joined: Mon Mar 14, 2016 3:51 pm
- Contact:
Re: RSO and disable biter generation mid-game
While I appreciate that, I'm asking about in Lua. I'm working on a mod which disabled biters in the late game. It works in vanilla by changing the surface mapgen settings. RSO does it separately elsewhere.steinio wrote:There is a setting in Settings -> Mods -> MapDemosthenex wrote:I found settings.global["rso-biter-generation"] in the source which controls whether biters are created. Can I disable this mid-game using the lua console, like changing ore settings?
My only other workaround would be to add a hook to chunk creation which clears the bugs, but I'd rather tell RSO to stop.
Thanks.
Re: RSO and disable biter generation mid-game
Sorry my fault.Demosthenex wrote:While I appreciate that, I'm asking about in Lua. I'm working on a mod which disabled biters in the late game. It works in vanilla by changing the surface mapgen settings. RSO does it separately elsewhere.steinio wrote:There is a setting in Settings -> Mods -> MapDemosthenex wrote:I found settings.global["rso-biter-generation"] in the source which controls whether biters are created. Can I disable this mid-game using the lua console, like changing ore settings?
My only other workaround would be to add a hook to chunk creation which clears the bugs, but I'd rather tell RSO to stop.
Thanks.
What happen if you use
Code: Select all
settings.global["rso-biter-generation"] = false
-
- Fast Inserter
- Posts: 144
- Joined: Mon Mar 14, 2016 3:51 pm
- Contact:
Re: RSO and disable biter generation mid-game
I believe I tried that on the console and it had no effect. I think that may be read only. I can check my scrollback logs later on my test box.steinio wrote:Code: Select all
settings.global["rso-biter-generation"] = false
Re: RSO and disable biter generation mid-game
AFAIK settings are global and any mod can edit any other setting. It is possible that console might not have the same access as a mod.Demosthenex wrote:I believe I tried that on the console and it had no effect. I think that may be read only. I can check my scrollback logs later on my test box.steinio wrote:Code: Select all
settings.global["rso-biter-generation"] = false
Another thing is that you might need to look far to check if it worked since game seems to generate chunks in the dark areas - with a lot of pollution it can go pretty far.
Also your code has one small issue. It should be:
Code: Select all
settings.global["rso-biter-generation"].value = false
-
- Fast Inserter
- Posts: 144
- Joined: Mon Mar 14, 2016 3:51 pm
- Contact:
Re: RSO and disable biter generation mid-game
So I tried that, both in my mod and on the console. Then I revealed the map around my char in a new game out to 1km. They kept spawning. I'm on RSO 3.5.14.orzelek wrote:Code: Select all
settings.global["rso-biter-generation"].value = false
Any other suggestions?
I know the Biter's Begone mod compensates for this by having an on_chunk_created event hook that kills all the enemies in a new chunk when it is created. I can revert to that if RSO can't be changed dynamically mid-game.
-
- Fast Inserter
- Posts: 144
- Joined: Mon Mar 14, 2016 3:51 pm
- Contact:
Re: RSO and disable biter generation mid-game
To reply to myself, settings says in the API documentation that it is read only.
http://lua-api.factorio.com/latest/LuaSettings.html
Any other ideas? I think I'll have to do a hook on chunk creation.
http://lua-api.factorio.com/latest/LuaSettings.html
Any other ideas? I think I'll have to do a hook on chunk creation.
Re: RSO and disable biter generation mid-game
Only other way I see is to add remote interface to RSO to allow enemy spawning override separately.
Using chunk generation event will not give you the full effect. RSO can spawn entities outside of currently generated chunk.
Using chunk generation event will not give you the full effect. RSO can spawn entities outside of currently generated chunk.
-
- Fast Inserter
- Posts: 144
- Joined: Mon Mar 14, 2016 3:51 pm
- Contact:
Re: RSO and disable biter generation mid-game
So I've set it up at the moment to purge all active enemies, set the vanilla mapgen to disable spawning, and then have an on generation hook where I clear the new chunk and adjacent chunks. Seems to work fine.orzelek wrote:Only other way I see is to add remote interface to RSO to allow enemy spawning override separately.
Using chunk generation event will not give you the full effect. RSO can spawn entities outside of currently generated chunk.
Re: RSO and disable biter generation mid-game
Actually if you enable option for RSO to use vanilla generation and then disable that generation it should work without chunk clearing.Demosthenex wrote:So I've set it up at the moment to purge all active enemies, set the vanilla mapgen to disable spawning, and then have an on generation hook where I clear the new chunk and adjacent chunks. Seems to work fine.orzelek wrote:Only other way I see is to add remote interface to RSO to allow enemy spawning override separately.
Using chunk generation event will not give you the full effect. RSO can spawn entities outside of currently generated chunk.
Enablind vanilla generation will disable the one built into RSO. Thats something user would need to do since you can't edit the settings.
-
- Fast Inserter
- Posts: 144
- Joined: Mon Mar 14, 2016 3:51 pm
- Contact:
Re: RSO and disable biter generation mid-game
I did see that. Unfortunately that won't work. The point of this mod is to research a way to kill bugs in the late game. I don't want to use user input.orzelek wrote:Demosthenex wrote: Actually if you enable option for RSO to use vanilla generation and then disable that generation it should work without chunk clearing.
Enablind vanilla generation will disable the one built into RSO. Thats something user would need to do since you can't edit the settings.