• 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] Replace buildings with custom buildings without affecting techtree?

Status
Not open for further replies.
Level 14
Joined
May 9, 2021
Messages
263
Hey.

I'm trying to create an Altered Melee map where you start as any one of the four original Races, but can pick an option that replaces certain units with other units (for example; starting as Orcs and picking "Darkspear" will replace Grunts with Darkspear Skirmishers and Raiders with Raptor Riders).

The way I'd like to do this is to replace the regular buildings with custom buildings that have all the new units and upgrades (so, taking the example again, the Barracks would be replaced with a Darkspear Barracks) without affecting the techtree (some buildings require the Barracks and so on).

How can I do this? Or is there a better way?

Help will be appreciated :)
 

Remixer

Map Reviewer
Level 33
Joined
Feb 19, 2011
Messages
2,112
You can define some tech tree options in the Gameplay Constants menu (top par in world editor). For example "Altar" definition includes the altar of all races for the purpose of Tavern.

So, you can name one of those categories "Barracks" and include both variants of your barracks in it, and use the Techtree Equivalent as the requirement for your needs.
 
Level 29
Joined
Sep 26, 2009
Messages
2,595
Possible solutions depend on whether buildings are also changed or not. If you want to only limit which units you can train or which researches are available, then you can do this via triggers:
  • Player - Set the max research level of Your_tech to 0 for Your_player
  • Player - Make Your_unit_type Unavailable for training/construction by Your_player
If you also want to have different buildings, then personally I would say to create copy of all custom buildings - including those that are unchanged.
My reason is simple: Let's say you want to replace Orc's default building 'Altar of Storms' with 'Altar of Loa' when player picks 'Darkspear' race.
Altar of Storm is required in order to upgrade Great Hall to Fortress.
You can add the Altar of Loa to Alter of Storm's 'Techtree - Dependency Equivalents', meaning that you will be able to upgrade Great Hall to Fortress even if you don't have Altar of Storms but you have Altar of Loa built.
The issue is that if you don't have Altar of Loa/Storms built, the Fortress will in game write that it requires Altar of Storms... yet you can only build Altar of Loa.
This issue, where building requires structures that you cannot build, is very confusing in my opinion, hence why I would personally just create a copy of a Fortress specifically for Darkspear trolls and change its requirements from Altar of Storms to Altar of Loa.
 
Level 14
Joined
May 9, 2021
Messages
263
Possible solutions depend on whether buildings are also changed or not. If you want to only limit which units you can train or which researches are available, then you can do this via triggers:
  • Player - Set the max research level of Your_tech to 0 for Your_player
  • Player - Make Your_unit_type Unavailable for training/construction by Your_player
If you also want to have different buildings, then personally I would say to create copy of all custom buildings - including those that are unchanged.
My reason is simple: Let's say you want to replace Orc's default building 'Altar of Storms' with 'Altar of Loa' when player picks 'Darkspear' race.
Altar of Storm is required in order to upgrade Great Hall to Fortress.
You can add the Altar of Loa to Alter of Storm's 'Techtree - Dependency Equivalents', meaning that you will be able to upgrade Great Hall to Fortress even if you don't have Altar of Storms but you have Altar of Loa built.
The issue is that if you don't have Altar of Loa/Storms built, the Fortress will in game write that it requires Altar of Storms... yet you can only build Altar of Loa.
This issue, where building requires structures that you cannot build, is very confusing in my opinion, hence why I would personally just create a copy of a Fortress specifically for Darkspear trolls and change its requirements from Altar of Storms to Altar of Loa.
This is how I originally planned to do it, but it's a bit tedious to copy so many buildings... Plus you also have to copy some upgrades for each Fortress you copy if I'm not mistaken.

Anyway, I don't plan on renaming the structures or anything, so just changing the techtree as you and @Remixer suggested should work fine.

Thanks for the help :)
 
Status
Not open for further replies.
Top