Load INI-based vanilla-compliant configs from scripts efficiently #478
phobos2077
started this conversation in
Ideas
Replies: 2 comments
-
Possible future extensions:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Alternative approach: Instead of opcode, single metarule:
PROs:
CONs:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
My mods use a lot of ini settings to work. I use get_ini_setting/string opcodes present from the old sfall days. These have a few issues:
I'd like to separate mod configs from "player preferences", configs should be inside dat file/folder like all other files. For example, crafting schematics could be configured via INI/TXT file. Right now it doesn't seem to be possible to keep this file in the dat.
Proposed opcodes:
0x8285 - int config_load(string filePath, int isDb)
0x8286 - any config_get(int configId, string/int section, string/int key, int type)
Reasoning:
sfall_funcX
becauseconfig_get
might get called potentially hundreds of times. Not sure if it's a valid concern though...add_extra_msg_file
is a good example of this.Under the hood, configs will be parsed using the new INI parser:
Beta Was this translation helpful? Give feedback.
All reactions