Jump to content

[LE] Read any values from private INI file


jaxonz

Recommended Posts

Just in case it is of use to others, I just updated Jaxonz Console Plugin, adding functions to read private values from any INI file.



This functionality is distinct from SKSE Utility script INI functions, which can only read INI values defined by Bethesda and loaded by Skyrim. My function instead forwards to Windows GetPrivateProfileStringA.



In effect, this will allow modders to create custom values in their own MyModName.INI file and have the bool/init/float/string values accessible to Papyrus.


Link to comment
Share on other sites

Thank you for sharing your handy plugin, nice work :smile:

Any plans to add write values to the same ini?

eg: Write section, write key, write value

 

Edit: Forgot to ask dumb question, but is there a limit to the size of an ini that can be read from, eg: 32kb?

Edited by smashly
Link to comment
Share on other sites

I did not enable writing as it might provide a vector for abusive behavior (such as writing a command string to win.ini). I suppose I could hard code some directory limitations or only allow writing to a single filename as protection from this. Since I didn't need write capabilities for my needs, I simply didn't implement that.



The current implementation uses an 8k buffer, so you can read in strings that are 4000+ characters.



For a working example, I'm using this capability in my Jaxonz Real Names mod. http://www.nexusmods.com/skyrim/mods/61430


Link to comment
Share on other sites

Awesome, I've wanted this for quite some time. I actually wrote a hacky solution with the existing SKSE Utility functions by smashing a bunch of variables into an unused INI String. I've been waiting for someone to come along and make that completely obsolete and here you did it. I hope it gets added to SKSE. I will be using this in all of my mods.

Link to comment
Share on other sites

  • 5 years later...

I am looking for a DLL doing exactly that for Skyrim SE. Would you know of any?

Hey there,

unfortunately it seems that the actual plugin didn't even got ported to the SE. :sad:

https://www.nexusmods.com/skyrimspecialedition/search/

These are the only mods / ports from Jaxonz' work I could find for the SE.

Addition: Ah, I just realized that the Nexus cannot directly link to a search term. Well just search for "Jaxonz" on your own the. Sorry. :/

 

You may have more luck directly asking that in the respective SE forum:

https://forums.nexusmods.com/index.php?/forum/4045-skyrim-special-edition-files/

Link to comment
Share on other sites

  • Recently Browsing   0 members

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