Jump to content

[solved]patching 2da with negative values


Recommended Posts

Hi.

 

I'm fiddling with the default kits and I've run into a wall trying to apply a stat penalty by patching the abclsmod.2da. When I want to apply a bonus (positive value) it works fine, but I put a "-" in there and weidu throws a tantrum. Here's what I have:

 

 ACTION_IF (FILE_EXISTS_IN_GAME ~ABCLSMOD.2DA~) BEGIN
    COPY_EXISTING ~ABCLSMOD.2DA~ ~override~
        COUNT_2DA_COLS cols
        READ_2DA_ENTRIES_NOW rows cols
        FOR (row = 1; row < rows; ++row) BEGIN
            READ_2DA_ENTRY_FORMER rows row 0 ~kit_name~
            PATCH_IF ~%kit_name%~ STRING_EQUAL_CASE ~LATHANDER~ BEGIN
                SET patch_row = %row%
            END
        END
        SET_2DA_ENTRY %patch_row% 5 cols -2
    BUT_ONLY
 END

How can I make this work?

Edited by Allbrother
Link to comment

Here's the error:

 

[REVISIONS/SETUP-REVISIONS.TP2] PARSE ERROR at line 122 column 1-12
Near Text: BUT_ONLY
	GLR parse error

[REVISIONS/SETUP-REVISIONS.TP2]  ERROR at line 122 column 1-12
Near Text: BUT_ONLY
	Parsing.Parse_error
ERROR: parsing [REVISIONS/SETUP-REVISIONS.TP2]: Parsing.Parse_error
ERROR: problem parsing TP file [REVISIONS/SETUP-REVISIONS.TP2]: Parsing.Parse_error

FATAL ERROR: Parsing.Parse_error

 

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...