• 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.

Few questions

Status
Not open for further replies.
Level 7
Joined
Oct 10, 2009
Messages
111
Yesterday I open new thread and I get positive answer ...
Now I have some new questions :

1.I have changed a creep spawning from Natural Hostile to Player 11 (Enemy) but then when I kill (for example) footman I don't get any of gold.
I have try with trigger :
Event :
Unit - Unit Dies
Condition :
A dying unit equal to Footman
Action :
Give 50 to Killing Unit current gold...
But don't work.
2.Map is Hero Defense type ... What special events you suggesting me to make, or if you think that there is should not be special events say it. And how to make it :D
3.How to make that creep drops random item upon dead (in normal fight) and how to make that Boss after dead comes to 2 "Little bosses".
4.Should i make strong or weak towers ? (for now 1 level but I have made a 6 level creeps just to do it in trigger editor)
5.Can anyone give me the colors in war3... (you know what I think... )
I see that reputation is quite a needed on this forum so +rep everybody who helps me.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
1) Your trigger is very bad, a better option would be:
  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player - Turn Gives bounty On for Player 11 (Dark Green)
Important Note:
Add this trigger to an already existing trigger with the event "Map Initialization".
Player 11 will always give gold when you kill a unit now.
(also, it's Neutral Hostile)

2) Special events are mandatory, try to make them as original as possible.
3) It's not really hard for me, but it will for you...
So do you want me to give the easy or the harder method (easy = more work, but simple).
4) Err... perhaps balanced towers? o_O (I always like to work with small numbers, like 1-1 damage).
5) |c00RRGGBB
RR = Red, every R needs to be a hexadecimal character up to F (1-9 and A-F).
That number needs to be multiplied with 16 and then add the second R.
Example: 8F= (8x16) + 15 = 143 (you can check this with every photo editing program).

Do this for GG and BB as well (RR = Red, GG = Green, BB = Blue).

Color codes I often use:
|c00666fff
|c00ff9900
|c000066ff

|c00444488
|c00884444
|c00448844

Note: Do not spam color codes.
All colors codes must be easy to read and match eachother, don't mix colors that don't go well together and don't use too flashy colors.


Newb Guide Template



Triggering (GUI)


Basics

One of the first things you need to know is how to fix leaks, though I will go over something else first.
Variables.

You will need variables in every map you make, the only exceptions are melee-maps.
Variables are needed to count kills, remember heroes, fix leaks, basically everything that you need to recall.

