Author Topic: SET_2DA_ENTRY broken in v230  (Read 1553 times)

Offline plainab

  • Sasha al'Therin
  • Planewalker
  • *****
  • Posts: 491
    • Infinity Engine Modding
SET_2DA_ENTRY broken in v230
« on: October 25, 2011, 04:04:30 PM »
okay I made this change in a party ai script I made for IWD.  converted it to use in BG (well what I could anyway)
Code: [Select]
COPY_EXISTING ~scrlev.ids~ ~override~
 SET_2DA_ENTRY 4 0 2 ~3~
 SET_2DA_ENTRY 5 0 2 ~4~
 SET_2DA_ENTRY 6 0 2 ~5~
 SET_2DA_ENTRY 7 0 2 ~6~
BUT_ONLY_IF_IT_CHANGES
It runs perfectly fine under weidu version 210 (the version that the IWD script had)

it changes this:
Code: [Select]
0 OVERRIDE
1 AREA
2 SPECIFICS
4 CLASS
5 RACE
6 GENERAL
7 DEFAULT
into this:
Code: [Select]
0 OVERRIDE
1 AREA
2 SPECIFICS
3 CLASS
4 RACE
5 GENERAL
6 DEFAULT

but when it updates to version 230 I receive this error:
Code: [Select]
ERROR: Cannot find 7 rows with at least 2 columns.ERROR: [scrlev.ids] -> [override] Patching Failed (COPY) (Failure("Cannot Set 2DA Entry"))
If I change the code to this:
Code: [Select]
COPY_EXISTING ~scrlev.ids~ ~override~
 SET_2DA_ENTRY 3 0 2 ~3~
 SET_2DA_ENTRY 4 0 2 ~4~
 SET_2DA_ENTRY 5 0 2 ~5~
 SET_2DA_ENTRY 6 0 2 ~6~
BUT_ONLY_IF_IT_CHANGES
it will process but changes it incorrectly to this:
Code: [Select]
0 OVERRIDE
1 AREA
3 SPECIFICS
4 CLASS
5 RACE
6 GENERAL
7 DEFAULT
So it obviously isn't an issue where it is counting from 0 instead of 1 since telling it to change line 3 instead of 4 changed the third line.  The issue seems to be that it isn't recognizing the last line (in this case the 7th).  I've even tried it with a column count of 1 and it still errors out on line 7.

the reason I correct the script level numbers is because I actually assign scripts via script to the class and race levels on the party members and if the numbers are not correct they get assigned incorrectly... (tempted to drop it into the fixpack but can't cause of this...)

I don't know which version since 210 it crapped out on, but can we get this to work properly again? 
My working mods:
an AI Party Script for BG2 game engine DOWNLOAD LINK ONLY!
Interactive Tweaks for BG series with some IWD support. DOWNLOAD LINK ONLY!
Rest For 8 Hours an IWD mod
-------------------------------------------
My contributions: BG1Fixpack, BG1Tweaks
On Hold: Solestia an NPC for SOA
-------------------------------------------
My website: http://sasha-altherin.webs.com

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: SET_2DA_ENTRY broken in v230
« Reply #1 on: October 25, 2011, 04:53:46 PM »
The file doesn't have 8 lines, so SET_2DA_ENTRY 7 0 2 must fail. It appears that the second (and correct) code doesn't work because the file begins with an empty line. SET_2DA_ENTRY_LATER/NOW works correctly.
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

Offline plainab

  • Sasha al'Therin
  • Planewalker
  • *****
  • Posts: 491
    • Infinity Engine Modding
Re: SET_2DA_ENTRY broken in v230
« Reply #2 on: October 25, 2011, 05:15:46 PM »
are you saying to use SET_2DA_ENTRY_NOW rather than just SET_2DA_ENTRY?



and on a side note...  the scrlvl.ids file when 'fixed' in BG:ToTSC actually breaks and scripts don't get set right but in IWD1 it has to be fixed to get the correct script slots.  go figure!
My working mods:
an AI Party Script for BG2 game engine DOWNLOAD LINK ONLY!
Interactive Tweaks for BG series with some IWD support. DOWNLOAD LINK ONLY!
Rest For 8 Hours an IWD mod
-------------------------------------------
My contributions: BG1Fixpack, BG1Tweaks
On Hold: Solestia an NPC for SOA
-------------------------------------------
My website: http://sasha-altherin.webs.com

Offline the bigg

  • The Avatar of Fighter / Thieves
  • Moderator
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: SET_2DA_ENTRY broken in v230
« Reply #3 on: October 27, 2011, 03:29:26 PM »
Fixed in git.
Author or Co-Author: WeiDU (http://j.mp/bLtjOn) - Widescreen (http://j.mp/aKAiqG) - Generalized Biffing (http://j.mp/aVgw3U) - Refinements (http://j.mp/bLHoCc) - TB#Tweaks (http://j.mp/ba02Eg) - IWD2Tweaks (http://j.mp/98OFYY) - TB#Characters (http://j.mp/ak8J55) - Traify Tool (http://j.mp/g1Ry9A) - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics (http://j.mp/9UeIwB) - Nalia Mod (http://j.mp/dng9l0) - Nvidia Fix (http://j.mp/aRWjjg)
Code dumps: Detect custom secondary types (http://j.mp/hVzzXG) - Stutter Investigator (http://j.mp/gdtBn8)

If possible, send diffs, translations and other contributions using Git (http://j.mp/aBZFrq).

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: