Demivrgvs Posted May 21, 2007 Share Posted May 21, 2007 I've changed some in game items from X charges to once a day...problem is that when i find the item it has X charges even if it correctly recharge one charge after resting. And if i add a new ability with charges when the item is found the new ability has no charges before resting. What have i to do to set the #charges so that they're diplayed correctly before resting? Link to comment
Avenger Posted May 21, 2007 Share Posted May 21, 2007 Set the actual (current) item charges too. Link to comment
Demivrgvs Posted May 22, 2007 Author Share Posted May 22, 2007 Where am i supposed to do so? I'm using NI to edit the item and i can only see one row about #charges... Link to comment
devSin Posted May 22, 2007 Share Posted May 22, 2007 You need to edit the ARE or CRE where the item is referenced. The current charges are stored there. Link to comment
Demivrgvs Posted May 22, 2007 Author Share Posted May 22, 2007 For editind .cre i've no problem but editing .are without overwriting is beyond my knowledge. Is there a simple code to do that #charge editing? Thanx! Link to comment
Demivrgvs Posted May 23, 2007 Author Share Posted May 23, 2007 Is it possible to make something like this... COPY_EXISTING ~ribald.sto~ ~override/ribald.sto~ ADD_STORE_ITEM ~myitem~ #20 #0 #0 #1 #5 ...but referring to items that may lay in containers? What i need is something like: COPY ~Item_rev\itm\AMUL15.ITM~ ~override\AMUL15.ITM~ #20 #0 #0 Just to edit the #charges the item will have when you find it. Link to comment
Nythrun Posted May 23, 2007 Share Posted May 23, 2007 There isn't a top level WeiDU command for this. Something like the following: COPY_EXISTING ~AREANAME.are~ ~override~ // pick the correct area :) PATCH_IF (SOURCE_SIZE > 0x11b) THEN BEGIN READ_LONG 0x78 "io" // offset to list of items FOR (READ_SHORT 0x76 "ic"; "ic" > 0x00; "ic" -= 0x01) BEGIN READ_ASCII ("io" + ("ic" * 0x14) - 0x14) ~in~ // item name PATCH_IF (~%in%~ STRING_EQUAL_CASE ~NAMEOFTHEITEMTOMODIFY~) THEN BEGIN WRITE_SHORT ("io" + ("ic" * 0x14) - 0x0a) 0x00 // charges first header WRITE_SHORT ("io" + ("ic" * 0x14) - 0x08) 0x00 // charges second header WRITE_SHORT ("io" + ("ic" * 0x14) - 0x06) 0x00 // charges third header SET "ic" = 0x00 END END END BUT_ONLY where you pick the area name, the item to modify, and some non-zero number of charges Link to comment
Demivrgvs Posted May 23, 2007 Author Share Posted May 23, 2007 THANX! WRITE_SHORT ("io" + ("ic" * 0x14) - 0x0a) 0x00 Those are the numer of charges? For example 0x02 would mean 2 charges? Link to comment
igi Posted May 24, 2007 Share Posted May 24, 2007 Yes. Note that in the code sample the charge count is being set in hex. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.