Jump to content

Lauriel

Modders
  • Posts

    940
  • Joined

  • Last visited

Posts posted by Lauriel

  1. I've finished a little component that can be added to your mod that will allow you to use proper and upper case player1 pronouns just like normal pronouns.  As of now, it's only in English, but if you can translate into other languages, feel free to add the tra files.

    I've never collaborated on a project in github before, but everything's there.  In fact, I've barely ever used github, so if I need to add or change something, just let me know.

    The files can be found here.

  2. Just now, Lauriel said:

    I would have bet it would have too, but it didn't.

    Not saying I didn't screw something up, but I couldn't get the caret to work in any shape or form with a string built from the tra file.

  3. Just now, subtledoctor said:

    I missed this:

    If you put the .tra ref into a variable like I did with %last_text% above, then use the caret with the variable, I bet it would work. 

    I would have bet it would have too, but it didn't.

  4. 2 minutes ago, subtledoctor said:

    Was going to say, you could also inline a text file, copy it to a workspace directory, and then APPEND_OUTER lines of text to it. (That adds a line break though.) I do that in several mods. It depends on precisely what you want to achieve. 

    Oh my goodness!  What we will do to bash Weidu over the head to let us do what we want to do!  LOL

  5. 1 minute ago, subtledoctor said:

    Something like:

     

    
    SPRINT last_text @3000 // ~world~
    	SPRINT EVAL whole_text ~hello %last_text%!~
    	PRINT ~%whole_text%~ // hello world! 

     

    Maybe.

    I'll try it :)

  6. Ahh, I vaguely remember SPRINTF.  It's been a couple decade....  I would never have thought of that.

    4 minutes ago, grodrigues said:

    Do not forget to change the tra ref into text -- the code for this is in Item Revisions somewhere. If you can't find it, I have stolen it for my mods and can put it in here.

      And please, yes, share, please :)  If you can find it.  I just want to be able to share this with folks and move on to my actual mod.  LOL

  7. 1 minute ago, Jarno Mikkola said:

    Erhm, you are done nothing good.

    As in, what does this entail ? A dialog ? .d file ? A script string display ? Erhm flying eyes in a dream state...

    The ++ (dialog phrase) + (dialog phrase) ... can be done, but in a .d file involving CHAIN ...

    This is in a .tp2 file that inserts proper and upper case player1 pronouns into tokentxt 2da file and is used to build the line that is inserted into the table, allowing for multiple languages so it can be used in dialogues like: ~my dialogue line <UPPER_LORDLADY>~

  8. What I thought would be easy ... well, that's just never the case, is it.  How would I go about concatenating a literal string with a string from a .tra file.  Like:

    myNewString = ~I say 'tomato' but you say ~ + @900000

    I tried the caret (^), but that's just for 2 literals.  I tried PLUS, I tried the plus sign, I tried... I don't remember everything I tried.  Help?

  9. I also will be modifying it to make sure my first row number is higher than the last one already in the table.

     

    EDIT:  Actually, I'll be modifying it to make sure my first row number is higher than the highest one already in the table.  I have no idea if those lines get sorted or not, so I'm not going to take the chance that they're not.

  10.   

    2 hours ago, Grammarsalad said:

    @Lauriel

    Do you mind posting your working sample?  lol, it doesn't work like I remember

     

    Sure, here you go.  I'm in the process of tra-ifying it.  Then I'll post it to Github so it's available to everyone.

    Spoiler

    // Add proper and upper case character pronouns to the token table

    // Set up array of pronouns to be entered into the token table
    ACTION_DEFINE_ASSOCIATIVE_ARRAY pronouns BEGIN
        HESHE => 0
        HIMHER => 0
        BOYGIRL => 0
        MANWOMAN => 0
        LORDLADY => 0
        SIRMAAM => 0
    END

    COPY_EXISTING ~TOKENTXT.2DA~ ~override~
        READ_2DA_ENTRIES_NOW curList 3

        // Check what's there against list of pronouns we'll be adding
        // so we don't duplicate tokens
        FOR (iRow = 1; iRow < curList; ++iRow) BEGIN
            READ_2DA_ENTRY_FORMER curList iRow 1 strToken
            PATCH_MATCH ~%strToken%~ WITH
                ~PROPER_HESHE~ BEGIN SET $pronouns("HESHE") = 1 END
                ~UPPER_HESHE~ BEGIN SET $pronouns("HESHE") += 2 END
                ~PROPER_HIMHER~ BEGIN SET $pronouns("HIMHER") = 1 END
                ~UPPER_HIMHER~ BEGIN SET $pronouns("HIMHER") += 2 END
                ~PROPER_BOYGIRL~ BEGIN SET $pronouns("BOYGIRL") = 1 END
                ~UPPER_BOYGIRL~ BEGIN SET $pronouns("BOYGIRL") += 2 END
                ~PROPER_MANWOMAN~ BEGIN SET $pronouns("MANWOMAN") = 1 END
                ~UPPER_MANWOMAN~ BEGIN SET $pronouns("MANWOMAN") += 2 END
                ~PROPER_LORDLADY~ BEGIN SET $pronouns("LORDLADY") = 1 END
                ~UPPER_LORDLADY~ BEGIN SET $pronouns("LORDLADY") += 2 END
                ~PROPER_SIRMAAM~ BEGIN SET $pronouns("SIRMAAM") = 1 END
                ~UPPER_SIRMAAM~ BEGIN SET $pronouns("SIRMAAM") += 2 END
                DEFAULT // do nothing
            END
        END

        SET curRow = %curList%

        PATCH_IF ($pronouns("HESHE") = 0 OR $pronouns("HESHE") = 2) THEN BEGIN
            // Add the missing pronoun to the token table
            PATCH_IF (%curRow% > 99) THEN BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%        PROPER_HESHE           1           35         1          0          He         She~
            END ELSE PATCH_IF (%curRow% > 9) THEN BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%         PROPER_HESHE           1           35         1          0          He         She~
            END ELSE BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%          PROPER_HESHE           1           35         1          0          He         She~
            END
            SET curRow += 1
        END
        PATCH_IF ($pronouns("HESHE") = 0 OR $pronouns("HESHE") = 1) THEN BEGIN
            // Add the missing pronoun to the token table
            PATCH_IF (%curRow% > 99) THEN BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%        UPPER_HESHE            1           35         1          0          HE         SHE~        
            END ELSE PATCH_IF (%curRow% > 9) THEN BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%         UPPER_HESHE            1           35         1          0          HE         SHE~        
            END ELSE BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%          UPPER_HESHE            1           35         1          0          HE         SHE~
            END
            SET curRow += 1
        END
        PATCH_IF ($pronouns("HIMHER") = 0 OR $pronouns("HIMHER") = 2) THEN BEGIN
            // Add the missing pronoun to the token table
            PATCH_IF (%curRow% > 99) THEN BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%        PROPER_HIMHER          1           35         1          0          Him        Her~
            END ELSE PATCH_IF (%curRow% > 9) THEN BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%         PROPER_HIMHER          1           35         1          0          Him        Her~
            END ELSE BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%          PROPER_HIMHER          1           35         1          0          Him        Her~
            END
            SET curRow += 1
        END
        PATCH_IF ($pronouns("HIMHER") = 0 OR $pronouns("HIMHER") = 1) THEN BEGIN
            // Add the missing pronoun to the token table
            PATCH_IF (%curRow% > 99) THEN BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%        UPPER_HIMHER           1           35         1          0          HIM        HER~
            END ELSE PATCH_IF (%curRow% > 9) THEN BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%         UPPER_HIMHER           1           35         1          0          HIM        HER~
            END ELSE BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%          UPPER_HIMHER           1           35         1          0          HIM        HER~
            END
            SET curRow += 1
        END
        PATCH_IF ($pronouns("BOYGIRL") = 0 OR $pronouns("BOYGIRL") = 2) THEN BEGIN
            // Add the missing pronoun to the token table
            PATCH_IF (%curRow% > 99) THEN BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%        PROPER_BOYGIRL         1           35         1          0          Boy        Girl~
            END ELSE PATCH_IF (%curRow% > 9) THEN BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%         PROPER_BOYGIRL         1           35         1          0          Boy        Girl~
            END ELSE BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%          PROPER_BOYGIRL         1           35         1          0          Boy        Girl~
            END
            SET curRow += 1
        END
        PATCH_IF ($pronouns("BOYGIRL") = 0 OR $pronouns("BOYGIRL") = 1) THEN BEGIN
            // Add the missing pronoun to the token table
            PATCH_IF (%curRow% > 99) THEN BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%        UPPER_BOYGIRL          1           35         1          0          BOY        GIRL~
            END ELSE PATCH_IF (%curRow% > 9) THEN BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%         UPPER_BOYGIRL          1           35         1          0          BOY        GIRL~
            END ELSE BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%          UPPER_BOYGIRL          1           35         1          0          BOY        GIRL~
            END
            SET curRow += 1
        END
        PATCH_IF ($pronouns("MANWOMAN") = 0 OR $pronouns("MANWOMAN") = 2) THEN BEGIN
            // Add the missing pronoun to the token table
            PATCH_IF (%curRow% > 99) THEN BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%        PROPER_MANWOMAN        1           35         1          0          Man        Woman~
            END ELSE PATCH_IF (%curRow% > 9) THEN BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%         PROPER_MANWOMAN        1           35         1          0          Man        Woman~
            END ELSE BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%          PROPER_MANWOMAN        1           35         1          0          Man        Woman~
            END
            SET curRow += 1
        END
        PATCH_IF ($pronouns("MANWOMAN") = 0 OR $pronouns("MANWOMAN") = 1) THEN BEGIN
            // Add the missing pronoun to the token table
            PATCH_IF (%curRow% > 99) THEN BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%        UPPER_MANWOMAN         1           35         1          0          MAN        WOMAN~
            END ELSE PATCH_IF (%curRow% > 9) THEN BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%         UPPER_MANWOMAN         1           35         1          0          MAN        WOMAN~
            END ELSE BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%          UPPER_MANWOMAN         1           35         1          0          MAN        WOMAN~
            END
            SET curRow += 1
        END
        PATCH_IF ($pronouns("LORDLADY") = 0 OR $pronouns("LORDLADY") = 2) THEN BEGIN
            // Add the missing pronoun to the token table
            PATCH_IF (%curRow% > 99) THEN BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%        PROPER_LORDLADY        1           35         1          0          Lord       Lady~
            END ELSE PATCH_IF (%curRow% > 9) THEN BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%         PROPER_LORDLADY        1           35         1          0          Lord       Lady~
            END ELSE BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%          PROPER_LORDLADY        1           35         1          0          Lord       Lady~
            END
            SET curRow += 1
        END
        PATCH_IF ($pronouns("LORDLADY") = 0 OR $pronouns("LORDLADY") = 1) THEN BEGIN
            // Add the missing pronoun to the token table
            PATCH_IF (%curRow% > 99) THEN BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%        UPPER_LORDLADY         1           35         1          0          LORD       LADY~
            END ELSE PATCH_IF (%curRow% > 9) THEN BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%         UPPER_LORDLADY         1           35         1          0          LORD       LADY~
            END ELSE BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%          UPPER_LORDLADY         1           35         1          0          LORD       LADY~
            END
            SET curRow += 1
        END
        PATCH_IF ($pronouns("SIRMAAM") = 0 OR $pronouns("SIRMAAM") = 2) THEN BEGIN
            // Add the missing pronoun to the token table
            PATCH_IF (%curRow% > 99) THEN BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%        PROPER_SIRMAAM         1           35         1          0          Sir        Ma'am~
            END ELSE PATCH_IF (%curRow% > 9) THEN BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%         PROPER_SIRMAAM         1           35         1          0          Sir        Ma'am~
            END ELSE BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%          PROPER_SIRMAAM         1           35         1          0          Sir        Ma'am~
            END
            SET curRow += 1
        END
        PATCH_IF ($pronouns("SIRMAAM") = 0 OR $pronouns("SIRMAAM") = 1) THEN BEGIN
            // Add the missing pronoun to the token table
            PATCH_IF (%curRow% > 99) THEN BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%        UPPER_SIRMAAM          1           35         1          0          SIR        MA'AM~
            END ELSE PATCH_IF (%curRow% > 9) THEN BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%         UPPER_SIRMAAM          1           35         1          0          SIR        MA'AM~
            END ELSE BEGIN
                INSERT_2DA_ROW %curRow% 3 ~%curRow%          UPPER_SIRMAAM          1           35         1          0          SIR        MA'AM~
            END
            SET curRow += 1
        END
    BUT_ONLY_IF_IT_CHANGES

     

  11. I put the token in, and used it in a dialogue, but the proper case pronoun was just skipped.  Here's what my tokentxt.2da file looks like after I added the proper case prounoun (except everything lines up):

    Spoiler

    2DA V1.0
    *
               TOKEN_TEXT             PROTAGONIST STAT       VALUE      EQUALITY   STRINGT    STRINGF    
    1          PROPER_HESHE           35                     1          0          He         She

     

    My dialogue line: @2011    = ~<PROPER_HESHE> is too strong for us!  Run for your lives!~ [1AMERC05]

    I suspect it's my dialogue line?  Is there another way to say 'use something from the token table'?

     

  12. Speaking of being confused...I responded to the wrong topic.  LOL  I haven't had my coffee yet.  I'm still half asleep.  That's my story and I'm sticking with it.

    20 minutes ago, Lauriel said:

    No I am completely wrong.  He wanted to change 2 weapon style which is exactly what would be changed.  I forgot row numbers start with 0 so I should have adjusted which row I was looking at.  Well, I still say, this can be confusing as hell, but I got it now.  Thanks @Grammarsalad! :)

  13. No I am completely wrong.  He wanted to change 2 weapon style which is exactly what would be changed.  I forgot row numbers start with 0 so I should have adjusted which row I was looking at.  Well, I still say, this can be confusing as hell, but I got it now.  Thanks @Grammarsalad! :)

  14. According to the documentation, they would get counted...

    Spoiler

    The total number of columns is five. If, however, you put 1 as your required column count then you tell WeiDU you want to consider all rows with at least 1 column. So your row numbers change:

    
    Row0: 2DA V1.0
    Row1: *
    Row2:      ROWNAME        LOWER MIXED HELP
    Row3: 0    RESERVE        *     *     *
    Row4: 1    BERSERKER      25179 25151 25201
    Row5: 2    WIZARD_SLAYER  25180 25152 25203
    Row6: 3    KENSAI         25181 25153 25204
    Row7: 4    CAVALIER       25182 25154 25206
    

     

×
×
  • Create New...