Jump to content


Photo

LolFixer Thread


  • Please log in to reply
355 replies to this topic

#41 Sasha Al'Therin

Sasha Al'Therin
  • Modder
  • 615 posts

Posted 13 November 2011 - 09:10 AM

weidu does have a cap. I've reached it a few times doing some ass-e-nine things :P and that on a very limited mod install.

it is possible that it does this because it is looking at every script AND dialog file within the area patch.

Try splitting it into two sections one that copies areas and looks at scripts
then one that copies areas and looks at dialogs.

other than that... clueless, I am

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-altheri...s.com/index.htm


#42 Lollorian

Lollorian

    smiley addict

  • Member
  • 4150 posts

Posted 13 November 2011 - 11:08 AM

I took a slightly different approach :D Instead of loading all the scripts and dialogues for every unlocked door found, we just load every script and dialogue and search for the unlocked doors :coolthumb:

Cut down install time by around 30 mins for me :P

New Door Lock Debugger
BEGIN ~Area Stuff - Door Lock Debugger~
  GROUP ~Area Stuff~

ACTION_IF !(FILE_EXISTS ~override/xr2400.are~) THEN BEGIN
  COPY_EXISTING ~ar0087.are~ ~override/xr2400.are~
END
ACTION_IF !(FILE_EXISTS ~override/xr2600.are~) THEN BEGIN
  COPY_EXISTING ~ar0087.are~ ~override/xr2600.are~
END

COPY_EXISTING_REGEXP GLOB ~^.+\.are$~ ~override~
  PATCH_IF (SOURCE_SIZE > 0x11b) THEN BEGIN
    READ_LONG  0xa4 "door_num" ELSE 0
    READ_LONG  0xa8 "door_off" ELSE 0
    SPRINT area ~%SOURCE_FILE%~
    FOR (index = 0 ; index < door_num ; index = index + 1) BEGIN
      READ_ASCII ("%door_off%" +        ("%index%" * 0xc8)) "door_name" (32) NULL
      READ_ASCII ("%door_off%" + 0x78 + ("%index%" * 0xc8)) "resref"
      PATCH_IF NOT (("%resref%" STRING_EQUAL_CASE "") OR ("%resref%" STRING_EQUAL_CASE "none")) BEGIN // legit key entry
        READ_BYTE ("%door_off%" + 0x28 + ("%index%" * 0xc8)) "flags"
        PATCH_IF ((("%flags%" BAND 0b00000010) != 0b00000010) AND (FILE_EXISTS_IN_GAME ~%resref%.itm~)) BEGIN
          PATCH_PRINT "%area% error: Door #%index% (%door_name%) has key (%resref%.itm) but was not locked! Checking..."
//        WRITE_BYTE ("%door_off%" + 0x28 + ("%index%" * 0xc8)) ("%flags%" BOR 0b00000010)
          INNER_ACTION BEGIN
            APPEND_OUTER ~lolfixer/check.txt~ ~%area% %door_name% %resref%~
	  END
        END
      END
    END
  END
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING_REGEXP GLOB ~^.+\.bcs$~ ~override~
  INNER_PATCH_FILE ~lolfixer/check.txt~ BEGIN
    COUNT_2DA_ROWS 1 num_lines
  END
  SPRINT file ~%SOURCE_FILE%~
  SET ld=99999
  DECOMPILE_AND_PATCH BEGIN  
    FOR (i = 0 ; i < num_lines ; i = i + 1) BEGIN
      INNER_PATCH_FILE ~lolfixer/check.txt~ BEGIN
        READ_2DA_ENTRY i 1 1 "door_name"
      END
      COUNT_REGEXP_INSTANCES CASE_SENSITIVE ~Lock("%door_name%")~ ld
      INNER_ACTION BEGIN
        ACTION_IF (%ld%>0) AND !(%ld%=99999) THEN BEGIN
          PRINT ~SCRIPT: %file% uses Lock("%door_name%")~
          APPEND_OUTER ~lolfixer/check1.txt~  ~SCRIPT: %file% uses Lock("%door_name%")~
        END
      END
    END
  END
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING_REGEXP GLOB ~^.+\.dlg$~ ~override~
  INNER_PATCH_FILE ~lolfixer/check.txt~ BEGIN
    COUNT_2DA_ROWS 1 num_lines
  END
  SPRINT file ~%SOURCE_FILE%~
  SET ld=99999
  DECOMPILE_AND_PATCH BEGIN  
    FOR (i = 0 ; i < num_lines ; i = i + 1) BEGIN
      INNER_PATCH_FILE ~lolfixer/check.txt~ BEGIN
        READ_2DA_ENTRY i 1 1 "door_name"
      END
      COUNT_REGEXP_INSTANCES CASE_SENSITIVE ~Lock("%door_name%")~ ld
      INNER_ACTION BEGIN
        ACTION_IF (%ld%>0) AND !(%ld%=99999) THEN BEGIN
          PRINT ~SCRIPT: %file% uses Lock("%door_name%")~
          APPEND_OUTER ~lolfixer/check1.txt~  ~DIALOGUE: %file% uses Lock("%door_name%")~
        END
      END
    END
  END
