Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

New Premium Module: Tyrants of the Moonsea! Read More
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

Can you alter the UI to display user created global and/or local variable names in the

GrammarsaladGrammarsalad Member Posts: 2,509
edited June 2016 in UI Modding
Character sheet?

If so, how difficult would it be?

Post edited by Grammarsalad on

Comments

  • Mr2150Mr2150 Member Posts: 1,170
    I'd tend to say yes, but it depends.

    Do you have some more detail about what you want to display, when and how?

  • GrammarsaladGrammarsalad Member Posts: 2,509
    @Mr2150

    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">.

  • GrammarsaladGrammarsalad Member Posts: 2,509
    And let's say i would like to create at least 20 of these

  • GrammarsaladGrammarsalad Member Posts: 2,509
    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?

  • Mr2150Mr2150 Member Posts: 1,170
    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,

  • GrammarsaladGrammarsalad Member Posts: 2,509
    Mr2150 said:

    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

  • Mr2150Mr2150 Member Posts: 1,170
    edited June 2016
    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.

  • Mr2150Mr2150 Member Posts: 1,170
    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.

  • GrammarsaladGrammarsalad Member Posts: 2,509
    edited June 2016
    Mr2150 said:

    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...

  • GrammarsaladGrammarsalad Member Posts: 2,509
    In any case, i can test it If i can figure out how to display custom text in the 'character sheet"

  • Mr2150Mr2150 Member Posts: 1,170
    If you solve the problem make sure to let everyone know :smile:

    mf2112Grammarsalad
  • GrammarsaladGrammarsalad Member Posts: 2,509
    Mr2150 said:

    If you solve the problem make sure to let everyone know :smile:

    I certainly will, my friend!

    mf2112
  • DeeDee Member Posts: 10,447
    text lua C:GetGlobal()
    may be of some help here. I haven't tested it, but any C: command should work as a text lua command.

    Grammarsaladmf2112JuliusBorisov
  • switswit Member, Translator (NDA) Posts: 494
    Dee said:

    text lua C:GetGlobal()
    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
    but it doesn't seem to work.

    Mr2150
Sign In or Register to comment.