Jump to content

Custom INI files for Mods


MofoMojo

Recommended Posts

Bethesda mentioned that mods would be able to support having their own INI files, and the Creation Kit site even mentions the possibility here.

 

Mod Defined

Mods can define INI files to override settings from Skyrim.ini. Mod defined INI files should have the same name as the plugin file and are only applied if the plugin is loaded by the game.

 

And then the following page hints at adding your own fRandomSetting to a custom [CoolSettings] section in an .ini file via papyrus.

 

; Set the "fRandomSetting" in the "[CoolSettings]" section to 10

Utility.SetINIFloat("fRandomSetting:CoolSettings", 10.0)

 

But I see no mention of how you might USE those values. So what good is being able to set custom ini settings in custom sections if there's no way to read those values out in papyrus scripts?

 

Am I missing something?

 

-MM

 

Edit: Sorry for the misleading title, that was supposed to be posed as a question, instead it looks like it's instructive. Apologies!

Edited by MofoMojo
Link to comment
Share on other sites

Bethesda mentioned that mods would be able to support having their own INI files, and the Creation Kit site even mentions the possibility here.

 

Mod Defined

Mods can define INI files to override settings from Skyrim.ini. Mod defined INI files should have the same name as the plugin file and are only applied if the plugin is loaded by the game.

 

And then the following page hints at adding your own fRandomSetting to a custom [CoolSettings] section in an .ini file via papyrus.

 

; Set the "fRandomSetting" in the "[CoolSettings]" section to 10

Utility.SetINIFloat("fRandomSetting:CoolSettings", 10.0)

 

But I see no mention of how you might USE those values. So what good is being able to set custom ini settings in custom sections if there's no way to read those values out in papyrus scripts?

 

Am I missing something?

 

-MM

 

Edit: Sorry for the misleading title, that was supposed to be posed as a question, instead it looks like it's instructive. Apologies!

 

Any one have thoughts on this? Still struggling to find the value in allowing mods and papyrus to WRITE their own ini settings but seemingly no way to access them from within papyrus.

 

-MM

Link to comment
Share on other sites

Bethesda mentioned that mods would be able to support having their own INI files, and the Creation Kit site even mentions the possibility here.

 

Mod Defined

Mods can define INI files to override settings from Skyrim.ini. Mod defined INI files should have the same name as the plugin file and are only applied if the plugin is loaded by the game.

 

And then the following page hints at adding your own fRandomSetting to a custom [CoolSettings] section in an .ini file via papyrus.

 

; Set the "fRandomSetting" in the "[CoolSettings]" section to 10

Utility.SetINIFloat("fRandomSetting:CoolSettings", 10.0)

 

But I see no mention of how you might USE those values. So what good is being able to set custom ini settings in custom sections if there's no way to read those values out in papyrus scripts?

 

Am I missing something?

 

-MM

 

Edit: Sorry for the misleading title, that was supposed to be posed as a question, instead it looks like it's instructive. Apologies!

 

Any one have thoughts on this? Still struggling to find the value in allowing mods and papyrus to WRITE their own ini settings but seemingly no way to access them from within papyrus.

 

-MM

 

I really don't know why you would need this beside messing with people settings for trolls. >♣<

 

IMHO That Ini wiki page is probably wrong. I've already tried the custom.ini stuff and that didn't work.

Link to comment
Share on other sites

I really don't know why you would need this beside messing with people settings for trolls. >♣<

 

IMHO That Ini wiki page is probably wrong. I've already tried the custom.ini stuff and that didn't work.

 

Player tweakable mods perhaps? In the mod I'm working on I have a number of GlobalVariables that people can adjust with SkyEdit or the CK to change the way and timing of certain advances, etc,. But if we can READ values from an .ini file via papyrus then anyone that has access to NOTEPAD could easily change the behavior of my mod. I literally feel as if I'm missing something obvious because WHY have papyrus be able to WRITE custom .ini settings without being able to retrieve them? It makes no sense.

 

-MM

Link to comment
Share on other sites

If your esp's name it is xyz.esp then just name your ini xyz.ini and they should(SHOULD) be automatically set.

 

What should be set? I understand the naming convention requirement of the .ini file but how do I READ the values from the .ini file in a papyrus script? For instance, if I can call SetINIFloat to set a value IN an .ini value via papyrus, how do I READ that value out when the game starts back up?

 

-MM

Link to comment
Share on other sites

http://www.creationkit.com/INI_files

 

Says they are only meant to override Skyrim ini configs. They aren't meant to be used as scripting configs, only game preference overrides.

 

Kind of goes against the ideas/sample presented in the following pages:

http://www.creationkit.com/SetINIFloat_-_Utility

http://www.creationkit.com/SetINIBool_-_Utility

http://www.creationkit.com/SetINIString_-_Utility

 

But I'm beginning to think that's all it does....which honestly...is kind of ... ridiculous. I can't imagine ANYONE wants their very very finely tuned .ini files overridden by a mod...in fact, I finally just got around to testing SetINIFloat and you know what? It didn't even save out a value in my mod's .ini file or any other .ini file for that matter. Dratz.... this would have been such a cool feature.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...