a.greene Posted December 19, 2023 Share Posted December 19, 2023 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. Quote Link to comment
jmerry Posted December 19, 2023 Share Posted December 19, 2023 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... Quote Link to comment
subtledoctor Posted December 19, 2023 Share Posted December 19, 2023 1 hour ago, jmerry said: 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? It doesn't matter, they can have any value. I think even repeated values don't do any harm. Quote Link to comment
a.greene Posted December 19, 2023 Author Share Posted December 19, 2023 @jmerry @subtledoctor Thank you. Quote Link to comment
Recommended Posts
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.