wc3edit.net

United Warcraft 3 map hacking!
It is currently October 22nd, 2017, 6:36 am

All times are UTC




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: April 15th, 2009, 5:00 am 
Offline
Forum Fanatic

Joined: October 16th, 2007, 7:32 pm
Posts: 327
The fallowing was taken off another website, The pictures could not come...

Mapping for Beginners
Learning to make maps in Warcraft is not that difficult. Playing around with the editor is the best way to learn, but some people may feel more comfortable with guidance. This thread serves as a jump-start for your mapping journey. It is just an overview, but it should push you in the right direction. Good luck!

Note: If you have any questions, post them in a separate thread. This thread is reserved for suggestions and tips.

How do I make a map!?
If you are completely new to Warcraft map-making, you will find that messing around with the editor will teach you a lot. The rule of thumb is that you should start small - a beginner is not going to make the next DotA without practice. World Editor Tutorials gives some excellent advice on how to start mapping:

Quote:
Our best advice for the new mapmaker is to open an existing melee map from Warcraft III. Add a few special events that can occur. Add a quest or two, and create some custom units. Change the terrain a little to learn about the terrain editor. When you know your way around the editor a little, create a few custom abilities, and maybe even a custom hero.


If you're not willing to invest the time and effort to learn how to make maps, then don't expect to succeed. Learning how to make maps is hard work, and it doesn't come overnight. That said, don't expect to get much help if you post a thread saying "help me! I want to make a map!"

How do I make a campaign?
All campaigns start off with the Campaign Editor. Assuming that you can make maps, the Campaign Editor is self-explanatory. After filling in the various text boxes with the corresponding information, click on the "Add Map" icon in the toolbar, and add the maps that you have created, with their corresponding buttons. If you have experience with the Object Editor, then the Campaign Editor's analogous features should be straightforward, the only difference being the color of the edited objects' texts. In addition, you can import files much like in regular maps, except that the path to the file is wc3campimported\file, not wc3mapimported\file.

If you want to save your character between maps, you will have to use the Game Cache triggers in the Trigger Editor.

How do I make a TD (Tower Defense) Map?
TDs are very difficult maps to create. Tossing aside the technical aspects for a moment, making an original, fun-to-play map requires a huge commitment. Because of the high standards in the mapping community on TDs, your map needs to be both well-polished and entertaining.

First, you will need to terrain your map. This includes doodads and other static aspects, such as the paths for the creeps to walk.

Second, you will need to create the towers. This is self-explanatory - if you've played a TD, you probably have tons of ideas bouncing around in your head. See some unprotected TDs for more details on making the towers.

Third, you will need to make the creeps, who walk through the paths. Again, as with the towers, you probably have many ideas.

There are many excellent tutorials on the internet about making TDs, so if you're stuck you can search for more detailed information.


Last edited by Black-Hole on April 15th, 2009, 5:02 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: April 15th, 2009, 5:02 am 
Offline
Forum Fanatic

Joined: October 16th, 2007, 7:32 pm
Posts: 327
Copied into thread as requested.


This is a tutorial to cover many terraining capabilities that you have when using the World Editor.

Code:
Section 1: Ground Terrain
1. Cliffs
2. Rolling lake and river beds
Section 2: Doodads
1. Important Object Editor Values
2. Placing Doodads

Section 1: Ground Terrain

Part 1: Cliffs
In some cases, using the default Blizzard cliffs can work, but if you are going for amazing looks or in a cinematic map, you should consider making all cliffs using the raise and lower tool.
Note: The warcraft 3 editor has a default limit on the angle of cliffs. To make near-vertical cliffs by using raise and lower, you will need to make a new folder in your warcraft 3 folder called UI. Then, download this (may have to right click->save target as) ZIP folder, extract the file inside, and put it into your new UI folder. After doing that you will be able to make vertical cliffs in World Editor.

Here is a comparision of ugly blizzard cliffs to even poorly done (Poorly done of course because I did it) slope cliffs:
Blizz Cliffs:

Slope Cliffs:


A good way to get started on a slope cliff is to make a steep pointy 'spike hill' sticking from the ground and extend it along a line using the plateau terraining tool. Then, 'paint' it with the different terrain types, often with rock being the cliff face, and use raise, lower, and smooth to make it look irregular because a perfectly flat cliff would look funny.

Part 2: Rolling lake and river beds
When making river and lake beds, it is often almost manditory that you use sloping sides rather than blizzard cliffs.
As you can see in the below pic, it is rather difficult to make beaches without using sloping sides: This image has been resized. Click this bar to view the full image. The original image is sized 728x440.



