RSO and disable biter generation mid-game

Replaces resource spawning system, so that the distances between resources are much bigger. Railway is needed then.

Moderators: orzelek, Dark

Post Reply
Demosthenex
Fast Inserter
Fast Inserter
Posts: 144
Joined: Mon Mar 14, 2016 3:51 pm
Contact:

RSO and disable biter generation mid-game

Post by Demosthenex »

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?

User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2631
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: RSO and disable biter generation mid-game

Post by steinio »

Demosthenex 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?
There is a setting in Settings -> Mods -> Map
Image

Transport Belt Repair Man

View unread Posts

Demosthenex
Fast Inserter
Fast Inserter
Posts: 144
Joined: Mon Mar 14, 2016 3:51 pm
Contact:

Re: RSO and disable biter generation mid-game

Post by Demosthenex »

steinio wrote:
Demosthenex 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?
There is a setting in Settings -> Mods -> Map
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.

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.

User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2631
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: RSO and disable biter generation mid-game

Post by steinio »

Demosthenex wrote:
steinio wrote:
Demosthenex 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?
There is a setting in Settings -> Mods -> Map
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.

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.
Sorry my fault.
What happen if you use

Code: Select all

settings.global["rso-biter-generation"] = false
Image

Transport Belt Repair Man

View unread Posts

Demosthenex
Fast Inserter
Fast Inserter
Posts: 144
Joined: Mon Mar 14, 2016 3:51 pm
Contact:

Re: RSO and disable biter generation mid-game

Post by Demosthenex »

steinio wrote:

Code: Select all

settings.global["rso-biter-generation"] = false
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.

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: RSO and disable biter generation mid-game

Post by orzelek »

Demosthenex wrote:
steinio wrote:

Code: Select all

settings.global["rso-biter-generation"] = false
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.
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.
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
(And yes I made this mistake to many times when adding settings to RSO ;) )

Demosthenex
Fast Inserter
Fast Inserter
Posts: 144
Joined: Mon Mar 14, 2016 3:51 pm
Contact:

Re: RSO and disable biter generation mid-game

Post by Demosthenex »

orzelek wrote:

Code: Select all

settings.global["rso-biter-generation"].value = false
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.

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.

Demosthenex
Fast Inserter
Fast Inserter
Posts: 144
Joined: Mon Mar 14, 2016 3:51 pm
Contact:

Re: RSO and disable biter generation mid-game

Post by Demosthenex »

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.

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: RSO and disable biter generation mid-game

Post by orzelek »

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.

Demosthenex
Fast Inserter
Fast Inserter
Posts: 144
Joined: Mon Mar 14, 2016 3:51 pm
Contact:

Re: RSO and disable biter generation mid-game

Post by Demosthenex »

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.
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
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: RSO and disable biter generation mid-game

Post by orzelek »

Demosthenex wrote:
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.
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.
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.

Demosthenex
Fast Inserter
Fast Inserter
Posts: 144
Joined: Mon Mar 14, 2016 3:51 pm
Contact:

Re: RSO and disable biter generation mid-game

Post by Demosthenex »

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.
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.

Post Reply

Return to “Resource Spawner Overhaul”