1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. The SharpCraft World Editor Extended (WEX) has been updated for the latest Warcraft 3 version: Forum.
    Dismiss Notice
  3. The Paired Modeling/Texturing Contest #3 - Leaders has begun! Artists group up and struggle! May the best team lead the run.
    Dismiss Notice

How to: Create a Full-working Custom Race

Discussion in 'General Mapping Tutorials' started by Interceptor, Mar 4, 2009.

  1. Interceptor


    Feb 14, 2009

    How to:

    Create a Full-working Custom Race

    Okay, here we go.
    You have played wc3 for very long, beaten 1vs8 insane blindfold and so on. You are just bored from the ordinary 4 races: Human, Orc, Night Elf and Undead.
    Maybe what you need is to try another race? If that's right, this tutorial is for you.
    Enough talk, let's go straight to the topic.

    What does a race contain?

    Each race in wc3 is unique by itself. However, there are things which are similar in all races:

    ♦ User Interface (UI)

    This is the interface that surrounds the game environment for each race - the frames of the mini map and the game map, the background of the inventory slot, etc. Although you does not necessarily notice, a part of the UI are also the text messages, icon for Idle Workers (F8) and the very important sound theme. Why is this important? It does not affect gameplay. What then? Well, it's pretty annoying when you play a Demon race and the frames are tree branches and butterflies, right? Or, if you run out of food, you get a message and hear "Create more Moonwells" while your food is produced by some kind of portals, for example. And, of course, it is especially annoying to see a Wisp idle worker icon, when your workers are everything but not wisps! What is also important to know when you create a custom race is that it MUST replace an existing one, preferably the most similar one. However, this SHOULD NOT AFFECT other players who are choosing the same race! I will explain this later, but what you have to understand is that the UI cannot be modified via triggers so choose wisely what race to replace and be sure that there is no other human player that plays a non-custom race since computer players are not annoyed by the UI disorders. It is not recommended to base your race on undead unless your buildings use blight terrain.

    ***To solve the problem, you need to do the following***
    - For Idle Worker Icon, open Advanced > Game Interface..., then select Use Custom Game Interface, find Icon - Idle Worker and change it from Peon to the desired one.
    - For the Text Messages, open again Advanced > Game Interface..., then scroll down to Text - General - '|cffffcc00You will be revealed to your opponents until you build a [...]|' and change it, along with the other similar messages (A gold mine has collapsed, A gold mine is running low, Build more [...] to continue unit production, etc. What is important to know here is that commas in text fields sort the text messages in their normal race order. For example, if you have chosen to replace the Night Elf race, the custom text should be after the third comma.
    - For the Sounds, in the same panel Advanced > Game Interface..., scroll to the Sound options and edit all, except Sound - Music - Defeat, Sound - Music - Victory and Sound - Place Building. If you have better ideas for the three unedited options, you can use them, but it's really not necessary to show such puritanism. In my map I have replaced all of them with the Naga equivalents used in the Sentinel campaign in The Frozen Throne. They really do work not only with Naga, but with most custom races, with the exception of the "Build more Coral Beds" which is too obvious. Anyway, since sounds are (almost) impossible to find, you can either use the naga ones, to record your own, or mute the volume (lol). Up to you ;)
    - For the Frame (UI) in the Game Interface you must edit the two Image - Console Inventory options and the four Image - Console Textures. Hell, if you find textures for these, PLEASE write me an e-mail! Else, if you're unlucky, like me, the choises are either crying to a good friend to make you one (lucky you) or make one yourself. Again, your choise.

    ♦ 4 Heroes

    Yeah... after trying to record a weird sound in the place of "Summon More Ziggurats" you realise that you don't have the 4 Heroes yet! Thinking of it as an easy part is a heavy delusion! You must very carefully design models, icons, stats and skills for your 4 Heroes, keeping the ballance between their skill strenght, unique role and being careful not to make them too weak or strong compared to the other races' heroes. How to design your Hero is entirely up to you and there are plenty of other tutorials about that. However, I would like to stress you the importance of these:
    - DO NOT base your custom Hero on a TAVERN or CAMPAIGN Hero! This will cause a really bad bug when you train the Hero in the altar and will finally lead to the recreation of the Hero. [highlight]NOTE: This was lately proved wrong. I still need to redo my tests. Until then, keep following the rule.[/highlight]
    - Pay special attention to all Arts, Animations and Tooltips. Ignoring that may cause the really annoying green icons when pressing F10, the damn Tool tip missing! message, the really weird thing that your Hero is 3 times bigger than his shadow/selecting circle, or the stupid fact that he fires arrows from his legs while holding an axe. So, really, be careful. Also notice that all heroes use X0-Y1, X0-Y2, X1-Y2 and X2-Y2 buttons when they are trained in the Altar.

    ♦ 10-11 Buildings

    Every race must contain:
    - 3-level Town Hall,
    - Basic War Unit Creation Building,
    - Lumber Mill Type Building (Upgrader),
    - Defensive Structure,
    - Altar,
    - Food Producer,
    - Advanced War Unit Creation Building,
    - Caster Creation Building,
    - Item Seller Building and
    - Ultimate War Unit Creation Building.
    Orcs are a good example. Humans contain a Blacksmith for upgrades, which is separate from their Lumber Mill, Night Elves's Lumber Mill is not exactly a Lumber Mill since they do not cut trees, and Undead have a Haunted Gold Mine instead of Defensive Structure (they use their Ziggurats for defense) and have an additional Sacrifical Pit. It is good to add an original and exceptional structure to your race. If you also get the idea of another unique way to transport recourses, it will be excellent. However, always remember that you cannot have more than 11 buildings.

    ♦ Units

    Each race has:
    - minimum 1 worker,
    - minimum 1 type of invisibility detection,
    - 3 casters,
    - 2-3 air units,
    - minumum 2 siege units (one of them must be mechanical) and
    - minimum 1 summoned unit.
    Following this scheme keeps the ballance of the game or at least make its fragility less sensible. Note that there is strict table of tier levels and upgrades that unlock higher level units. And when we speak about upgrades...

    ♦ Upgrades

    An upgrade building's presence is a must! It should contain 4 kinds of upgrades:
    - A 3-level attack upgrade for the 1st kind of units (usually melee)
    - A 3-level defense upgrade for the 1st kind of units
    - A 3-level attack upgrade for the 2nd kind of units (usually ranged)
    - A 3-level defense upgrade for the 2nd kind of units (usually ranged)
    Again, adding one additional upgrade that does not ruin balance may be a good idea (like Ultravision, Spiked Barricades, Corpse Spawning in Graveyard, etc.)
    Upgrades must also include the backpack upgrade (for inventory in the Town Hall) and the Town Hall upgrades themselves.
    The Caster Trainer must contain basic and advanced training for each caster where is necessary (but at least 2 such upgrades).
    Also there must be upgrades for units in the other war buildings (2-3 in the basic, 3-4 in the advanced, 1-2 in the ultimate). The upgrades must require the proper tier levels.

    ♦ Items

    There is also a rule for the items that are contained in the Item Shop building. The 2nd row is available in tier 2 town hall and the 3rd row - in tier 3.
    The 1st row should contain:
    - Level 1 race-unique item (like regeneration ones for human/orc, skeleton summoner for undead and eclipser for elf)
    - Lesser Clarity Potion
    - Random level 1 item (mechanical critter for human, flag of speed for orc, blight creator for undead, detect-invisibility consumable for elf)
    The 2nd row should contain:
    - Healing Potion
    - Mana Potion
    - Scroll of Town Portal
    - Optional: random level 2 item (similar to level 2 items in goblin shop)
    The 3rd row should contain:
    - Orb attack item
    - Random level 3 item (similar to level 3 items in goblin shop)

    Implementing the race

    OK, you have finished the object stuff (finally!). What is next is how to make your race actually work.
    The effects of UI edition in game interface apply to all races or at least to the race you have replaced. That's why it is NOT recommended to play other race than the custom one when using the map if you're not a computer player. Also, since it's a custom race, you have to make a lot changes here and there in order to make it a completely playable race. Here is the Step-by-Step guide.

    1. Open Advanced > Gameplay Constants and scroll to the Techtree section. Add your Altar, Heroes and Tier Halls in the appropriate places (Techtree - Dependency Equivalents - Hero/Altar/Tier ... Hall) and modify the text tooltips (Techtree - Dependency Equivalents Text - Tier 1/2/3 Hall) adding the names of your custom race's Tier halls.
    2. Make the Melee Initialization trigger look like this (do not add the functions in the -------- ... --------, they are comments to make understanding the trigger more easily):
    • Melee Initialization
      • Events
        • Map initialization
      • Contitions
      • Actions
        • -------- Remove the Victory/Defeat conditions --------
        • Melee Game - Use melee time of day (for all players)
        • Melee Game - Limit Heroes to 1 per Hero-type (for all players)
        • Melee Game - Give trained Heroes a Scroll of Town Portal (for all players)
        • Melee Game - Set starting resources (for all players)
        • Melee Game - Remove creeps and critters from used start locations (for all players)
        • Melee Game - Create starting units (for all players)
        • Melee Game - Run melee AI scripts (for computer players)
        • Player Group - Pick every player in (All players) and do (Actions)
          • Loop - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • ((Picked player) controller) Equal to User
                • -------- Add here the replaced race, in my case Orc --------
                • (Race of (Picked player)) Equal to Orc
              • Then - Actions
                • Unit Group - Pick every unit in (Units owned by (Picked player)) and do (Actions)
                  • Loop - Actions
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • -------- Here you add the unit type of the original race's town hall, in my case Great Hall --------
                        • (Unit-type of (Picked unit)) Equal to Great Hall
                      • Then - Actions
                        • -------- Here you add the Town Hall of your race, here my race is goblin --------
                        • Unit - Replace (Picked unit) with a Hall of Knowledge using The old unit's relative life and mana
                      • Else - Actions
                        • -------- Here you add the Worker units of your race --------
                        • Unit - Replace (Picked unit) with a Engineer using The old unit's relative life and mana
                • Player - Limit training of Heroes to 3 for (Picked player)
                • -------- Here you add each of your custom heroes, and be sure that no one of them is based on tavern or campaign hero --------
                • -------- Some of mine may sound as if they are based on such heroes, but they're not --------
                • -------- I have based them on Blademaster and Far Seer and changed all animations --------
                • Player - Limit training of Tinker to 1 for (Picked player)
                • Player - Limit training of Alchemist to 1 for (Picked player)
                • Player - Limit training of Exterminator to 1 for (Picked player)
                • Player - Limit training of Goblin Miner to 1 for (Picked player)
              • Else - Actions
                • Do Nothing

    - If at the beginning all town halls are at the center of the map, check player properties in scenario menu - usually it's starting location problem
    - If you can train all heroes without upgrading town hall, you have not added tier requirements via the object editor or [highlight]you have based them on tavern/campaign heroes <- This was proved wrong, but I still need to redo my tests on it, until then, keep following the rule.[/highlight]
    - If you see blight and your buildings don't use it, you have based your race on undead and the blight is from their mine and town hall
    - If you see weird animations like dying entangled gold mine, hide units before replacing them
    - If you get a message that you will be revealed unless you build a ... you have not deleted victory/defeat conditions from the melee game actions
    - If a problem still exists, send me the map or ask in the tutorial thread (this one) but avoid pm-ing me

    What's to come?

    OK, let's be fair. You should have noticed that there are no Victory/Defeat conditions. What does that mean? Simply:
    - There won't be "revealings" if someone runs out of town halls;
    - If you lose all your buildings you won't get a defeat message;
    - If you kill all your enemy's buildings you won't get a victory message

    The problem is that Melee V/D conditions consider only basic town hall units as real town halls, no matter what you have typed in gameplay constants. That means if you enable that function you will lose/win when you destroy/run out of buildings, but you will be also revealed 2 mins after the beginning of the game, getting unusual annoying messages.
    So now, I'm working on a, unfortunately very complicated, trigger to enable players win/lose the game.
    It is working (with very rare exceptions) but I'm looking for a better solution.
    Any ideas would be greatly appreciated!
    If you want a trigger to circumvent this issue, then see this post by Retera:
    I hope I have helped you.

    Last edited by a moderator: Oct 21, 2013
  2. xul1ganas


    Feb 20, 2009
    Thanks for nice tutorial. Very helpfull. I will add u reputation. :thumbs_up:
  3. M4stah


    Feb 16, 2009
    For every main base type a player builds, add a number to a integer array and hwen it reaches zero use visibility and possible defeat triggers.
  4. Interceptor


    Feb 14, 2009
    A player is defeated when s/he loses all his/her buildings. That's why current triggers watch the number of buildings via variables that change when a building is began or canceled/destroyed.
  5. Element of Water

    Element of Water

    Aug 3, 2008
    It is not possible to make the proper melee Victory/Defeat conditions with altered races in GUI (without lots of custom script). You can have a good attempt, but it will never be perfect.
  6. Super-Sheep


    Oct 21, 2006
    "Shop should have
    - ...
    - Lesser Clarity Potion
    - ..."

    Undeads dont have this. :p
  7. LN.Angel


    Jun 9, 2008
    i like it :)
    i tryed it myself to crate a naga race :D

    but i got a better project now
  8. Traxamillion


    Sep 14, 2007
    Very useful.

  9. 3rgytr54


    Apr 6, 2008
    About the town halls, there is a condition in the object editor called classified as:(right?) and it works.
  10. Interceptor


    Feb 14, 2009
    It does not. Don't think I haven't tried. Gameplay constants, classifications, etc. do not help.
  11. 3rgytr54


    Apr 6, 2008
    Ok, just making sure you didn't over look anything. I have used them before with a unit based off a regular town hall and it worked. I'm going to make sure that I remember what I think I remember is that it worked. If it works I'll attach a map that it works on.
  12. Interceptor


    Feb 14, 2009
    It works if you modify an existing town hall, but not if you create a new, add the classification, add it in gameplay constants, don't delete the V/D conditions melee action and use it in your map like that.
  13. Deathcom3s


    Dec 24, 2007
    Nice tutorial. I see no reason for it to not be approved.

    Last edited: Mar 26, 2009
  14. utror12


    Nov 2, 2008
    very nice thank you so god damm much i + rep XD
  15. Pyritie


    Nov 26, 2006
    Approved lol
  16. Teelo


    Mar 31, 2009
    Are you sure? I was doing something similar (but no way near as vast) recently, and solved that problem by making my new Town Hall a tech-tree equivalent of the replaced town hall (in your case, Great Hall).

    EDIT: Never mind.
  17. Tleno


    Jul 6, 2008
    I have a question: Can you make an technology upgrade instead of town hall upgrading?
    Something like in Company of Heroes German tech tree?
  18. Interceptor


    Feb 14, 2009
    I don't know what are you talking about, but I assume you mean either that advanced buildings require basic ones (in that case - no, because it's overpowered and you will progress much faster than ordinary races) or that instead of upgrading the town hall you research a major technology there (in that case - yes, it won't change the ordinary gameplay, but graphically it's better to upgrade the town hall =P).
    Correct me if I'm wrong.
  19. 3rgytr54


    Apr 6, 2008
    I personally have never played it but, you can make the town hall it upgrades into have the same model file. (not town hall type file (all three steps in one file, that kind won't work))
  20. Ricardo Irving

    Ricardo Irving

    May 10, 2009

    Didn't read most of it, so is the problem that its units aren't modified versions of already existing ones?