Jump to content

OBSE INI functions


glowplug

Recommended Posts

For the RealTime mod I want to give users a color picker in the documentation so they can copy and paste the hex string into the ini file.

 

RunBatchScript does not seem to work with string_var so I'd like to use the OBSE commands.

The trouble is that the documentation only lists the syntax for GetStringINISetting and so on.

I can easily see that in the source code but I simply can not see how it references the file.

I'm left asking...

  • where do I put the ini file
  • what is the ini file format
  • how do I open the file for reference
  • if I don't open the file for reference then what is the relative filepath for the setting arguement and how can I include the setting name in that string

...I've searched here and google but found nothing other than RunBatchScript topics.

Link to comment
Share on other sites

I've done it as a javascript hex to long int for user copy/paste as RunBatchScript compatible then parsed it out using OBSE functions.

 

Does anyone at least know of a mod that uses the OBSE xxxINISetting functions?

Link to comment
Share on other sites

This one does use SetStringGameSettingEX and RunBatchScript with sort of an ini file, but the way the variables are named is a bit strange, perhaps. Sorry about it. I am not a professional scripter. But I am learning a bit more every day. :D

 

http://www.nexusmods.com/oblivion/mods/46044/?

 

RunBatchScript with an "ini" (sort of) file works with String_var, but the variable needs to be set in the batch script like:

Set SomeQuest.sStringThing to sv_Construct "Skeever Tail Soup"
Maybe that helps a little... ? Edited by PhilippePetain
Link to comment
Share on other sites

Thanks for the help here.

 

This is yet another feature that the good people on OBSE deserve a round of applause.

If I'd just thought outside the box for a second.

I'm a bit annoyed with myself for not picking it up in the source code, I am way too impatient.

 

It will save a number of steps in the script parsing for passing the red, green, blue to the xml.

 

I've given myself the challenge of making the documentation user friendly so it's in html5 with a color picker...

...that does not work on IE, doh!

 

If anybody reading this knows of an html5 as well as cross browser compatible color picker I'd appreciate the link.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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