To use sloping shores, there are two methods you can use:
1. Raise the terrain out of preplaced water.
2. This is slightly complex, and allows you to lower the terrain into a plane of water beneath it. Good for rivers.:
-In the main screen, go to the advanced menu and uncheck 'Enfore water height limits'.
-Go to the area on the map you want to be able to lower water out of, select either the 'shallow water' or 'deep water' tools, and cover the entire area in that. So you should have a huge splat of water on the map with ugly blizz cliffs.
-Use the either the increase 1 tool for shallow water or the increase 2 tool for deep water, and raise the terrain level to be even with the original surrounding area.
-Now you can use the lower tool to lower the terrain beneath your water level.



Section 2: Doodads
Part 1: Important Object Editor Values
Art-Animate in Fog: Supposed to determine if a doodad plays its animation even under fog of war. However, this field doesn't actualy work. Only waterfalls do that.
Art-Default Scale: The default scaling value, only effects anything if you are placing doodads with the 'random scale' option off. Minimum and Maximum values allow for better freedom anyway, so this option isn't very useful.
Art-Fixed Rotation: This is the rotation the doodad will have when you place it. You'll notice that by default many are set to -1.00. -1.00 allows random rotation on placement.
Art-Floats: This determines if the doodad will sit on water or go under water upon placing it.
Max Roll Angle and Max Pitch Angle: These determine how the doodad sits up. They are 2 of the most useful fields in the entire listing of doodad options. Giving a positive value in one of these fields allows the doodad to roll with terrain when you place it. That is, if you place it on non-flat ground, it will roll to match the angle of the ground. Giving a negative value forces the doodad to roll to a certain point. So if you give it a value of -3.14, it will always upon placement be totally upside-down.
Note that despite saying 'degrees' these fields actualy use radians. If you dont know what that is, 3.14 radians=180 degrees.
Pathing-Pathing Texture: Determines the collision model for the doodad. Useful especially because setting a doodad's pathing texture to the one used by the small mass-placeable flowers makes a doodad have no pathing at all, and you can overlap them all you want.

Part 2: Placing Doodads
There are a bunch of useful buttons on your keyboard that can make doodad placement better.
The shift key: Holding down this key will allow you to place doodads with collision maps very close together, in a semi-overlap.
The ctrl key: This key is brilliant. If you select (a) doodad(s), and hold ctrl, you are in power of te height of the doodad(s). If you hold crtl and pageup while a doodad is selected, the doodad will rise. If you hold ctrl and pagedown while a doodad is selected, the doodad will be lowered.
Using doodads with a no-collision pathing texture on top of eachother, you can stack doodads together into all sorts of weird objects.
One use of lowering doodads is for trees: If you place a tree on a slope, it often will not be totally in the ground. This is called a 'floating tree'. Just select the tree and ctrl+pagedown it into the ground.


Top
 Profile  
 
PostPosted: April 15th, 2009, 5:04 am 
Offline
Forum Fanatic

Joined: October 16th, 2007, 7:32 pm
Posts: 327
>> Using Local Variables for Easy Triggering <<
A Tutorial by Sid

Many of the times when we make Trigger Enhanced Systems or Spells, We make a System or Spell, But while testing it we realize that We've lost
the MUI. How to fix it?
Example : Consider this spell...
Pulse Of Darkness : Marks target for Pulse of Darkness, Target will take damage equal to 5% of it's base hp per second for next 3 seconds.
Making such a spell in GUI is tough challange. Specially if you don't know anything of JASS.
Now, I hope you can make this spell, Let's create a basic trigger that will explain basic ideaa of the spell's function.

Code:

Trigger Pulse Of Darkness

