- Joined
- Aug 31, 2011
- Messages
- 297
Introduction!
What we need~
Let's begin!
Greetings!
This is just something to note a potential way to merge object data, since I can't use Grimoire stuff, being on v1.31 I started to experiment, so this is the result of that.
To preface, this should also work properly in all tabs of the Object Editor, and probably even the Trigger Editor, Hex Editors are pretty versatile being able to do as they do.
Apologies if things don't make sense, I just naturally seem to trail off on explanations a lot.
This is not the only way to merge data, other options might suit you better. If this seems to complicated, or run into some sort of issue you can always try something else.
This is just something to note a potential way to merge object data, since I can't use Grimoire stuff, being on v1.31 I started to experiment, so this is the result of that.
To preface, this should also work properly in all tabs of the Object Editor, and probably even the Trigger Editor, Hex Editors are pretty versatile being able to do as they do.
Apologies if things don't make sense, I just naturally seem to trail off on explanations a lot.
This is not the only way to merge data, other options might suit you better. If this seems to complicated, or run into some sort of issue you can always try something else.
It is advised that you backup your map before attempting this as it might not be reversible if you make a mistake.
What we need~
- Warcraft 3, of course, as well as World Editor
- A Hex Editor, I recommend HxD.
Let's begin!
So here we have our two sets of units we're going to combine. Sure could just copy them over but that's no fun.... And becomes much harder if both have over 100 units.
Of course we'll need to export the unit datas for both of these unit sets (I'd recommend against exporting all of the data at once, just bits at once, Units, Abilities, Upgrades, all that.
Beautiful and simple! Of course the data will fill out the more you change the units around, but this'll do for now.
This is what you need to copy-- everything from the 0C offset onwards... If you only have custom units-- we'll get to this later.
Copy it on to your main unit data, change the 08 offset to the addition of these two, 5+5 in Hexidecimal is A, so A for me (Use a calculator, it'll get harder to keep track of the more you have.)
And there we have it! We've combined the two! Buuuut that only covers a very specific case like this where you haven't got overlapping IDs or something, so let's do something about that, shall we?
Here, we'll be changing IDs around, this method isn't that great and can't always be done, but it's a method that exists for where you may use it. You'll see that I've also removed what isn't needed to copy from the new 'donor' data, just to make it easier.
Here, we hit Replace (Ctrl+R), set 'Search for:' to the first two bits of ID for your units or abilities or... what have you, you may need to do this multiple times for various things, then set 'Replace with:' with a new bit, so here I have 'Search for: u0' and 'Replace with: u1', set the 'Case sensitive' checkbox (Units use lowercase for their first letter, while heroes use uppercase, don't let them mix up or things will break) and Replace all! Do that all the times you need to aaaaand... Done!
Copy it all over to your main data and yay! Now all of the units have their new IDs. Of course you can also easily change what abilities that everything has and such this way by using ability IDs instead-- assuming you're also copying their abilities over.
So... Now what happens if you have changed the standard units as well? It becomes a bit more complicated but not too much.
My my! How crowded.
One easy way to do this is to export data, then File>Reset Standard Units to Defaults and export that data separately (Keep backups! Always keep backups!), this separate one is more for reference than anything.
For the reference data we'll need to find some kind of point to anchor off of, as it were, for this, we're using the Custom Footman ID of h000, trace back a little aaand...
There! that 05 telling us how many units we have, change that to the new number of units (still A since I'm only ending up with 10 in all), copy the donor data and there we go!
Just pointing out the model path as another reference point.
So... The IDs get kind of funky after getting to 256 units.
The 08 offset still has a number as it should (here 80) but there's another after it (03). Flip those around so you get 380 instead, and converting that from Hex to Decimal and you get 896. That's quite a lot. After getting to 256, new hundreds and thousands will instead be written AFTER the initial tens do, so that's mostly just a thing to keep in mind.
Hopefully that covers it all. Good luck!
This is what you need to copy-- everything from the 0C offset onwards... If you only have custom units-- we'll get to this later.
Copy it on to your main unit data, change the 08 offset to the addition of these two, 5+5 in Hexidecimal is A, so A for me (Use a calculator, it'll get harder to keep track of the more you have.)
Here, we'll be changing IDs around, this method isn't that great and can't always be done, but it's a method that exists for where you may use it. You'll see that I've also removed what isn't needed to copy from the new 'donor' data, just to make it easier.
Copy it all over to your main data and yay! Now all of the units have their new IDs. Of course you can also easily change what abilities that everything has and such this way by using ability IDs instead-- assuming you're also copying their abilities over.
So... Now what happens if you have changed the standard units as well? It becomes a bit more complicated but not too much.
One easy way to do this is to export data, then File>Reset Standard Units to Defaults and export that data separately (Keep backups! Always keep backups!), this separate one is more for reference than anything.
There! that 05 telling us how many units we have, change that to the new number of units (still A since I'm only ending up with 10 in all), copy the donor data and there we go!
So... The IDs get kind of funky after getting to 256 units.
Hopefully that covers it all. Good luck!
Last edited by a moderator: