Guest The_Swordalizer Posted April 7, 2005 Share Posted April 7, 2005 I have read enough tutorials to know that READ/WRITE is vital for good modding, however I am struggling with a few concepts. Here's a couple of examples from tutorials: Example 1: From kits tutorial: CODE COPY_EXISTING ~Viconi6.cre~ ~override~ ~Viconi8.cre~ ~override~ ~Viconi9.cre~ ~override~ ~Viconi11.cre~ ~override~ ~Viconi13.cre~ ~override~ ~Viconi16.cre~ ~override~ // ToB only, see below on ACTION_IF WRITE_SHORT 0x244 0 // doesn't change WRITE_BYTE 0x246 ~%A#SHAR%~ // the internal name of your kit, surrounded by % WRITE_BYTE 0x247 0x40 // doesn't change Why WRITE_SHORT and BYTE the two values that don't change? Why not just use the middle one? Also, could you not use COPY_EXISTING_REGEXP ~Viconi*.cre? Example 2: From the Weidu readme. COPY_EXISTING ~acolyte1.cre~ ~override/acolyte1.cre~ READ_LONG "0x2bc" "itemsoffset" READ_LONG "0x2b8" "itemslot" READ_LONG "0x2c0" "#items" READ_SHORT ("%itemslot%" + 0x04) "shield" WRITE_SHORT ("%itemslot%" + 0x04) "%#items%" WRITE_LONG 0x2b8 ("%itemslot%" + 0x14) WRITE_LONG 0x2c0 ("%#items%" + 1) INSERT_BYTES ("%itemsoffset%" + "%#items%" * 0x14) 0x14 WRITE_ASCII ("%itemsoffset%" + "%#items%" * 0x14) ~shld01~ IF_EVAL ("%shield%" = "65535") So, you're READing the items offset to find out where the items start. You're READing the item slot to find out . And you're READing the number of items. You add 0x04 to get the shield slot and READ this aswell. You WRITE into the itemslot the number of items. You WRITE +1 items. You INSERT enough bytes to hold the shield and write in the shield. Why can't you just READ the number of items, WRITE the number of items +1, get the offset for the shield from NI and WRITE_ASCII the shield into it? What is the importance of the additional functions? Why do you have to get the Shield as "0xXXXX) + X? Link to comment
This topic is now archived and is closed to further replies.