Jump to content

Misaligned table titles


NdranC

Recommended Posts

I've been running this code to change some weapon proficiencies:

COPY_EXISTING ~weapprof.2da~ override
    COUNT_2DA_COLS cols
    READ_2DA_ENTRIES_NOW read_weapprof 0
    FOR (col = 4; col < cols; ++col) BEGIN
        READ_2DA_ENTRY_FORMER read_weapprof 34 col val
        PATCH_IF (val == 3) BEGIN
            SET_2DA_ENTRY_LATER set_weapprof 34 col 4
        END PATCH_IF (val == 2) BEGIN
            SET_2DA_ENTRY_LATER set_weapprof 34 col 3
        END PATCH_IF (val == 1) BEGIN
            SET_2DA_ENTRY_LATER set_weapprof 34 col 2
        END
    END
    FOR (row = 31; row < 34; ++row) BEGIN
        FOR (col = 4; col < cols; ++col) BEGIN
            READ_2DA_ENTRY_FORMER read_weapprof row col val
            PATCH_IF (val == 2) BEGIN
                SET_2DA_ENTRY_LATER set_weapprof row col 4
            END PATCH_IF (val == 1) BEGIN
                SET_2DA_ENTRY_LATER set_weapprof row col 2
            END
        END
    END
    SET_2DA_ENTRIES_NOW set_weapprof 0
BUT_ONLY

This works as far as I can tell but it bugs me that the resulting file ends up with a misaligned table title text like so:

2DA V1.0
0
ID                       NAME_REF                 DESC_REF                 MAGE                     FIGHTER                  CLERIC
LARGE_SWORD              0                        8668                     9589                     0                        5

I've tried many things to fix this, like setting the column requirement of READ_2DA_ENTRY_NOW to %cols% but it ends up the same.

I'm learning to use weidu so any tips would be welcomed. Mostly concerned I'm doing something the wrong way.

Link to comment
On 8/28/2020 at 10:03 PM, argent77 said:

Add PRETTY_PRINT_2DA after you're done modifying the 2DA file.

Somewhat related, though minor: as you may have noticed, after executing that command the various columns may end up quite a lot separated (see "SPLPROT.2DA", where "V1.0" is aligned with the "STAT" column. That's probably unnecessary since it's not a "real" column...)

To sum up: I was wondering if there's a way to perform / execute what your NearInfinity calls "Align table"...

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