/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
///// \\\\\
///// Make Misc Bags of Holding Bottomless \\\\\
///// \\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
BEGIN @304000 DESIGNATED 3040
GROUP @4
// this file does nothing, it just allows other mods to detect this component
COPY_EXISTING ~sw1h01.itm~ ~override/cdt03040.
g3~
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
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
///// \\\\\
///// Unlimited Ammo Stacks \\\\\
///// \\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
BEGIN @308000 DESIGNATED 3080
GROUP @4
// this file does nothing, it just allows other mods to detect this component
COPY_EXISTING ~sw1h01.itm~ ~override/cdt03080.
g3~
PRINT @1
COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~ // looking for ammo
READ_SHORT 0x1C "type" ELSE 0
READ_SHORT 0x38 "max" ELSE 0
PATCH_IF (
("%max%" > 1) AND // if item can already stack and is of the type...
(
("%type%" = 5) OR // arrows,
("%type%" = 14) OR // bullets,
("%type%" = 29) OR // spears,
("%type%" = 31) OR // bolts,
("%type%" = 24) OR // darts,
("%type%" = 25) OR // axe, or
("%type%" = 16) // dagger
)
) BEGIN
WRITE_SHORT 0x38 999
END
BUT_ONLY_IF_IT_CHANGES
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
///// \\\\\
///// Unlimited Gem and Jewelry Stacking \\\\\
///// \\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
BEGIN @309000 DESIGNATED 3090
GROUP @4
// this file does nothing, it just allows other mods to detect this component
COPY_EXISTING ~sw1h01.itm~ ~override/cdt03090.
g3~
PRINT @1
COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~ // looking for gems and jewelry
PATCH_IF (SOURCE_SIZE > 0x71) THEN BEGIN // protects against invalid files
READ_SHORT 0x1c "type" ELSE 0
READ_SHORT 0x68 "max_abil" ELSE 0
READ_SHORT 0x70 "max_fx" ELSE 0
PATCH_IF (
("%max_abil%" = 0) AND // maximum abilities must be zero and
("%max_fx%" = 0) AND // maximum effects must be zero and type must be one of
(
("%type%" = 1) OR // amulets
("%type%" = 34) OR // gems
("%type%" = 33) OR // gold
("%type%" = 10) // or rings
)
) BEGIN
WRITE_SHORT 0x38 999
END
END
BUT_ONLY_IF_IT_CHANGES
// bandit scalps, winter wolf pelts too
ACTION_FOR_EACH item IN _misc01 _misc86 misc01 misc86 BEGIN
ACTION_IF FILE_EXISTS_IN_GAME ~%item%.itm~ BEGIN
COPY_EXISTING ~%item%.itm~ ~override~
WRITE_SHORT 0x38 9999
BUT_ONLY
END
END
//alter nashkel shopkeep to only take one wolf pelt at a time instead of the whole stack
ACTION_FOR_EACH dialog IN shopkn _shopkn BEGIN
ACTION_IF FILE_EXISTS_IN_GAME ~%dialog%.dlg~ BEGIN
COPY_EXISTING ~%dialog%.dlg~ ~override~
DECOMPILE_AND_PATCH BEGIN
REPLACE_TEXTUALLY ~TakePartyItem("\(_?MISC01\)")~ ~TakePartyItemNum("\1",1)~
END
END
END
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
///// \\\\\
///// Unlimited Potion Stacking \\\\\
///// \\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
BEGIN @310000 DESIGNATED 3100
GROUP @4
// this file does nothing, it just allows other mods to detect this component
COPY_EXISTING ~sw1h01.itm~ ~override/cdt03100.
g3~
PRINT @1
COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~ // looking for potions
READ_SHORT 0x1C "type" ELSE 0
PATCH_IF ("%type%" = 9) BEGIN // potions
WRITE_SHORT 0x38 999
END
BUT_ONLY_IF_IT_CHANGES
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
///// \\\\\
///// Unlimited Scroll Stacking \\\\\
///// \\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\/////\\\\\
BEGIN @311000 DESIGNATED 3110
GROUP @4
// this file does nothing, it just allows other mods to detect this component
COPY_EXISTING ~sw1h01.itm~ ~override/cdt03110.
g3~
PRINT @1
COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~ // looking for scrolls
READ_SHORT 0x1C "type" ELSE 0
PATCH_IF ("%type%" = 11) BEGIN // scrolls
WRITE_SHORT 0x38 999
END
BUT_ONLY_IF_IT_CHANGES