Jump to content

IR Revised V1.3.800 (2022 January 11th)


Recommended Posts

A WeiDU function will of course but that's a bit more advanced than *

What ? This is why weidu has COPY_EXISTING_REGEXP GLOB ~ax1h.*itm$~ ~override~ //our patching code goes here that features: "simply changing a flag and adding an effect".

 

Say, something close to this effect:

PATCH_IF GAME_IS ~eet bgee bg2ee iwdee~ BEGIN //this needs updated weidu exe something starting with v240 or later
COPY_EXISTING_REGEXP GLOB ~ax1h.*itm$~ ~override~ BEGIN
	WRITE_BYTE ~0x021~ THIS & `BIT6 // unset BIT6
	LPF ~ADD_SPELL_EFFECT~ INT_VAR opcode=319 target=1 timing=2 duration=0 parameter1=11 parameter2=5 END

COPY_EXISTING_REGEXP GLOB ~arow.*itm$~ ~override~ BEGIN
	WRITE_BYTE ~0x021~ THIS & `BIT6
	LPF ~ADD_SPELL_EFFECT~ INT_VAR opcode=319 target=1 timing=2 duration=0 parameter1=11 parameter2=5 END

COPY_EXISTING ~bow05.itm~ ~override~
              ~bow06.itm~ ~override~
              ~bow08.itm~ ~override~
              ~bow14.itm~ ~override~
              ~bow15.itm~ ~override~
              ~bow18.itm~ ~override~
              ~bow19.itm~ ~override~
              ~bow20.itm~ ~override~
              ~bow21.itm~ ~override~
              ~bow26.itm~ ~override~
              ~bow99.itm~ ~override~ BEGIN
	WRITE_BYTE ~0x021~ THIS & `BIT6
	LPF ~ADD_SPELL_EFFECT~ INT_VAR opcode=319 target=1 timing=2 duration=0 parameter1=11 parameter2=5 END

This code is of course untested and might need tweaking, but it should be close.

Edited by Jarno Mikkola
Link to comment

I'll test this later on an old installation. Looks to me like it should work, but this would only fix none mod items, right?

The problem is mod added items are affected as well and even if you check for something like PROFICIENCYSHORTBOW you'll run into issues where you suddenly flag items that are not supposed to work for shamans. Like a thief only short bow for example...

Link to comment

The IR readme says this

 

The main component of IR overwrites existing items and their descriptions, so it should be installed before mods that patch items. If you would prefer certain items remain unaltered by IR, you have the option to disable specific item modifications prior to installing the mod. You can find instructions on how to do this in the Power Users section below.

The other components of IR have been designed to patch all items, including items added by other mods, so they should be installed after all mods that add or replace items.

 

 

Yet, I am fairly certain that the main component did patch mod added bows as well.

I fear I am too much of a WeiDU newb to effectively check the actual code as to where what is patched and why/whether it is necessary..

Link to comment

code doesn't work

 

 

 

[C:\BGEE\EET-Ready\Baldur's Gate II - Enhanced Edition_OLD-For-Modding\Setup-Tes
tx.exe] WeiDU version 24200
In state 875, I expected one of these tokens:
  [0] EOF
  [3] <<<<<<<<
  [14] ACTION_GET_STRREF_S
  [18] OUTER_TEXT_SPRINT
  [22] RANDOM_SEED
  [23] ADD_KIT
  [27] AT_INTERACTIVE_UNINSTALL
  [34] LAUNCH_ACTION_FUNCTION
  [40] LOG
  [42] COPY_ALL_GAM_FILES
  [45] SILENT
  [48] BEGIN
  [50] ADD_MUSIC
  [52] BIFF
  [56] GET_DIRECTORY_ARRAY
  [63] PRINT
  [70] WITH_SCOPE
  [73] WITH_TRA
  [75] ACTION_RERAISE
  [79] ACTION_IF
  [84] APPEND
  [86] DEFINE_ACTION_MACRO
  [87] ACTION_TO_UPPER
  [88] ACTION_GET_STRREF
  [93] DEPRECATED
  [94] FORCED_SUBCOMPONENT
  [95] ACTION_GET_STRREF_F
  [96] STRING_SET_EVALUATE
  [97] OUTER_FOR
  [98] REQUIRE_COMPONENT
  [100] FAIL
  [101] AT_UNINSTALL
  [104] CLEAR_ARRAYS
  [106] ACTION_GET_STRREF_FS
  [110] GROUP
  [123] COPY_EXISTING
  [124] REINCLUDE
  [127] MOVE
  [131] ADD_AREA_TYPE
  [141] EXTEND_TOP_REGEXP
  [144] ADD_PROJECTILE
  [145] OUTER_PATCH_SAVE
  [146] CREATE
  [152] MKDIR
  [154] OUTER_SET
  [155] WARN
  [157] STRING_SET
  [159] COPY_RANDOM
  [160] ADD_JOURNAL
  [166] DISABLE_FROM_KEY
  [168] AT_INTERACTIVE_EXIT
  [169] ACTION_READLN
  [171] ACTION_DEFINE_ARRAY
  [172] UNINSTALL
  [180] VERBOSE
  [181] DEFINE_PATCH_FUNCTION
  [189] ACTION_BASH_FOR
  [197] ACTION_MATCH
  [198] REQUIRE_FILE
  [205] ACTION_FOR_EACH
  [207] CLEAR_CODES
  [214] EXTEND_TOP
  [216] CLEAR_MEMORY
  [217] DECOMPRESS_BIFF
  [225] DESIGNATED
  [228] COPY
  [229] APPEND_COL_OUTER
  [233] DEFINE_PATCH_MACRO
  [236] COPY_LARGE
  [249] COPY_KIT
  [254] ADD_SECTYPE
  [255] ACTION_CLEAR_ARRAY
  [259] EXTEND_BOTTOM
  [276] ALTER_TLK
  [278] COPY_EXISTING_REGEXP
  [284] EXTEND_BOTTOM_REGEXP
  [285] FORBID_FILE
  [286] CLEAR_IDS_MAP
  [289] ALTER_TLK_LIST
  [300] OUTER_PATCH
  [304] AT_INTERACTIVE_NOW
  [306] AT_EXIT
  [308] AT_INTERACTIVE_UNINSTALL_EXIT
  [311] NO_LOG_RECORD
  [314] STRING_SET_RANGE
  [315] APPEND_COL
  [318] ACTION_TO_LOWER
  [323] ADD_SPELL
  [326] CLEAR_EVERYTHING
  [327] GET_FILE_ARRAY
  [332] AT_NOW
  [334] LOAD_TRA
  [335] REQUIRE_PREDICATE
  [337] INSTALL_BY_DEFAULT
  [339] ACTION_PHP_EACH
  [342] SUBCOMPONENT
  [349] ACTION_TRY
  [351] ACTION_DEFINE_ASSOCIATIVE_ARRAY
  [354] INCLUDE
  [363] ALTER_TLK_RANGE
  [368] DEFINE_ACTION_FUNCTION
  [369] OUTER_SPRINT
  [372] LAUNCH_ACTION_MACRO
  [373] FORBID_COMPONENT
  [392] COMPILE
  [397] AT_UNINSTALL_EXIT
  [403] ADD_SCHOOL
  [404] LABEL
  [410] APPEND_OUTER
  [413] CLEAR_INLINED
  [416] DELETE
  [430] OUTER_WHILE
Parse error (state 875) at PATCH_IF

[TESTX/SETUP-TESTX.TP2] PARSE ERROR at line 7 column 1-8
Near Text: PATCH_IF
        GLR parse error

[TESTX/SETUP-TESTX.TP2]  ERROR at line 7 column 1-8
Near Text: PATCH_IF
        Parsing.Parse_error
ERROR: parsing [TESTX/SETUP-TESTX.TP2]: Parsing.Parse_error
ERROR: problem parsing TP file [TESTX/SETUP-TESTX.TP2]: Parsing.Parse_error

FATAL ERROR: Parsing.Parse_error

Press ENTER to exit.

 

 

Link to comment

Switch the PATCH_IF to be REQUIRE_PREDICATE ... This will requyire you to make it an independent component, name that component... so:

BEGIN ~Shaman usability patch~
REQUIRE_PREDICATE GAME_IS ~eet bgee bg2ee iwdee~ BEGIN //this needs updated weidu exe something starting with v240 or later

COPY_EXISTING_REGEXP GLOB ~ax1h.*itm$~ ~override~ BEGIN
	WRITE_BYTE ~0x021~ THIS & `BIT6 // unset BIT6
	LPF ~ADD_SPELL_EFFECT~ INT_VAR opcode=319 target=1 timing=2 duration=0 parameter1=11 parameter2=5 END

