Jump to content

List from Weidu?


Recommended Posts

Lots of ways to do this :)


This will just leave a text file in your override.

Item List: Resref, Identified Description, Description Bam

COPY ~asdfasdfasdf.asdfasdfasdf~ ~override/itemlog.txt~
 INSERT_BYTES 0x00 (0x2)
 WRITE_SHORT  0x00 0x0a0d
 READ_ASCII   0x00 ~nl~

OUTER_SPRINT ~list~ ~~

COPY_EXISTING_REGEXP GLOB ~^[^. ][^. ]?[^. ]?[^. ]?[^. ]?[^. ]?[^. ]?[^. ]?\.itm~ ~override~
READ_STRREF 0x0c ~id_desc~
READ_ASCII  0x58 ~bam_resref~
SPRINT ~list~ ~%list% %nl% %SOURCE_RES% // %id_desc% // %bam_resref% ~

APPEND ~itemlog.txt~ ~%list%~


Help, I've been Bigg-empted!

Link to comment

I used this technique to get a list of EasyTutu CREs and it worked great - except it only retrieved the BG2 CREs. And in reality, I don't want those, I just want the ones beginning with underscores, which it can't seem to find. Is there a way to list these?

Link to comment

Well like I said, it works - it just doesn't pick up Tutu resrefs (just BG2). It works fine on BG1, for what that's worth. Anyway...

BACKUP ~crelist/backup~
AUTHOR ~null~

BEGIN ~crelist~
COPY_EXISTING_REGEXP - ~.*\.cre~ ~../crelist/null~
READ_STRREF 0x8 name
READ_LONG 0x14 xp
READ_LONG 0x1c gold
READ_SHORT 0x24 chp
READ_SHORT 0x28 anim
READ_ASCII 0x34 smpt
READ_SSHORT 0x46 bac
READ_SSHORT 0x48 eac
READ_BYTE 0x52 thc0
READ_BYTE 0x53 apr
READ_BYTE 0x54 svd
READ_BYTE 0x55 svw
READ_BYTE 0x56 svp
READ_BYTE 0x57 svb
READ_BYTE 0x58 svs
READ_BYTE 0x66 lore
READ_BYTE 0x6e lsp
READ_BYTE 0x6f ssp
READ_BYTE 0x70 bwp
READ_BYTE 0x71 spp
READ_BYTE 0x72 bwp
READ_BYTE 0x73 skp
READ_BYTE 0x74 axp
READ_BYTE 0x75 mwp
READ_BYTE 0x234 lv1
READ_BYTE 0x235 lv2
READ_BYTE 0x236 lv3
READ_BYTE 0x237 sex
READ_BYTE 0x238 str
READ_BYTE 0x239 stx
READ_BYTE 0x23a int
READ_BYTE 0x23b wis
READ_BYTE 0x23c dex
READ_BYTE 0x23d con
READ_BYTE 0x23e chr
READ_BYTE 0x23f mor
READ_BYTE 0x23f mbk
READ_BYTE 0x23f mrt
READ_LONG 0x244 kit
READ_BYTE 0x270 ea
READ_BYTE 0x271 gen
READ_BYTE 0x272 rac
READ_BYTE 0x273 cls
READ_BYTE 0x275 gnd
READ_BYTE 0x27b aln
READ_ASCII 0x2cc dlg
PATCH_PRINT ~%SOURCE_RES%,%name%,%sex%,%gnd%,%gen%,%rac%,

Link to comment

Cheers. Not sure why Tutu doesn't update the keyfile, and I had to make "null" a real directory for this method to work, but no worries, it works.


If I wanted to, say, add to this list the items currently listed in the CRE weapon slots, would that be difficult?

Link to comment

Not at all ;)

  READ_LONG 0x02bc ilo
 READ_LONG 0x02c0 ilc
 SPRINT ~itemlist~ ~~
 FOR (i1 = 0x0; i1 < (ilc * 0x14); i1 += 0x14) BEGIN
READ_ASCII (ilo + i1) item
SPRINT ~itemlist~ ~%itemlist% %item%~
 PATCH_PRINT ~%itemlist%~


Probably you'd want COPY_EXISTING_REGEXP GLOB ~^_.+\.cre$~

Link to comment

And (after a week of playing with different patches and failing miserably) if one wanted to convert the READ_SHORT 0x28 anim into the text in animate.ids, (I got advice to use LOOKUP_IDS_SYMBOL_OF_INT variable idsFile value, but I can't seem to create a working INNER_PATCH or PATCH_IF statement that makes it work...)


how would they write that, please?

Link to comment

Well I'm not a coding guru like you all but I seem to have gotten that to work by inserting this line after the READ_SHORT 0x28 anim:

LOOKUP_IDS_SYMBOL_OF_INT anim ~animate~ %anim%

Gnarly. Thanks for that suggestion. ;) Sure beats exporting all the IDS tables to SQL and generating my report that way.

Link to comment
Not at all ;)
  READ_LONG 0x02bc ilo
 READ_LONG 0x02c0 ilc
 SPRINT ~itemlist~ ~~
 FOR (i1 = 0x0; i1 < (ilc * 0x14); i1 += 0x14) BEGIN
READ_ASCII (ilo + i1) item
SPRINT ~itemlist~ ~%itemlist% %item%~
 PATCH_PRINT ~%itemlist%~

Cool. That gives me a list of all the items on the CREs. In the interest of trying to keep this report somewhat limited, how would one retrieve just the items in the weapon slots? I was experimenting with code like this:
READ_LONG 0x2b8 so //slots offset
READ_LONG 0x2bc io //items offset
READ_SBYTE (so + 0x9) ws1 //slot1
PATCH_IF (ws1 = ~-1~) BEGIN SPRINT ~wp1~ ~~ END ELSE
READ_ASCII (io + (ws1 * 0x14)) wp1 //weapon1

And so on. It gives me accurate results for weapon1 maybe half the time, but sometimes it gives an item in a different slot. So maybe my math is funny, or the code is, or both. The IESDP is a bit vague when looking up offsets within offsets, or I'm just not reading it right.

Link to comment


This topic is now archived and is closed to further replies.

  • Create New...