Jump to content


Photo

What Mods Should I Play?


  • Please log in to reply
48 replies to this topic

#21 melkor_morgoth75

melkor_morgoth75

    Lord

  • Modder
  • 1509 posts

Posted 09 October 2009 - 06:17 AM

I do believe that the best and fastest way would be to have a full list of items filtered by prefix, but we have to assume that any item has been "created" by the mod with the correct prefix. As jarno pointed out however, the better and more reliable work would be the manual one (not that so huge anyway at the end).

mm75

Tired of the same boring spawned creatures u face in BG? Try BGSpawn


#22 Wisp

Wisp
  • Modder
  • 1353 posts

Posted 09 October 2009 - 07:24 AM

Sounds good. BTW do you (or anybody else) know how to export a list of all party items from a savegame?

You can do it with WeiDU. E.g:
BACKUP "save_extractor/backup"
AUTHOR Wisp

BEGIN "Extract a list of items from a saved game"
NO_LOG_RECORD

<<<<<<<< ...save_extractor/fl-inlined/fl#se-list.txt
>>>>>>>>

PRINT "Please enter the name of the saved game you wish to process (e.g. 000000000-Auto-Save) and press enter"

ACTION_READLN save
//OUTER_SPRINT save 000000003-Auto-Save-TOB
OUTER_PATCH 12 BEGIN
  WRITE_BYTE 0 0x0d
  WRITE_BYTE 1 0x0a
  READ_ASCII 0 wnl (2)
END

ACTION_IF NOT FILE_EXISTS "save/%save%/baldur.gam" BEGIN
  FAIL "The specified saved game could not be located. Aborting."
END ELSE BEGIN
  COPY "...save_extractor/fl-inlined/fl#se-list.txt" override
  COPY "save/%save%/baldur.gam" "save/%save%/baldur.gam"
	READ_LONG 0x20 mem_off
	READ_LONG 0x24 num_mem
	FOR (i=0;i<num_mem;i+=1) BEGIN
	  INNER_ACTION BEGIN
		APPEND fl#se-list.txt "Party member %i%:"
	  END
	  READ_LONG mem_off + 0x160*i + 0x4 cre_off
	  READ_LONG cre_off + 0x2bc itm_off
	  READ_LONG cre_off + 0x2c0 num_itm
	  FOR (j=0;j<num_itm;j+=1) BEGIN
		READ_ASCII cre_off + itm_off + 0x14*j item
		PATCH_IF FILE_EXISTS_IN_GAME "%item%.itm" BEGIN
		  INNER_ACTION BEGIN
			COPY_EXISTING "%item%.itm" override
			  READ_STRREF 0xc itm_name
			BUT_ONLY
		  END
		  INNER_ACTION BEGIN
			APPEND fl#se-list.txt "%item% %itm_name%"
		  END
		  PATCH_IF FILE_EXISTS_IN_GAME "%item%.sto" BEGIN
			SPRINT $bag_list("%item%") "%itm_name%"
		  END
		END
	  END
	END
  BUT_ONLY
	
  ACTION_PHP_EACH bag_list AS sto => name BEGIN
	COPY_EXISTING "%sto%.sto" override
	  INNER_ACTION BEGIN
		APPEND fl#se-list.txt "Container %sto% (%name%) contains:"
	  END
	  READ_LONG 0x34 sale_off
	  READ_LONG 0x38 num_sale
	  FOR (i=0;i<num_sale;i+=1) BEGIN
		READ_ASCII sale_off + 0x1c*i item
		PATCH_IF FILE_EXISTS_IN_GAME "%item%.itm" BEGIN
		  INNER_ACTION BEGIN
			COPY_EXISTING "%item%.itm" override
			  READ_STRREF 0xc itm_name
			BUT_ONLY
		  END
		  INNER_ACTION BEGIN
			APPEND fl#se-list.txt "%item% %itm_name%"
		  END
		END
	  END
	BUT_ONLY
  END
  
  COPY_EXISTING fl#se-list.txt override
	REPLACE_TEXTUALLY CASE_SENSITIVE EVALUATE_REGEXP "Party member \([0-5]\):" "%wnl%Party member \1:%wnl%"
	REPLACE_TEXTUALLY CASE_SENSITIVE EVALUATE_REGEXP "Container \(.*\) contains:" "%wnl%%wnl%Container \1 contains:%wnl%"
  BUT_ONLY

  PRINT "The output can be found in override/fl#se-list.txt"
END
Save the code into a text file called save_extractor.tp2 and rename a copy of weidu.exe into setup-save_extractor.exe.
It should give you a list of all items in possession of the party, as well as any items in containers in possession of the party. I don't know if it accepts saved game names with spaces in them.

