Skip to content

Tokentxt.2da

wolpakwolpak Member Posts: 390
After a ton of testing, this feature appears to do nothing.

Comments

  • Troodon80Troodon80 Member, Developer Posts: 4,110
    edited March 2014
    It's an externalised feature that allows overriding or adding of string tokens.

    Example usage:
    TOKEN_TEXT PROTAGONIST STAT VALUE EQUALITY STRINGT STRINGF 0 CSTM_MANWOMAN 1 35 2 0 woman man

    If <CSTM_MANWOMAN> is used in dialogue like this:

    image

    You will get this:

    image

    As said here by Avenger;

    Basic usage is as follows
    • Row: can be left blank.
    • Token text: must be uppercase.
    • Protagonist: set to zero (0) for protagonist and non-zero for current talker.
    • Stat: set to the stat you want to evaluate from STATS.IDS. In the example above, 35 is 'SEX'.
    • Value: set to the value you want to evaluate.
    • Equality: set to zero (0) to evaluate equal-to, or non-zero (e.g. 1) for greater-than. In my example, the value is 2 for female, values less than or greater than will be interpreted as male.
    • String if True (StringT): Your string if the value equates true according to the equality. I've tried using an integer string ref, but only actual strings appear to work (which is no harm, either).
    • String if False (StringF): Your string if the value equates false according to the equality.
    In my example above, female is the variable I want to evaluate as the gender. Female = 2. If the gender of the current talker is not female (2), then they will be treated as a male. The output of CSTM_MANWOMAN will appropriately state man or woman depending on this.

    As also stated, it is somewhat trial and error.

    Moving to Not An Issue, it's working as stated. :-)
  • wolpakwolpak Member Posts: 390
    edited March 2014
    @Troodon80‌

    Thank you for the clarification. I guess it is working as stated, but isn't nearly as functional as it should/could be.

    First, I'll have to test more, but it seems that an underscore was required in my Token_Text field and it does not accept any numbers.

    Second, this is just an evaluation (basically can be done with scripts) and isn't dynamic either. It appears to only run on game load.

    Third, each Token_Text must be different as they are all evaluated. Fortunately, you do not have to have a false.

    This was my test:
    2DA V1.0
    *
    TOKEN_TEXT PROTAGONIST STAT VALUE EQUALITY STRINGT STRINGF
    0 CSTM_SLASHA 1 21 0 0 0
    1 CSTM_SLASHB 1 21 1 0 1
    2 CSTM_SLASHC 1 21 2 0 2
    3 CSTM_SLASHD 1 21 3 0 3
    4 CSTM_SLASHE 1 21 4 0 4
    5 CSTM_SLASHF 1 21 5 0 5
    6 CSTM_SLASHG 1 21 6 0 6
    7 CSTM_SLASHH 1 21 7 0 7
    8 CSTM_SLASHI 1 21 8 0 8
    9 CSTM_SLASHJ 1 21 9 0 9
    10 CSTM_SLASHK 1 21 10 0 10

    strref:
    SLASH: [CSTM_SLASHA][CSTM_SLASHB][CSTM_SLASHC][CSTM_SLASHD][CSTM_SLASHE][CSTM_SLASHF][CSTM_SLASHG][CSTM_SLASHH][CSTM_SLASHI][CSTM_SLASHJ][CSTM_SLASHK] (but with the appropriate brackets)

    So, if my protagonist has slashing resistance of 5, it would ignore all but and put 5. Which, despite all the lines needed in the 2da, would work nicely, except it only runs on game load. So, I took off the slash resist item and the text remained the same.

    I guess this then turns into a feature request to have this run all the time.

    It would be nice to be able to leave out the evaluation and have the token just print out the stat directly, but I guess that isn't possible.
    Post edited by wolpak on
  • wolpakwolpak Member Posts: 390
    Still don't think this is working properly. Especially the protagonist and current talker aspect.
Sign In or Register to comment.