Jump to content

SetGameIniFloat SKSE member?


Hoamaii

Recommended Posts

Hey guys,

 

The Wiki states that "Game.SetGameIniFloat" is an SKSE function while "GetGameIniFloat" is a native one. I was wondering if there might not me a mistake here. I've been using both in a small script after uninstalling SKSE just to check what I can do with that and it seems to work.

 

I find that odd - Wiki pages are usually pretty reliable. Would you know if there may be an error on the Wiki page about this "SetGameIniFloat" or "SetGameIniInt"?

 

Thanks. And cheers :).

Link to comment
Share on other sites

It's correct the SetGameIni functions were added in skse 1.5.10

 

You might still have the source files from SKSE left over (since the compiler uses those to check if the Functions exist or not you can still compile the script). It shouldn't work in game however and I think the error that should show up is Unbound Native Function... not sure on that one.

 

In saying that the Wiki is out of date and still incomplete sadly there's probably over a hundred functions (skse) still not documented there in any way and hundreds that don't even have a page yet, so always check the skse / native source files for the full list of functions you can use.

 

EDIT: Might have exaggerated that a little probably less then a hundred functions that aren't mentioned on the wiki.

Edited by Arocide
Link to comment
Share on other sites

Hmm... left over source files in my game?.. That's odd but still may be, I'll double-check then.

 

Would you know about "GetINIFloat" or "SetINIInt"? Do these functions have the same effect as the previous ones? I haven't tried them yet but one Wiki page lists them as Global function and other pages say they are SKSE functions too... So SKSE or Global in your opinion?

Link to comment
Share on other sites

SKSE Functions are almost all Native themselves (very rarely do they add a non-native function unless it's for convenience), there is no speed difference (or it is so insignificant that it's not worth mentioning) between an SKSE Native function and a Native function. Native means it is handled by game code (of which skse hooks itself into) and not papyrus code.

 

Global has a different meaning a function can be both Native and Global, Global means it is not attached to any one object but is instead called on the Type (Script) itself. All Game Script Functions are global since there is only ever one game instance there's little point in a non-global game function, SKSE Functions included.

Edited by Arocide
Link to comment
Share on other sites

Aw, sorry for the inappropriate term, I meant "native", not global. What I meant was: is "SetINIFloat" function Vanilla native or has been added by SKSE? The Wiki says SKSE on one page, and native on another. And does this function have the same effect as "SetGameSettingIniFloat"? In both cases, they change an INI settings - what I'm trying to find out is how they differ if they do...

 

Thanks for replying, Arocide :).

Link to comment
Share on other sites

Aw, sorry for the inappropriate term, I meant "native", not global. What I meant was: is "SetINIFloat" function Vanilla native or has been added by SKSE? The Wiki says SKSE on one page, and native on another. And does this function have the same effect as "SetGameSettingIniFloat"? In both cases, they change an INI settings - what I'm trying to find out is how they differ if they do...

 

Thanks for replying, Arocide :smile:.

 

Oh, no worries.

 

Ini settings and Game Settings are two different things, You'll find the game settings data contained within the plugin files themselves (which you can find in creation kit by looking at Gameplay > Settings) and ini settings are within the Skyrim.ini file usually contained in your user folder under "My Games\Skyrim\". You can't use Set Functions to create new entries for either though, and any changes made will reset once Skyrim is closed.

 

The SetINI<type> functions are native and weren't added by SKSE, SetGameSetting<type> are though.

Link to comment
Share on other sites

Oh, glad I asked and thanks for replying again.

 

The thing I've actually been trying (and which seemed to be working without SKSE enabled) was: "Game.SetGameSettingFloat("fJumpFallHeightMult", 0.00)" which removes all damage taken when you fall - a little bit like these boots we had in Oblivion. I honestly thought that was momentarily changing the value which was set in the Skyrim.ini file. So what you mean is "SetINIfloat(fJumpFallHeightMult, 0.00)" would only work if that specific entry is already present in the .ini file, whereas "Game.SetSettingFloat" will do the trick no matter what? They're clearly not interchangeable then. Thanks for the clarification, Arocide :).

Link to comment
Share on other sites

If it was a INI setting supported by Skyrim, since the functions don't read the file themselves they read what Skyrim has already read in, so adding custom ini entries won't work, "fJumpFallHeightMult" would not work even if you were to add it to the file itself. That's a fairly important distinction to make.

Link to comment
Share on other sites

"fJumpFallHeightMult" would not work even if you were to add it to the .ini file itself? I didn't try and did not intend to, I only modified it through scripting an enchantment - but that's obviously an important distinction. Thanks.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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