Edited by Wisp, 09 October 2009 - 07:32 AM.


#23 OneEyedPhoenix

OneEyedPhoenix
  • Member
  • 308 posts

Posted 09 October 2009 - 07:58 AM

Save the code into a text file called save_extractor.tp2 and rename a copy of weidu.exe into setup-save_extractor.exe.
It should give you a list of all items in possession of the party, as well as any items in containers in possession of the party. I don't know if it accepts saved game names with spaces in them.


Great Wisp! This is exactly what I was looking for. :cheers:

Didn't work for the containers though... :huh:
It listed all my containers but not their content.

#24 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 09 October 2009 - 09:40 AM

The easiest way to do this would be to extract all the .itm files and their statistics directly from the mod folder rather than messing with saved games. Then you could check any you weren't able to obtain versus the mod code, to see if they're actually obtainable.

Someone might want to split this topic into something else (doesn't really have to do with "what mods to play" anymore, heh).

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#25 Wisp

Wisp
  • Modder
  • 1353 posts

Posted 09 October 2009 - 09:57 AM

Didn't work for the containers though... :huh:
It listed all my containers but not their content.

Huh. It worked on bag19a when I tested it (premade ToB thief in Auto-Save in vanilla ToB).
Could you replace the relevant block of code with this
ACTION_PHP_EACH bag_list AS sto => name BEGIN
	PRINT "Copying %sto%.sto"
	COPY_EXISTING "%sto%.sto" override
	  INNER_ACTION BEGIN
		APPEND fl#se-list.txt "Container %sto% (%name%) contains:"
	  END
	  READ_LONG 0x34 sale_off
	  READ_LONG 0x38 num_sale
	  PATCH_PRINT "sale_off=%sale_off%, num_sale=%num_sale%"
	  FOR (i=0;i<num_sale;i+=1) BEGIN
		READ_ASCII sale_off + 0x1c*i item
		PATCH_PRINT "i=%i%, item is %item%"
		PATCH_IF FILE_EXISTS_IN_GAME "%item%.itm" BEGIN
		  PATCH_PRINT "%item% exists"
		  INNER_ACTION BEGIN
			COPY_EXISTING "%item%.itm" override
			  READ_STRREF 0xc itm_name
			BUT_ONLY
		  END
		  INNER_ACTION BEGIN
			APPEND fl#se-list.txt "%item% %itm_name%"
		  END
		END
	  END
	BUT_ONLY
  END
and then run the installer again and upload the debug file?

(Though I agree with Miloch.)

#26 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 09 October 2009 - 10:09 AM

Actually no. Cause you'll have to be able to re-conform that the item in question has the abilities mentioned in the description. And you can do that only by looking it with an editor. :P Hurray for manual work.

Obviously, but every saved type counts and such a list would be a starting point in narrowing the job down.

Actually, you could extract both the item statistics and description from an item listing utility (see for example the CRE Lister in my signature). You'd just have to read the right fields or parse the .tra files. Hurray for automation!

Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#27 OneEyedPhoenix

OneEyedPhoenix
  • Member
  • 308 posts

Posted 09 October 2009 - 11:18 AM

Huh. It worked on bag19a when I tested it (premade ToB thief in Auto-Save in vanilla ToB).
Could you replace the relevant block of code with this and then run the installer again and upload the debug file?


Tried it, same result. The end of fl#se-list.txt looks like this:

Container SWBAG02C (Green Gem Bag) contains:



Container T-BHLD01 (Green Bag of Holding) contains:



Container T-BPTN01 (Copper Potion Case) contains:



Container BGBAG05 (Purple Potion Case) contains:



Container THBAG05 (Turquoise Bag of Holding) contains:

Container T-BAMM02 (Red-Black Ammo Belt) contains:Container SWBAG03B (Bronze Scroll Case) contains:Container SWBAG03 (Green Scroll Case) contains:Container SWBAG02B (Black-Green Gem Bag) contains:

I have attached the debug file but couldn't see anything conspicuous.

Attached Files



#28 Wisp

Wisp
  • Modder
  • 1353 posts

Posted 09 October 2009 - 11:56 AM

Doh. Of course. It's the .sto file in the saved game that needs to be checked.
Unfortunately I don't know how to decompress .sav files with WeiDU (assuming it's even possible), so that's not something I can help you with.
The current code will only list items that are in the container by default, not the ones added by the player (and it will list items that have been removed by the player).

Edit: I'll toy with it a bit. It should be possible to do this.

Edited by Wisp, 09 October 2009 - 12:17 PM.


#29 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 09 October 2009 - 11:58 AM

