Rabain Posted February 22, 2007 Share Posted February 22, 2007 Is it possible to get a weidu to generate a list showing: ItemResRef---ItemName(0x000c)---DescriptionBamResRef (0x0058) And if so could someone post the code for that? please! Link to comment
the bigg Posted February 22, 2007 Share Posted February 22, 2007 BACKUP ~somewhere~ AUTHOR ~foo!~ BEGIN ~lister~ NO_LOG_RECORD COPY_EXISTING_REGEXP - ~.*\.itm~ ~../some/not/existing/dir~ READ_STRREF 0xc name READ_ASCII 0x58 bam PATCH_PRINT ~%SOURCE_RES%---%name%---%bam%~ Link to comment
Nythrun Posted February 22, 2007 Share Posted February 22, 2007 Lots of ways to do this This will just leave a text file in your override. <<<<<<<<asdfasdfasdf.asdfasdfasdf 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~ PATCH_IF (SOURCE_SIZE > 0x71) THEN BEGIN TO_LOWER ~SOURCE_RES~ READ_STRREF 0x0c ~id_desc~ READ_ASCII 0x58 ~bam_resref~ SPRINT ~list~ ~%list% %nl% %SOURCE_RES% // %id_desc% // %bam_resref% ~ END BUT_ONLY APPEND ~itemlog.txt~ ~%list%~ Help, I've been Bigg-empted! Link to comment
Rabain Posted February 22, 2007 Author Share Posted February 22, 2007 Thanks Guys. For those interested the file is attached. http://www.box.net/public/2rkbjk1p2g Hopefully that link will work until BWL is back up. Link to comment
Miloch Posted February 26, 2007 Share Posted February 26, 2007 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
devSin Posted February 26, 2007 Share Posted February 26, 2007 You need to post the code you used to compile the list. Link to comment
Miloch Posted February 26, 2007 Share Posted February 26, 2007 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~ NO_LOG_RECORD 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%, %anim%,%cls%,%kit%,%lv1%,%lv2%,%lv3%,%chp%,%xp%,%apr%,%thc0%, %bac%,%eac%,%svd%,%svw%,%svp%,%svb%,%svs%,%aln%,%ea%,%smpt%, %dlg%,%lore%,%lsp%,%ssp%,%bwp%,%skp%,%axp%,%mwp%,%str%,%stx%, %int%,%wis%,%dex%,%con%,%chr%,%mor%,%mbk%,%mrt%,%gold%~ Link to comment
the bigg Posted February 26, 2007 Share Posted February 26, 2007 use COPY_EXISTING_REGEXP GLOB blah_blah_blah Link to comment
devSin Posted February 26, 2007 Share Posted February 26, 2007 COPY_EXISTING_REGEXP GLOB Without GLOB, WeiDU will only look for resources in the keyfile (which Tutu doesn't update, apparently). Link to comment
Miloch Posted February 26, 2007 Share Posted February 26, 2007 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
Nythrun Posted February 26, 2007 Share Posted February 26, 2007 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%~ END PATCH_PRINT ~%itemlist%~ Probably you'd want COPY_EXISTING_REGEXP GLOB ~^_.+\.cre$~ Link to comment
cmorgan Posted February 26, 2007 Share Posted February 26, 2007 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
Miloch Posted February 26, 2007 Share Posted February 26, 2007 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
cmorgan Posted February 26, 2007 Share Posted February 26, 2007 Now I really feel foolish - I was reversing the variable and the ids, and even worse putting the file as ~animate.ids~ Back to rereading basics! Link to comment
Miloch Posted February 27, 2007 Share Posted February 27, 2007 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%~ END 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
Recommended Posts
Archived
This topic is now archived and is closed to further replies.