• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[SOLVED] Custom unit not loading

Status
Not open for further replies.
Level 15
Joined
Dec 19, 2020
Messages
286
Hello guys!

In one of my maps, I'm making use of a custom unit based off the Siege Engine. The custom unit has its own stats with its own model.
In the map I'm making use of multiple factions. Only one of them uses this unit, so I preplaced one. The problem is as such: When starting the map, the custom unit has been switched to a Siege Engine (the unit it is based off). The custom unit isn't trained by the computer-controlled player too.

To make things even more complicated, if I place one of the custom units for myself, it doesn't change and works fine. This also counts for other computer-controlled players, except the player I want.

Does anyone now what the problem could be?

Thanks in advance! :)
 
Level 15
Joined
Dec 19, 2020
Messages
286
That is a very strange bug indeed that a custom pre-placed unit is turned into another unit upon playing the map.

Does the custom unit have the Chaos ability by chance and the faction has Barrage upgraded?

Otherwise you may have a trigger that's replacing the unit.

It indeed has. I removed the abilities and the unit is working as it did previously. Sadly, now the AI starts making mistakes. It now only trains my custom units and not siege engines (they are supposed to be part of the same attack wave and it actually did previously). Any idead where this comes from?

EDIT: If you don't research the barrage upgrade at all, everything works fine.

Is it possible for you to take a look at another AI problem in my map? It is posted at AI attack waves mixing .
 
Last edited:
It indeed has. I removed the abilities and the unit is working as it did previously. Sadly, now the AI starts making mistakes. It now only trains my custom units and not siege engines (they are supposed to be part of the same attack wave and it actually did previously). Any idead where this comes from?

EDIT: If you don't research the barrage upgrade at all, everything works fine.

Is it possible for you to take a look at another AI problem in my map? It is posted at AI attack waves mixing .
My only idea is you haven't changed the AI script to properly account for the two units. Delete the chaos ability from the custom unit because when the barrage upgrade is researched it'll transform the custom unit into the Siege Engine. As for the AI where is the Ogre players starting location? Because I believe suicide on player sometimes uses it as a location. Other than that I'm not sure there's nothing wrong with the script from what I can tell. Although I would delete the heroes from the CampaignDefenderEx I think that can cause some unwanted behaviour just have them placed on the map and when they die trigger it so a random altar is picked and ordered to revive them :)
 
Level 15
Joined
Dec 19, 2020
Messages
286
My only idea is you haven't changed the AI script to properly account for the two units. Delete the chaos ability from the custom unit because when the barrage upgrade is researched it'll transform the custom unit into the Siege Engine. As for the AI where is the Ogre players starting location? Because I believe suicide on player sometimes uses it as a location. Other than that I'm not sure there's nothing wrong with the script from what I can tell. Although I would delete the heroes from the CampaignDefenderEx I think that can cause some unwanted behaviour just have them placed on the map and when they die trigger it so a random altar is picked and ordered to revive them :)

Thanks for all your help! Sadly, the AI problem did not change, despite the fact taht the starting location is at the right place and the heroes are no longer part of the defense group.
I've added my map to this post, so you can see what I mean if you like it. It's about the blue faction.

PS. Feel free to play the map. It's almost finished
 

Attachments

  • Map5 Reuniting the family.w3x
    1.4 MB · Views: 12
Level 15
Joined
Dec 19, 2020
Messages
286
I'll wait til it's finished and uploaded :)

Here's a crazy idea that might work, re-write the AI for blue from scratch maybe using an AI from the vanilla campaigns as a base. Sometimes it helps to just clear your mind completely and go back to the ground up.

Thanks for the tip! I'll try it.

The map is part of a greater project, so it can take some time before it is uploaded. :)

EDIT: It didn't help. :( I guess it will be one big attack wave then. Despite this, thanks for your time!
 
Last edited:

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,287
My guess is the dependency equivalence (or however WC3 calls it) is set incorrectly. The custom units count as siege engines as far as the AI is aware because they were based off siege engines and that field was not changed. When it comes time to make a stock of siege engines, the AI thinks it already has since it owns the custom units which count as them and so skips to the next stock order.
 
Level 15
Joined
Dec 19, 2020
Messages
286
My guess is the dependency equivalence (or however WC3 calls it) is set incorrectly. The custom units count as siege engines as far as the AI is aware because they were based off siege engines and that field was not changed. When it comes time to make a stock of siege engines, the AI thinks it already has since it owns the custom units which count as them and so skips to the next stock order.

Thanks for the tip. Luckily, it has been solved. The error occured because of some strange upgrade bug in the Editor. Despite this, thanks for trying to find a solution.
 
Status
Not open for further replies.
Top