The easiest way to do this would be to extract all the .itm files and their statistics directly from the mod folder rather than messing with saved games.

I wouldn't be so certain, since one can encode an item just as fine as to copy it over.

Unfortunately I don't know how to decompress .sav files with WeiDU (assuming it's even possible), so that's not something I can help you with.

Yep, my hex editor shows complete mess within .sav files.

Edited by GeN1e, 09 October 2009 - 12:05 PM.

Retired from modding.


#30 Wisp

Wisp
  • Modder
  • 1353 posts

Posted 09 October 2009 - 12:30 PM

Unfortunately I don't know how to decompress .sav files with WeiDU (assuming it's even possible), so that's not something I can help you with.

Yep, my hex editor shows complete mess within .sav files.

The IESDP entry on .sav files is both informative and mystifying. But at the very least, I think it shows that it is possible to get the information you want with WeiDU.

#31 Wisp

Wisp
  • Modder
  • 1353 posts

Posted 09 October 2009 - 01:49 PM

Okay, this might be a little sketchy, but I think it will correctly retrieve items from containers stored in the saved game. It worked for my test case, anyway.

BACKUP "save_extractor/backup"
AUTHOR Wisp

BEGIN "Extract a list of items from a saved game"
NO_LOG_RECORD

<<<<<<<< ...save_extractor/fl-inlined/fl#se-list.txt
>>>>>>>>

OUTER_PATCH 12 BEGIN
  WRITE_BYTE 0 0x0d
  WRITE_BYTE 1 0x0a
  READ_ASCII 0 wnl (2)
END

PRINT "Please enter the name of the saved game you wish to process (e.g. 000000000-Auto-Save) and press enter"

ACTION_READLN save

ACTION_IF NOT FILE_EXISTS "save/%save%/baldur.gam" BEGIN
  FAIL "The specified saved game could not be located. Aborting."
END ELSE BEGIN
  COPY "...save_extractor/fl-inlined/fl#se-list.txt" override
  COPY "save/%save%/baldur.gam" "save/%save%/baldur.gam"
	READ_LONG 0x20 mem_off
	READ_LONG 0x24 num_mem
	FOR (i=0;i<num_mem;i+=1) BEGIN
	  INNER_ACTION BEGIN
		APPEND fl#se-list.txt "Party member %i%:"
	  END
	  READ_LONG mem_off + 0x160*i + 0x4 cre_off
	  READ_LONG cre_off + 0x2bc itm_off
	  READ_LONG cre_off + 0x2c0 num_itm
	  FOR (j=0;j<num_itm;j+=1) BEGIN
		READ_ASCII cre_off + itm_off + 0x14*j item
		PATCH_IF FILE_EXISTS_IN_GAME "%item%.itm" BEGIN
		  INNER_ACTION BEGIN
			COPY_EXISTING "%item%.itm" override
			  READ_STRREF 0xc itm_name
			BUT_ONLY
			APPEND fl#se-list.txt "%item% %itm_name%"
		  END
		  PATCH_IF FILE_EXISTS_IN_GAME "%item%.sto" BEGIN
			SPRINT $bag_list("%item%.STO") "%itm_name%"
		  END
		END
	  END
	END
  BUT_ONLY
  
  COPY "save/%save%/baldur.sav" "save/%save%/baldur.sav"
	FOR (current=0x8;current<BUFFER_LENGTH;current+=name_size+dec_size+0xc) BEGIN
	  READ_LONG  current name_size
	  READ_ASCII current + 0x4 filename (name_size) NULL
	  READ_LONG  current + 0x4 + name_size unc_size
	  READ_LONG  current + 0x8 + name_size dec_size
	  PATCH_IF VARIABLE_IS_SET $bag_list("%filename%") BEGIN
		DECOMPRESS_INTO_VAR current + name_size + 0xc dec_size unc_size file
		SPRINT bag_name $bag_list("%filename%")
		INNER_ACTION BEGIN
		  APPEND fl#se-list.txt "Container %filename% (%bag_name%) contains:"
		END
		INNER_PATCH "%file%" BEGIN
		  READ_LONG 0x34 sale_off
		  READ_LONG 0x38 num_sale
		  FOR (i=0;i<num_sale;i+=1) BEGIN
			READ_ASCII sale_off + 0x1c*i item
			INNER_ACTION BEGIN
			  COPY_EXISTING "%item%.itm" override
				READ_STRREF 0xc itm_name
			  BUT_ONLY
			  APPEND fl#se-list.txt "%item% %itm_name%"
			END
		  END
		END
	  END
	END
  BUT_ONLY

  COPY_EXISTING fl#se-list.txt override
	REPLACE_TEXTUALLY CASE_SENSITIVE EVALUATE_REGEXP "Party member \([0-5]\):" "%wnl%Party member \1:"
	REPLACE_TEXTUALLY CASE_SENSITIVE EVALUATE_REGEXP "Container \(.*\) contains:" "%wnl%%wnl%Container \1 contains:"
  BUT_ONLY

  PRINT "The output can be found in override/fl#se-list.txt"
