• 🏆 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!

A strange bug

Status
Not open for further replies.
Level 4
Joined
Jan 2, 2016
Messages
66
I want to make a Ballista unit. So, I made a custom unit based on Glaive Thrower, as that is the closest to what I want. I changed its model, icon, and projectile model. But, for reasons unknown, it shows up as a Night Elf Archer both in the editor and in game. It has the Archer icon and model, but it still has the Ballista missile. But it fires that missile in a high arc like the Archer rather than in a flat line, even though I have the projectile arc height set to 0.05.

It doesn't seem to matter what I do: if I make a custom unit based on Glaive Thrower, it will have the Archer model and icon, and will be named "Archer" on the unit palette and have the Archer tooltip. No matter what I change, it shows up as an Archer in game.

This only happens if I make the custom unit under my campaign's Custom Data; if I do it in the map's Object Editor, it works normally.

Any ideas what could be causing this?
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,190
Sounds like a bug. Possibly a data collision?

If the unit is given a rawcode identifier that is the same as an existing unit, or shares the same letters (different cases) as an existing unit then it might load the wrong unit.

If your individual maps have some custom units defined, and then you add one to the campaign it is possible that the one added to the campaign has the same rawcode as the ones added to the individual maps. Since the campaign editor does not know what is in the maps, it cannot be sure if rawcodes it creates are not used in the maps.
 
Level 4
Joined
Jan 2, 2016
Messages
66
Well, I'm very early in development so there is only one map in the campaign. I'm creating my custom units before I start making missions. And that map doesn't contain any custom data; I'm doing all that in the Campaign Editor so the maps will inherit it.

I deleted the unit and made it again, to see what happens. When I'm looking at the unit under the Campaign Editor, its rawcode is e600:ebal. Then, when I look at the very same unit under the map's Object editor, its rawcode is e600:earc!

But, I made a different map and it appears to work properly in that one, so there must be something wrong with that one map I'm using. I can't figure out what, though.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,190
But, I made a different map and it appears to work properly in that one, so there must be something wrong with that one map I'm using. I can't figure out what, though.
It is not basing the unit on the intended type. Could this be an expansion/patch dependency problem? For example one map is RoC and the other TFT. Or one map uses latest patch while the other uses vanilla release object data.
 
Level 4
Joined
Jan 2, 2016
Messages
66
Well, it doesn't appear to be an expansion dependency problem; I created a new w3x map and imported into the campaign, and in that map the Ballista shows up correctly, both in editor and in game.

Since the bugged map didn't contain any content yet, I'm fine with just deleting it. This doesn't mean the problem is solved though, just worked around.
 
Status
Not open for further replies.
Top