Idobek Posted April 12, 2004 Share Posted April 12, 2004 (edited) Let's say we want to remove the 'lore to identify' value from all items so that we never have to have them identified. BEGIN ~Identify All Items~ COPY_EXISTING_REGEXP GLOB ~.+\.itm~ ~override~ WRITE_SHORT 0x42 0x0000This will modify all item files in the game to set the 'lore to identify' value to 0. However, it will copy (and backup) every item file, including the ones that already have 0 'lore to identify'. By using BUT_ONLY_IF_IT_CHANGES, only the files that actually change will be copied. BEGIN ~Identify All Items~ COPY_EXISTING_REGEXP GLOB ~.+\.itm~ ~override~ WRITE_SHORT 0x42 0x0000 BUT_ONLY_IF_IT_CHANGESTo save space, you can use BUT_ONLY instead of BUT_ONLY_IF_IT_CHANGES for the same effect. Note: BUT_ONLY_IF_IT_CHANGES will trip over the iplot0xx items if you use C_E_R to copy all the items. I have added this piece of code to the top of my tp2 to deal with this issue. ALWAYS ACTION_IF NOT FILE_EXISTS ~override/iplot01k.itm~ THEN BEGIN COPY ~IKTest/blank.itm~ ~override/iplot01k.itm~ END ACTION_IF NOT FILE_EXISTS ~override/iplot04g.itm~ THEN BEGIN COPY ~IKTest/blank.itm~ ~override/iplot04g.itm~ END ACTION_IF NOT FILE_EXISTS ~override/iplot04h.itm~ THEN BEGIN COPY ~IKTest/blank.itm~ ~override/iplot04h.itm~ END ACTION_IF NOT FILE_EXISTS ~override/iplot04i.itm~ THEN BEGIN COPY ~IKTest/blank.itm~ ~override/iplot04i.itm~ END ENDI do it like this because then I don't have to remember copy the iplot0xx items everytime I use C_E_R on items. Edited March 16, 2015 by Mike1072 modernized and removed references to IF_EVAL Quote Link to comment
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.