Grammarsalad Posted October 17, 2018 Posted October 17, 2018 (edited) Solved. See 3rd post I'm trying to create a number of cleric scrolls. In order to increase compatibility (especially with Spell Revisions), I would like to be able to copy the spell description and then apply it to the scroll description. I can do this will the file name, no problem. So, for example, for the scroll of detect evil, I have this: //get spl name: Detect Evil COPY_EXISTING ~SPPR104.spl~ ~override~ READ_ASCII 0x0008 name COPY_EXISTING ~B_PS104.itm~ ~override~ //scroll of detect evil (etc.) WRITE_ASCIIE 0x0008 ~%name%~ WRITE_ASCIIE 0x000c ~%name%~ Great, it copies the spell text/string ref--not sure which--from the spell and applies it to the scroll. That is, this doesn't work: //get spl name: Detect Evil COPY_EXISTING ~SPPR104.spl~ ~override~ READ_ASCII 0x0054 desc COPY_EXISTING ~B_PS104.itm~ ~override~ //scroll of detect evil (etc.) WRITE_ASCIIE 0x0054 ~%desc%~ What am I doing wrong? Edited October 17, 2018 by Grammarsalad Quote
subtledoctor Posted October 17, 2018 Posted October 17, 2018 Just use the strrefs? COPY spl READ_LONG 0x50 desc COPY itm WRITE_LONG 0x54 desc Quote
Grammarsalad Posted October 17, 2018 Author Posted October 17, 2018 (edited) Oh spit! Simple mistake. I was copying the wrong descriptor from the spl file (i.e. 0x0054 when it should have been 0x0050)--thanks for that Subtle. This worked: Edit: this is lightly better: //Scroll of Detect evil COPY_EXISTING ~SPPR104.spl~ ~override~ READ_ASCII 0x0008 name READ_ASCII 0x0050 desc COPY ~%mod_folder%/data/scrolls/priest_1/B_PS104.itm~ ~override~ //Actual scroll WRITE_ASCIIE 0x0008 ~%name%~ WRITE_ASCIIE 0x000c ~%name%~ WRITE_ASCIIE 0x0054 ~%desc%~ Edited October 17, 2018 by Grammarsalad Quote
CamDawg Posted October 17, 2018 Posted October 17, 2018 The name and description fields are string references (read: numeric), so READ/WRITE_LONG is a better fit than READ/WRITE_ASCII. Quote
subtledoctor Posted October 17, 2018 Posted October 17, 2018 Can't WRITE_ASCII screw things up if you don't specify the length of the string, or something? Should it instead be SAY EVAL? Quote
Ardanis Posted October 18, 2018 Posted October 18, 2018 It's eight characters by default, so unless you need different length (or to null-terminate) it's fine. Quote
Grammarsalad Posted October 19, 2018 Author Posted October 19, 2018 Ah okay. I'll change it to read/write long Quote
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.