COPY_EXISTING_REGEXP GLOB ~arow.*itm$~ ~override~ BEGIN
	WRITE_BYTE ~0x021~ THIS & `BIT6
	LPF ~ADD_SPELL_EFFECT~ INT_VAR opcode=319 target=1 timing=2 duration=0 parameter1=11 parameter2=5 END

COPY_EXISTING ~bow05.itm~ ~override~
              ~bow06.itm~ ~override~
              ~bow08.itm~ ~override~
              ~bow14.itm~ ~override~
              ~bow15.itm~ ~override~
              ~bow18.itm~ ~override~
              ~bow19.itm~ ~override~
              ~bow20.itm~ ~override~
              ~bow21.itm~ ~override~
              ~bow26.itm~ ~override~
              ~bow99.itm~ ~override~ BEGIN
	WRITE_BYTE ~0x021~ THIS & `BIT6
	LPF ~ADD_SPELL_EFFECT~ INT_VAR opcode=319 target=1 timing=2 duration=0 parameter1=11 parameter2=5 END
Link to comment

Now you get to this one...

BACKUP ~modname/backup~
AUTHOR ~The Imp~

BEGIN ~Shaman usability patch~
MKDIR modname
ACTION_IF (GAME_IS ~eet bgee bg2ee iwdee~ ) BEGIN
COPY_EXISTING_REGEXP GLOB ~.*\.itm$~ ~override~
	PATCH_IF (SOURCE_SIZE > 0x113) BEGIN // protects against invalid files
	READ_SHORT ~0x1C~ ~type~
	PATCH_IF (type = 0x5) OR (type = 0xf) OR (type = 0x19) BEGIN
	READ_BYTE  ~0x21~ ~race~
	WRITE_BYTE  0x21  (race BAND  0b10111111)
	LPF ~ADD_SPELL_EFFECT~ INT_VAR opcode = 319 target = 1 timing = 2 duration = 0 parameter1 = 11 parameter2 = 5 resist_dispel = 0 probability1 = 100 insert_point = 0 
