Icendoan Posted July 5, 2008 Share Posted July 5, 2008 I seem to have the most problems with this, eh? Well, I am helping Zyraen over at SHS with his Silmarillion Partial Conversion, and I am coding his dynamic item upgrade system for him. Step one is making all the items. I have a few template items I am using to spawn hundreds, via COPY_EXISTING with a new filename, and then patching in abilities ect. Most of my code is copied and pasted, just creating different items each time. So, I only have to give you the offending block, not all 1000 lines of it. I shall codebox it as well, because I am nice. COPY_EXISTING ~zyplatf.itm~ ~override/zy0pf1s1.itm~ //0 Diamonds SAY NAME1 ~Full Plate +1~ WRITE_BYTE 0x256 15 COPY_EXISTING ~zyplatf.itm~ ~override/zy0pf1e1.itm~ WRITE_BYTE 0x316 15 //Fire WRITE_LONG 0x286 15 //Acid WRITE_BYTE 0x2b2 15 //Cold WRITE_BYTE 0x2e6 15 //Electricity COPY_EXISTING ~zyplatf.itm~ ~override/zy0pf1s2.itm~ WRITE_BYTE 0x256 25 COPY_EXISTING ~zyplatf.itm~ ~override/zy0pf1e2.itm~ WRITE_BYTE 0x316 25 //Fire WRITE_LONG 0x286 25 //Acid WRITE_BYTE 0x2b2 25 //Cold WRITE_BYTE 0x2e6 25 //Electricity COPY_EXISTING ~zyplatf.itm~ ~override/zy1pf1s1.itm~ //1 D WRITE_BYTE 0x256 15 COPY_EXISTING ~zyplatf.itm~ ~override/zy1pf1s2.itm~ WRITE_BYTE 0x256 25 COPY_EXISTING ~zyplatf.itm~ ~override/zy1pf1e1.itm~ WRITE_BYTE 0x316 15 //Fire WRITE_LONG 0x286 15 //Acid WRITE_BYTE 0x2b2 15 //Cold WRITE_BYTE 0x2e6 15 //Electricity COPY_EXISTING ~zyplatf.itm~ ~override/zy1pf1e2.itm~ WRITE_BYTE 0x316 25 //Fire WRITE_LONG 0x286 25 //Acid WRITE_BYTE 0x2b2 25 //Cold WRITE_BYTE 0x2e6 25 //Electricity COPY_EXISTING ~zyplatf.itm~ ~override/zy2pf1s1.itm~ //2 D WRITE_BYTE 0x256 15 COPY_EXISTING ~zyplatf.itm~ ~override/zy2pf1s2.itm~ WRITE_BYTE 0x256 25 COPY_EXISTING ~zyplatf.itm~ ~override/zy2pf1e1.itm~ WRITE_BYTE 0x316 15 //Fire WRITE_LONG 0x286 15 //Acid WRITE_BYTE 0x2b2 15 //Cold WRITE_BYTE 0x2e6 15 //Electricity COPY_EXISTING ~zyplatf.itm~ ~override/zy2pf1e2.itm~ WRITE_BYTE 0x316 25 //Fire WRITE_LONG 0x286 25 //Acid WRITE_BYTE 0x2b2 25 //Cold WRITE_BYTE 0x2e6 25 //Electricity COPY_EXISTING_REGEXP GLOB ~zy1pf.*.itm~ ~override~ WRITE_BYTE 0x106 -1 //AC Bonuses COPY_EXISTING_REGEXP GLOB ~zy2pf.*.itm~ ~override~ WRITE_BYTE 0x106 -2 REPLACE_TEXTUALLY ~+0~ ~+1~ Which uses the one platemail multiple times. I get a parsing error with the starting COPY_EXISTING. I have tried changing to COPY and GLOBing it, to no success. If you could in any way make sense of why I get these errors, it would be extremely helpful. Thanks once again, Icen Link to comment
berelinde Posted July 5, 2008 Share Posted July 5, 2008 Are you copying the "source" item to the override before you attempt to patch it? zyplatf.itm isn't present in the unmodified game, so if you haven't moved it from the mod folder to the override first, weidu won't find it. I'd recommend using COPY ~MyMod/ITM/zyplatf.itm~ ~override/zy0pf1s1.itm~ etc Link to comment
Icendoan Posted July 5, 2008 Author Share Posted July 5, 2008 I had, this is block two, for the +1 Armour, I copied for +0. EDIT: I had tried changing that to COPY and patching another base copy, and I still got the same error. Icen Link to comment
Taimon Posted July 5, 2008 Share Posted July 5, 2008 Post the parse error. Or just change the -1 to (0 - 1). [same for -2] WeiDU doesn't handle negative ints directly. Link to comment
Icendoan Posted July 6, 2008 Author Share Posted July 6, 2008 WeiDU v 20400 Log C:\Game\BG2\setup-silm.exe [./chitin.key] loaded, 590551 bytes [./chitin.key] 182 BIFFs, 41793 resources [dialog.tlk] loaded, 13478138 bytes [dialog.tlk] 105999 string entries [./Autorun.ini] loaded, 1452 bytes [./baldur.ini] loaded, 3768 bytes Possible HD/CD Path: [C:\Game\BG2\] Possible HD/CD Path: [C:\Game\BG2\English\] Possible HD/CD Path: [C:\Game\BG2\CD1\] Possible HD/CD Path: [C:\Game\BG2\CD2\] Possible HD/CD Path: [C:\Game\BG2\English\] Possible HD/CD Path: [C:\Game\BG2\CD2\] Possible HD/CD Path: [C:\Game\BG2\English\] Possible HD/CD Path: [C:\Game\BG2\CD3\] Possible HD/CD Path: [C:\Game\BG2\English\] Possible HD/CD Path: [C:\Game\BG2\CD4\] Possible HD/CD Path: [C:\Game\BG2\CD5\] [./Keymap.ini] loaded, 5615 bytes [./Mplaynow.ini] loaded, 230 bytes [C:\Game\BG2\setup-silm.exe] Using scripting style "BG" [dialog.tlk] claims to be writeable. [dialog.tlk] claims to be a regular file. [sETUP-SILM.TP2] PARSE ERROR at line 439 column 1-13 Near Text: COPY_EXISTING GLR parse error [sETUP-SILM.TP2] ERROR at line 439 column 1-13 Near Text: COPY_EXISTING Parsing.Parse_error ERROR: parsing [sETUP-SILM.TP2]: Parsing.Parse_error ERROR: problem parsing TP file [sETUP-SILM.TP2]: Parsing.Parse_error FATAL ERROR: Parsing.Parse_error WeiDU Timings load TLK 0.000 parsing .log files 0.001 parsing .tp files 0.009 loading files 0.045 unmarshal KEY 0.048 stuff not covered elsewhere 0.108 unmarshal TLK 0.145 TOTAL 0.356 is my debug, and I shall try changing the -1s to (0-1). Aha! After doing that the error changed! I can probably handle it from here, and I will get back to you if it confounds me again or it is successful. Thanks, Icen Link to comment
Icendoan Posted July 6, 2008 Author Share Posted July 6, 2008 Ok, it has got me again, just like it did before because I have no clue what is actually turning these up. This one is due to a WRITE_ASCII when I convert the full plate to chainmail, changing BAMs. I have just double checked the offsets and that is fine, as well as putting my ascString in ~~, to no avail. Here is this chunk of code, very similar to the last; COPY_EXISTING ~zyplatf.itm~ ~override/zychan.itm~ SAY NAME1 ~Chainmail +0~ WRITE_LONG 0x106 5 //base AC WRITE_LONG 0x132 2 //Slashing WRITE_LONG 0x162 0 //Peircing WRITE_LONG 0x192 0 //Missile WRITE_LONG 0x19e -2 //Crushing WRITE_ASCII 0x3a ~Ichan01.BAM~ WRITE_ASCII 0x44 ~Gchan01.BAM~ WRITE_ASCII 0x58 ~Cchan01.BAM~ SAY DESC #6673 COPY_EXISTING ~zychan.itm~ ~override/zy0c0s1.itm~ //0 Diamonds WRITE_BYTE 0x256 15 COPY_EXISTING ~zychan.itm~ ~override/zy0ce01.itm~ WRITE_BYTE 0x316 15 //Fire WRITE_LONG 0x286 15 //Acid WRITE_BYTE 0x2b2 15 //Cold WRITE_BYTE 0x2e6 15 //Electricity COPY_EXISTING ~zychan.itm~ ~override/zy0c0s2.itm~ WRITE_BYTE 0x256 25 COPY_EXISTING ~zychan.itm~ ~override/zy0c0e2.itm~ WRITE_BYTE 0x316 25 //Fire WRITE_LONG 0x286 25 //Acid WRITE_BYTE 0x2b2 25 //Cold WRITE_BYTE 0x2e6 25 //Electricity COPY_EXISTING ~zychan.itm~ ~override/zy1c0s1.itm~ //1 D WRITE_BYTE 0x256 15 COPY_EXISTING ~zychan.itm~ ~override/zy1c0s2.itm~ WRITE_BYTE 0x256 25 COPY_EXISTING ~zychan.itm~ ~override/zy1c0e1.itm~ WRITE_BYTE 0x316 15 //Fire WRITE_LONG 0x286 15 //Acid WRITE_BYTE 0x2b2 15 //Cold WRITE_BYTE 0x2e6 15 //Electricity COPY_EXISTING ~zychan.itm~ ~override/zy1c0e2.itm~ WRITE_BYTE 0x316 25 //Fire WRITE_LONG 0x286 25 //Acid WRITE_BYTE 0x2b2 25 //Cold WRITE_BYTE 0x2e6 25 //Electricity COPY_EXISTING ~zychan.itm~ ~override/zy2c0s1.itm~ //2 D WRITE_BYTE 0x256 15 COPY_EXISTING ~zychan.itm~ ~override/zy2c0s2.itm~ WRITE_BYTE 0x256 25 COPY_EXISTING ~zychan.itm~ ~override/zy2c0e1.itm~ WRITE_BYTE 0x316 15 //Fire WRITE_LONG 0x286 15 //Acid WRITE_BYTE 0x2b2 15 //Cold WRITE_BYTE 0x2e6 15 //Electricity COPY_EXISTING ~zychan.itm~ ~override/zy2c0e2.itm~ WRITE_BYTE 0x316 25 //Fire WRITE_LONG 0x286 25 //Acid WRITE_BYTE 0x2b2 25 //Cold WRITE_BYTE 0x2e6 25 //Electricity COPY_EXISTING_REGEXP GLOB ~zy1c0.*.itm~ ~override~ WRITE_BYTE 0x106 4 //AC Bonuses COPY_EXISTING_REGEXP GLOB ~zy2c0.*.itm~ ~override~ WRITE_BYTE 0x106 3 Can you see, in your infinite wisdom, what is wrong with this? Thanks once again, Icen Link to comment
Taimon Posted July 6, 2008 Share Posted July 6, 2008 WRITE_LONG 0x19e -2 //Crushing Same thing, change to (0 - 2). Parenthesis are optional. [but the spaces around the minus are not.] You probably notice, that there is a WRITE_ASCII after that line, so the error message pointed you somewhat in the right direction. Oh, and can you change your binary sig to hex? Will be much shorter. Link to comment
Icendoan Posted July 6, 2008 Author Share Posted July 6, 2008 Heh. sure. Thanks for helping, I should have thought of those negatives as well. Just to clarify, can I SAY DESC #STRREF? I am not too sure about it but I don't want to type it all out. Right, I can't. Ah well. I changed my descriptions to a string instead of a STRREF, and I get another error. Aha, naming issues! It gets to the installing but fails, I will see if I can sort it, if not, I will post again. HUZZAH! IT INSTALLS! I corrected some false integers (0-1 ect.) and some typos. Icen Link to comment
Taimon Posted July 6, 2008 Share Posted July 6, 2008 Just to clarify, can I SAY DESC #STRREF? I am not too sure about it but I don't want to type it all out. Right, I can't. Ah well. This should work. What error did you get? Link to comment
Icendoan Posted July 6, 2008 Author Share Posted July 6, 2008 Parse error, and the WeiDU readme says strings only, so I just copied/pasted the descriptions. It may have also been linked to my lack of a NAME2 for it. Oh, hex sig as well! Icen Link to comment
Mike1072 Posted July 6, 2008 Share Posted July 6, 2008 Ok, it has got me again, just like it did before because I have no clue what is actually turning these up. This one is due to a WRITE_ASCII when I convert the full plate to chainmail, changing BAMs. I have just double checked the offsets and that is fine, as well as putting my ascString in ~~, to no avail. Here is this chunk of code, very similar to the last; COPY_EXISTING ~zyplatf.itm~ ~override/zychan.itm~ SAY NAME1 ~Chainmail +0~ WRITE_LONG 0x106 5 //base AC WRITE_LONG 0x132 2 //Slashing WRITE_LONG 0x162 0 //Peircing WRITE_LONG 0x192 0 //Missile WRITE_LONG 0x19e -2 //Crushing WRITE_ASCII 0x3a ~Ichan01.BAM~ WRITE_ASCII 0x44 ~Gchan01.BAM~ WRITE_ASCII 0x58 ~Cchan01.BAM~ SAY DESC #6673 Can you see, in your infinite wisdom, what is wrong with this? Thanks once again, Icen You should note that RESREFs do not include file extensions, and you will be writing over more of the file than the 8 bytes assigned for the icon information when you try to write more than 8 characters. WRITE_ASCII 0x3a ~Ichan01~ #8 WRITE_ASCII 0x44 ~Gchan01~ #8 WRITE_ASCII 0x58 ~Cchan01~ #8 Link to comment
Icendoan Posted July 6, 2008 Author Share Posted July 6, 2008 Ah, ok. I will amend that. I was just going by the fields in NI. Icen Link to comment
Miloch Posted July 7, 2008 Share Posted July 7, 2008 Or just change the -1 to (0 - 1). [same for -2]WeiDU doesn't handle negative ints directly. Pretty sure you can just quote it too... ~-1~ etc. Link to comment
Icendoan Posted July 7, 2008 Author Share Posted July 7, 2008 Well, it works, so I am not going to mess about with it more. Icen Link to comment
Icendoan Posted July 10, 2008 Author Share Posted July 10, 2008 Right, just a question this time. Honest. How do I patch in a flag such as Two-Handed? Icen Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.