Jump to content

[QUESTION] How do I prevent a particular race from using a particular kit?


a.greene

Recommended Posts

 

Hypothetically, if I wanted to prevent a particular race (Dwarves) from using a particular kit (berserker) is this the best way to do it? Or is there a better way?

COPY_EXISTING ~K_F_D.2DA~ ~override~
  COUNT_2DA_ROWS ~2~ "rows"
  FOR (index = 1 ; index < rows ; index = index + 1) BEGIN
    READ_2DA_ENTRY index 1 2 "kit"
    PATCH_IF ("%kit%" = 1) BEGIN
      REMOVE_2DA_ROW 4 1
    END
  END
  BUT_ONLY_IF_IT_CHANGES
                               

Thank you in advance.

Link to comment

It's certainly the obvious way to do it - just engage with the system that's already in use..

For reference, in those K_ tables, the number in the second column that identifies the kit is the number in the first column of KITLIST.2DA. Unless it's 0, in which case that's the "trueclass" option.

What I'm not sure of here is the first column - do those have to be in sequence, or can those index numbers just be anything as long as they're different? Your current code will leave a gap in the indexing, so that matters...

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