Event :
- A unit starts effect of an ability
Conditions
- Ability being cast is equal to Pulse of Darkness
Actions
- Cause (Casting Unit) to Damage (Target Unit of Ability being Cast) for (((Max HP of (Target unit of Ability being Cast) / (100)) * (5)) using
Attack Type Magic and Damage type Spells.
- Wait 1.00 seconds
- Cause (Casting Unit) to Damage (Target Unit of Ability being Cast) for (((Max HP of (Target unit of Ability being Cast) / (100)) * (5)) using
Attack Type Magic and Damage type Spells.
- Wait 1.00 seconds
- Cause (Casting Unit) to Damage (Target Unit of Ability being Cast) for (((Max HP of (Target unit of Ability being Cast) / (100)) * (5)) using
Attack Type Magic and Damage type Spells.
Ok, So now you have an idea. But test it out in a map, It won't work!
Why?
Because the fnction - Target unit of Ability being cast - becomes "Reset" after the - Wait X.xx Seconds - action!
So, Only the first Action is executed. Now, How to tackle that? Well, We can use Variables.
So, here's a trigger that takes one step ahed.

Code:

Variables
CastingUnit - unit
TargetUnit - unit
Here's Trigger...

Code:

Trigger Pulse Of Darkness
Event :
- A unit starts effect of an ability
Conditions
- Ability being cast is equal to Pulse of Darkness
Actions
- Set CastingUnit = (Casting Unit)
- Set TargetUnit = (Target Unit of Ability being Cast)
- Cause (CastingUnit) to Damage (TargetUnit) for (((Max HP of (TargetUnit) / (100)) * (5)) using Attack Type Magic and Damage type Spells.
- Wait 1.00 seconds
- Cause (CastingUnit) to Damage (TargetUnit) for (((Max HP of (TargetUnit) / (100)) * (5)) using Attack Type Magic and Damage type Spells.
- Wait 1.00 seconds
- Cause (CastingUnit) to Damage (TargetUnit) for (((Max HP of (TargetUnit) / (100)) * (5)) using Attack Type Magic and Damage type Spells.
Now you have a trigger that is "Working", But what will happen if One unit casts this spell and second one also casts it before first is in
effect? Well, Don't bet that everything will go on normally. I can say that you'll lose the Bet. Since we are using two "Global Vars", It will
OverWrite the second target on the first one and before the effecton First one completes, it will aply damage to second one. It's a Major
Problem with the spell, Called loss of MUI.

Now how to fix it?
Answer is the title of the Tutorial, Usage of Local Variables.
Now comes the Trick.


If you define a Variable globally called "VariableName", it is called "udg_VariableName" in JASS.
Just Remember this.
Now, I presume you've still retained the CasterUnit and TargetUnit variables we created earlier.


Here, If you are smart enough, Tell me what these variables will be called in JASS?

Right, "udg_CasterUnit" and "udg_TargetUnit"


Now, I want you to make a little modification to the Last Step We've taken, Our Second Trigger.
Just Add these two Actions above all the Actions in the Trigger.

Code:

Actions :
- Custom Script : local unit udg_CasterUnit
- Custom Script : local unit udg_TargetUnit
So, here's the Final Trigger...

Code:

Trigger Pulse Of Darkness
Event :
- A unit starts effect of an ability
Conditions
- Ability being cast is equal to Pulse of Darkness
Actions
- Custom Script : local unit udg_CasterUnit
- Custom Script : local unit udg_TargetUnit
- Set CastingUnit = (Casting Unit)
- Set TargetUnit = (Target Unit of Ability being Cast)
- Cause (CastingUnit) to Damage (TargetUnit) for (((Max HP of (TargetUnit) / (100)) * (5)) using Attack Type Magic and Damage type Spells.
- Wait 1.00 seconds
- Cause (CastingUnit) to Damage (TargetUnit) for (((Max HP of (TargetUnit) / (100)) * (5)) using Attack Type Magic and Damage type Spells.
- Wait 1.00 seconds
- Cause (CastingUnit) to Damage (TargetUnit) for (((Max HP of (TargetUnit) / (100)) * (5)) using Attack Type Magic and Damage type Spells.
Now, Try it out... This is the one that works smoothly and without any Glitch!
Why?

Remember what we wrote above all? We've declared two Local Variables, For the Simplicity in GUI, We set the names of out Locals to the same
names that of the Globals. Thus we can access the Variables from the Drop Down Menu of "Set Variable" action. There we select the Global
Variable's name, But when the Script compiles, it actually refers to Local Variables.Thus We "Override" the Globals by Locals.

How to implement it further?
Simple, For every Spell Trigger you create. Always use the Variables instead of GUI Functions while writing the Actions part. Then simply
define the locals of Same name and Same trype to that of the Globals you used in the Trigger Actions.
Hope this will help a map maker while making Trigger Enhanced Triggers.

Quote:Note:
Also, It's 100% safe to use Loops and Wait functions inside Loops, if you're using Locals. Remember Not to access Global accidently if you're
using Wait inside Loop.

Thanks for Reading through the post and Tolerating this Long Post.
And Don't forget my Reward... A Reputation point will do!


Top
 Profile  
 
PostPosted: April 15th, 2009, 5:04 am 
Offline
Forum Fanatic

Joined: October 16th, 2007, 7:32 pm
Posts: 327
=> What is this?
Demonstrates how to track effects, Create, record and destroy them periodically without any problem.

=> Requirements
This requires the Frozen Throne Expansion, At least ver.1.07. This will not work with RoC as it involves Custom Scripts functions.
=> Main
To start off, You'll need a variable,
Fx (Special Effect Variable)
Now, Create a trigger as follows..

...
Trigger HandleFx
Events :
- None
Conditions :
- None
Actions :
- Custom Script : Local Effect Eff
- Custom Script : set Eff = udg_Fx
- Wait 5.00 seconds.
- Custom Script : set udg_Fx = Eff
- Special Effect : Destroy Special Effect Fx
...

Now How to Implement that?
Now you have your Effect Handle, You can implement it!
Use it this way...

...
- Special Effect : Create Special Effect : <Whatever Path of Effect>
- Set Fx = Last Created Special Effect
- Trigger : Run HandleFx (Ignoring Conditions)
...

Hooray! You've made your own Special Effect Tracker!
=> Customization
You can customize this further, Like setting up Delay to 10.00 seconds rather than 5.00 seconds.. It won't hurt, You can safely create whatever effects you want...


=> Advanced Customization
I've found how to enhance it further according to your needs, Cause normaly, making a Triggered spell, you need to always adjust the values for how much time you'll need to display the effects.

=> How to start?
Let's again look at the old effect tracker we made...
here it is...

...
Trigger HandleFx
Events :
- None
Conditions :
- None
Actions :
- Custom Script : Local Effect Eff
- Custom Script : set Eff = udg_Fx
- Wait 5.00 seconds.
- Custom Script : set udg_Fx = Eff
- Special Effect : Destroy Special Effect : Fx
...

You found that you've plainly used the 5.00 seconds constant delay... Now the question comes, how to customize it for each effect?
You'll need another variable,
FxDur ...Real Variable.
Now, convert the HandleFx into Custom script and modify it's Action functions like this..

...
function Trig_HandleFx_Actions takes nothing returns nothing
local effect Eff
local real EffDur
set Eff = udg_Fx
set EffDur = udg_FxDur
call TriggerSleepAction( EffDur )
set udg_Fx = Eff
call DestroyEffectBJ( udg_Fx )
endfunction
...

Now, your entire trigger looks like this...

...
function Trig_HandleFx_Actions takes nothing returns nothing
local effect Eff
local real EffDur
set Eff = udg_Fx
set EffDur = udg_FxDur
call TriggerSleepAction( EffDur )
set udg_Fx = Eff
call DestroyEffectBJ( udg_Fx )
endfunction

function InitTrig_HandleFx takes nothing returns nothing
set gg_trg_HandleFx = CreateTrigger( )
call TriggerAddAction( gg_trg_HandleFx, function Trig_HandleFx_Actions )
endfunction
...

=> How to Implement this now?
Same way we did before, but now one more variable to set before running this trigger!
like this..

...
- Special Effect : Create Special Effect : <Whatever Path of Effect>
- Set Fx = Last Created Special Effect
- Set FxDur = 6.00
- Trigger : Run HandleFx (Ignoring Conditions)


Top
 Profile  
 
PostPosted: April 15th, 2009, 5:05 am 
Offline
Forum Fanatic

Joined: October 16th, 2007, 7:32 pm
Posts: 327
Note: I did not discover this code, the original author is "Tennis" from www.wc3jass.com. All credits go to him, this is only a guide on how you implement it.

Description
Many maps uses the "player1 (red) = guy who decides everything", that is annoying because the host might not want to play as red but still wants to control the stuff which the host sometimes can do (as an example, difficulty settings, player 1 (red) is in a large number of maps able to set the difficulty of the game through a dialog or something similar).
But what most people probably didn't knew is that with just a very small amount of custom scripts (Jass) and 1 variable you can detect who is the host.

So here it goes, the 3 easy steps on how to create the variable and make the custom scripts.

Step 1: The Variable
Create a new variable, name it "Host", set the variable type to "Player (player)", do not check out the Aray box and leave the initial value at none like I have done in the picture below.


Step 2: Custom Script Header
Right, you have your variable now it is time to get the hardest part done. In the Trigger Editor you click at the top at the maps name like if it was any other trigger, in there you paste these lines of code (Make sure you paste it at the top):
[jass]function GetHost takes nothing returns nothing
local gamecache g = InitGameCache("Map.w3v")
call StoreInteger ( g, "Map", "Host", GetPlayerId(GetLocalPlayer ())+1)
call TriggerSyncStart ()
call SyncStoredInteger ( g, "Map", "Host" )
call TriggerSyncReady ()
set udg_Host = Player( GetStoredInteger ( g, "Map", "Host" )-1)
call FlushGameCache( g )
set g = null
endfunction[/jass]

Step 3 Getting The Host
Now that you have the most of the work done you just need to make a last simple trigger where you set the event to Map initialization, conditions you leave untouched and in the actions you make a custom script like this: "Custom script: call GetHost()". Now it has checked who is the host and stored it in the variable, for further use you just need to address everything to the "Host" variable like you would usually do to Player 1 (red), it is as simple as that.


Top
 Profile  
 
PostPosted: April 15th, 2009, 5:05 am 
Offline
Forum Fanatic

Joined: October 16th, 2007, 7:32 pm
Posts: 327
Note: In this tutorial we will show you how you create a simple multiply choice dialog for 1 player. Keep in mind that this is directed towards the beginners within the Trigger Editor and is in no way meant to teach the experienced modders anything that they probably didn't knew already.

1) What is a dialog?
A "Dialog" is a litle window that pops up which contains some buttons that you can click. An example of what a Dialog can be used for is a simple thing like if you would like to have a 100 gold. Instead of having the choice based on chat commands where you write -yes or -no it is (and looks) better to have a Dialog window apearing asking you if you would like to have a 100 gold and then having 2 buttons which says "Yes" or "No".
We will now show you how you make a Dialog like I just told you about in the simpliest way (that we know of).

2) Getting Started.
To get started you should (ofcourse) open up the World Editor and enter the Trigger Editor (Hotkey for it is F4), the icon for it is located inbetween the Terrain Editor & the Sound Editor.


3) Creating The Variables.
Once you entered the Trigger Editor the first thing to do is finding the Variable Editor (Hotkey for it is Ctrl+B), the icon for it is located to the left of the New Category icon.

When you are inside the Variable Editor you click on the green x with a + infront of it to create a new variable, then you make the two variables needed for the Dialog as shown below.


4) Creating The Dialog Window.
Once you made your two variables you can start with the actual triggers for getting the Dialog Window to apear.
First you create a new trigger and do as shown below.

The Dialog Window
Code:

Events
Time - Elapsed game time is 1.00 seconds
Conditions
None
Actions
Dialog - Clear MyDialog
Dialog - Change the title of MyDialog to Do you want a 100 gold?
Dialog - Create a dialog button for MyDialog labelled Yes
Set DialogButton[1] = (Last created dialog Button)
Dialog - Create a dialog button for MyDialog labelled No
Set DialogButton[2] = (Last created dialog Button)
Dialog - Show MyDialog for Player 1 (Red)
Once this is done the Dialog will apear perfectly but there will be no effect when clicking the buttons.

5) Creating The Buttons.
To make the buttons actually do something you create two triggers as shown below.

Yes Button
Code:
Events
Dialog - A dialog button is clicked for MyDialog
Conditions
(Clicked dialog button) Equal to DialogButton[1]
Actions
Player - Add 100 to Player 1 (Red) Current gold
Game - Display to Player Group - Player 1 (Red) the text: You have recieved 100 gold
No Button
Code:
Events
Dialog - A dialog button is clicked for MyDialog
Conditions
(Clicked dialog button) Equal to DialogButton[2]
Actions
Game - Display to Player Group - Player 1 (Red) the text: You didn't want any gold


Top
 Profile  
 
PostPosted: April 15th, 2009, 5:06 am 
Offline
Forum Fanatic

Joined: October 16th, 2007, 7:32 pm
Posts: 327
Basics of a TD
by ragingspeedhorn

Note: This tutorial will explain you the very basics of making a TD. This is in no way geared towards experienced modders but is made for the beginners within Warcraft III modding.


What is a TD?

TD stands for Tower Defense and is a genre of maps developed for the Warcraft III engine. In a TD your goal is to build towers to prevent creeps of reaching a certain destination.


So.. How do I create one?

A good way of starting on a TD is to firstly make the terrain you find fitting for your map and then determine the lanes and setting up the pathing system (the creeps movement).


Uhh right, so how do I do that?

To get the creeps to move from 1 place to another you will need to make regions at the desired locations and then trigger the movement like this (the Trigger Editor is located inbetween the Terrain Editor and the Sound Editor):

Movement Region 1
Code:
Events
Unit - A unit enters Spawn Region
Conditions
None
Actions
Unit - Order (Entering unit) to Move To (Center of Region1)
Movement Region 2
Code:
Events
Unit - A unit enters Region1
Conditions
None
Actions
Unit - Order (Entering unit) to Move To (Center of Region2)
Movement Region 3
Code:
Events
Unit - A unit enters Region2
Conditions
None
Actions
Unit - Order (Entering unit) to Move To (Center of Region3)
Movement Region 4
Code:
Events
Unit - A unit enters Region3
Conditions
None
Actions
Unit - Order (Entering unit) to Move To (Center of Region4)
Movement Region 5
Code:
Events
Unit - A unit enters Region4
Conditions
None
Actions
Unit - Order (Entering unit) to Move To (Center of End Region)



Ok done, now what?

Next is the actual trigger that spawns the "waves" as the levels of units is often called. It can be done like this:

Wave 1
Code:
Events
Time - Elapsed game time is 30.00 seconds
Conditions
None
Actions
Unit - Create 40 Footman for Player 12 (Brown) at (Center of Spawn Region) facing 0.00 degrees


Right, so the regions and spawning is made, now what's next?

Next on the list should be finding out what to make of builders, towers and making the creeps, this is done within the Object Editor which is located inbetwen the Sound Editor and the Campaign Editor. You can also make triggered abilities for the towers but if you need help from this tutorial I suggest you wait with that untill a later time.


Right-o, I have made some towers, a builder and all the creeps, now what?

Adding the "lives" function is something that almost every td has, atleast it is only a few which doesent, so that is also included in here. Now I will show how you create the basic Leaderboard and putting in the lives function. Before you make the actual Leaderboard you have to make a variable like this one shown below to set the lives initial value.




Now when that is done you can move on to creating the Leaderboard and setting up everything that has to with lives and updating the Leaderboard.


Setup Leaderboard
Code:
Events
Time - Elapsed game time is 0.10 seconds
Conditions
None
Actions
Leaderboard - Create a leaderboard for (All players) titled Lives
Leaderboard - Add Player 1 (Red) to (Last created leaderboard) with label Lives and value Lives
Leaderboard - Change the color of all labels for (Last created leaderboard) to (0.00%, 100.00%, 0.00%) with 0.00% transparency
Leaderboard - Show (Last created leaderboard)
Life Lost
Code:
Events
Unit - A unit enters End Region
Conditions
(Owner of (Entering unit)) Equal to Player 12 (Brown)
Actions
Set Lives = (Lives - 1)
Unit - Remove (Entering unit) from the game Leaderboard - Change the value for Player 1 (Red) in (Last created leaderboard) to Lives
Game - Display to Lives the text: (( + ((Name of (Entering unit)) + has reached the end! )) + ((String(Lives)) + chances left))
Trigger - Run Defeat (checking conditions)
Defeat Trigger
Code:
Events
None (it is a trigger that is run by the 'Life Lost' trigger)
Conditions
None
Lives Less than or equal to 0
Actions
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Unit - Remove (Picked unit) from the game)
Game - Defeat Player 1 (Red) with the message: Defeat!

Leaderboard made, is there anything more?

Most td maps (atleast the decent ones) has it so you are able to sell your towers so here I will show a way it can be done.


Tower Selling
Code:
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Sell Tower
Actions
Player - Add ((Point-value of (Casting unit)) / xxx) to (Owner of (Casting unit)) Current gold
Unit - Remove (Casting unit) from the game

Ability done, what's next?

Once you have succesfully made the Tower Selling ability I think you are covered in with the basic triggers, now you only need to make it so you win once the last wave of units have been defeated. Good luck with your td map!


Top
 Profile  
 
PostPosted: April 15th, 2009, 5:06 am 
Offline
Forum Fanatic

Joined: October 16th, 2007, 7:32 pm
Posts: 327
Basics of Regions
by ragingspeedhorn, with some edits by Archian.


Index Of Content:

- What Is A Region?
- Where Do I Find The Place To Add Regions?
- What Do I Use These Regions For?
- You Also Mentioned Custom Weather, What Is That?
- Also Ambient Sound, What Is That? ...And Why Is It Turned Off?!
- Conclusion.


Note: In this tutorial we will explain to you the basics of working with regions, what a region is and some other usefull tips. This tutorial is in no way geared towards experienced modders but is meant as a helpfull hand to the newbeginners within Wc3 modding.

What Is A Region?

A region is a invisible field (ingame that is, in the editor your region is visible when you are using the region palette (but only when using the region palette, though you can change it so it's viewable while you're working in any of the other palettes)) used for triggered events, custom weather for certain areas (the area the region stretches over) and for ambient sound.
The last two being choosable in the individual regions properties and the first in the trigger editor.

The regions that this tutorial is about are called rects in JASS, that is because they are rectangular.
Besides rects JASS does also have the type region which is composed of many tiny sqares, so that you can have regions with any shape you want (for example a circle).
Contributed by: PitzerMike.

Now for the 'Unit enters Rect'-event: When this event is registered with a trigger, WC creates a temporary rectangular JASS-region with the same dimension as the GUI-region that will be specified in the trigger editor. And the event will be registered for that temporary JASS-region, not for the rect (because rects technically don't even have Enter/Leave-Events).
Contributed by: PitzerMike.


Where Do I Find The Place To Add Regions?

Go up in "Layer" and select "Regions", then the "Region Palette" pops up and from that you are able to manage and add new regions. You add the new regions through the grey button.

This is what the Region Palette looks like.


This is how the regions looks like.


As you can see the regions on the picture has different colors, you can change the color of the region inside the region properties (acces the properties by double clicking the region which you wish to change).


What Do I Use These Regions For?

As said before regions are mostly used for triggered events.
Here is some basic examples of a simple trigger involving the "Unit enters region" event:

Code:
Test Trigger
Events
Unit - A unit enters Region 000 <gen>
Conditions
Unit type of (Entering unit) Equal to (Footman)
Actions
Unit - Kill (Entering unit)
This trigger will kill any units that enters region "000" if they are of the type Footman.
It is a pretty basic example, a commonly used trigger which involves a region.

Code:
Region Trigger
Events
Unit - A unit enters Region 000 <gen>
Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
Actions
Unit - Order (Entering unit) to Move To (Center of Region 001 <gen>)
This trigger makes the unit entering "Region 000" move to Region 001 if the entering unit is owned by Player 1.

Code:
Region Spawn Trigger
Events
Unit - A unit enters Region 000 <gen>
Conditions
Actions
Unit - Create 1 Footman for Player 1 (Red) at (Center of Region 001 <gen>) facing Default building facing degrees
This trigger creates a Footman unit at the center (middle) of Region 001 when a unit owned by any player enters Region 000.

You Also Mentioned Custom Weather, What Is That?

The custom weather is the Weather Effect box. If you wish to have let's say an area where it is raining you create a region over the desired area like shown below.


Once that is done you open up the Region Properties and check out the Weather Effect box.


Once that is done you can choose your desired effect, as an example I have used "Ashenvale Rain (Heavy)".


The Weather Effects which you have to choose from are all the different effects premade by Blizzard which they used in the RoC & TFT campaigns, there are 21 in total. Also you are able to import your own custom Weather Effects, check out THIS tutorial made by CryoniC.

Also Ambient Sound, What Is That? ...And Why Is It Turned Off?!

The reason why you are not able to choose a Ambient Sound right away is because you can only use sounds once you have added them to your map as sounds through the Sound Editor (if you add them as music you will not be able to use them as Ambient Sounds, it needs to be as a sound). As shown below I have added the Credits theme as a sound file and then it becomes selectable in the Region Properties.





Conclusion.
Hopefully with this tutorial you have learned abit more about regions and their basic use, if you got any suggestions for improvements or such please leave a comment


Top
 Profile  
 
PostPosted: April 15th, 2009, 5:07 am 
Offline
Forum Fanatic

Joined: October 16th, 2007, 7:32 pm
Posts: 327
How to make heroes get past level 10.


Since a lot of new members doesn't know how to make heroes get past lvl 10, I figured out that the best way is to post a tutorial here.
So this is what you do:
...go to the top menus and go to the one called 'Advanced', and then within that menu, click on 'Gameplay Constants' and then within there, click off the check box labeled 'Use Custom Gameplay Constants' and then within the list, scroll down and find the field called 'Hero Maximum Level'.Change it to whatever the value you want and your done.

Now I realy hope that this will decrease the number of new threads about that.


Top
 Profile  
 
PostPosted: April 15th, 2009, 5:07 am 
Offline
Forum Fanatic

Joined: October 16th, 2007, 7:32 pm
Posts: 327
First,i'd like to say thanks to [b]uberfoop[/u] and edwinfong25 for helping me to solve problems about this ability.

Actualy,this is my first spell made in triggers,so i decide to place it as tutorial for mapping beginners and for those who haven't made, or don't know how to make, something like this.

What is Massivenes:
"Slams the ground five times in line slowing enemy units and deals massive damage in an area of effect."

Ability is based on thunder clap (human mountain king's ability).My ability contains two levels (Side NOTE:i disabled attack speed decreasing).This is you who shall decide how much levels it has or what damage does it deal etc...

Now after you made ability give it to wanted hero and make doomy ability.
How to make Doomy ability:
All you should do is to copy original "Massiveness".After you paste your ability,you will find button "Stats - Hero Ability".Set it to false and set "Stats - Mana Cost" for ALL levels to 0.That's all!

Now create dummy unit!
What is doomy unit and how to create it:
Doomy unit is invisible and untouchable unit.In the most maps they serve for triggering spell (the most) and some mappers use them as for visibility actions.Doomy unit can do such a things (75% spells without doomies are impossible).

Okay,go to Object Editor and create new unit based on (example) Footman (you can choose any unit you want,but just create it).Then,there are the most important things you must do.In the other hand,ability won't work,so keep eye on next:

Abilities - Normal = Invulnerable (Neutral) , Locust , ""Massiveness (Doomy)""
(Invurnerable ability isn't necesary,but it makes doomy 100% safe (i did set it).Why Locust?Locust can not be selected in game,so no one can choose it while it's working,ok?And ofcourse add Doomy ability you made the last);
Art - Animation - Cast Backswing = At least 0.100
Art - Animation - Cast Point = At least 0.100
(When these two actions are disabled,simply cannot shoot ability more then once (i realy don't know why it happens));
Art - Model File = Thunder Clap <Caster>
Art - Scaling Value = 1.00
(Because thunder clap needs caster animation,we have to set actions above.If we leave it as example Zone Indicator model file,ability WILL do effect,but thunder clap will not be shown because actualy doomy is INVISIBLE,understand???);
Combat - Attacks Enabled = NONE
(you don't want your doomy to run around map and attack anyone he can,right?);
Movement - Type = Fly
(Logicaly,because doomy can block some land units in combat);
Stats - Hide Minimap Display = TRUE
(The most important thing.If you leave as false,then everytime you cast ability,minimap will show your invisible unit (doomy) lol);
Stats - Sight Radius (Day and Night) = 0 , 0 (both)


Ok,you completed creating doomy unit.Now,it is time to make ability with triggers.

First,you must start with event:
Code:
Unit - A unit Starts the effect of an ability
Second,the most important.You must ORDER which ability to match...condition:
Code:
(Ability being cast) Equal to Massiveness (Dwarf Master)

Okay,now we need actions...

First off,you don't want Massiveness to clap 5 times at once.So i did this:First of all actions:

Code:
Wait 0.50 seconds
After hero casts ability,trigger will wait 0.5 seconds.
Second is something what i "MAYBE" understand.We have to call Point variable.If i'm introduced well,this saves the game of bugs,laggs and stucks.Like,if two heroes cast it in once,trigger may confuse its' self if everything is in one action,right?So,this action works perfectly and now do this! (Create one variable named (or however you want) Point_Array with 'Array' Size 1.Next lets call it:

Code:
Set Point_Array[1] = (Position of (Casting unit))
(DON'T FORGET [1])

We done it.Now here's the action.Now match how much times you want Massiveness to slam the ground with this action (i set it to 4,that means first hero casts it once and after that,4 more times):

Code:
For each (Integer A) from 1 to 4, do (Actions)
Loop - Actions

That's done too.Now,we need to set Point variable 'WHERE' to create doomies.In my map,Massivness (Doomy) ability slams in random point around casting hero (there is limited range ofcourse).And,it's spawned on random angle as well,so you cannot except where actualy ability will be cast.How to do that:

Code:
Set Point_Array[2] = (Point_Array[1] offset by (Random real number between 100.00 and 250.00) towards (Random angle) degrees)
(DON'T FORGET [2] and [1] in Point variable)

Next we need create doomy for owner of casting unit in point_array 2,right,so:

Code:
Unit - Create 1 Doomy (Massiveness) for (Owner of (Casting unit)) at Point_Array[2] facing Default building facing degrees
Now,after we created doomy unit,we don't need second point_array variable as well.We MUST remove it if we don't want your game get crashed with such a points.Custom Script works for us!Go to New Action - Custom Script and TYPE next:

Code:
Custom script: call RemoveLocation(udg_Point_Array[2])
We removed it now we're safe...We need to make sure that doomy contains ability we want.Also,because of next actions,we need to add ability also if it's added in Object Editor (more safely):

Code:
Unit - Add Massiveness (Doomy) to (Last created unit)
Now you may ask 'how to set level of doomy ability,but to match with hero's original ability'?Do this:

Code:
Unit - Set level of Massiveness (Doomy) for (Last created unit) to (Level of (Ability being cast) for (Casting unit))
Now,we must order doomies to cast Massivenes where they are.Don't forget,this is ability is based on thunder clap ability.Go to New Action - Unit - Issued Order With No Target and do next:

Code:
Unit - Order (Last created unit) to Human Mountain King - Thunder Clap
And spell is done...After this actions,ability will take effect 3 more times and will be turned off until next time hero cast it.There are 2 more things:First,we have to remove dommies from the game.And do next:

Code:
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
They are removed and job is finished regarding doomies.All we left is Point_Array[1],we called it before main action,and now we have to remove it OUT of main action:So TYPE next:

Code:
Custom script: call RemoveLocation(udg_Point_Array[1])
That's all.Your spell is donr and now you can test and try it.
Maybe one day you will use this ability for your own map (joke).

If in some actions or in some description i was wrong,please correct me.
I except some comments on this topic.Feel free to say and ask anything you want.Sorry if i was wrong in some words or action and very sorry for VERY BAD English language...Thank you all

(Here's full ability: )
Code:
Massiveness
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Massiveness (Dwarf Master)
Actions
Wait 0.50 seconds
Set Point_Array[1] = (Position of (Casting unit))
For each (Integer A) from 1 to 4, do (Actions)
Loop - Actions
Set Point_Array[2] = (Point_Array[1] offset by (Random real number between 100.00 and 250.00) towards (Random angle) degrees)
Unit - Create 1 Doomy (Massiveness) for (Owner of (Casting unit)) at Point_Array[2] facing Default building facing degrees
Custom script: call RemoveLocation(udg_Point_Array[2])
Unit - Add Massiveness (Doomy) to (Last created unit)
Unit - Set level of Massiveness (Doomy) for (Last created unit) to (Level of (Ability being cast) for (Casting unit))
Unit - Order (Last created unit) to Human Mountain King - Thunder Clap
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Custom script: call RemoveLocation(udg_Point_Array[1])


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO


Privacy Policy Statement
Impressum (German)