The variable editor can be opened by pressing CTRL + B inside the trigger editor (or by pressing the yellow 'X' on top of the screen).
Now you can create variables by pressing the green 'X'-button, after that you can create any variable you wish.
Variables you will need in every map are:
Point variable (name doesn't matter) with an array
Group variable without array
Player Group variable without array
(these are to fix leaks)


Leaks cause lag and can crash your maps, so it's important to fix them.

For information on what leaks, check This tutorial
I would suggest reading this tutorial completely, you will get used to fixing them after a while.

Efficient Triggering

If you have triggers like:

  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Unit - Create 1 Footman for Player 1 (Red) at (Player 1 (Red) start location) facing Default building facing degrees
      • Unit - Create 1 Footman for Player 2 (Blue) at (Player 2 (Blue) start location) facing Default building facing degrees
      • Unit - Create 1 Footman for Player 3 (Teal) at (Player 3 (Teal) start location) facing Default building facing degrees
      • Unit - Create 1 Footman for Player 4 (Purple) at (Player 4 (Purple) start location) facing Default building facing degrees
      • Unit - Create 1 Footman for Player 5 (Yellow) at (Player 5 (Yellow) start location) facing Default building facing degrees
Then you are doing something terribly wrong...
The better option would be:

  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • Set loc[1] = ((Player((Integer A))) start location)
          • Unit - Create 1 Footman for (Player((Integer A))) at loc[1] facing Default building facing degrees
          • Custom script: call RemoveLocation(udg_loc[1])
Where "loc" is a point variable with array.
This does exactly the same, but the difference is that this is easier and it does not create lag (the other trigger does).

For Each Integer X info: this action will set integer X (can be any integer) from the starting value (in this case 1) to the end value (5).
Every time the integer increases, it will trigger the actions in it, so this trigger will activate 5 times, but every time it does something slightly different.
In more general terms, they're called "loops".

As you can see, loops are very useful for efficiency, but there is more...
The If/Then/Else-function is also very useful when talking about efficiency.

I will explain this with dialogs (if you do not know what dialogs are, or how to form them, Check this tutorial.
Note: the tutorial given above is not efficient, I will do it otherwise - the tutorial is just to show what it is and how it's formed!


I will skip the dialog init trigger and just go straight to the dialog buttons trigger.
Let's just say the dialog is a hero-choose dialog with 3 buttons (Ranger, Warrior, Mage).


  • Dialog Buttons
    • Events
      • Dialog - A dialog button is clicked for Dialog
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to DialogButton[1]
        • Then - Actions
          • Set loc[1] = (Center of (Playable map area))
          • Unit - Create 1 Ranger for (Triggering player) at loc[1] facing Default building facing degrees
          • Custom script: call RemoveLocation(udg_loc[1])
          • Game - Display to (All players) for 8.00 seconds the text: (|c00444488 + ((Name of (Triggering player)) + '|r has chosen the Ranger))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to DialogButton[2]
        • Then - Actions
          • Set loc[1] = (Center of (Playable map area))
          • Unit - Create 1 Warrior for (Triggering player) at loc[1] facing Default building facing degrees
          • Custom script: call RemoveLocation(udg_loc[1])
          • Game - Display to (All players) for 8.00 seconds the text: (|c00444488 + ((Name of (Triggering player)) + '|r has chosen the Warrior))
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to DialogButton[3]
        • Then - Actions
          • Set loc[1] = (Center of (Playable map area))
          • Unit - Create 1 Mage for (Triggering player) at loc[1] facing Default building facing degrees
          • Custom script: call RemoveLocation(udg_loc[1])
          • Game - Display to (All players) for 8.00 seconds the text: (|c00444488 + ((Name of (Triggering player)) + '|r has chosen the Mage))
        • Else - Actions
As you can see, I can combine all dialog buttons for all dialogs into 1 trigger, making it a lot easier to scroll through the triggers...
(Triggering Player is the player clicking the dialog).



Kick-triggers are often done like this by newbs:

  • Kick
    • Events
      • Player - Player 1 (Red) types a chat message containing -kick blue as An exact match
    • Conditions
    • Actions
      • Game - Defeat Player 2 (Blue) with the message: LOLOL NOOB!!!!
  • Kick
    • Events
      • Player - Player 1 (Red) types a chat message containing -kick teal as An exact match
    • Conditions
    • Actions
      • Game - Defeat Player 3 (Teal) with the message: LOLOL NOOB!!!!
  • Kick
    • Events
      • Player - Player 1 (Red) types a chat message containing -kick purple as An exact match
    • Conditions
    • Actions
      • Game - Defeat Player 4 (Purple) with the message: LOLOL NOOB!!!!
And this for every player...

As you can see, there are 2 mistakes:
  1. You will need a lot of stupid triggers for this
  2. "LOLOL NOOB!!!!" makes the map look like crap

I prefer one of these methods:

  • Init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Color[1] = blue
      • Set Color[2] = teal
      • Set Color[3] = purple
      • Set Color[4] = yellow
      • Set Color[5] = orange
      • Set Color[6] = green
This sets up the colors... obviously (it's best to merge this with an already existing map init trigger)

  • Kick
    • Events
      • Player - Player 1 (Red) types a chat message containing -kick as A substring
    • Conditions
    • Actions
      • For each (Integer i) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Entered chat string) Equal to (-kick + Color[i])
            • Then - Actions
              • Game - Defeat (Player((i + 1))) with the message: You have been kicked
              • Game - Display to (All players) for 7.00 seconds the text: (|c00444488 + ((Name of (Player((i + 1)))) + |r has been kicked))
            • Else - Actions
And this is the kick-trigger, if the message is -kick + (color defined in map init), then the player matching that color will be kicked.
Easy and efficient...


This method is even easier, but a bit different: red will have to say -kick X (where X is a number)
  • Kick
    • Events
      • Player - Player 1 (Red) types a chat message containing -kick as A substring
    • Conditions
    • Actions
      • For each (Integer i) from 1 to 6, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Entered chat string) Equal to (-kick + (String((i + 1))))
            • Then - Actions
              • Game - Defeat (Player((i + 1))) with the message: You have been kicked
              • Game - Display to (All players) for 7.00 seconds the text: (|c00444488 + ((Name of (Player((i + 1)))) + |r has been kicked))
            • Else - Actions
That's it... the entire kick-trigger, that's easy, right?



Objects


Units

I shall start with perhaps the most annoying thing: tooltips and hotkeys.
If your tooltips/hotkeys are insufficient or wrong, the game won't progress smooth.
A good tooltips contains all necessary information without it being too long, TD's are the best example: those hotkeys really need Damage, Attack Speed, Range, Abilties (and additionally DPS, Ground/Air).
Tooltips are meant to provide information, not te be a part of the story/lore!.

Hotkeys should be easy to use and to remember.
In my TD, I have used:
E - R - T - Y - U - - - P
D - F - G
C - V - B

This is the same on both QWERTY and AZERTY!
The main block (left) is used to build towers, Y is for spells, U is for upgrades and P is to Sell towers (the other side of the keyboard).
Randomly using hotkeys is better than nothing at all, as long as they do not override eachother and they must be correct.

Important: use structure!
Put all units that belong together in the same race (e.g.: all heroes in human, all creeps in orc, all neutrals in Night Elf, ...).
If you ever need to change an object, you'll know exactly where to find it, this will save a lot of time (believe me... it will).

Spells/Buffs

About the same as units: the tooltip and hotkeys are important for the spells.

Do not use standard spells in a custom map! Change them as much as possible - or just so it fits in the map!

When you change the name of a spell, change the name of the buff as well!
e.g.: If you cast 'Ghost Form' (based of Wind Walk) and the buff says "Wind Walk: This unit is..." - that's just painful.


Terrain


Basic Info

Do not abuse the cliffs, WEU and JNGP have a better terrain-tool so you can use the terrain height-tool to make cliffs.
(Note: only use WEU for terraining purposes)
Use the terrain height tool a lot... a flat terrain sucks (don't overdo it, when you notice you're overdoing it, use the smooth tool).

When creating cities, make it look like a city...
A city is not a place where houses have been randomly placed, nor does it contain any other random props... a city is structured, thus you must also do so.


Doodads

Spammed cinematic doodads do not look good, avoid using them.

Use environmental doodads and don't be afraid to use too many of them... they're meant to be used more than other doodads.
When creating a forest, you will really need to use a lot of them: shrubs, rocks, fallen trees. hollow tree trunks, flowers, ... all of these are very common in forests, then why not use them in a forest in warcraft?


Description


A description is highly important, it will attract people to play your map and bad descriptions make the creator of the map look like a beginner.
To learn more about this, read my tutorial about it.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Ummm, I guess the first note is obvious: it just turns the bounty on for a player ^^

2) Special events:
Special events are used to make a game interesting, many people will lose interest after doing the same thing (in case of a hero defense: killing creeps) the entire time.
Special events can also be different types of units, or a class change (as VergilThazaar did properly ^^).
However, you could add a weather bonus (insert a random weather system and make heroes have a bonus with certain weather types and a disadvantage with others).
However I'm not supposed to give ideas here, but to tell you how things work ^^

3) Creep Drop:
It seems like I didn't answer this good indeed...
Random creep drops is pretty vague: you can drop random level X items, or random items of type X.
I will just assume you didn't mean any of this, but just that creeps drop items...
The easy method (which will require some work) is somehing like this:

  • Creep Drops
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set loc = (Position of (Triggering unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Footman
          • (Random integer number between 1 and 100) Less than or equal to 20
        • Then - Actions
          • Item - Create Tome of Experience at loc
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Knight
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 100) Less than or equal to 20
            • Then - Actions
              • Item - Create Claws of Attack +15 at loc
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random integer number between 1 and 100) Less than or equal to 50
            • Then - Actions
              • Item - Create Gloves of Haste at loc
            • Else - Actions
        • Else - Actions
      • Custom script: call RemoveLocation(udg_loc)
Now a footman will have a 20% chance to drop a tome of exp and a knight 20% chance to drop +15 claws and 50% chance to drop gloves of haste.
Pretty basic, just a lot of if/then/else-work ^^

Another method is by setting up a table (I like tables... I use them for a lot of things).
This table should contain: creep type, item type and drop chance (that's all I can think of).
So you should add these actions in a trigger with as event "Map Init":

  • Actions
    • Set CreepEnd = (CreepEnd + 1)
    • Set DropChance[CreepEnd] = 20
    • Set CreepType[CreepEnd] = Footman
    • Set ItemType[CreepEnd] = Tome of Experience
    • ----------------------------------
    • Set CreepEnd = (CreepEnd + 1)
    • Set DropChance[CreepEnd] = 20
    • Set CreepType[CreepEnd] = Knight
    • Set ItemType[CreepEnd] = Claws of Attack +15
    • ----------------------------------
    • Set CreepEnd = (CreepEnd + 1)
    • Set DropChance[CreepEnd] = 50
    • Set CreepType[CreepEnd] = Knight
    • Set ItemType[CreepEnd] = Gloves of Haste
It's pretty easy to understand (I think), but I've added a line to make it more clear:
It increases an integer variable by 1 and then sets the dropchance, creep type and item type for that integer to it's correct value.
Example:
Let's take the first set, "DropChance[CreepEnd] = 20" means nothing more than "DropChance[1] = 20".
Or, in other words: the drop chance of the first set is 20%, the item in this set will thus have a 20% chance to drop.

Okay, right... now the part that connects the table to the actual drops:

  • Creep Drop
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set loc = (Position of (Triggering unit))
      • For each (Integer i) from 1 to CreepEnd, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • CreepType[i] Equal to (Unit-type of (Triggering unit))
              • (Random integer number between 1 and 100) Less than or equal to DropChance[i]
            • Then - Actions
              • Item - Create ItemType[i] at loc
            • Else - Actions
      • Custom script: call RemoveLocation(udg_loc)
Perhaps a bit more difficult to explain...
It loops an integer from 1 to CreepEnd (CreepEnd is defined in the table, CreepEnd is in this example 3, since there are 3 drop sets).
For every integer, it launches an action: if the unit type of the dying unit matches the CreepType[X] (also defined in the table), it will drop the item ItemType[X].

Hmm... how to explain this in normal words?
I'll just create a more extended example:

Example:

We start at the beginning of the map and I will use the second set:
CreepType[2] = Knight (Dying unit has to be a knight)
ItemType[2] = Claws +15 (Dropped item will be a +15 claws)
DropChance[2] = 20 (The chance the item drops is 20%)

Now, when a knight dies it will loop the action.
When the integer is 1, it will return false (since Dying Unit isn't CreepType[1], since CreepType[1] is a footman.
Then the integer increases to 2, this will return true for 1 part: the dying unit is indeed CreepType[2].
but: there' s also a second condition: a random integer between 1 and 100 must be =< 20, which will only be true... 20% of the times ^^

Let's say that we've got luck on our side and it is indeed true, now every condition is fulfilled and the actions will be fired.
The only action is that it creates ItemType[X] at the dying unit's location, since the integer we're using is still 2, it will create ItemType[2], or a +15 claws at the dying unit's location.
And that's exactly what we wanted...


You do NOT need to modify this trigger, only add more sets in the table.


Question 3: extended
There was another question I didn't see the first time: how can a unit split into 2 (or more) other units after dying?
The answer is really easy, since it's a standard blizzard spell: "Spawn Hydra (Hatchling)".
Inside the object editor, go to spells -> Neutral Hostile -> Units -> Spawn Hydra.

Change the Data - Unit Type to the mini-bosses and change the Data - Number of Units to the number of mini-bosses which will spawn when the boss dies.
After that's done, add the ability to the boss and he will split into 2 mini-bosses when dead.


4) Strong/Weak Towers?
It's a lot easier for the player to calculate how much he has to hit a creep when the creep has for example 100HP and the towers 5-5, 2-2, 7-7, ...
It will also look a bit better, since high damage often results in things like: 5000-4999 / 5000-5001 / 4999-5000 etc... (I've seen enough people who don't know how to use the damage formula properly...).
Another advantage of weak towers is that creeps will also have low HP, which means you can actually see their HP, with strong towers the HP will be above 10k (from there it begins to fade to black, making it nearly impossible to see a creep's HP).

In my opinion: weak towers are better, but it remains a personal opinion... if you like extremely high damage, then use it.


5) Color Codes

Color codes on warcraft are made with 4 hexadecimal codes, each code containing 2 hexadecimal characters, with |c in front of it
|cTTRRGGBB
TT = First code / RR = second code / GG = third code / BB = Fourth Code

As far as I know, the first code (TT) is meant to be the transparancy, but it is futile.
A lot of people use |cFF, but I always use |c00 - which is easier for me, but in general it doesn't matter.

After that comes the second, third and fourth code, which each exists out of (yet again) 2 hexadecimal characters (1-9 and A-F, where A=10, B=11, ...).
The first character is the most important, it's used to define the rough color, the second is used to smoothen that color.
The first char. decides the rough color because it has to multiplied by 16.
So if the first char. is F, it will be: F x 16 = 15 x 16 = 240 (since the max is 255, it's very close).
You still need to smoothen it with the second character, to make a very bright color you add another F (=15), you need to add this number to the previous result.
So you already had 240, you need to add 15, this becomes 255 ( = max. color).

RR = Red
GG = Green
BB = Blue


I hope this helped o_O
 
Status
Not open for further replies.
Top