Steve Posted November 15, 2008 Share Posted November 15, 2008 Song and Silence v3 misuses the STRING_MATCHES_REGEXP operator in its .TP2 file, causing WeiDU to do the opposite of what is wanted. Adding the Adventurer kit after the NPC Kitpack's "Give Imoen Adventurer kit" will change every CRE except Imoen to an Adventurer. This mistake also shows up if the BG2 Fixpack is not installed. The fix is to change every: "string" STRING_MATCHES_REGEXP ~pattern~ to: ("string" STRING_MATCHES_REGEXP ~pattern~)=0 Hm, I can't see any way to attach the fixed .TP2 file so you'll need to change it manually. Link to comment
Guest Guest Posted November 15, 2008 Share Posted November 15, 2008 Maybe you could email it to cmorgan and he could upload the fix? Link to comment
cmorgan Posted November 15, 2008 Share Posted November 15, 2008 Hey, Steve, to confirm: the change is from: // unecessary if Fixpack ACTION_IF NOT MOD_IS_INSTALLED setup-bg2fixpack.tp2 0 THEN BEGIN //Fix Blade's pick pockets skill COPY ~song_and_silence/chorister/a!pp2.spl~ override COPY ~song_and_silence/chorister/a!pp3.spl~ override COPY ~song_and_silence/chorister/a!pp13.spl~ override COPY_EXISTING clabba02.2da override COUNT_2DA_COLS cols READ_2DA_ENTRIES_NOW rows cols SPRINT entry null FOR (i_0 = 0; i_0 < rows && ~%entry%~ STRING_MATCHES_REGEXP ~\*+~; i_0 += 1) BEGIN READ_2DA_ENTRY_FORMER rows i_0 1 entry PATCH_IF NOT ~%entry%~ STRING_MATCHES_REGEXP ~\*+~ BEGIN SET_2DA_ENTRY_LATER clabba02_set i_0 1 ~AP_A!PP13~ END END FOR (i_0 = 2; i_0 < cols && i_0 < 16; i_0 += 2) BEGIN SPRINT entry null FOR (i_1 = 0; i_1 < rows && ~%entry%~ STRING_MATCHES_REGEXP ~\*+~; i_1 += 1) BEGIN READ_2DA_ENTRY_FORMER rows i_1 i_0 entry PATCH_IF NOT ~%entry%~ STRING_MATCHES_REGEXP ~\*+~ BEGIN PATCH_IF 2 * (i_0 / 2) = i_0 BEGIN SET_2DA_ENTRY_LATER clabba02_set i_1 i_0 ~AP_A!PP2~ END ELSE BEGIN SET_2DA_ENTRY_LATER clabba02_set i_1 i_0 ~AP_A!PP3~ END END END END SET_2DA_ENTRIES_NOW clabba02_set cols PRETTY_PRINT_2DA BUT_ONLY UNLESS ~AP_CDBLPP~ to: // unecessary if Fixpack ACTION_IF NOT MOD_IS_INSTALLED setup-bg2fixpack.tp2 0 THEN BEGIN //Fix Blade's pick pockets skill COPY ~song_and_silence/chorister/a!pp2.spl~ override COPY ~song_and_silence/chorister/a!pp3.spl~ override COPY ~song_and_silence/chorister/a!pp13.spl~ override COPY_EXISTING clabba02.2da override COUNT_2DA_COLS cols READ_2DA_ENTRIES_NOW rows cols SPRINT entry null FOR (i_0 = 0; i_0 < rows && ~%entry%~ STRING_MATCHES_REGEXP ~\*+~; i_0 += 1) BEGIN READ_2DA_ENTRY_FORMER rows i_0 1 entry PATCH_IF NOT (~%entry%~ STRING_MATCHES_REGEXP ~\*+~) = 0 BEGIN SET_2DA_ENTRY_LATER clabba02_set i_0 1 ~AP_A!PP13~ END END FOR (i_0 = 2; i_0 < cols && i_0 < 16; i_0 += 2) BEGIN SPRINT entry null FOR (i_1 = 0; i_1 < rows && ~%entry%~ STRING_MATCHES_REGEXP ~\*+~; i_1 += 1) BEGIN READ_2DA_ENTRY_FORMER rows i_1 i_0 entry PATCH_IF NOT (~%entry%~ STRING_MATCHES_REGEXP ~\*+~) = 0 BEGIN PATCH_IF 2 * (i_0 / 2) = i_0 BEGIN SET_2DA_ENTRY_LATER clabba02_set i_1 i_0 ~AP_A!PP2~ END ELSE BEGIN SET_2DA_ENTRY_LATER clabba02_set i_1 i_0 ~AP_A!PP3~ END END END END SET_2DA_ENTRIES_NOW clabba02_set cols PRETTY_PRINT_2DA BUT_ONLY UNLESS ~AP_CDBLPP~ FOR (i_0 = 0; i_0 < rows && ~%entry%~ STRING_MATCHES_REGEXP ~\*+~; i_0 += 1) BEGIN matches the pattern, but ~%entry%~ STRING_MATCHES_REGEXP ~\*+~ does not... right? And more specifically to this trouble, //This means that if Idobek's Kitpack is installed, Nalia and Imoen will get this version of the Adventurer. ACTION_IF MOD_IS_INSTALLED npckit.tp2 1400 || MOD_IS_INSTALLED npckit.tp2 2500 THEN BEGIN COPY_EXISTING_REGEXP GLOB ~^.+\.cre$~ override PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN READ_ASCII DEATHVAR dv PATCH_IF "%dv%" STRING_MATCHES_REGEXP ~^imoen2?$~ && MOD_IS_INSTALLED npckit.tp2 1400 BEGIN PATCH_PRINT @80 WRITE_SHORT 0x244 0x0000 WRITE_BYTE 0x246 %A!ADVENTURER% WRITE_BYTE 0x247 0x40 END ELSE PATCH_IF "%dv%" STRING_MATCHES_REGEXP ~^nalia$~ && MOD_IS_INSTALLED npckit.tp2 2500 BEGIN PATCH_PRINT @81 WRITE_SHORT 0x244 0x0000 WRITE_BYTE 0x246 %A!ADVENTURER% WRITE_BYTE 0x247 0x40 END END BUT_ONLY END the PATCH_IF "%dv%" STRING_MATCHES_REGEXP ~^imoen2?$~ && MOD_IS_INSTALLED npckit.tp2 1400 BEGIN and similar need to be PATCH_IF ("%dv%" STRING_MATCHES_REGEXP ~^imoen2?$~) = 0 && MOD_IS_INSTALLED npckit.tp2 1400 BEGIN ? (wait a sec - no. it needs to be FOR (i_0 = 0; i_0 < rows && (~%entry%~ STRING_MATCHES_REGEXP ~\*+~) = 0; i_0 += 1) BEGIN right...) Link to comment
Mike1072 Posted November 15, 2008 Share Posted November 15, 2008 Hey, Steve, to confirm: the change is from: // unecessary if Fixpack ACTION_IF NOT MOD_IS_INSTALLED setup-bg2fixpack.tp2 0 THEN BEGIN //Fix Blade's pick pockets skill COPY ~song_and_silence/chorister/a!pp2.spl~ override COPY ~song_and_silence/chorister/a!pp3.spl~ override COPY ~song_and_silence/chorister/a!pp13.spl~ override COPY_EXISTING clabba02.2da override COUNT_2DA_COLS cols READ_2DA_ENTRIES_NOW rows cols SPRINT entry null FOR (i_0 = 0; i_0 < rows && ~%entry%~ STRING_MATCHES_REGEXP ~\*+~; i_0 += 1) BEGIN READ_2DA_ENTRY_FORMER rows i_0 1 entry PATCH_IF NOT ~%entry%~ STRING_MATCHES_REGEXP ~\*+~ BEGIN SET_2DA_ENTRY_LATER clabba02_set i_0 1 ~AP_A!PP13~ END END FOR (i_0 = 2; i_0 < cols && i_0 < 16; i_0 += 2) BEGIN SPRINT entry null FOR (i_1 = 0; i_1 < rows && ~%entry%~ STRING_MATCHES_REGEXP ~\*+~; i_1 += 1) BEGIN READ_2DA_ENTRY_FORMER rows i_1 i_0 entry PATCH_IF NOT ~%entry%~ STRING_MATCHES_REGEXP ~\*+~ BEGIN PATCH_IF 2 * (i_0 / 2) = i_0 BEGIN SET_2DA_ENTRY_LATER clabba02_set i_1 i_0 ~AP_A!PP2~ END ELSE BEGIN SET_2DA_ENTRY_LATER clabba02_set i_1 i_0 ~AP_A!PP3~ END END END END SET_2DA_ENTRIES_NOW clabba02_set cols PRETTY_PRINT_2DA BUT_ONLY UNLESS ~AP_CDBLPP~ to: ... I don't believe this needs to be changed. //This means that if Idobek's Kitpack is installed, Nalia and Imoen will get this version of the Adventurer. ACTION_IF MOD_IS_INSTALLED npckit.tp2 1400 || MOD_IS_INSTALLED npckit.tp2 2500 THEN BEGIN COPY_EXISTING_REGEXP GLOB ~^.+\.cre$~ override PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN READ_ASCII DEATHVAR dv PATCH_IF "%dv%" STRING_MATCHES_REGEXP ~^imoen2?$~ && MOD_IS_INSTALLED npckit.tp2 1400 BEGIN PATCH_PRINT @80 WRITE_SHORT 0x244 0x0000 WRITE_BYTE 0x246 %A!ADVENTURER% WRITE_BYTE 0x247 0x40 END ELSE PATCH_IF "%dv%" STRING_MATCHES_REGEXP ~^nalia$~ && MOD_IS_INSTALLED npckit.tp2 2500 BEGIN PATCH_PRINT @81 WRITE_SHORT 0x244 0x0000 WRITE_BYTE 0x246 %A!ADVENTURER% WRITE_BYTE 0x247 0x40 END END BUT_ONLY END the PATCH_IF "%dv%" STRING_MATCHES_REGEXP ~^imoen2?$~ && MOD_IS_INSTALLED npckit.tp2 1400 BEGIN and similar need to be PATCH_IF ("%dv%" STRING_MATCHES_REGEXP ~^imoen2?$~) = 0 && MOD_IS_INSTALLED npckit.tp2 1400 BEGIN ? Yep. Link to comment
Steve Posted November 15, 2008 Author Share Posted November 15, 2008 Mike is correct; I misread the code. The lines that are done when the Fixpack is not installed are OK. Only the two STRING_MATCHES_REGEXP in the Adventurer section need to be changed. Link to comment
Guest Dirty Uncle Bertie Posted November 16, 2008 Share Posted November 16, 2008 I looked in ABDCDSRQ.2DA and ABDCSCRQ.2DA and saw that the ADVENTURER entry looked like this: MIN_STR MIN_DEX MIN_CON MIN_INT MIN_WIS MIN_CHR A!ADVENTURER 0 17 0 0 0 0 But all the other entries look like this: MIN_STR MIN_DEX MIN_CON MIN_INT MIN_WIS MIN_CHR HELM 0 0 0 0 17 0 LATHANDER 0 0 0 0 17 0 Link to comment
Guest D. U. Bertie Posted December 6, 2008 Share Posted December 6, 2008 Anyone care to comment on the ABDCDSRQ.2DA and ABDCSCRQ.2DA issue? Is this something I should be worried about? Link to comment
Steve Posted December 8, 2008 Author Share Posted December 8, 2008 The game doesn't care about lining up columns, just that there are the right number of fields. The line shows that the A!ADVENTURER kit requires a minimum Dex of 17. Link to comment
Guest D. U. Bertie Posted December 8, 2008 Share Posted December 8, 2008 Cool, thanks. I noticed that the BURGLAR and SHARPSHOOTER entries were fine (haven't installed any other kits from S&S) so thought that maybe there was just an issue with the ADVENTURER kit. Still, for neatness sake maybe it could be corrected in the next version. Link to comment
Azazello Posted December 9, 2008 Share Posted December 9, 2008 I noticed that the BURGLAR and SHARPSHOOTER entries were fine (haven't installed any other kits from S&S) so thought that maybe there was just an issue with the ADVENTURER kit. Still, for neatness sake maybe it could be corrected in the next version. Mods are rarely corrected for neatness. Don't believe me--start going thru many TP2 and BAF files of different mods. Link to comment
Leomar Posted May 25, 2009 Share Posted May 25, 2009 Only to let you know, that we fix this with the BiG World Fixpack: --- song_and_silence\setup-song_and_silence.tp2 Fri Aug 01 10:13:22 2008 +++ C:\BWP Patchstudio\patched files\song_and_silence\setup-song_and_silence.tp2 Tue Dec 16 19:13:05 2008 @@ -685,7 +685,7 @@ COPY_EXISTING_REGEXP GLOB ~^.+\.cre$~ override PATCH_IF SOURCE_SIZE > 0x2d3 BEGIN READ_ASCII DEATHVAR dv - PATCH_IF "%dv%" STRING_MATCHES_REGEXP ~^imoen2?$~ && MOD_IS_INSTALLED npckit.tp2 1400 BEGIN + PATCH_IF ("%dv%" STRING_MATCHES_REGEXP ~^imoen2?$~) = 0 && MOD_IS_INSTALLED npckit.tp2 1400 BEGIN PATCH_PRINT @80 WRITE_SHORT 0x244 0x0000 WRITE_BYTE 0x246 %A!ADVENTURER% Greetings Leomar Link to comment
Mike1072 Posted May 25, 2009 Share Posted May 25, 2009 Only to let you know, that we fix this with the BiG World Fixpack: - PATCH_IF "%dv%" STRING_MATCHES_REGEXP ~^imoen2?$~ && MOD_IS_INSTALLED npckit.tp2 1400 BEGIN + PATCH_IF ("%dv%" STRING_MATCHES_REGEXP ~^imoen2?$~) = 0 && MOD_IS_INSTALLED npckit.tp2 1400 BEGIN Greetings Leomar The similar statement just below on line 693: END ELSE PATCH_IF "%dv%" STRING_MATCHES_REGEXP ~^nalia$~ && MOD_IS_INSTALLED npckit.tp2 2500 BEGIN Should be changed as well, to: END ELSE PATCH_IF ("%dv%" STRING_MATCHES_REGEXP ~^nalia$~) = 0 && MOD_IS_INSTALLED npckit.tp2 2500 BEGIN Link to comment
Leomar Posted May 27, 2009 Share Posted May 27, 2009 Only to let you know, that we fix this with the BiG World Fixpack: - PATCH_IF "%dv%" STRING_MATCHES_REGEXP ~^imoen2?$~ && MOD_IS_INSTALLED npckit.tp2 1400 BEGIN + PATCH_IF ("%dv%" STRING_MATCHES_REGEXP ~^imoen2?$~) = 0 && MOD_IS_INSTALLED npckit.tp2 1400 BEGIN Greetings Leomar The similar statement just below on line 693: END ELSE PATCH_IF "%dv%" STRING_MATCHES_REGEXP ~^nalia$~ && MOD_IS_INSTALLED npckit.tp2 2500 BEGIN Should be changed as well, to: END ELSE PATCH_IF ("%dv%" STRING_MATCHES_REGEXP ~^nalia$~) = 0 && MOD_IS_INSTALLED npckit.tp2 2500 BEGIN Thank you Mike1072, we'll add this. Greetings Leomar Link to comment
cmorgan Posted June 24, 2009 Share Posted June 24, 2009 Posting for recheck, before uploading Song 7 Silence v4; changes: Roter Berserker, German Translation of Song & Silence http://forums.gibberlings3.net/index.php?showtopic=17482 Steve and mike1072's repairs, http://forums.gibberlings3.net/index.php?showtopic=16050 Nothing else anyone has found, right? Link to comment
cmorgan Posted June 24, 2009 Share Posted June 24, 2009 Oh, and http://forums.gibberlings3.net/index.php?s...st&p=149516 If not, then it should be ready for packaging. I will show changes below and leave this for a bit for recheck by anyone who can comment - readme changes: <body> <h1>Song and Silence: A Mod for Bards and Thieves</h1> <div class="section"> <p><strong><a href="http://www.gibberlings3.net/">A Gibberlings Three Mod</a><br /> Authors: <a href="http://forums.gibberlings3.net/index.php?showuser=30">Andyr</a>, <a href="http://forums.gibberlings3.net/index.php?showuser=25">Grim Squeaker</a>, and <a href="http://forums.gibberlings3.net/index.php?showuser=17">NiGHTMARE</a> <br /> On the web: <a href="http://www.gibberlings3.net/sns/">Home page</a></strong> and <strong><a href="http://forums.gibberlings3.net/index.php?showforum=72">discussion forum</a></strong></p> <p><strong> Version 4 - <a href="http://www.gibberlings3.net/downloads/#sns">Check for the most recent version</a></strong><br /> <strong>Languages:</strong> English, French, German, Polish<br /> <strong>Platforms:</strong> Windows, Mac OS X, and Linux </div> // snip for space <h2>Version History</h2> <div class="section"> <p><strong>Version 4 - June 24, 2009 </strong></p> <ul> <li>WeiDU update to v210</li> <li><a href="http://forums.gibberlings3.net/index.php?showtopic=17482">German translation</a> provided by Roter Berserker</li> <li><a href="http://forums.gibberlings3.net/index.php?showtopic=16050">PATCH_IF code repair</a> provided by Steve and Mike1072</li> <li><a href="http://forums.gibberlings3.net/index.php?showtopic=12060">ASCIIE code repair</a> provided by Mike1072</li> </ul> <p><strong>Version 3 - August 1, 2008 </strong></p> <ul> <li>WeiDU update to v208, README/VERSION behavior, removed obsolete auto-update.bat, cosmetic readme fixes.</li> <li>French translation by Zayn and Lothringen of the d'Oghmatiques, Polish translation by Yarpen.</li> <li>Bugfixes and reported problems through June, 2008 addressed by Nythrun.</li> </ul> <p><strong>Version 2 - September 18, 2007</strong></p> <ul> code changes: language added, LANGUAGE ~German (translated by Roter Berserker)~ ~german~ ~song_and_silence/tra/german/setup-song_and_silence.tra~ and PATCH_IF repairs: {done incorrectly - Mike1072 is IM'ing me through makings sure they work right!) Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.