|
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Messages - BlizzMod
1
« on: November 21, 2017, 09:38:47 PM »
Keywords: | Iron, breaker, dwarrf, WotTH |
Model Type: | Hero |
Model Category: | Dwarf | Rating: |
5
| | |
« Created: November 21, 2017, 09:40:34 PM by moyack »
Related Topics or Resources
Iron Breaker A model from the abandoned project War of the Three Hammers, a campaign developed initially by Camel's Hump and with the participation of an great staff of modellers, animators and skinners. This is one of the several models developed for this project. I hope you can give a good use in your project. ALL CREDITS TO THEIR RESPECTIVE AUTHORS.
2
« on: November 13, 2017, 11:24:45 PM »
Keywords: | Iron, forge, guard, dwarf, WotTH |
Model Type: | Unit |
Model Category: | Dwarf | Rating: |
5
| | |
« Created: November 13, 2017, 11:26:16 PM by moyack »
Related Topics or Resources
Iron Forge Guard A model from the abandoned project War of the Three Hammers, a campaign developed initially by Camel's Hump and with the participation of an great staff of modellers, animators and skinners. This is one of the several models developed for this project. I hope you can give a good use in your project. ALL CREDITS TO THEIR RESPECTIVE AUTHORS.
3
« on: November 12, 2017, 12:06:57 AM »
Keywords: | Hero, Drenn, Stone, Axe, WotTH |
Model Type: | Hero |
Model Category: | Dwarf | Rating: |
5
| | |
« Created: November 12, 2017, 12:08:33 AM by moyack »
Related Topics or Resources
Captain Drenn Stoneaxe A model from the abandoned project War of the Three Hammers, a campaign developed initially by Camel's Hump and with the participation of an great staff of modellers, animators and skinners. This is one of the several models developed for this project. I hope you can give a good use in your project. ALL CREDITS TO THEIR RESPECTIVE AUTHORS.Atlast he is finished! I present to you Captain Drenn Stoneaxe, main character of the Bronzebeard campaign. Model and skin by camel's_hump, animations and particles by Chriz.
4
« on: October 27, 2017, 10:16:28 PM »
Keywords: | Hearth, guard, WotTH |
Model Type: | Hero |
Model Category: | Dwarf | Rating: |
5
| | |
« Created: October 27, 2017, 10:18:21 PM by moyack »
Related Topics or Resources
Hearth Guard A model from the abandoned project War of the Three Hammers, a campaign developed initially by Camel's Hump and with the participation of an great staff of modellers, animators and skinners. This is one of the several models developed for this project. I hope you can give a good use in your project. ALL CREDITS TO THEIR RESPECTIVE AUTHORS.The Hearthguards are great leaders of the Wildhammer army. With their skills in battle, mighty armor, stone swords, and two-headed axes, they have developed to be both deadly attackers and seasoned defenders.
Head model by Tufy, axe model by someone at wc3search, base model by Blizzard. Model and skin by camel's_hump.
5
« on: October 16, 2017, 09:11:06 AM »
Keywords: | Firelord, WotTH |
Model Type: | Unit |
Model Category: | Creep, Demon, Dwarf | Rating: |
5
| | |
« Created: October 16, 2017, 09:15:52 AM by moyack »
Related Topics or Resources
The Firelord A model from the abandoned project War of the Three Hammers, a campaign developed initially by Camel's Hump and with the participation of an great staff of modellers, animators and skinners. This is one of the several models developed for this project. I hope you can give a good use in your project. ALL CREDITS TO THEIR RESPECTIVE AUTHORS.The Firelord unit.. Fully animated and ready to go.
Animations include:
- Stand
- Stand 2
- Stand Ready

- Walk

- Attack

- Attack 2
- Spell Channel

