ad3d0 Posted March 18, 2016 Share Posted March 18, 2016 So, I'm completely unfamiliar with how scripting works in Fallout games, however have some minor programming skills. So I have a questions before I start digging deeper into it.Is it possible to make so in-game script would use variables defined in external file, some .ini file in data folder for example. May be I will need Script Extender for such feature? Link to comment Share on other sites More sharing options...
DarthWayne Posted March 18, 2016 Share Posted March 18, 2016 Yes, it is possible. Take a look at the Utility Script. For some mysterious reason Beth only added the setter functions. The getter functions need script extender. Link to comment Share on other sites More sharing options...
Reneer Posted March 19, 2016 Share Posted March 19, 2016 (edited) Short answer: Yes. Longer answer: There are several functions in Utility.pex that would be useful:Function SetINIBool(string ini, bool value) global native Function SetINIString(string ini, string value) global native Function SetINIFloat(string ini, float value) global native Function SetINIInt(string ini, int value) global native However, you will note that there are no functions available to GET INI variables. Which makes absolutely no sense, but that's Bethesda for you. Edited March 19, 2016 by Reneer Link to comment Share on other sites More sharing options...
ad3d0 Posted March 19, 2016 Author Share Posted March 19, 2016 (edited) Oh! That's great! Giant Thank You for your answers! Now It's time for "digging" :wink: Edited March 19, 2016 by ad3d0 Link to comment Share on other sites More sharing options...
Neanka Posted March 19, 2016 Share Posted March 19, 2016 (edited) что great? что без f4se можно только записать но не прочитать из ини?как насчет глобальных переменных? Edited March 19, 2016 by Neanka Link to comment Share on other sites More sharing options...
PoliteRaider Posted March 19, 2016 Share Posted March 19, 2016 (edited) что great? что без f4se можно только записать но не прочитать из ини?как насчет глобальных переменных? I'm not sure. This is just a question because I don't know the answer myself, but does that actually mean there's no way of accessing the information in the variables? Or does it just mean that we can't use the correct object oriented design principles in how we access them? Can they be directly referenced from within another function? I've been trying to figure this out myself but haven't gotten anywhere so far. (Edit: I mean without using F4SE) Edited March 19, 2016 by PoliteRaider Link to comment Share on other sites More sharing options...
Reneer Posted March 19, 2016 Share Posted March 19, 2016 (edited) что great? что без f4se можно только записать но не прочитать из ини?как насчет глобальных переменных? I'm not sure. This is just a question because I don't know the answer myself, but does that actually mean there's no way of accessing the information in the variables? Or does it just mean that we can't use the correct object oriented design principles in how we access them? Can they be directly referenced from within another function? I've been trying to figure this out myself but haven't gotten anywhere so far. (Edit: I mean without using F4SE) As far as I know, there is no current way to get the INI values without using console commands. There supposedly is a GetINISetting console command, but no way to really use it to store values in Papyrus. Edited March 19, 2016 by Reneer Link to comment Share on other sites More sharing options...
PoliteRaider Posted March 19, 2016 Share Posted March 19, 2016 As far as I know, there is no current way to get the INI values without using console commands. There supposedly is a GetINISetting console command, but no way to really use it to store values in Papyrus. Wow, that's really disappointing. Link to comment Share on other sites More sharing options...
Reneer Posted March 19, 2016 Share Posted March 19, 2016 (edited) Wow, that's really disappointing.Welcome to modding Bethesda games, where something that should be trivially easy is in fact neither easy nor trivial. Edited March 19, 2016 by Reneer Link to comment Share on other sites More sharing options...
Manttis567 Posted March 20, 2016 Share Posted March 20, 2016 So, I'm completely unfamiliar with how scripting works in Fallout games, however have some minor programming skills. So I have a questions before I start digging deeper into it.Is it possible to make so in-game script would use variables defined in external file, some .ini file in data folder for example. May be I will need Script Extender for such feature?Why define the variables in external file? you can define the variables in the ESP and then use it in the script. Link to comment Share on other sites More sharing options...
Recommended Posts