• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[General] Changing Item Raw Code

Status
Not open for further replies.
Level 23
Joined
Jul 26, 2008
Messages
1,317
Hi guys,
I searched hive for key words regarding my search, but could not find anything particularly relevant to my situation from any of the links below (except one telling me I needed JNPG).

Raw Data Code
Item Value Change
Raw Data Tutorial

Essentially, I am trying to change the raw values for items in the world editor. I am making a map series that is connected by a load/save system, and while I originally though it was saving items based on their name, I now think it is saving them based on raw code, which is a problem for me.

The problem is, when I started my map series, I did not have all the items made, so I just created the items that each map would provide players as I made each map. I would then copy paste them into future maps that would load/save the hero from that map. The load/save system is now giving me trouble with regards to the items (abilities load/save fine). It seems copy pasting the items created different raw code despite everything else being the same, and now I suspect the raw code difference is bugging the save/load system. Does anyone have any ideas?




upload_2018-8-24_21-0-30.png




upload_2018-8-24_21-0-39.png



You can see here, for this item, the difference is I00E and I00D
 
Level 23
Joined
Jul 26, 2008
Messages
1,317
The previous maps have already been made unfortunately, with all the triggers and everything. From map 11 on wards, all the maps have all the items, so that is not the problem. The issue is what to do with the previous maps that have already been made. Worst case scenario is I give everyone the codes for the legendary items, but I want to avoid this :/
 
Level 39
Joined
Feb 27, 2007
Messages
5,010
With WEX you can choose a new rawcode for an object if you create it via right clicking on the object you want to base it on and selecting the appropriate dialog option from the right-click menu. I believe the option to choose a rawcode also appears if you copy and paste one object at a time.

It might also be possible to import only item data with the right object file. Not sure on that.
 

Wrda

Spell Reviewer
Level 26
Joined
Nov 18, 2012
Messages
1,887
Meh, with sharpcraft merge option this could be solved easily, unfortunately sharpcraft don't work now because of this new patch...(at least for me)
If the all items and all item copy orders are different in every map, this will take an eternity but the only solution I see is copying each
item in every map (don't copy the same item if you already did) to an empty map, with the help of a paper and pencil to point out the name of the items you already copied. When you're done, export the item data to a folder so you can remember it is there. Open the first map level and import the file you had exported earlier, then you should check if the units have their abilities right and move on to the next map level and so on.
 
Level 39
Joined
Feb 27, 2007
Messages
5,010
Doing what Wrda suggested would probably take you less time and be less annoying than having to deal with save codes. As long as you didn't accidentally use the same rawcode for multiple items in different maps it wont be hard, just repetitive, and you only ever have to do it once. However, rawcode collisions mean you will also have to change them in any trigger.
 
Level 23
Joined
Jul 26, 2008
Messages
1,317
Doing what Wrda suggested would probably take you less time and be less annoying than having to deal with save codes. As long as you didn't accidentally use the same rawcode for multiple items in different maps it wont be hard, just repetitive, and you only ever have to do it once. However, rawcode collisions mean you will also have to change them in any trigger.
Hi Pyrogasm, I really appreciate you and Wrda's advice on this matter. If its ok, I just have a quick question.
I was talking to another map creator who has done the same thing I have done (series of maps with save/load), and he said to avoid this problem I am facing, he just overwrote the original items for warcraft 3 instead of making any custom items. I was just curious if this method has any drawbacks, as on the surface it seems by far the most simple thing to do, since the normal items' raw codes should in theory never change, regardless of it they are edited.

Thanks so much though for the previous responses before, I really appreciated them.
 
Level 11
Joined
May 29, 2008
Messages
132
I have a suggestion. Rather than copying and pasting items between maps, try to use the Object Editor's "File -> Export Item Settings" command. This should create a file that contains all of the raw data for the items you've made. Then in your other maps, use the "File -> Import Item Settings" to import the items. Hopefully using these commands will keep the item IDs consistent across multiple maps.

Make sure to create the initial export off of the map that you feel has the IDs correct and working with the save system. Maybe even consider making an "Items Map" that it's only role is to store the items data for your set of maps, then whenever you make changes to an item you do it in that map, then import it into all of the others.
 
Level 39
Joined
Feb 27, 2007
Messages
5,010
Rather than copying and pasting items between maps, try to use the Object Editor's "File -> Export Item Settings" command. ... Then in your other maps, use the "File -> Import Item Settings" to import the items
Maybe even consider making an "Items Map" that it's only role is to store the items data for your set of maps, then whenever you make changes to an item you do it in that map, then import it into all of the others.
the only solution I see is copying each item in every map (don't copy the same item if you already did) to an empty map, with the help of a paper and pencil to point out the name of the items you already copied. When you're done, export the item data to a folder so you can remember it is there. Open the first map level and import the file you had exported earlier, then you should check if the units have their abilities right and move on to the next map level and so on.

Also exporting and batch importing immediately will definitely create duplicate items (same data fields but different rawcode) and overwrite previously-used item rawcodes even if the item isn't the 'same'. So yes the OP needs to put it into a separate map first and resolve all the collisions. Batch importing straight into all the other maps will definitely cause problems.
 
Level 23
Joined
Jul 26, 2008
Messages
1,317
Well, wait 1 second. One of my maps currently has all the correct items in them. Does that mean I can just delete all items from the other maps, and then just import those new items over through the import setting?

That sounds slightly easier haha. Of course I would re-add all the references in the triggers to those items, but other than that, it seems this way will consume less time than me manual changing everything to the normal non custom items.
 
Status
Not open for further replies.
Top