- Death
- Decay
- Portrait
6
« on: October 15, 2017, 09:33:39 PM »
Keywords: | Dwarf, priest, WotTH |
Model Type: | Unit |
Model Category: | Dwarf | Rating: |
4
| | |
« Created: October 15, 2017, 09:35:30 PM by moyack »
Related Topics or Resources
Dwarven Priest A model from the abandoned project War of the Three Hammers, a campaign developed initially by Camel's Hump and with the participation of an great staff of modellers, animators and skinners. This is one of the several models developed for this project. I hope you can give a good use in your project. ALL CREDITS TO THEIR RESPECTIVE AUTHORS.
7
« on: October 14, 2017, 11:27:02 PM »
Keywords: | Dark, Iron, Warrior, Dwarf, WotTH |
Model Type: | Unit, Hero |
Model Category: | Dwarf | Rating: |
5
| | |
« Created: October 14, 2017, 11:31:04 PM by moyack »
Related Topics or Resources
Dark Iron Slave A model from the abandoned project War of the Three Hammers, a campaign developed initially by Camel's Hump and with the participation of an great staff of modellers, animators and skinners. This is one of the several models developed for this project. I hope you can give a good use in your project. ALL CREDITS TO THEIR RESPECTIVE AUTHORS.
8
« on: October 14, 2017, 10:31:43 PM »
Keywords: | Dark, Iron, Sorcerer, mage, Dwarf, WotTH |
Model Type: | Unit |
Model Category: | Dwarf | Rating: |
5
| | |
« Created: October 14, 2017, 10:34:50 PM by moyack »
Related Topics or Resources
Dark Iron Sorcerer A model from the abandoned project War of the Three Hammers, a campaign developed initially by Camel's Hump and with the participation of an great staff of modellers, animators and skinners. This is one of the several models developed for this project. I hope you can give a good use in your project. ALL CREDITS TO THEIR RESPECTIVE AUTHORS.The sorcerers are some of the most senior magicians in the clan. They know the way o the mind, and can create false visions to fool the unwise, as well as urge on their own warriors. The sorcerers are often distrusted even by their masters because the way they manipulate the weak minded.
Model by Mc !, skin by Falcoknight
9
« on: October 11, 2017, 10:16:20 PM »
Keywords: | Dark, Iron, Slave, Dwarf, WotTH |
Model Type: | Unit |
Model Category: | Dwarf | Rating: |
5
| | |
« Created: October 11, 2017, 10:19:13 PM by moyack »
« Last Edit: October 14, 2017, 10:33:29 PM by moyack »
Related Topics or Resources
Dark Iron Slave A model from the abandoned project War of the Three Hammers, a campaign developed initially by Camel's Hump and with the participation of an great staff of modellers, animators and skinners. This is one of the several models developed for this project. I hope you can give a good use in your project. ALL CREDITS TO THEIR RESPECTIVE AUTHORS.At the bottom of the Dark Iron hierarchy are the commoners. They serve their masters by doing lowly works like cutting timber or setting up buildings. Even though the ones above them sneer, these are the ones who make Dark Iron society go around.
Fully modeled, unwrapped and animated by Chriz. Texture made by camel's_hump
10
« on: September 24, 2017, 09:16:04 PM »
El Encuentro de las Especies. por: William Salazar Tipo: Supervivencia Modo Campaña: (historia inicial) y Modo multiplayer. Personajes: Cesar Correa, William, Moyack, Juan David Gómez INTRODUCCIÓNAño 2030, 6 amigos fueron de viaje . Pero un inesperado accidente hizo que perdieran la dirección de su barco, cayendo en una grieta espacio temporal que los dirigió a otra dimensión. Mientras pasaban por esta especie de túnel vieron y oyeron cosas extrañas y perturbadoras... -Nuestros personajes se verán enfrentados a diversos retos encontrando múltiples especies unas amigables y otras no tanto, serán capases de sobrevivir y encontrar la salida de este lugar ...? HISTORIAAño 2030, 6 Amigos fueron de viaje . Pero un inesperado accidente hizo que perdieran la dirección de su barco, cayendo en una grieta espacio temporal que los dirigió a otra dimensión. Mientras pasaban por esta especie de túnel vieron y oyeron cosas extrañas y perturbadoras. Llegaron a un lugar muy parecido a la tierra, se podía respirar, había agua , habían frutas parecidas pero no sabían si eran toxicas o si el agua se podía tomar. No lo hicieron hasta que tomaron pequeñas cantidades de cada fruta o vegetal parecidos a los que ellos conocían. No sabían si era la tierra hasta que de repente vieron un animal similar a un mino tauro, quimeras centauro y se dieron cuenta que habían entrado en algo poco convencional solo se acuerda que viajaron en algo al principio pensaron que habían viajado al pasado. Se repartieron tareas para quedarse en esa isla reunieron agua troncos para hacer una fogata para hervir el agua los 3 hombres vigilaron al principio hasta que pudieran luego despertar a las mujeres para que ellos pudieran dormir 2 hombres y 1 mujer fueron a navegar alrededor encontrando una isla pero parecía más peligrosa y como simios pero tenían inteligencia y conciencia, con 5 dedos lo cual era raro, se podían comunicar pero no le dieron importancia ya que se veían amigables , volvieron e hicieron una balsa más grande y fueron todos. A William le hirieron con una lanza así que fueron a su isla para intentar no recibir más daños e hicieron su propio armamento para intentar comunicarse, no lograron e intentaban solo herir a los hombres ya que las mujeres se parecían a las de su especie. Regresando a su isla se percataron de que los estaban siguiendo.Al llegar intentaron llevarse a las mujeres se escondieron durante un tiempo no savian como detenerlos o como regresar a casa..
11
« on: September 21, 2017, 10:57:26 PM »
Keywords: | Dark, Iron, Magi, WotTH |
Model Type: | Unit |
Model Category: | Dwarf | Rating: |
5
| | |
« Created: September 21, 2017, 10:59:16 PM by BlizzMod »
Related Topics or Resources
Dark Iron Magi A model from the abandoned project War of the Three Hammers, a campaign developed initially by Camel's Hump and with the participation of an great staff of modellers, animators and skinners. This is one of the several models developed for this project. I hope you can give a good use in your project. ALL CREDITS TO THEIR RESPECTIVE AUTHORS.The magi of the Dark Iron dwarves are indeed masters of fire, and the most powerful ones can even summon the mighty fire elementals to aid them in battle.
Model by Mc ! Texture by camel's_hump Animations by Chriz.
12
« on: September 20, 2017, 12:14:13 AM »
Keywords: | Dark, Iron, Devoted, Hero, WotTH |
Model Type: | Hero |
Model Category: | Dwarf | Rating: |
5
| | |
« Created: September 20, 2017, 12:16:49 AM by moyack »
Related Topics or Resources
Dark Iron Devoted A model from the abandoned project War of the Three Hammers, a campaign developed initially by Camel's Hump and with the participation of an great staff of modellers, animators and skinners. This is one of the several models developed for this project. I hope you can give a good use in your project. ALL CREDITS TO THEIR RESPECTIVE AUTHORS.The devoted ones are often younger dwarves who wish to prove themselves in battle. Even though their swords are particularly sharp, or their armor especially strong, the willpower and their courage alone may well hold of the enemy long enough for spell casters to get themselves ready.
Model and skin by camel's Hump, base model by Blizzard.
13
« on: September 18, 2017, 12:30:29 AM »
Keywords: | Dark, Iron, Berseker, Hero, WotTH |
Model Type: | Hero |
Model Category: | Dwarf | Rating: |
5
| | |
« Created: September 18, 2017, 12:33:48 AM by moyack »
Related Topics or Resources
Dark Iron Berseker A model from the abandoned project War of the Three Hammers, a campaign developed initially by Camel's Hump and with the participation of an great staff of modellers, animators and skinners. This is one of the several models developed for this project. I hope you can give a good use in your project. ALL CREDITS TO THEIR RESPECTIVE AUTHORS.Older warriors, who have survived long enough are elected to become berserkers. They take a special concoction on regular basis, which allows them to, when called for, go into a frenzy. When they do, not many will stand up to them.
Model by Norinrad and camel's_hump, skin by Falcoknight and camel's_hump.
14
« on: August 19, 2017, 07:06:02 AM »
Keywords: | Bronzebeard, Thane, Hero, WotTH |
Model Type: | Hero |
Model Category: | Dwarf | Rating: |
5
| | |
« Created: August 19, 2017, 07:08:16 AM by BlizzMod »
Related Topics or Resources
Bronze Beard Thane
A model from the abandoned project War of the Three Hammers, a campaign developed initially by Camel's Hump and with the participation of an great staff of modellers, animators and skinners. This is one of the several models developed for this project. I hope you can give a good use in your project. ALL CREDITS TO THEIR RESPECTIVE AUTHORS.
15
« on: August 18, 2017, 10:59:57 PM »
Keywords: | Bronzebeard, crossbowman, WotTH |
Model Type: | Unit |
Model Category: | Dwarf | Rating: |
5
| | |
« Created: August 18, 2017, 11:01:31 PM by BlizzMod »
Related Topics or Resources
Bronze Beard Crossbowman (Caped)
A model from the abandoned project War of the Three Hammers, a campaign developed initially by Camel's Hump and with the participation of an great staff of modellers, animators and skinners. This is one of the several models developed for this project. I hope you can give a good use in your project. ALL CREDITS TO THEIR RESPECTIVE AUTHORS.
16
« on: July 26, 2017, 10:08:40 PM »
Keywords: | Bronze, Beard, King warrior, WotTH |
Model Type: | Unit |
Model Category: | Dwarf | Rating: |
5
| | |
« Created: July 26, 2017, 10:08:40 PM by BlizzMod »
Related Topics or Resources
Bronze Beard King Warrior
A model from the abandoned project War of the Three Hammers, a campaign developed initially by Camel's Hump and with the participation of an great staff of modellers, animators and skinners. This is one of the several models developed for this project. I hope you can give a good use in your project. This model manages team color on all his armor, allowing to have different representations or armors, which could be useful in giving the idea of different warrior types. ALL CREDITS TO THEIR RESPECTIVE AUTHORS.
17
« on: July 25, 2017, 08:29:29 PM »
Keywords: | Broze, Beard, worker, WotTH |
Model Type: | Unit |
Model Category: | Dwarf | Rating: |
5
| | |
« Created: July 25, 2017, 08:29:29 PM by moyack »
« Last Edit: July 25, 2017, 10:12:03 PM by BlizzMod »
Related Topics or Resources
Bronze Beard Worker
A model from the abandoned project War of the Three Hammers, a campaign developed initially by Camel's Hump and with the participation of an great staff of modellers, animators and skinners. This is one of the several models developed for this project. I hope you can give a good use in your project. So, you thought WC3 needed a Dwarf model?? here it is!!! with nice animations and all the fancy stuff. And don't forget his beard, it's sexy ALL CREDITS TO THEIR RESPECTIVE AUTHORS.
18
« on: July 24, 2017, 11:04:44 PM »
Updated Bronze Beard warrior
19
« on: July 24, 2017, 10:17:38 PM »
Keywords: | Bronze, Bear, warrior |
Model Type: | Unit, Hero |
Model Category: | Dwarf | Rating: |
5
| | |
« Created: July 24, 2017, 10:17:39 PM by BlizzMod »
Related Topics or Resources
Bronze Beard Warrior
A model from the abandoned project War of the Three Hammers, a campaign developed initially by Camel's Hump and with the participation of an great staff of modellers, animators and skinners. This is one of the several models developed for this project. I hope you can give a good use in your project. Notes: This model has no team color, but it has a lot of animations. It can be used as unit or hero, but mostly as a hero because it doesn't have decay animations. ALL CREDITS TO THEIR RESPECTIVE AUTHORS.
20
« on: July 23, 2017, 09:59:14 PM »
Uploaded BB_Crossbowman.
21
« on: July 23, 2017, 09:48:50 PM »
Keywords: | BB, Crossbowman |
Model Type: | Unit |
Model Category: | Dwarf | Rating: |
5
| | |
« Created: July 23, 2017, 09:48:50 PM by BlizzMod »
Related Topics or Resources
Bronze Beard Crossbowman
A model from the abandoned project War of the Three Hammers, a campaign developed initially by Camel's Hump and with the participation of an great staff of modellers, animators and skinners. This is one of the several models developed for this project. I hope you can give a good use in your project. ALL CREDITS TO THEIR RESPECTIVE AUTHORS.
22
« on: July 23, 2017, 09:06:04 PM »
Uploaded BB_Ramrider... at last!!!!
23
« on: July 23, 2017, 09:00:55 PM »
Keywords: | WotTH, BB, Ramrider |
Model Type: | Unit |
Model Category: | Dwarf | Rating: |
5
| | |
« Created: July 23, 2017, 09:00:55 PM by BlizzMod »
Related Topics or Resources
Bronze Beard Ram Rider
A model from the abandoned project War of the Three Hammers, a campaign developed initially by Camel's Hump and with the participation of an great staff of modellers, animators and skinners. This is one of the several models developed for this project. I hope you can give a good use in your project. ALL CREDITS TO THEIR RESPECTIVE AUTHORS.
24
« on: July 09, 2017, 01:51:10 AM »
Tutorial originally made by wonderpriest inspired in Kattana original tutorial.Trackables
A trackable is just something like a doodad, let's say. But it is different as it can't be selected, it can't be moved, it can't die, and it can't be eliminated. It doesn't even have to be seen if you don't want it to. The point of a trackable is to harness the mouse detection for usage in triggers. Mouse detection just means the game registers when your mouse pointer moves over an object, or clicks it. FAQ As I get more questions, I will answer them here so you don't have to sift through the posts.
Q. Do trackables work in multiplayer maps? A. Yes, they work fine. As for tracking which player triggered the trackable, you would need a handler system for that.
Limitations Although Blizzard gave us these functions to use mouse detection, it doesn't seem they really cared to finsh the code, because you can not retrieve a triggering player from a trackable event. Nor can a trackable be owned by a player. The usage of trackables is very limited, because you can not manipulate anything about a trackable once you create it, or before. This means you can not move, scale, color, or make any other kind of modification. You just create it, and that's it. Also, one of the reasons not many people know of trackables, is because they require JASS to fully use. You can create and manipulate trackables through the Custom Script action, but there is no event in GUI that uses trackables. Fortunately, the functions are not very hard to understand and require little, if any, JASS knowledge. Usage I wanted to bring these trackables to attention, because even many JASSers seem to not know what they are. Trackables are a powerful tool that can be used to make better interactive systems, and even things like mini-games. To use trackables, first you must create them. They can not be pre-placed in a map, so you must make them through triggers. They are created somewhat like units are created, only you use a model string to determine the model of the trackable, not an id or name. This is actually very useful, because you can use any valid model path. This includes units, buildings, doodads...anything with a model path. If you use a unit or buildiing model, the trackable will appear looking like a neutral hostile unit, with no team colors. Trackables do play animations. If you want a trackable to be invisible, you just insert a void string argument (""). Here is the function to create a trackable:
modelpath is the path of the model you would like to use. Use "" for an invisable trackable. Remember to use \\ instead of \. real x and real y are the coordinates of the location to create the trackable facing is the angle that the trackable faces (remember this cannot be changed after creation)
The events for trackables are as follows:
trackable is a handle that you use like any other handle (unit, location...).
TriggerRegisterTrackableHitEvent registers when a player clicks on a trackable. TriggerRegisterTrackableTrackEvent registers when a player moves his mouse across a trackable. You may notice that this same system is in place with normal units in Warcraft III. When you click a unit, you select it. When you pass over a unit with your mouse, a bar shows it's health. Trackable events work like any other event, but you also need to specify a trackable for the event to register. A Trigger: This trigger will create a trackable, and when someone passes over it, a message will be sent.
function Massage takes nothing returns nothing endfunction //=========================================================================== function InitTrig_zomg takes nothing returns nothing local trackable tr= CreateTrackable( "units\\human\\Peasant\\Peasant.mdl",0,0,-90) //Creates our trackable, with the peasant model endfunction
You may notice I display the message to all players. This is because there is no 'GetTriggeringPlayer' for a trackable event, which is probably the biggest limitation of trackables. But, there is a 'GetTriggeringTrackable'. Which opens up possibilites to fix the missing TriggeringPlayer problem. (With 'GetTriggeringTrackable', you may be able to stimulate a Triggering Player, maybe by using the Handle Vars or another system) The Result: ADD: Trackable Workarounds (credits to KaTTana) Using Handle Vars With Trackables KaTTana wrote this part better than I can, so here it is. You can find KaTTana's Trackables tutorial here: Link You can find KaTTana's Handle Var turorial here: Link A Part of KaTTana's Tutorial: "We don't have any natives for getting the (x,y) coordinates of a trackable, but we can handle that ourselves with the Local Handle Variables. Here is a custom API for extended use of trackables.
// =========================== // Trackable API function GetTrackableX takes trackable tc returns real return GetHandleReal(tc, "x") endfunction function GetTrackableY takes trackable tc returns real return GetHandleReal(tc, "y") endfunction function GetTrackableFacing takes trackable tc returns real return GetHandleReal(tc, "facing") endfunction function GetTrackablePath takes trackable tc returns string return GetHandleString(tc, "path") endfunction function NewTrackable takes string path, real x, real y, real facing returns trackable call SetHandleReal(tc, "x", x) call SetHandleReal(tc, "y", y) call SetHandleReal(tc, "facing", facing) call SetHandleString(tc, "path", path) return tc endfunction
Trackables in Multiplayer Previously, the tutorial stated that trackables didn't work in multiplayer, but that was wrong. They work fine, and they don't desynchronize the game. However, there is no way to determine which player triggered the event on a trackable. We can work around this by creating a trackable for each player - each can only be triggered by one player.
// t1 and t2 are visually the same trackable, but in fact they only work for one player each local trackable t1 // Player 1's trackable local trackable t2 // Player 2's trackable local string peasant = "units\\human\\Peasant\\Peasant.mdl" local string invisible = "" local string path = invisible set path = peasant endif set path = invisible set path = peasant endif call SetHandleInt(t1, "player", 0) // Store which player "owns" this trackable call SetHandleInt(t2, "player", 1) // Same for player 2 // Add events to register track/hit on t1 and t2...
After this, you can determine the player triggering a trackable by reading the local integer named "player" on the triggering trackable. We can extend to NewTrackable if you like:
function GetTrackableOwner takes trackable t returns player return Player(GetHandleInt(t, "player")) endfunction function NewTrackable takes string path, real x, real y, real facing, player owner returns trackable local trackable tc local string invisible = "" set path = invisible endif call SetHandleReal(tc, "x", x) call SetHandleReal(tc, "y", y) call SetHandleReal(tc, "facing", facing) call SetHandleString(tc, "path", path) return tc endfunction
Giving height to Trackables Although the natives do not allow it, a simple workaround enables us to create trackables at a given height above ground.
function CreateTrackableZ takes string path, real x, real y, real z, real face returns trackable set d = null return tr endfunction
It works by creating an Invisible Platform at the given height, and then creating the trackable on top of that. After removing the platform, the trackable stays in place." _________________________________________________________________ Once again, that was part of KaTTana's trackable tutorial, which you can find here: Link That's it for the Trackables tutorial, thanks for reading, and hope you have fun using these in your map! Questions, comments, and suggestions are welcome, and appreciated! ADD: If anyone finds this confusing, or wants a demo map to look at, just say iit and I will make a demo map using all of the Trackable functions.
25
« on: July 09, 2017, 01:42:59 AM »
Developed by Blade.dkThis tutorial will help you add a simple, but cool, AI to hero arena type maps. The AI you’ll learn how to make here will not be perfect. The one we will create here will attack other heroes, pick up items, learn and use spells, but it won’t be as effective as a human player. However, when you’ve learned the basics you should be able to improve it yourself. RequiresJASS Knowledge – This tutorial uses JASS examples, and JASS-only features, so you will need to know JASS to follow this tutorial and make the AI. Technically it can be done in the GUI, but I won’t recommend that due to memory leaks, tons of unneeded code, and because using return bug and game cache based systems isn’t possible in the GUI. If you don’t know JASS, check the JASS tutorials at The JASS Vault and Wc3Campaigns. You also need to know what a rawcode are, if you don’t, just search the different Warcraft 3 sites to find out. A game cache and return bug based system – This can be KaTTaNa’s Local Handle Variables, Vexorian’s CSCache module (a part of the Caster System) or any other similar system. In this tutorial I’ll use the CSCache module. This map – A small map I’ve created that shows a simple AI like the one we’ll make in action. It is important that you have this map, as the tutorial often refers to it. Notes- The AI we’ll make here is not as good as a human player, but better than nothing. And when you’ve learned the basics, you should be able to improve it yourself. - A lot of numbers (player numbers, for example) starts from 1 in the GUI, but while they starts from 0 in JASS. As this is a JASS tutorial, they start from 0 here. - You don’t have to do the things exactly like I do them; I do it in my way, but if your way is better or you just feel more comfortable with it, do it your own way. I’m not perfect, and this tutorial isn’t perfect either, but hopefully it will help somebody. - You could use the AI from my demo map without creating your own (if you do so, give me credit), but I suggest making your own, as maps can be very different, and because you should be able to learn more from making it yourself. - The demo map is probably not perfectly unbugged, and it isn’t the funniest map either. Remember that it was just a map I quickly created to show a simple AI, if you want to see a better map with a good AI, take a look at Azeroth’s Arcane Arena. - I would like to specially thank Vexorian for encouraging me to make my first AI for my map, giving me tips on how to do it, and for showing me his AI, which helped me improve mine. Thanks! InitializationFirst create a new trigger with the “Player - Player 1 (Red) leaves the game” event. Convert it to JASS. We need that trigger to register when a player leaves the game, so we can start the AI for that player. At the moment it will only register when player 0 leaves the game, so we’ll use a loop to make it register when any player from 0-11 leaves instead. We want the AI to use abilities. This may sound hard, but it isn’t. We just have to make the Heroes learn the abilities, and they’ll cast them themselves. NOTE: The situation where a computer-controlled hero will cast a spell is always the same situation as where it would cast the spell it’s based on. So if you have a custom spell based on Silence, it will cast it in situations where it would cast it in melee games. NEVER base your spells of the “Channel” ability, as the AI never will use them. Changing the OrderString field on a spell in the Object Editor does nothing, it will still be the same as on the base spell. To know which spells the heroes have, we create a game cache to store it in. In the example map my trigger creates a gamecache at map initialization and saves it in the udg_GameCache global variable. Note that the cache HAS to be initialized before we starts using it, so I will do that in the first InitTrig function of my map. In my map I create a function called “SetupSkills”. In the AI trigger’s InitTrig function I use the ExecuteFunc native (read more about that native here) to execute that function in another thread. This is to prevent the map initialization thread from getting too long, and crash. My SetupSkills function looks like this:
function SetupSkills takes nothing returns nothing local string h // Create a local string variable // Paladin // Here we’ll initialise the Paladin’s skills, repeat this for all other heroes set h = UnitId2String('Hpal') // Store the returned value of UnitId2String(‘Hpal’) in the local call StoreInteger(udg_GameCache, h, "BaseSkill1", 'AHhb') // One of his base skills is Holy Light, store it as “BaseSkill1” call StoreInteger(udg_GameCache, h, "BaseSkill2", 'AHds') // Store Divine Shield as “BaseSkill2” call StoreInteger(udg_GameCache, h, "BaseSkill3", 'AHad') // Store Devotion Aura as “BaseSkill3” call StoreInteger(udg_GameCache, h, "UltimateSkill", 'AHre') // Store Resurrection as his “UltimateSkill” … // Repeat for each Hero. endfunction
Here’s my InitTrig_AI function:
function InitTrig_AI takes nothing returns nothing local integer i = 0 loop exitwhen i > 11 set i = i + 1 endloop endfunction
Starting the AI for a heroTo control the AI I will use a timer. I create a function called “StartAI” that takes a single unit argument: the hero (check the function in the example map). The function just creates a timer, "attaches" the hero to it, and starts it (just make the expiration function now, we will out some actions into it later, but you need the function and endfunction lines to prevent getting compile errors). This is the empty AILoop function and the StartAI function from the example map:
function AILoop takes nothing returns nothing endfunction function StartAI takes unit hero returns nothing call AttachObject(m, "hero", hero) set m = null endfunction
Note that I’m starting it as a “one-shot” timer, by using false as the 'periodic' boolean value (we’ll get back to that later). Now just make your hero selection system call that function when a computer controlled player chooses a hero, and go to the function that is executed when a player leaves the game. Check if the player has a hero, if he/she has one, call the function that starts the AI on that hero. Example:
function PlayerLeaves takes nothing returns nothing endif set p = null endfunction
NOTE: This will make the AI take control of a leaving player's hero, this is not needed, if you want to do something else when a player leaves. Making the AI do somethingWhenever the timer expires there are some things we want it to do: - If the hero is dead, wait until he/she/it is revived.
- If the hero is about to die, order him/her/it to move to the fountain at the map center.
- If the hero has a fine amount of health, check if an enemy is close. If true, order the Hero to attack it, else check for items close to the hero, if any, issue a smart order so the Hero will pick the up. if there isn’t any, just order the hero to patrol to a random point in the arena.
- If the hero is alive and has any unused skill points, learn a skill.
We’ll start with declaring all the variables. Notice the real variable 'e' in my function, it defines how long time will elapse before the timer expires again, so we can wait shorter time if the hero is dead, or longer time if he/she/it is attacking. That variable is initialized with the value 5. Declare the local variables:
function AILoop takes nothing returns nothing local unit h = GetTableUnit(a, "hero") local rect i local location r local group g local boolexpr b local boolexpr be local unit f local real e = 5 …
We start with checking if the hero is dead, if he/she/it is, set the real variable to 1.5 (because waiting 5 seconds after revival is too long time, we don’t want that). The hero’s life ('l' is 0, just set e to 1.5 to make the timer check more frequently for the hero’s revival.
… if l <= 0 then set e = 1.5 endif …
Next I check if the hero’s life is below 20% of it's max life. If it is low, order the hero to move to fountain and set the variable 'e' to 3. The hero’s life is less than 20% of max life, so order the hero to move to the position of the fountain: If the hero isn’t weak, check if he/she/it has a common order (to prevent it from interrupting channel spells). If it is a standard order, we check if any enemies are within a radius of 500. If true, simply issue an attack order (don’t change the 'e' variable, 5 seconds is fine in this situation).
function AIFilterEnemyConditions takes nothing returns boolean endfunction … else if ((o == "smart") or (o == "attack") or (o == "patrol") or (o == "move") or (o == "stop") or (o == "hold") or (o == null)) then set b = Condition( function AIFilterEnemyConditions) if f == null then … else endif endif …
If no enemies are found, check for items. If an item is found, check if it’s a powerup. If it isn’t, check if the hero has any empty inventory slots, and order the hero to pick it up.
function AISetItem takes nothing returns nothing endfunction function AIItemFilter takes nothing returns boolean endfunction function AIHasEmptyInventorySlot takes unit u returns boolean endfunction … if f == null then set i = Rect(x-800, y-800, x+800, y+800) set bj_lastRemovedItem=null if bj_lastRemovedItem != null and ( GetItemType(bj_lastRemovedItem) == ITEM_TYPE_POWERUP or AIHasEmptyInventorySlot(h)) then else … endif …
If the hero has items in all slots, or no items existed, order him/her/it to patrol to a random location in the map, to find new targets. Now let’s check if the hero has any unused skill points (keep this separated from the attack/item pickup/patrol block). If he/she/it has, call a function that learns a skill to the hero. In my example I’ve used a function that stores the number it has taught the hero an ability, to keep a special pattern in the ability learning:
function AILearnSkill takes unit h, string a returns nothing local integer i = GetTableInt(a, "LearnSkillOrder")+1 if i == 1 or i == 4 or i == 8 then elseif i == 2 or i == 5 or i == 9 then elseif i == 3 or i == 7 or i == 10 then elseif i == 6 then endif call SetTableInt(a, "LearnSkillOrder", i) endfunction … call AILearnSkill(h, a) endif …
Now simply make the timer expire again after 'e' seconds: Last we need to set the local variables to null:
… set h = null set i = null set r = null set g = null set b = null set f = null set be = null …
Final notesThis is the basics of it, it can be way better, but this should help you get started. Feel free to ask questions here or pm me. It shouldn’t be complicated at all, but if you have just checked the tutorial it can be so. The map was made to give a better demonstration, so please check it. When you have finished making your simple AI, try to add one or more of the following things to imrove it: - Try to make it find the weakest enemy close. - Try to make different AI players work together on killing a specific unit. - When most battles becomes centered about the fountain, make heroes run away from it when they’re fleeing. - Make the AI post text messages that varies depending on the situation (for example, an AI player can say “Die, sucker!” before killing you). I hope this will help somebody! Blade.dk
|
|
|