Jump to content

Few questions about scriping.


ad3d0

Recommended Posts

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

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 by Reneer
Link to comment
Share on other sites

что great? что без f4se можно только записать но не прочитать из ини?

как насчет глобальных переменных?

Edited by Neanka
Link to comment
Share on other sites

что 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 by PoliteRaider
Link to comment
Share on other sites

 

 

что 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 by Reneer
Link to comment
Share on other sites

 

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

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

  • Recently Browsing   0 members

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