Jump to content

SET_2DA...


Lauriel

Recommended Posts

The Weidu documentation contradicts itself on the syntax of SET_2DA_ENTRY.  For the SET_2DA_ENTRY tutorial, the syntax is stated as row, column, #columns, entry-value.  In the SET_2DA_LATER tutorial, it illustrates the SET_2DA_ENTRY function as having the syntax of #columns, row, column, entry-value.

Which is it?

Link to comment

SET_2DA_ENTRY takes different inputs (row/col/max cols/val) than SET_2DA_ENTRY_LATER (var/row/col/val). I think because %var% was set earlier when you did a READ_2DA_ENTRIES_NOW and implicitly includes the max col count.

So not a contradiction, just two different functions. 

Edited by subtledoctor
Link to comment

What confused me is it used 1 as a the required columns.  This would have changed the single weapon fighting style, not the 2 handed weapon style, because the first 2 rows would have been counted since they have one column...if I understand that parameter correctly.  So I thought the first parameter, 34, was the required columns.  But no, I was wrong on that.  It's the row number, it's just the wrong row number because the wrong required columns was put in.  Very confusing for a newb.

Here's the section:

Spoiler

To illustrate the differences, consider the following code, which allows for thieves, cleric/thieves and mage/thieves to put 3 proficiency points in Two-weapon fighting using SET_2DA_ENTRY:


COPY_EXISTING ~weapprof.2da~ ~override~
  SET_2DA_ENTRY 34 7  1 3
  SET_2DA_ENTRY 34 39 1 3
  SET_2DA_ENTRY 34 40 1 3

Compare this with the equivalent code using SET_2DA_ENTRY_LATER and SET_2DA_ENTRIES_NOW:


COPY_EXISTING ~weapprof.2da~ ~override~
  SET_2DA_ENTRY_LATER ~_#_#_#weapprof~ 34 7  3
  SET_2DA_ENTRY_LATER ~_#_#_#weapprof~ 34 39 3
  SET_2DA_ENTRY_LATER ~_#_#_#weapprof~ 34 40 3
  SET_2DA_ENTRIES_NOW ~_#_#_#weapprof~ 1

 

Link to comment

I haven't looked, but are you counting the "

23 minutes ago, Lauriel said:

The example is changing 3 values on the same line and using 1 as the required number of columns...which I don't understand, at all, but maybe after I use it a while I understand why that works.

Well, I'm just doing that because there are basically two competing standards re starting a new sentence: in my day, you used two spaces after a period.  However, I understand that nowadays, it's one space.  Its all very Oxford commaesque. Now, my brain is confused and so I sometimes use one space, and sometimes two, so I would need to do something like that even if I only used the macro for myself.  

Re: set_2da.  Did you also count the "2DA[space]V1.0" in the top left corner?  Maybe that is what's throwing your numbers off

Link to comment

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

 

Link to comment

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! :)

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