BUT_ONLY_IF_IT_CHANGES
Adding CASE_SENSITIVE seems to have shortened the list considerably... but I'm kinda worried they might leave out Lock("DOOR01") when searching for Lock("Door01") :P

Anyway, output of the new code:
Spoiler

"I am the smiley addict, yellow and round, this is my grin :D when I'm usually around :P.
When there's trouble brewing, see me post, cuz it's usually a wall o' yellow and your eyes are toast!!!"

BWP GUIDE - BWP FIXES - impFAQ - NPC LIST - KIT LIST - AREA LIST

GitHub Links : BWP Fixpack | Lolfixer | BWP Trimpack | RezMod


#43 Sasha Al'Therin

Sasha Al'Therin
  • Modder
  • 615 posts

Posted 13 November 2011 - 01:12 PM

Adding CASE_SENSITIVE seems to have shortened the list considerably... but I'm kinda worried they might leave out Lock("DOOR01") when searching for Lock("Door01")

I don't think it would as I think that the variable string is replaced prior to the case check. You could try without case sensitivity and compare case by case to see what the returns are.

Also do you know if object variable names are case sensitive in game as in door01 is different than DOOR01 or are they treated as the same?
I suppose I could do my own tests... but if the answer is known...

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-altheri...s.com/index.htm


#44 i30817

i30817
  • Member
  • 611 posts

Posted 13 November 2011 - 04:11 PM

Wrong topic.

:P

Edited by i30817, 13 November 2011 - 06:58 PM.


#45 Lollorian

Lollorian

    smiley addict

  • Member
  • 4150 posts

Posted 14 November 2011 - 07:28 PM

Been trying to get the item swapping component to perfection for the past few days but I noticed something odd... possibly in WeiDU of all things :unsure:

Neither COPY_EXISTING_REGEXP ~^.+\.cre$~ ~override~ nor COPY_EXISTING_REGEXP GLOB ~^.+\.cre$~ ~override~ seem to load all the cre's in the game :o

2 of them right off the bat would be ADANGMA3 and AERBOD01. Attaching both the lolfixer.debug and g3 creature invetory debug log (I cross-checked with NI and yup, those creatures do have equippable items)

Also, just in case the problem is with my code, here it is :D
Spoiler

For the cre's it does affect, it works awesome now so... :P

Attached Files


Edited by Lollorian, 14 November 2011 - 07:29 PM.

"I am the smiley addict, yellow and round, this is my grin :D when I'm usually around :P.
When there's trouble brewing, see me post, cuz it's usually a wall o' yellow and your eyes are toast!!!"

BWP GUIDE - BWP FIXES - impFAQ - NPC LIST - KIT LIST - AREA LIST

GitHub Links : BWP Fixpack | Lolfixer | BWP Trimpack | RezMod


#46 Sasha Al'Therin

Sasha Al'Therin
  • Modder
  • 615 posts

Posted 14 November 2011 - 08:59 PM

2 of them right off the bat would be ADANGMA3 and AERBOD01. Attaching both the lolfixer.debug and g3 creature invetory debug log (I cross-checked with NI and yup, those creatures do have equippable items)

ran this to see what would happen on a unmoddifed BG2:TOB there is no adangma3.cre but there is an aerbod01.cre and it was caught and adjusted...

To ensure that each file was loaded I added right after the copy line
PATCH_PRINT ~Loading %SOURCE_FILE% .... ~


my debug showed

