Mike1072 Posted January 24, 2009 Share Posted January 24, 2009 There are a couple old tweak pack components that are still editing descriptions in a less-than-optimal way for mod compatibility. I figured that providing newer code for them would be preferable to going around saying "don't use these". I've made the following changes: Two-Handed Bastard Swords and Two-Handed Katanas The two-handed versions now have their descriptions patched to display Type: 2-handed instead of Type: 1-handed. This is not related to compatibility, just a bonus feature. Universal Clubs Descriptions for all clubs will now be patched in the Universal Clubs component and the Description Update for Universal Clubs component will be skipped for English installs. Wear Multiple Protection Items (P&P Restrictions) The versions of the items that have no AC bonus now have their description patched instead of overwritten. This ensures there will be no inconsistencies when you switch between the two versions, other than the expected lack of an AC bonus on one. Edit: These changes have been included in version 8 of the BG2 Tweak Pack. Link to comment
Guest Guest Posted January 24, 2009 Share Posted January 24, 2009 Hey, this is great! I was going to request your Two-Handed Bastard Swords and Two-Handed Katanas tweak, but now I don't need to (plus there's sweet bonus stuff). I think cmorgan said something about releasing some mod updates soon, so hopefully he'll be able to include your stuff. Thanks a lot, Mike. Link to comment
Shaitan Posted January 24, 2009 Share Posted January 24, 2009 I think cmorgan said something about releasing some mod updates soon, so hopefully he'll be able to include your stuff. Thanks a lot, Mike. He did and I'm still eagerly waiting Link to comment
Leomar Posted March 26, 2009 Share Posted March 26, 2009 There are a couple old tweak pack components that are still editing descriptions in a less-than-optimal way for mod compatibility. I figured that providing newer code for them would be preferable to going around saying "don't use these". I've made the following changes. Two-Handed Bastard Swords and Two-Handed Katanas: The two-handed versions now have their descriptions patched to display Type: 2-handed instead of Type: 1-handed. This is not related to compatibility, just a bonus feature. Universal Clubs: Descriptions for all clubs will now be patched in the Universal Clubs component and the Description Update for Universal Clubs component will be skipped for English installs. Wear Multiple Protection Items (P&P Restrictions): The versions of the items that have no AC bonus now have their description patched instead of overwritten. This ensures there will be no inconsistencies when you switch between the two versions, other than the lack of an AC bonus on one. Here's a diff: --- Setup-BG2_Tweaks.tp2 2007-12-16 19:12:59.496750000 -0800 +++ Setup-BG2_Tweaks_new.tp2 2009-01-23 22:27:38.328125000 -0800 @@ -4087,6 +4087,22 @@ ... Only to let you know, that we use your code with the BiG World Fixpack. Additional we have included a fix for "Bottomless bag of holding - lag problem and vanishing item" mentioned here. @@ -7808,9 +7908,9 @@ PRINT @1 COPY_EXISTING_REGEXP GLOB ~^.+\.sto$~ ~override~ - READ_LONG 0x08 "itemtype" ELSE 0 + READ_LONG 0x08 "itemtype" ELSE 32767 PATCH_IF ("%itemtype%" = 5) BEGIN - WRITE_SHORT 0x22 0 + WRITE_SHORT 0x22 32767 END BUT_ONLY_IF_IT_CHANGES Greetings Leomar Link to comment
sturmvogel Posted June 23, 2009 Share Posted June 23, 2009 I can't use the BWP fixpack as a Mac user. How can I incorporate these changes into my installation? Are these added to the .tp2 in their entirety? Link to comment
Mike1072 Posted June 23, 2009 Author Share Posted June 23, 2009 I can't use the BWP fixpack as a Mac user. How can I incorporate these changes into my installation? Are these added to the .tp2 in their entirety? Edit: Updated .tp2 can be found in first post. Link to comment
Guest Guest Posted June 23, 2009 Share Posted June 23, 2009 Mike, are you able to attach a replacement BG2 Tweak Pack tp2 for us (one that includes your changes)? That would make things very simple for us non-modders, and would be much appreciated. Link to comment
Mike1072 Posted June 23, 2009 Author Share Posted June 23, 2009 Mike, are you able to attach a replacement BG2 Tweak Pack tp2 for us (one that includes your changes)? That would make things very simple for us non-modders, and would be much appreciated. Done; see first post. It has all the description changes noted in my first post, plus the Bottomless Bags fix from the BWP Fixpack. @Leomar: I fixed one additional spot in the .tp2 dealing with making bags bottomless, line 2394. Link to comment
Guest Guest Posted June 24, 2009 Share Posted June 24, 2009 Mike, are you able to attach a replacement BG2 Tweak Pack tp2 for us (one that includes your changes)? That would make things very simple for us non-modders, and would be much appreciated. Done; see first post. It has all the description changes noted in my first post, plus the Bottomless Bags fix from the BWP Fixpack. @Leomar: I fixed one additional spot in the .tp2 dealing with making bags bottomless, line 2394. Yay! Many thanks. Link to comment
Leomar Posted June 25, 2009 Share Posted June 25, 2009 @Leomar: I fixed one additional spot in the .tp2 dealing with making bags bottomless, line 2394. Thanks, we'll use your new TP2 with the BW Fixpack. Greetings Leomar Link to comment
Leomar Posted June 28, 2009 Share Posted June 28, 2009 @ Mike1072 The bottomless bag fix looked like this: PRINT @1 COPY_EXISTING_REGEXP GLOB ~^.+\.sto$~ ~override~ READ_LONG 0x08 "itemtype" ELSE 32767 PATCH_IF ("%itemtype%" = 5) BEGIN WRITE_SHORT 0x22 32767 END BUT_ONLY_IF_IT_CHANGES Now in your TP2 it looks like this: PRINT @1 COPY_EXISTING_REGEXP GLOB ~^.+\.sto$~ ~override~ READ_LONG 0x08 "itemtype" ELSE 0 PATCH_IF ("%itemtype%" = 5) BEGIN WRITE_SHORT 0x22 32767 END BUT_ONLY_IF_IT_CHANGES Is this not needed: READ_LONG 0x08 "itemtype" ELSE 32767 Greetings Leomar Link to comment
Mike1072 Posted June 28, 2009 Author Share Posted June 28, 2009 Is this not needed:READ_LONG 0x08 "itemtype" ELSE 32767 Greetings Leomar No, it's not needed. When you use "READ_X offset variable ELSE value", it will try to read the information from the offset and assign it to the variable. If the offset is out-of-bounds (file's too small), instead of failing, the specified value will be assigned to the variable in place of the information from the file. Since the PATCH_IF statement only cares whether the variable has the value 5 or not, it makes no difference if we assign 0 or 32767 to the variable when we don't intend to patch the file. Link to comment
Leomar Posted June 29, 2009 Share Posted June 29, 2009 Is this not needed:READ_LONG 0x08 "itemtype" ELSE 32767 Greetings Leomar No, it's not needed. When you use "READ_X offset variable ELSE value", it will try to read the information from the offset and assign it to the variable. If the offset is out-of-bounds (file's too small), instead of failing, the specified value will be assigned to the variable in place of the information from the file. Since the PATCH_IF statement only cares whether the variable has the value 5 or not, it makes no difference if we assign 0 or 32767 to the variable when we don't intend to patch the file. Thanks for the answer, Mike1072. Greetings Leomar Link to comment
Leomar Posted July 19, 2009 Share Posted July 19, 2009 We have updated the German translation of BG2 Tweak Pack and now, translated the description_updates.tra, too. With the Chinese there are two LANGUAGE versions who used this description_updates.tra. We took Mike 1072's fixed Setup-BG2_Tweaks.tp2 and changed the following in there: Line 800: AUTO_TRA ~BG2_Tweaks/languages/%s~ LANGUAGE ~English~ ~english~ ~BG2_Tweaks/languages/english/description_updates.tra~ ~BG2_Tweaks/languages/english/setup.tra~ LANGUAGE ~Czech (Translation by Razfallow and Vlasák)~ ~czech~ ~BG2_Tweaks/languages/czech/setup.tra~ LANGUAGE ~Francais (Translation by Anomaly, Elgaern the Dragon Slayer, Isaya and elminster)~ ~french~ ~BG2_Tweaks/languages/french/setup.tra~ LANGUAGE ~Deutsch (Uebersetzung von Leonardo Watson, Caswallon und Jester)~ ~german~ ~BG2_Tweaks/languages/german/description_updates.tra~ ~BG2_Tweaks/languages/german/setup.tra~ LANGUAGE ~Italiano (translation by Andrea Columbo; original EoU by Antonio Favata)~ ~italian~ ~BG2_Tweaks/languages/italian/setup.tra~ LANGUAGE ~Korean (Translation by web2air)~ ~korean~ ~BG2_Tweaks/languages/korean/setup.tra~ LANGUAGE ~Polski (Translation by yarpen, Artanis, dragionian, Evendur, Grjgori, and Neminus)~ ~polish~ ~BG2_Tweaks/languages/polish/setup.tra~ LANGUAGE ~Russian (Translation by Creepin, Domi, Kulyok, Serdrick, and aerie.ru)~ ~russian~ ~BG2_Tweaks/languages/russian/setup.tra~ LANGUAGE ~Espanol (traducido por Clan DLAN)~ ~spanish~ ~BG2_Tweaks/languages/spanish/setup.tra~ LANGUAGE ~Chinese (translated by Miranda)~ ~chinese~ ~BG2_Tweaks/languages/chinese/description_updates.tra~ ~BG2_Tweaks/languages/chinese/setup.tra~ Line 4501: REQUIRE_PREDICATE (("%LANGUAGE%" STRING_COMPARE_CASE "english" = 0) OR ("%LANGUAGE%" STRING_COMPARE_CASE "chinese" = 0) OR ("%LANGUAGE%" STRING_COMPARE_CASE "german" = 0)) @7 Line 6064: // description updates ACTION_IF (("%LANGUAGE%" STRING_COMPARE_CASE "chinese" = 0) or ("%LANGUAGE%" STRING_COMPARE_CASE "german" = 0)) THEN BEGIN // Chinese and German only (English is patched above) Line 6924: REQUIRE_PREDICATE (("%LANGUAGE%" STRING_COMPARE_CASE "english" = 0) OR ("%LANGUAGE%" STRING_COMPARE_CASE "chinese" = 0) OR ("%LANGUAGE%" STRING_COMPARE_CASE "german" = 0)) @7 You get the updated files here: Removed, see for the current update below. Was that all what we must do for the German language version or is there anything else? Mike1072, do we must do something of your "Type: 2-handed" changes? Greetings Leomar Link to comment
Mike1072 Posted July 19, 2009 Author Share Posted July 19, 2009 Heh, if you let me know what you were planning, I probably could have saved you some time. The description_updates.tra contains all of the old-style description updates that overwrite previous descriptions without taking into account whether they might have been previously changed, which is what my code is trying to change. If you want to patch things dynamically, I can provide help with the code (especially the regular expressions). As an example of patching descriptions dynamically, in the Wear Multiple Protection Items P&P Style component, to patch the versions of items that stack with armour but have no AC bonus, the code looks for a line starting with "Armor Class:" or "Armour Class:" and deletes that line, using this code: REPLACE_TEXTUALLY ~[%lnl%%mnl%%wnl%] *Armou?r Class.*:.*~ ~~ This is instead of writing new descriptions for every item of Protection with the line removed. I'm not totally sure about how people using different languages play and install mods and might need more information before knowing how best to patch descriptions for them. If all of your text in-game is in German, in this component you'd just need to remove the German version of Armor Class. If instead you commonly have some text in German but other text in English, you'd want code to remove both lines. Line 800 AUTO_TRA ~BG2_Tweaks/languages/%s~ LANGUAGE [...] For the non-English languages, the reason for specifying the English setup.tra like this ~BG2_Tweaks/languages/english/setup.tra~ ~BG2_Tweaks/languages/german/setup.tra~ is probably so that if the mod gets updated with a new string somewhere and the string gets added to the English .tra but not the other .tra (in this case German), WeiDU won't die, it will just take the English string when no German one exists. Line 4501: REQUIRE_PREDICATE (("%LANGUAGE%" STRING_COMPARE_CASE "english" = 0) OR ("%LANGUAGE%" STRING_COMPARE_CASE "chinese" = 0) OR ("%LANGUAGE%" STRING_COMPARE_CASE "german" = 0)) @7 I think I removed the English line from here so that the component ("Description Updates for Universal Clubs") would be skipped for English installs, since they get their descriptions changed in the main Universal Clubs component now. If you end up using patching code instead of this component to update descriptions, you'll want to disable it for your language as well. Line 6064: // description updates ACTION_IF (("%LANGUAGE%" STRING_COMPARE_CASE "chinese" = 0) or ("%LANGUAGE%" STRING_COMPARE_CASE "german" = 0)) THEN BEGIN // Chinese and German only (English is patched above) Same notes as above. Be careful with your syntax, WeiDU commands are case sensitive - using "or" here will throw an error, you'll want either "OR" or "||". Line 6924: REQUIRE_PREDICATE (("%LANGUAGE%" STRING_COMPARE_CASE "english" = 0) OR ("%LANGUAGE%" STRING_COMPARE_CASE "chinese" = 0) OR ("%LANGUAGE%" STRING_COMPARE_CASE "german" = 0)) @7 This one is okay. Just in case anyone is wondering why I didn't bother writing patching code for this component ("Make +x/+y Weapons Consistent"), it's because it can only be installed when the Fixpack isn't installed. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.