Let's say that i want to assign a local variable to a given character,( lets call it, "hunt"). Then, i would like to display on the character sheet something like:
I can already display these values using custom tokens in dialog. I'm assuming that i can do the same for this ( with the limitation that i need to update them at each game load). Actually, let me ask: is this assumption correct?
Yes... although the way the character screen works if you want the values to change each time you select a different character then it might not work as planned... The character screen works on ID numbers which are seemingly random allocated and change and nobody has yet figured that bit out yet,
Yes... although the way the character screen works if you want the values to change each time you select a different character then it might not work as planned... The character screen works on ID numbers which are seemingly random allocated and change and nobody has yet figured that bit out yet,
These id numbers determine? Sorry, i know nothing about ui modding
Each character is allocated an ID number - when you select a character that ID number is used to find the relevant stats/inventory etc.
If you are trying to, for example, allocate new stats to each character then that may be possible by editing the relevant tables however when you close the game session there is no way to remember those stats - to my knowledge. You can create static variables, and variables that change within the game session but as soon as you close the game, they are gone.
Remember, this is modding for the UI and sadly not a rewrite the engine modding.
That's not to say it isn't possible - just that nobody has figured it out yet, to my knowledge.
As an example, have a look at the thread here where I created a whole new game within the game.
In that mod, I use and manipulate a lot of variables and strings. However - as soon as the user quits the game, everything they have done within the game-in-game is gone.
As an example, have a look at the thread here where I created a whole new game within the game.
In that mod, I use and manipulate a lot of variables and strings. However - as soon as the user quits the game, everything they have done within the game-in-game is gone.
Very cool mod btw!
We have the same (or similar) problem with custom tokens. In dialog, you can create your own tokens, and assign them values based on local or global variables, but they reset at game load. So, you have to reset them each load. I do this in a script of an ' invisible creature'...
I'm assuming that i can do something similar here...
may be of some help here. I haven't tested it, but any C: command should work as a text lua command.
Did anyone managed to successfully pass the in-game global variable to the UI like @Dee mentioned? I've tried adding this code to OnOpen section of ESC_MENU:
guiVariable = C:GetGlobal('SomeInGameVariable','GLOBAL') if ( guiVariable == 1 ) then --do something neat here if in-game variable = 1 end
Comments
Do you have some more detail about what you want to display, when and how?
Sure,
Let's say that i want to assign a local variable to a given character,( lets call it, "hunt"). Then, i would like to display on the character sheet something like:
Hunting: <"hunt"> ranks
Where the value of "hunt" displayed at <"hunt">.
If you are trying to, for example, allocate new stats to each character then that may be possible by editing the relevant tables however when you close the game session there is no way to remember those stats - to my knowledge. You can create static variables, and variables that change within the game session but as soon as you close the game, they are gone.
Remember, this is modding for the UI and sadly not a rewrite the engine modding.
That's not to say it isn't possible - just that nobody has figured it out yet, to my knowledge.
In that mod, I use and manipulate a lot of variables and strings. However - as soon as the user quits the game, everything they have done within the game-in-game is gone.
We have the same (or similar) problem with custom tokens. In dialog, you can create your own tokens, and assign them values based on local or global variables, but they reset at game load. So, you have to reset them each load. I do this in a script of an ' invisible creature'...
I'm assuming that i can do something similar here...