Loading AERBOD01.CRE ....
[./override/slng01.itm] loaded, 314 bytes
[./override/slng01.itm] loaded, 314 bytes
[./override/slng01.itm] loaded, 314 bytes
[./override/slng01.itm] loaded, 314 bytes
[./override/slng01.itm] loaded, 314 bytes
[./override/bull01.itm] loaded, 170 bytes
[./override/bull01.itm] loaded, 170 bytes
[./override/bull01.itm] loaded, 170 bytes

AERBOD01.CRE: Equippable items in inventory: leat04.itm! Equipping ARMOR
Copied [AERBOD01.CRE] to [override/AERBOD01.CRE]


Also, my debug shows

Copying and patching 4004 files ...

and NI shows a file total of

CRE - 4004




perhaps your game is modded or has some left over modded files throwing off the results?
EDIT: -- just looked at your debug file... IT IS MODDED!!!!!!!!!! boy you have a lot of mods! Took me to line 814 just to get thru all your listed mods... :P

I'm pretty sure that the fixpack takes care of a lot of the items in wrong locations, but they go off of the base game so mod added stuff doesn't get fixed

what your debug shows is mod added items, you can clearly see the prefixes AJ#, AG, AA, 1XQ to name a few AND it shows transfered BG1 files like Aldeth & Algernon tho your 'fixer' equips the cloak on Algernon and there is a quest about picking it off of him. I don't think it can be pick pocketed if it is in an equipped slot...
Something to think about...

and your 'fixer' totally broke some mod's pickpocket exploit fix for the bandit scalps by moving the scalp out of the glove slot and back into the inventory slot... (eh I'm testing a script/dialog fix for this which so far seems to be working. i.e. the scalps get created once the creature goes hostile till then they don't have it at all)


So definitely need to do a case by case examination rather than a blind run sorry to burst your bubble

Edited by Sasha Al'Therin, 14 November 2011 - 09:11 PM.

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-altheri...s.com/index.htm


#47 Lollorian

Lollorian

    smiley addict

  • Member
  • 4150 posts

Posted 15 November 2011 - 12:22 AM

To ensure that each file was loaded I added right after the copy line

PATCH_PRINT ~Loading %SOURCE_FILE% .... ~