END
END
END
END

It 's checked that it works in a BG2 game with weidu.exe v244... but I can't say that it actually "works", as I don't have the bug.

 

The only bad side it has it should make all the bows usable to Shamans, not just Short Bows, but they don't have the proffs, so it matter not that much.

Link to comment

LPF ~ADD_SPELL_EFFECT~ INT_VAR opcode = 319 target = 1 timing = 2 duration = 0 parameter1 = 11 parameter2 = 5 resist_dispel = 0 probability1 = 100 insert_point = 0

 

I presume this is the "add usability for class/kit" opcode in the EEs? IR already has an item type identifier, thankfully, so it would be very easy to integrate for only EE games if that's the case.

 

(e): Ah, I see that subtledoctor whipped up something similar. Yes, I'll fix this for the next version.

Edited by Bartimaeus
Link to comment

I presume this is the "add usability for class/kit" opcode in the EEs? IR already has an item type identifier, thankfully, so it would be very easy to integrate for only EE games if that's the case.

Actually that's the exact opposite. The item is first allowed to be usable by all druids by the other code, which allows also Shamans to use them, and then this restricts axes from usage by druids, but not Shamans that use the same class marker for usability, but not the same class mark on the class stat identifier(class.ids), which that code restricts usage from. Aka we do the exact thing the EE v2.3 patch did.

Edited by Jarno Mikkola
Link to comment

V.1.13 released:

1. Dwarven Shield's AC bonus was 1 less than it should be.

2. Strong Arm's damage was 1 less than what it should be (tentative fix).

3. Removed greater than and less than symbols for the Purifier +4/+5 for EE compatibility.

4. Throwing Axe +2's icon was misaligned.

5. Mithral Full Plate Mail +2 (not Bruenor's) had 1 more AC than it should've.

6. Rod of the Apprenti now has the correct amount of charges when initially given.

7. Staff of the Ram +4 was previously saying it did an extra 1D8 crushing damage - now says 5.

8. Harmonium Halberd had a wrongly colored blade.

9. Changed the prices of a few items a little like Harbinger, Harmonium Halberd, Joril's Dagger, and Sling of Everard to make them more in line with items of similar power.

10. Makes "on strike" effects (specifically Cloak of Nature's Vengeance, Keldorn's armor, Casiel's Soul, and Shield of Dawn) affect only enemies (to prevent misfires against your own characters and against neutral AI that shouldn't really happen - tentative fix, haven't had time to test it, but it should work...and hopefully doesn't completely break these items).

​11. Fixes Store Revisions from creating duplicate Bracers of Defense AC 4.

12. Stole subtledoctor's code for fixing Shaman usabilities (only applies to EE games).

​13. BG1:EE items now handled (only applies to EE-games - revisions at this time are very minor and likely to stay that way, though most items did have their prices and lores fixed - I can't believe they bothered making so many bad items...). BG2:EE items to be done at some later date.

Edited by Bartimaeus
Link to comment

Hey, found a few issues.

 

Firstly the Werebane +2 dagger dagg09b.itm when using its ability to switch to melee form the item that is set to be removed is dagg09 instead of dagg09b. This causes the dagger to be multiplied.

Also the lore value of the dagger is not set to 0 which causes it to become unidentified when switching from melee -> ranged form.

 

The cloak of the wolf is set to polymorph the character who uses it into wolfwe02.cre. This is probably fine in BG2, but BGEE doesn´t have that .cre file which causes the game to crash.

Link to comment

Thanks! I'm surprised I never noticed the Werebane issue - thought I had all those ironed out.

 

(edit): 1.13a released:

1. Fixed the above two problems with Werebane.

2. Fixed Cloak of the Wolf for BG1EE games.

3. Fixed Karajah's not actually having the +3 bonus to vs. breath saving throws (thanks Luke).

Edited by Bartimaeus
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...