Is it possible to change map mod settings during an event?

Place to get help with not working mods / modding interface.
Post Reply
User avatar
ZwerOxotnik
Fast Inserter
Fast Inserter
Posts: 114
Joined: Tue Dec 19, 2017 6:58 pm
Contact:

Is it possible to change map mod settings during an event?

Post by ZwerOxotnik »

https://lua-api.factorio.com/1.1.30/events.html#on_runtime_mod_setting_changed wrote: player_index :: uint (optional): The player who changed the setting or nil if changed by script.
I don't notice a way to change a setting in events by scripts.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Is it possible to change map mod settings during an event?

Post by eradicator »

'tis a bit obscure to find because it's listed as [read-only] on the LuaSettings page.
Concepts.html#ModSetting wrote: ModSetting

Table with the following fields:

value :: uint or double or boolean or string: The value of the mod setting. The type depends on the setting.

Note: Runtime settings can be changed through console commands and by the mod that owns the settings by writing a new table to the ModSetting.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

User avatar
ZwerOxotnik
Fast Inserter
Fast Inserter
Posts: 114
Joined: Tue Dec 19, 2017 6:58 pm
Contact:

Re: Is it possible to change map mod settings during an event?

Post by ZwerOxotnik »

Oh, thank you.
I make cakes from mods. However, I don't have dough now but you can help me.

Post Reply

Return to “Modding help”