Awesome idea and yup all teh creatures load :D (wonder why they aren't being modified though :unsure:)

perhaps your game is modded or has some left over modded files throwing off the results?
EDIT: -- just looked at your debug file... IT IS MODDED!!!!!!!!!! boy you have a lot of mods! Took me to line 814 just to get thru all your listed mods... :P

Well lol yeah :D I'm carrying out all my future tests on this install! Vanilla BGII-ToB is too narrow a case study to perfect this non? :P

what your debug shows is mod added items, you can clearly see the prefixes AJ#, AG, AA, 1XQ to name a few AND it shows transfered BG1 files like Aldeth & Algernon tho your 'fixer' equips the cloak on Algernon and there is a quest about picking it off of him. I don't think it can be pick pocketed if it is in an equipped slot...

and your 'fixer' totally broke some mod's pickpocket exploit fix for the bandit scalps by moving the scalp out of the glove slot and back into the inventory slot...

We already have quite an extensive skiplist (of stuff like MINHP1 and related immunity items and the like) that shouldn't be swapped :P

PATCH_IF (!((~%item%~ STRING_EQUAL_CASE ~AA8BALA~) OR
                    (~%item%~ STRING_EQUAL_CASE ~AADEMRNG~) OR
                    (~%item%~ STRING_EQUAL_CASE ~AAGOLSTN~) OR
                    (~%item%~ STRING_EQUAL_CASE ~AAHELM~) OR
                    (~%item%~ STRING_EQUAL_CASE ~AAOROFN1~) OR
                    (~%item%~ STRING_EQUAL_CASE ~AAREVIMM~) OR
                    (~%item%~ STRING_EQUAL_CASE ~AAWEATH1~) OR
                    (~%item%~ STRING_EQUAL_CASE ~ARROPHEO~) OR
                    (~%item%~ STRING_EQUAL_CASE ~BAZPLO02~) OR
                    (~%item%~ STRING_EQUAL_CASE ~BEHOLDER~) OR
                    (~%item%~ STRING_EQUAL_CASE ~BHAALHP1~) OR
                    (~%item%~ STRING_EQUAL_CASE ~BHAALIMM~) OR
                    (~%item%~ STRING_EQUAL_CASE ~BONEDAG~) OR
                    (~%item%~ STRING_EQUAL_CASE ~CBBNLCH0~) OR
                    (~%item%~ STRING_EQUAL_CASE ~CBBNLCH1~) OR
                    (~%item%~ STRING_EQUAL_CASE ~CHWRAITH~) OR
                    (~%item%~ STRING_EQUAL_CASE ~DRAGGRE1~) OR
                    (~%item%~ STRING_EQUAL_CASE ~DRAGSHA1~) OR
                    (~%item%~ STRING_EQUAL_CASE ~DW#SKRNG~) OR
                    (~%item%~ STRING_EQUAL_CASE ~DWDUST~) OR
                    (~%item%~ STRING_EQUAL_CASE ~FAMMY~) OR
                    (~%item%~ STRING_EQUAL_CASE ~GHOST~) OR
                    (~%item%~ STRING_EQUAL_CASE ~GHOST3~) OR
                    (~%item%~ STRING_EQUAL_CASE ~GOLCLA~) OR
                    (~%item%~ STRING_EQUAL_CASE ~GOLFLE~) OR
                    (~%item%~ STRING_EQUAL_CASE ~GOLSTONE~) OR
                    (~%item%~ STRING_EQUAL_CASE ~GORAIR~) OR
                    (~%item%~ STRING_EQUAL_CASE ~GORMISTI~) OR
                    (~%item%~ STRING_EQUAL_CASE ~ILLBLUR~) OR
                    (~%item%~ STRING_EQUAL_CASE ~IMMCHS~) OR
                    (~%item%~ STRING_EQUAL_CASE ~IMMCLOUD~) OR
                    (~%item%~ STRING_EQUAL_CASE ~IMMUNE1~) OR
                    (~%item%~ STRING_EQUAL_CASE ~IMMUNE10~) OR
                    (~%item%~ STRING_EQUAL_CASE ~IMMUNE2~) OR
                    (~%item%~ STRING_EQUAL_CASE ~IMMUNE3~) OR
                    (~%item%~ STRING_EQUAL_CASE ~IMOENHP1~) OR
                    (~%item%~ STRING_EQUAL_CASE ~IMPINVIS~) OR
                    (~%item%~ STRING_EQUAL_CASE ~INVULNER~) OR
                    (~%item%~ STRING_EQUAL_CASE ~IRONGOL~) OR
                    (~%item%~ STRING_EQUAL_CASE ~JONHP1~) OR
                    (~%item%~ STRING_EQUAL_CASE ~KUORING~) OR
                    (~%item%~ STRING_EQUAL_CASE ~LICH~) OR
                    (~%item%~ STRING_EQUAL_CASE ~LICHIM2~) OR
                    (~%item%~ STRING_EQUAL_CASE ~LK#IBELT~) OR
                    (~%item%~ STRING_EQUAL_CASE ~MAGE03~) OR
                    (~%item%~ STRING_EQUAL_CASE ~MAGE04~) OR
                    (~%item%~ STRING_EQUAL_CASE ~MAGE05~) OR
                    (~%item%~ STRING_EQUAL_CASE ~MAGE06~) OR
                    (~%item%~ STRING_EQUAL_CASE ~MAGEBRAC~) OR
                    (~%item%~ STRING_EQUAL_CASE ~MAHARPER~) OR
                    (~%item%~ STRING_EQUAL_CASE ~MASAKIIM~) OR
                    (~%item%~ STRING_EQUAL_CASE ~MEL01~) OR
                    (~%item%~ STRING_EQUAL_CASE ~MGLOBE~) OR
                    (~%item%~ STRING_EQUAL_CASE ~MINHP1~) OR
                    (~%item%~ STRING_EQUAL_CASE ~MINHP20~) OR
                    (~%item%~ STRING_EQUAL_CASE ~MISTPO~) OR
                    (~%item%~ STRING_EQUAL_CASE ~MONHP1~) OR
                    (~%item%~ STRING_EQUAL_CASE ~MONHP80~) OR
                    (~%item%~ STRING_EQUAL_CASE ~NOCIRC~) OR
                    (~%item%~ STRING_EQUAL_CASE ~POWEATH1~) OR
                    (~%item%~ STRING_EQUAL_CASE ~REGHP1~) OR
                    (~%item%~ STRING_EQUAL_CASE ~REGHP2R~) OR
                    (~%item%~ STRING_EQUAL_CASE ~RIDRING~) OR
                    (~%item%~ STRING_EQUAL_CASE ~RINGDEMN~) OR
                    (~%item%~ STRING_EQUAL_CASE ~RINGWOLF~) OR
                    (~%item%~ STRING_EQUAL_CASE ~S1-20~) OR
                    (~%item%~ STRING_EQUAL_CASE ~SAREVIMM~) OR
                    (~%item%~ STRING_EQUAL_CASE ~SENGUA04~) OR
                    (~%item%~ STRING_EQUAL_CASE ~SPEC02~) OR
                    (~%item%~ STRING_EQUAL_CASE ~SPECTR~) OR
                    (~%item%~ STRING_EQUAL_CASE ~STONSKIN~) OR
                    (~%item%~ STRING_EQUAL_CASE ~T-BAMM02~) OR
                    (~%item%~ STRING_EQUAL_CASE ~TELSLAV~) OR
                    (~%item%~ STRING_EQUAL_CASE ~TELSLAV2~) OR
                    (~%item%~ STRING_EQUAL_CASE ~TRANS3~) OR
                    (~%item%~ STRING_EQUAL_CASE ~TROLLDIE~) OR
                    (~%item%~ STRING_EQUAL_CASE ~TSTATUE~) OR
                    (~%item%~ STRING_EQUAL_CASE ~TZ25_!SK~) OR
                    (~%item%~ STRING_EQUAL_CASE ~TZ25_#MH~) OR
                    (~%item%~ STRING_EQUAL_CASE ~TZ25__NB~) OR
                    (~%item%~ STRING_EQUAL_CASE ~VAMPREG1~) OR
                    (~%item%~ STRING_EQUAL_CASE ~VAMPREG2~) OR
                    (~%item%~ STRING_EQUAL_CASE ~VERMTYPE~) OR
                    (~%item%~ STRING_EQUAL_CASE ~VORSQUI1~) OR
                    (~%item%~ STRING_EQUAL_CASE ~WALLPASS~) OR
                    (~%item%~ STRING_EQUAL_CASE ~ZY18BALA~) OR
                    (~%item%~ STRING_EQUAL_CASE ~ZYCLCKN1~) OR
                    (~%item%~ STRING_EQUAL_CASE ~ZYHELME5~) OR
                    (~%item%~ STRING_EQUAL_CASE ~ZYHELMN1~) OR
                    (~%item%~ STRING_EQUAL_CASE ~ZYINVULN~) OR
                    (~%item%~ STRING_EQUAL_CASE ~ZYOROFN1~) OR
                    (~%item%~ STRING_EQUAL_CASE ~ZYREG1P3~) OR
                    (~%item%~ STRING_EQUAL_CASE ~ZYRINGN1~) OR
                    (~%item%~ STRING_EQUAL_CASE ~ZYSW1HN3~)) AND (FILE_EXISTS_IN_GAME ~%item%.itm~)) THEN BEGIN
So the bandit scalps and other pcikpocketing eccentricities could (in theory ofcourse) be added to that :D

I've never pickpocketed anyone in my BG games so dunno if they're unpickable if equipped (which would make sense though :lol: Hilarious imagining someone pickpocket a suit of equipped platemail :D)

PS: I took care to not name the components as fixers ;)... because I knew they'd break stuff beyond recognition :ROFL: (for now atleast :P)

PS2: I guess the thread title is kinda misleading then yeah? :lol:

"I am the smiley addict, yellow and round, this is my grin :D when I'm usually around :P.
When there's trouble brewing, see me post, cuz it's usually a wall o' yellow and your eyes are toast!!!"

BWP GUIDE - BWP FIXES - impFAQ - NPC LIST - KIT LIST - AREA LIST

GitHub Links : BWP Fixpack | Lolfixer | BWP Trimpack | RezMod


#48 Lollorian

Lollorian

    smiley addict

  • Member
  • 4150 posts

Posted 25 November 2011 - 11:39 AM

Added all instances of cheesy-non-pickpocketing-tactic-by-equipping-into-slot items :D

PATCH_IF (!((~%item%~ STRING_EQUAL_CASE ~MISC86~) OR                                                        //Bandit Scalp
                   ((~%item%~ STRING_EQUAL_CASE ~MISC54~) AND (~%SOURCE_RES%~ STRING_EQUAL_CASE ~JALANT~)) OR        //Child's Body
                   ((~%item%~ STRING_EQUAL_CASE ~RING07~) AND (~%SOURCE_RES%~ STRING_EQUAL_CASE ~RAMAZI~)) OR        //Ramazith's Prot Ring
                   ((~%item%~ STRING_EQUAL_CASE ~MISC2H~) AND (~%SOURCE_RES%~ STRING_EQUAL_CASE ~SHANDAL2~)) OR        //Shandalar's Wardstone
                   ((~%item%~ STRING_EQUAL_CASE ~MISC6Z~) AND (~%SOURCE_RES%~ STRING_EQUAL_CASE ~GEMCH02~)) OR        //Imnesvale Chicken's Beljuril
                   ((~%item%~ STRING_EQUAL_CASE ~MISCB7~) AND (~%SOURCE_RES%~ STRING_EQUAL_CASE ~HELLGEN~)) OR        //Genie's Tears of Bhaal
                   ((~%item%~ STRING_EQUAL_CASE ~RING39~) AND (~%SOURCE_RES%~ STRING_EQUAL_CASE ~HLKANG~)) OR        //Kangaxx's Gaxx Ring
                   ((~%item%~ STRING_EQUAL_CASE ~MISC8K~) AND (~%SOURCE_RES%~ STRING_EQUAL_CASE ~TRRAK01~)) OR        //Ihtafeer's Head
                   ((~%item%~ STRING_EQUAL_CASE ~MISCA7~) AND (~%SOURCE_RES%~ STRING_EQUAL_CASE ~UDPRINCE~)) OR        //Kuo-Tuan Prince's Blood
                   ((~%item%~ STRING_EQUAL_CASE ~MISC8H~) AND (~%SOURCE_RES%~ STRING_EQUAL_CASE ~UDSILVER~)) OR        //Adalon's Blood
                   ((~%item%~ STRING_EQUAL_CASE ~MISCCC~) AND (~%SOURCE_RES%~ STRING_EQUAL_CASE ~UDSILVER~)) OR        //Adalon's Note

"I am the smiley addict, yellow and round, this is my grin :D when I'm usually around :P.
When there's trouble brewing, see me post, cuz it's usually a wall o' yellow and your eyes are toast!!!"

BWP GUIDE - BWP FIXES - impFAQ - NPC LIST - KIT LIST - AREA LIST

GitHub Links : BWP Fixpack | Lolfixer | BWP Trimpack | RezMod


#49 Sasha Al'Therin

Sasha Al'Therin
  • Modder
  • 615 posts

Posted 25 November 2011 - 01:16 PM

just a bit o' friendly advice to keep it as 'look & leave alone' for these types of items. If at some point BGT or another mod switches things and uses any of my BG Fixpack ideas, there could be additional problems created if you decided to have your 'fixer' auto-move these types of items into equipping slots cause that's what you currently expect in the BGT install...


((~%item%~ STRING_EQUAL_CASE ~MISC54~) AND (~%SOURCE_RES%~ STRING_EQUAL_CASE ~JALANT~)) OR        //Child's Body
this item is kinda pointless to be moved to a different slot. it's a bit too heavy to be pickpocketed EVER. setting the flag on this item and leaving it in the inventory should be acceptable IMHO. in fact that's what the BG1 fixpack does/will do.

((~%item%~ STRING_EQUAL_CASE ~RING07~) AND (~%SOURCE_RES%~ STRING_EQUAL_CASE ~RAMAZI~)) OR        //Ramazith's Prot Ring
Its only an exploit because Ramazith is created in 3 different areas. I've fixed it so that you can pickpocket any of his items and they no longer be present in any subsequent creations of his character.
Spoiler


and you've of course seen the thread I started about the bandit scalps, so you know about other possibilities that could be employed if so desired.

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-altheri...s.com/index.htm


#50 Lollorian

Lollorian

    smiley addict

  • Member
  • 4150 posts

Posted 25 November 2011 - 08:47 PM

Thing is, there's already an awesome utility in the G3Debugging Suite for debugging the inventory so I'm kinda reluctant to dulicate that code here :lol:

I think once my exams get done, I could prolly separate the Inventory Overhauler into a MASSIVE BORKAGE EXPECTED component (that does what it does right now :P) and a SPECIFIC ITEM OVERHAULER (that can specifically alter individual items - like adding the stealable flag to body item MISC54 you mentioned :D)

Also, I didn't wanna dabble in script stuff to fix things, my intention was to make something that could make game resources well... less shittier to the game :ROFL:

That being said, the Area Stuff components look awesome now! Might actually prevent a few crashes and stutter :ermm:

Recommended components list for now:
~LOLFIXER.TP2~ #0 #1 // Area Stuff - Missing Ambient Remover (removes ambients that don't have their WAV present): 0.1A
~LOLFIXER.TP2~ #0 #2 // Area Stuff - Missing Actor Remover (removes actors that don't have their CRE present): 0.1A
~LOLFIXER.TP2~ #0 #3 // Area Stuff - Missing Spawn Remover (nulls spawn entries that don't have their CRE present): 0.1A
~LOLFIXER.TP2~ #0 #4 // Area Stuff - Missing Rest Spawn Remover (nulls rest spawn entries that don't have their CRE present): 0.1A
~LOLFIXER.TP2~ #0 #6 // Creature Stuff - Creature Resource Fixer (res_fixer for ALL CREATURES): 0.1A
~LOLFIXER.TP2~ #0 #7 // Creature Stuff - Inventory Unborker (removes spurious references to the item table): 0.1A
~LOLFIXER.TP2~ #0 #8 // Creature Stuff - Inventory Cleaner (removes items that don't exist and converts them into already present items where applicable): 0.1A
~LOLFIXER.TP2~ #0 #10 // Item Stuff - Item Resource Fixer (res_fixer for ALL ITEMS): 0.1A
~LOLFIXER.TP2~ #0 #11 // Spell Stuff - Spell Resource Fixer (res_fixer for ALL THE SPELLS): 0.1A
~LOLFIXER.TP2~ #0 #12 // Spell Stuff - Innate Fixer (makes Innate spells level 1): 0.1A

"I am the smiley addict, yellow and round, this is my grin :D when I'm usually around :P.
When there's trouble brewing, see me post, cuz it's usually a wall o' yellow and your eyes are toast!!!"

BWP GUIDE - BWP FIXES - impFAQ - NPC LIST - KIT LIST - AREA LIST

GitHub Links : BWP Fixpack | Lolfixer | BWP Trimpack | RezMod


#51 the bigg

the bigg

    2083 is a prime number.

  • Modder
  • 3331 posts

Posted 28 November 2011 - 01:00 PM

WeiDU is a 32 bit executable, hence it can't handle more than 2 GB of RAM, even if you had multiple terabytes RAM. Furthermore, OCaml has a default memory limit of 1GB, and the option to increment it is non-functional under Windows.

Your code is failing because the creature has three instances of ringdund.itm in its inventory, and apparently REMOVE_CRE_ITEM doesn't work correctly in that case. Can I have a copy of ringdund.itm, topazeye.itm and scalblue.itm? WeiDU works correctly; however, your code doesn't account for the fact that three items were removed instead of one, and thus starts reading invalid sections of the file instead of the item table.

Edited by the bigg, 28 November 2011 - 01:41 PM.

Italian users: help test the Stivan NPC!

Author or Co-Author: WeiDU - Widescreen - Generalized Biffing - Refinements - TB#Tweaks - IWD2Tweaks - TB#Characters - Traify Tool - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics - Nalia Mod - Nvidia Fix
Code dumps: Detect custom secondary types - Stutter Investigator

If possible, send diffs, translations and other contributions using Git.


#52 10th

10th
  • Member
  • 621 posts

Posted 28 November 2011 - 01:44 PM

Copy of all three items attached. Cre-file included. Big Picture's BPDRAGTP.CRE has the same inventory setup as the included DRAGTOPE.CRE.

10th

Attached Files


Avast! You cannot defeat our titan-mounted submarine staffed by cannibal vikings! - Nodwick

"I grab his deceased spirit and piledrive it back into his body, duplicating raise dead." - Psyren Oots board

#53 Lollorian

Lollorian

    smiley addict

  • Member
  • 4150 posts

Posted 28 November 2011 - 08:37 PM

WeiDU works correctly; however, your code doesn't account for the fact that three items were removed instead of one, and thus starts reading invalid sections of the file instead of the item table.

Dangnabbit! biggrin.gif There should be a funstion to REMOVE_CRE_ITEM_SLOT specifying which slot to remove from tongue.gif Maybe even an EXCHANGE_CRE_ITEM_SLOT :ROFL:

Anyway, resorted to binary hackery and it works now I guess tongue.gif Thanks a million! And it just dawned on me that I could just check whether the item was DROPPABLE before moving them to let go of the omfghuge skiplist laugh.gif (would still be needed for those pickpocket things though tongue.gif)

Again, thanks a lot! Got kinda frustrated about this biggrin.gif

Attached Files


Edited by Lollorian, 24 July 2015 - 09:37 AM.

"I am the smiley addict, yellow and round, this is my grin :D when I'm usually around :P.
When there's trouble brewing, see me post, cuz it's usually a wall o' yellow and your eyes are toast!!!"

BWP GUIDE - BWP FIXES - impFAQ - NPC LIST - KIT LIST - AREA LIST

GitHub Links : BWP Fixpack | Lolfixer | BWP Trimpack | RezMod


#54 Lollorian

Lollorian

    smiley addict

  • Member
  • 4150 posts

Posted 29 November 2011 - 12:13 AM

And up :D Here's how it looks now :cheers:

Spoiler

Attached Files


Edited by Lollorian, 29 November 2011 - 03:12 AM.

"I am the smiley addict, yellow and round, this is my grin :D when I'm usually around :P.
When there's trouble brewing, see me post, cuz it's usually a wall o' yellow and your eyes are toast!!!"

BWP GUIDE - BWP FIXES - impFAQ - NPC LIST - KIT LIST - AREA LIST

GitHub Links : BWP Fixpack | Lolfixer | BWP Trimpack | RezMod


#55 i30817

i30817
  • Member
  • 611 posts

Posted 29 November 2011 - 07:18 AM

Say, will you be using this to report to the mods the errors it finds? Or it's a pure fixer with no reporting?

#56 Lollorian

Lollorian

    smiley addict

  • Member
  • 4150 posts

Posted 29 November 2011 - 08:36 AM

It's supposed to be something that can fix only the absolutely OBVIOUS errors so yeah it will fix :P But anything and everything it does is seen in the console output :) (in a - hopefully - really simple and understandable way :lol:)

I do intend to log everything to a file for easy reporting though... But just concentrating on getting the fixing scripts right before I add in the logging stuff :P

Meanwhile, might I point you to the oh-so-awesome G3Debugging Suite for its logging? :D Reports much more than this thing fixes :P

Edited by Lollorian, 29 November 2011 - 08:44 AM.

"I am the smiley addict, yellow and round, this is my grin :D when I'm usually around :P.
When there's trouble brewing, see me post, cuz it's usually a wall o' yellow and your eyes are toast!!!"

BWP GUIDE - BWP FIXES - impFAQ - NPC LIST - KIT LIST - AREA LIST

GitHub Links : BWP Fixpack | Lolfixer | BWP Trimpack | RezMod


#57 krimine

krimine
  • Member
  • 10 posts

Posted 29 November 2011 - 01:11 PM

Also reports more than necessary, like bg1 proficiencies in bg2 files, which is no problem for the engine.

#58 Sasha Al'Therin

Sasha Al'Therin
  • Modder
  • 615 posts

Posted 29 November 2011 - 03:19 PM

also reports map note offsets being off when ran in BG1 which is totally ok since BG1 doesn't use map notes. :P

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-altheri...s.com/index.htm


#59 Lollorian

Lollorian

    smiley addict

  • Member
  • 4150 posts

Posted 29 November 2011 - 07:15 PM

... also reports shields in the inventory as equippable even if theres a 2-handed weapon already equipped :D

Anyway, this thread helped fix the Overhauler skipping lots of stuff :D Now to use the Res_fixer code to create something that can reindex AREs :P

@Sasha: Its project page says it's just for BGII :devil:

Edited by Lollorian, 29 November 2011 - 07:16 PM.

"I am the smiley addict, yellow and round, this is my grin :D when I'm usually around :P.
When there's trouble brewing, see me post, cuz it's usually a wall o' yellow and your eyes are toast!!!"

BWP GUIDE - BWP FIXES - impFAQ - NPC LIST - KIT LIST - AREA LIST

GitHub Links : BWP Fixpack | Lolfixer | BWP Trimpack | RezMod


#60 Sasha Al'Therin

Sasha Al'Therin
  • Modder
  • 615 posts

Posted 29 November 2011 - 08:01 PM

@Sasha: Its project page says it's just for BGII

Yes but Camdawg told me that I could run it in BG1 since 99% of the file structures were the same. I'd just have to take things like the map note offsets into account ^^

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-altheri...s.com/index.htm