Age of Wonders III

Age of Wonders III

Community Made Maps & Campaigns
Welcome to the Age of Wonder III Workshop. The place on Steam to get and share handcrafted scenarios, epic campaigns and mods that implement little tweaks to full game overhauls.
Learn More
Modding: Cant Spawn Custom Unit
I recall having dealt with this problem before, but forgot the solution. I added a custom unit (the Airship from the Racial Heritage mod) to a mod of mine, but cannot build it in cities. Well, I can build, but once construction is complete, nothing spawns. What could be the cause of this?
< >
Showing 1-15 of 25 comments
Gloweye 17 4 Dec, 2016 @ 1:11am 
Unit Race Link Data, or something that sounds like it.
CapitaineYolo 13 4 Dec, 2016 @ 2:23am 
I got it to work somehow, but still dont quite know what was the problem. I ended up just copy pasting the unit from ships into machines and made sure everything looked like the original. Maybe the game needs an adjacent water tile to spawn a ship-type unit..
CapitaineYolo 13 4 Dec, 2016 @ 2:27am 
Im also trying to summon hero units during tactical combat. I attempted this by feeding a spell, from which I know it works with regular Unit Sets, with a Hero Set. Doesnt seem to work though :(
Gloweye 17 4 Dec, 2016 @ 2:28am 
Originally posted by CapitaineYolo:
Im also trying to summon hero units during tactical combat. I attempted this by feeding a spell, from which I know it works with regular Unit Sets, with a Hero Set. Doesnt seem to work though :(

Hero units are really completely different from others...Dont think there's a way to do this.
CapitaineYolo 13 4 Dec, 2016 @ 2:29am 
Is it because of their ability to cast spells?
Gloweye 17 4 Dec, 2016 @ 3:19am 
No, they're just a completely different kind of thing. It's like saying "Why can't I use conversion on the strategic map" ? "cause it's a tactical combat ability". They might look a bit the same and both have defense and resistance, but thats where the similarity stops. Their implementation is so different that they don't share anything, figure/unit entries don't exist for heroes, there's no link data, even their animation resolvers are different (unit can use those from the heroes, but not the other way around.)
CapitaineYolo 13 4 Dec, 2016 @ 3:24am 
For my purposes its not that important for the spawned unit to actually cast spells or be a hero.
Could I make regular Units which look like heroes with the Content Editor?
Gloweye 17 4 Dec, 2016 @ 5:15am 
Originally posted by CapitaineYolo:
For my purposes its not that important for the spawned unit to actually cast spells or be a hero.
Could I make regular Units which look like heroes with the Content Editor?

Not sure, but it\s easy to put a guy on a horse and give him a hero name.

Eomolch (spelling ?) is a modder who done something like it, he might know more.
CapitaineYolo 13 4 Dec, 2016 @ 6:25am 
Yeah, he probably is the best person to ask this, but according to steam didnt log in for 18 days :/. Mind if i ask more questions? My Mod (Enhanced Garrison) gives the Defending player in a Siege the ability of Spawning extra Units, depending on the Cities Buildings. It works by adding "City Property: Combat Property" to the buildings properties.

Ofcourse I would like it, if the units race matches that of the city. With the Racial T3 production facility, thats not a problem. But Basic Buildings, like Barracks or Temples are shared among all races. Because of this, right now everyone simply gets the Human racial Units, except for the racial T3.

Unlike most other City Properties, for some reason Combat Properties dont have the option of setting forbidden/required city requisites. Otherwise I could ofcourse add all the Combat Properties to their respective buildings and set city race as a requirement.

So now im thinking.. Do I have to copy the entire City Building Tree for every Race, thus converting all basic Buildings into racial ones? Would this mean, that in case of a city migration to another race...

- the city loses all buildings?
-the city keeps present buildings and their effects, but can now also build everything a second time?
Last edited by CapitaineYolo; 4 Dec, 2016 @ 6:31am
Gloweye 17 4 Dec, 2016 @ 8:42am 
yeah, that's what it would mean, so that doesn't sound like a good answer for me.

How about you make it different buildings, like the racial defense buildings ? Require the baseline buildings, then builds new ones.
CapitaineYolo 13 4 Dec, 2016 @ 9:00am 
yeah looks like my only choice. im going to make them require the same city properties and make them mutually exclusive to prevent duplicate buildings, and make city migrations a little more smooth. though this means, that hybrid cities will be a thing in my mod...

For example:

an orc city is conquered, then migrated to humans. it may already have the orc barracks, and they still allow the human player to build orc units despite the cities population being human. but if he decides to now build a warhall, it will produce human halberdiers and cavalry.

unless im mistaken and thats not how it works
Bob 2 4 Dec, 2016 @ 9:14am 
That's not how it works for the same reason you can't build Shock Troopers in a city that was once an Orc city and then migrated to a different race, even if the Dark Citadel is still in that city. There needs to be a race link for the unit with the race itself (not the race of the unit, but the race link for the production). For example, Orc Spearmen are only buildable in Orc cities, while Battering Rams are buildable in all cities that aren't dwellings. The Frost Tank is only buildable in Frostling Cities, while Flame Tanks are only buildable in cities that aren't Frostlings.

This is the same for buildings. If the race link of a building is not there for that race, you can't build it. If the building is already there prior to migration, the building will be disabled upon migration and not do anything anymore.

Basically, for a building to function, several requirements must be met:

1) It needs to have a race link with the race currently living in the city
2) In case of buildings set to only work in living cities, the city must not be ghouled (for example Hospital and Grand Palace)
3) In case of buildings set to only work in dead cities, the city must be ghouled. If it was purged afterwards those buildings are disabled (for example Harvester's Guild or Palace of the Dead)
4) In case of class-specific buildings, they only work if the player controlling that city is playing with the class or specialization that the building is linked to.

If one of those requirements is not met, the building is simply disabled, it can only be sold and won't grant its city properties.
Last edited by Bob; 4 Dec, 2016 @ 9:21am
CapitaineYolo 13 4 Dec, 2016 @ 9:24am 
damn you answer quickly :o i deleted that comment bc I realised I was just repeating what you said right there.. very helpful information, but unfortunate :/

Edit: and now you deleted your answer ;D
Last edited by CapitaineYolo; 4 Dec, 2016 @ 9:25am
CapitaineYolo 13 4 Dec, 2016 @ 9:27am 
Im contemplating whether losing all buildings in a city is worth the migration. and whether its better to lose all progress when migrating, but have the garrisons match a cities race, or keep the buildings, with an almost entirely human garrison.

Another relevant question is whether evil players are too strong in vanilla..
Last edited by CapitaineYolo; 4 Dec, 2016 @ 9:29am
Gloweye 17 4 Dec, 2016 @ 11:37am 
Originally posted by CapitaineYolo:
Im contemplating whether losing all buildings in a city is worth the migration. and whether its better to lose all progress when migrating, but have the garrisons match a cities race, or keep the buildings, with an almost entirely human garrison.

Another relevant question is whether evil players are too strong in vanilla..

I'd say, just add new buildings. If you publish the mod, people are going to complain really hard because it's a rather fundamental change for the city mechanics.

Just prefixing the name of your new strucutres with their race name probably works well enough tho.

I've thought about a structure like this myself...but I never liked that there's no way to prevent them from spawning outside the walls.
< >
Showing 1-15 of 25 comments
Per page: 1530 50