END

Edit: For posterity with slightly more polished code.

Edited by Wisp, 10 October 2009 - 04:20 AM.


#32 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 09 October 2009 - 05:35 PM

DECOMPRESS_INTO_VAR

Works :coolthumb:

Retired from modding.


#33 OneEyedPhoenix

OneEyedPhoenix
  • Member
  • 308 posts

Posted 10 October 2009 - 12:35 AM

DECOMPRESS_INTO_VAR

Works :coolthumb:


Here as well. Great Work Wisp! :cheers:

#34 Wisp

Wisp
  • Modder
  • 1353 posts

Posted 10 October 2009 - 04:22 AM

Good :)

#35 melkor_morgoth75

melkor_morgoth75

    Lord

  • Modder
  • 1509 posts

Posted 12 October 2009 - 12:18 AM

I passed the entire week-end MANUALLY fixing all DSotSC items, The Vault Items and DarkHorizon Items.

I would say, DH ones are really a mess ... so i will skip in my next install and moreover, my laptop crashed this night after i tried a patching for Video Card (still using windows 2k) and i lost all my work. DAMNED!!!
Anyway, really (apart DH which is a pain) DSotSC items + The Vault Items should be no more than 50-60 to be changed, so not that huge work,

mm75

Tired of the same boring spawned creatures u face in BG? Try BGSpawn


#36 OneEyedPhoenix

OneEyedPhoenix
  • Member
  • 308 posts

Posted 12 October 2009 - 12:35 AM

I would say, DH ones are really a mess ... so i will skip in my next install and moreover, my laptop crashed this night after i tried a patching for Video Card (still using windows 2k) and i lost all my work. DAMNED!!!
Anyway, really (apart DH which is a pain) DSotSC items + The Vault Items should be no more than 50-60 to be changed, so not that huge work,


So all that work for nothing?
I was kind of hoping that it could be time for Erebusant (whom nobody has seen for a month) to update the mods, if it's bugs you have been squashing.

Edited by OneEyedPhoenix, 12 October 2009 - 12:37 AM.


#37 melkor_morgoth75

melkor_morgoth75

    Lord

  • Modder
  • 1509 posts

Posted 12 October 2009 - 02:05 AM

I would say, DH ones are really a mess ... so i will skip in my next install and moreover, my laptop crashed this night after i tried a patching for Video Card (still using windows 2k) and i lost all my work. DAMNED!!!
Anyway, really (apart DH which is a pain) DSotSC items + The Vault Items should be no more than 50-60 to be changed, so not that huge work,


So all that work for nothing?
I was kind of hoping that it could be time for Erebusant (whom nobody has seen for a month) to update the mods, if it's bugs you have been squashing.


Any work is not for nothing (but how a pain!) ... anyway for DSotSC items, just very few are bugged, i simply toned down everything and they are really not that many.

mm75

Tired of the same boring spawned creatures u face in BG? Try BGSpawn


#38 OneEyedPhoenix

OneEyedPhoenix
  • Member
  • 308 posts

Posted 12 October 2009 - 03:40 AM

Any work is not for nothing (but how a pain!) ... anyway for DSotSC items, just very few are bugged, i simply toned down everything and they are really not that many.


Maybe you could upload you modified items (if you do it again that is) so I could check them out?
Haven't seen any bugged DSotSC items so far myself, but Vault items are another story...

#39 melkor_morgoth75

melkor_morgoth75

    Lord

  • Modder
  • 1509 posts

Posted 12 October 2009 - 04:58 AM

Any work is not for nothing (but how a pain!) ... anyway for DSotSC items, just very few are bugged, i simply toned down everything and they are really not that many.


Maybe you could upload you modified items (if you do it again that is) so I could check them out?
Haven't seen any bugged DSotSC items so far myself, but Vault items are another story...


I will, not sure when it could happen now but i will,

mm75

Tired of the same boring spawned creatures u face in BG? Try BGSpawn


#40 melkor_morgoth75

melkor_morgoth75

    Lord

  • Modder
  • 1509 posts

Posted 12 October 2009 - 05:03 AM

...but Vault items are another story...


I don't remember there were lot of buggy item in that mod honestly, but there are not that many anyway. Are u sure they're from The Vault?

mm75

Tired of the same boring spawned creatures u face in BG? Try BGSpawn