subtledoctor Posted January 6, 2016 Share Posted January 6, 2016 Let's say I have identified a kit by some value in kitlist.2da. But the kit name in column 1 of that file differs from the kit name in kit.ids... and I need the latter to use with script triggers and actions. The only thing shared between the two files is the unusability flag. (Unless the row numbers match? I don't think they do.) So I assume I would have to use that somehow...? Does LOOKUP_IDS_SYMBOL_OF_INT work with kit.ids? Does READ_2DA_ENTRY? EDIT - not even the unusability flag. But kitlist.2da in the EEs has an extra column with the IDS value. So presumably there is a method to use that to go between the files. (It's okay if this mod ends up being EE-only.) Link to comment
Jarno Mikkola Posted January 6, 2016 Share Posted January 6, 2016 What's this actually for ? Perhaps there's another way to reach this point---. In BG1EE(v1.2) and BG2EE(.. v1.3.2064), the kitlist.2da lists the kit.ids in the last column. But not so in the original games of course. Link to comment
subtledoctor Posted January 6, 2016 Author Share Posted January 6, 2016 Ya - I can use the EE column... I'm just unsure what to do with that value. In kitlist.2da it looks like 0x0000400Dwhile in kit.ids it looks like 0x400D Link to comment
Jarno Mikkola Posted January 6, 2016 Share Posted January 6, 2016 Those are the same numbers, if you don't know, just like the number 101(one hundred one) is 000 000 101, the first six zeroes usually just not shown, cause they make no difference to the amount. Link to comment
subtledoctor Posted January 6, 2016 Author Share Posted January 6, 2016 Okay I'm at ym computer and can try some stuff out, but I'm hitting a wall. I've stored the KITIDS column value from kitlist.2da in %bar%; then I try to run this: LOOKUP_IDS_SYMBOL_OF_INT foo ~kit~ %bar% But I'm getting a parse error. The Weidu documentation shows this for usage: LOOKUP_IDS_SYMBOL_OF_INT variable idsFile value Example: LOOKUP_IDS_SYMBOL_OF_INT foo ~spell~ 1101 Not sure what I'm doing wrong... will it not take a variable in the "value" field? Is this a showstopper? Link to comment
argent77 Posted January 6, 2016 Share Posted January 6, 2016 LOOKUP_IDS_SYMBOL_OF_INT should have no trouble with variable substitutions. It's a patch command though, so you have to use OUTER_PATCH or a similar construct if you want to use it on action level. The PATCH_PRINT call of this code snippet OUTER_PATCH foo BEGIN SET kit_value = 0x4024 // = 16420 (decimal) LOOKUP_IDS_SYMBOL_OF_INT kit_name ~kit~ kit_value PATCH_PRINT ~%kit_value% = %kit_name%~ END should output "16420 = DARK_MOON" for BG2:EE. Link to comment
subtledoctor Posted January 6, 2016 Author Share Posted January 6, 2016 LOOKUP_IDS_SYMBOL_OF_INT ... is a patch command though, Oooooh... didn't realize that. How contained does it have to be? (I'm away from my computer again, can't test stuff.) Could I just use the OUTER_PATCH block solely to generate the variable, and then use it elsewhere? Like: SET kit_value = 0x4024 // = 16420 (decimal) OUTER_PATCH foo BEGIN LOOKUP_IDS_SYMBOL_OF_INT kit_name ~kit~ kit_value END [some command] ~%kit_name%~Thing is, I'm generating the variable from kitlist.2da in an array (with various other values, like the name & description string refs, the class number, etc.) and then running iterated commands in an ACTION_PHP_EACH loop. The kit.ids name is used within that loop. Link to comment
argent77 Posted January 6, 2016 Share Posted January 6, 2016 Yes, that should be no problem. WeiDU variables seem to be globally accessible even if you define them in nested code blocks. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.