|
|
Nytemair's Map Editor Guide!
Use Ctrl + F to find a section.
Contents:
- Introduction
- Getting Started
- Important Information
- Map-Editing Basics
- Creating a Map
- Adding Lane Creeps
- Adding Neutrals
- Kongor
- Spawn Points
- Shops
- Pathing and Sight Blockers
- Polishing your Map
- Saving and Playing
- Your First hero
- Creating Custom Content Overview
- Adding A Hero
- Changing Basic Values
- Getting Your Hero In Game
- Item and Spell Creation
- Getting Started
- States, Affectors, Gadgets and Projectiles
- Modifiers
- Effects and Icons
- Getting Your Item Into a Shop
- Advanced Mechanics
- Changing Global Values
- Adding Triggers
- User Interface
- Sounds and Music
- Resources
- Conclusion
Last edited by Nytemair; 02-09-2012 at 03:02 AM.
Premium Tips and Tricks Guide: http://forums.heroesofnewerth.com/sh...php?p=14769758
I am an angry nerd who makes angry music in my bedroom. I also like doing flips.
1.0 - Introduction
This is a tutorial on creating custom content using the tools given to us by S2. It will cover almost everything about making maps, heroes, spells, items, game modes, user-interfaces, sounds and more. This is a Work-In-Progress and I appreciate feedback. By the end of this, you will be well on your way to releasing your first custom map, complete with as much custom content as your heart desires!
1.1 - Getting Started
Tools and Programs:1.2 - Important Information
Heroes of Newerth Editor:Extra Programs:
This is the primary editor given to us by S2, it allows users to create and edit maps with powerful tools. It is also used to spawn neutrals, creeps, kongor and buildings. It is not used to create or add custom content such as heroes, game modes or the like. This is located in your Heroes of Newerth Directory and is called Editor.bat.
XML Scripting Interface:
Through the use of a text editor, we have the ability to create and modify core game files that the engine uses to create entities in the game. Learning this allows us to make custom content, and essentially make anything we desire.
Notepad++
While any text editor will do the job when scripting, Notepad++ is extremely powerful due to it's clean interface, powerful tools and the fact that it's free.
Download Link
Winrar
Since all of HoN's content is in modified .ZIP folders, you will need some form of extraction program. I recommend Winrar because it's much more efficient when you get accustomed to it. Note: The newest version of Winrar (4.10) is currently incompatible with .s2z formats, use an older link.
Download Link
Heroes of Newerth Script Editor Module
Made by Oloko, a former moderator in the Maps sub-forum. This is a module for Netbeans IDE. Check out the thread here.
At this point in time, there is no way for us to host our custom content, or play with other people. Since we have heard nothing from S2 in the last few months, we just have to bite our lip and get on with it. On an optimistic note, this gives us more time to polish our masterpieces!
Last edited by Nytemair; 02-09-2012 at 03:01 AM.
Premium Tips and Tricks Guide: http://forums.heroesofnewerth.com/sh...php?p=14769758
I am an angry nerd who makes angry music in my bedroom. I also like doing flips.
2.0 - Map Editing Basics
This section of the guide will run you through creating a custom Map for Heroes of Newerth. In this section, we will create a small map with terrain, scenery, water, lane and neutral creeps, a kongor, rune spawns, as well as a base.
2.1 - Creating a Map
First, open your Editor (Program Files/Heroes of Newerth/editor.bat). Once it has finished loading, you will be presented with a splash screen, simply click to remove it and get into the Editor.
The Interface:
At first it may seem daunting, but the interface is actually quite clean and efficient; along the left, you have the primary tool panel. At the top you have the secondary tool panel, in the top-right corner is the mini-map accompanied by global map settings. The bottom-right corner holds the tool-specific options box. All of these interfaces can be moved and positioned as you see fit, and most can be minimized to take up less space.
Note: There is no undo key in the editor, make sure you make plenty of backups of your files as well, as if you break something, it's quite difficult and time-consuming to fix.
All maps are stored in the folder Heroes of Newerth/game/maps.
Once opened, you are faced with the default blank map, feel free to play around with whatever you want here. If you need to re-create this, click File -> New Map. Then type in these values:
In addition, you can open the Properties box at the top-right hand corner of the map to change these settings.
Available to us are a series of powerful editing tools, located on the left of the screen.Grid: Activates the grid, allowing you to place things with more precision and symmetry.
Environment: Allows you to change lighting and environment settings.
![]()
Brushes:Deform: Manipulates the terrain with a brush, allowing to shape it in various ways.
Paint: Paints textures and colour with the selected brush.
Entities: Allows you to place trees, props and trigger markers in your map.
Foliage: Paints foliage with the brush, grass, flowers and the like are placed with this tool.
Sound: Allows you to place sound emmiters on your map.
Blockers: Allows the painting of pathing and sight blockers.
Cliffs: Allows you to change height levels of your map, creating cliffs and ramps.
Water: Paints flowing water with the brush.
The tools in detail:
Deform:
The Deform tool is primarily used to shape and manipulate the map in a way that does not affect the pathing of units. This tool can be used to make hills, mountains, plateus and more.
Paint:
The paint tool enables us to paint textures on the map such as dirt or snow, it also allows us to re-colour areas as well, adding more realism and depth to the terrain.
Texture: (image)
The texture tool paints an image with the brush, it comes with two layers. The first is the base layer that paints a rough, jagged base for our texture. The second layer is used to smooth and blend the edges.
Select a texture from the toolbar, make sure layer 1 is selected. (image)
Layer 1: (image)
Layer 2: (image)
The small eye in the layer selection box toggles the visibility of the layer. If you notice your map is missing the floor, you may have unchecked one of these by accident.
Colour: (image)
The colour tool allows us to change the RGB levels of any terrain under the brush, allowing you to create things like blood stains or river beds. Select a colour from the tool bar (image)
Entities: (image)
Entities are physical objects in game, these include heroes, trees, buildings and kongor. Entites are where the bulk of your content will be found.
(toolbar image)
Mode:
Model: This includes everything that is not a tree. Neutral spawns, fountains, kongor and the like are under this category.
Tree: Allows you to quickly place trees in the map, there are four types of trees. To select a specific tree, open the drop down menu in the bottom-left corner of your screen. (image)
The entity toolbar gives us almost complete control over our entities. (image)
Create: Places the selected entity on the map.
Select: Selects entities, useful when you don't want to move them.
Translate XY: Moves the entity along the XY axis (along the ground).
Translate Z: Moves the entity up or down along the Z axis.
Rotate Yaw: Rotates the entity along the horizontal axis.
Rotate Roll: Rotates the entity along its roll axis, useful for changing the aesthetic of props. (Pillars can become horizontal, and used as drains or walls.)
Rotate Pitch: Rotates the entity along its pitch, leaning it forward or backward.
Extra Options:
Snap: Snaps the target to the grid (if active), allowing precise movements.
Lock: Locks the entity, preventing it from being tampered with until it is unlocked again.
Center Mode: Selects how a group of objects interact with each other when they are being manipulated.
Move To Ground: Moves the selected objects down or up until they are aligned with the ground, useful if your object gets lost under deformation.
Straighten Model: Resets all rotation, useful if you can't get him straight normally. (WINK)
Reset Scale: Resets the model back to it's default scale.
Select All Models of This Type: Very useful if you decide your trees are looking a bit dead.
Entity Properties: (image)
This is where we set the important details of the entity, such as what model it uses, how it interacts with the world etc.
Name: The entity's specific name, used for spawners or creating triggers later on.
Level: Used for neutral camps, this sets what colour the icon is on the map. (Green, Yellow, Orange or Red)
Type: The type of entity, defines how it interacts with other entities.
Model: The model of the entity, if used for a unit - it will only apply in the editor.
Skin: The skin used for the model, usually set to default.
Target #0-4: Used to select other entities, this is used for Neutral and Creep spawning, as well as rune spawns etc.
Config: Allows the user to input settings specific to this entity, such as changing the maximum number of creep stacks.
Folage: (image)
Foliage allows us to place grass, flowers, shrubs and other plants on our map. This works in a similar way to texturing, although foliage creates physical models instead of flat textures.
(toolbar image)
Apply Foliage: Places the selected foliage onto the map. Left click paints, right click removes.
Affect Current Texture of Foliage: Changes the selected foliage into the current texture, useful for replacing plants without having to delete everything.
Affect Current Density of Foliage: Changes the density of the selected foliage to the currently set value.
Affect Current Size of Foliage: Changes the height of the foliage to the currently set value.
Affect Current Scale of Foliage: Changes the scale of the foliage to the currently set value.
Smooth: Smooths the foliage, removing hard edges.
Foliage Settings (image)
Texture: The plant to be placed.
Primary Density: Changes the density (amount) of foliage in the center of the brush.
Secondary Density: Changes the density (amount) of foliage around the edges of the brush.
Height: Changes the height of the plants.
Width: Changes the width of the plants.
Random Height: Applies a random seed to the foliage affecting height.
Random Width: Applies a random seed to the foliage affecting width.
Primary Scale: The overall scale of the foliage in the center of the brush.
Secondary Scale: The overall scale of the foliage around the edges of the brush.
Sound: (image)
Allows the user to place custom ambient sounds in their map. Has no drop down menu, so the file path must be entered manually.
Ambient Sound Path: Manually entered path of the audio file.
Ambient Sound Volume: The gain of the audio file.
Last edited by Nytemair; 02-09-2012 at 07:35 AM.
Premium Tips and Tricks Guide: http://forums.heroesofnewerth.com/sh...php?p=14769758
I am an angry nerd who makes angry music in my bedroom. I also like doing flips.
3.0 - Your First Hero
____________________________________________
3.1 - Overview
Before we begin -
This section assumes that you have already made a map, and are now interested in adding custom content such as heroes and items. Before adding custom content to a map, I highly recommend you extract your map.s2z file (Heroes Of Newerth/game/maps/tutorial_map.s2z) to a new folder of the same name on your desktop. This makes it much faster and easier to edit, and you won't do any damage to your map or game installation by messing around with things.
Next, you must add a new folder called "resources" (capitalization is very important!), and place it inside your loose map folder. This is where all our custom content goes!
Finally, to create a hero, you must set up a structure of folders inside your resources, formatting is extremely important, so make sure everything is where it's supposed to be.
- tutorial_map (folder)
- resources (folder)
- heroes (folder)
- custom_hero (folder)
- hero.entity
- ability_01 (folder)
- ability_02 (folder)
- ability_03 (folder)
- ability_04 (folder)
As you can see, we place our custom_hero in the heroes section of our resource folder. Inside our hero folder, we have a hero.entity file, which governs the basic attributes of the hero such as his name, stats, what abilities he gets and so forth. In addition, we have four sub-folders, each of which contain the necessary scripts for his 4 (or more!) abilities.
"Cool, a bunch of folders. Now can I make my hero shoot lazers?"
Not quite. First we have to understand exactly what makes up a hero. There are several types of files you will come across, some are more important than others, but they all serve one or more purposes.
.entity
Entity files are renamed .txt documents and can be opened with any text editor such as Notepad++. Entity files are the building blocks of custom content. If we wanted to add a hero, we must make an entity for it.
.model and .mdf
These files are the models that show up in-game for your .entity files. Entities are essentially the brains, these are the bodies that they control.
.effect
Effects are the pretty fires and lightning your hero shoots in your mind, we'll get into this more later.
.clip
Selected animations that your model will use when performing various actions such as attacking or moving.
.material
The texture that wraps your model, essentially its skin.
____________________________________________
3.2 - Adding A Hero
Create a folder system in your resources called tutorial as below.
- resources (folder)
- heroes (folder)
- tutorial (folder)
- projectile (folder)
- projectile.entity
- hero.entity
- ability_01 (folder)
- ability_02 (folder)
- ability_03 (folder)
- ability_04 (folder)
For our hero, we'll be designing a Ranged Intelligence Nuker. Why? Because they often have basic spells that aren't difficult to script. Having a ranged hero will also let me explain projectiles earlier on.
____________________________________________
3.3 - Changing Basic Values
Right now, our hero is non-existant, we've only set up the foundation for where we're going to put our data. To actually create something, we're going to copy files from another hero as a starting point.3.4 - Getting Your Hero In Game
Open up your hero.entity file (it should be completely blank) and paste this:
Okay, that was a lot of text. So what exactly did we do? The above is a modified version of Bombadier's hero.entity, which will serve as an excellent starting point because it has everything we need to get started.
Key sections:
Feel free to play around with these values, try giving your hero 10000 health or making him Agility. If you need to reset him, copy and paste the data from above again.
So now we've defined our hero's basic attributes, and we've told the file which projectile.entity to use as his attack. Now we must create a projectile so that the hero can actually use it. Open up your projectile.entity now and copy the following:
This file is a lot smaller than our hero, simply because it only needs to include basic values like how fast it flies. Once again, "null.mdf" means our Teapot hero will be shooting Teapots. Swell!
____________________________________________
Once you're done playing around with variables, it's time to see what we've created.
- Select everything in your map folder (not the folder itself, just the contents), right click and select "Add To Archive". This will open up Winrar.
- Tick ZIP under format, .s2z files are modified ZIP files, selecting RAR won't work.
- Type in the name of your map followed by .s2z (tutorial_map.s2z)
- Click OK.
While it's packing, find your map file that you extracted at the beggining of this section (Heroes of Newerth/Game/Maps/tutorial_map.s2z) and delete it. Once it finishes packing, copy and paste the new one from your desktop to your Maps Folder.
To Play:
Open HoN, create a custom game on a Practice Server. Select your map from the drop-down menu, it's generally a good practice to load your map twice (join lobby, disconnect then re-host), this ensures everything unpacks properly and you won't have any problems.
Voila! If you did everything right, your hero should now be in the Intelligence section (it will have a white-square). Select him and push ready!
Last edited by Nytemair; 02-09-2012 at 07:01 AM.
Premium Tips and Tricks Guide: http://forums.heroesofnewerth.com/sh...php?p=14769758
I am an angry nerd who makes angry music in my bedroom. I also like doing flips.
4.0 - Item and Spell Creation
____________________________________________
4.1 - Getting Started
In this section of the guide, we will go through how to make custom spells and items, as well as learn how to add models, icons and effects to what we've made so far.4.2 - States, Affectors, Gadgets and Projectiles
In the previous tutorial, you set up a folder system for your tutotial hero. Go ahead and open this up.
Open the folder ability_02 (it should be empty), and create the following files:
- ability.entity
- state.entity
- affector.entity
These will form as the basis for your first custom ability, which will be an Area of Effect nuke that deals damage and slows units in the area, at the end of the slow, the units hit will be stunned. Before we create anything though, we must first learn what makes an ability work.
Abilities are made up of seperate .entity files which come together to carry out the ability, these include states, affectors, gadgets and projectiles.
States are entities that apply a positive or negative effect for a set duration. Slows, poisons, heal-over-time and stuns are all examples of States.
Affectors are used for advanced requirements of your ability, if you want something to have a delay before it happens or target multiple units, then you will need an affector.
Gadgets are (often) invisible units that are used for things like giving sight of an area, or creating spell effects that follow a target. An example of this is Nomad's Sand Storm.
Projectiles are missiles that apply the spell's effect when they hit a target, an example of this would be Andromeda's Comet.
Now for our ability, we need to create a workflow. This is basically the order in which things play out, we want the following workflow:
Cast Ability -> Do AOE Damage -> Apply Slow to everyone hit -> Apply stun when slow ends.
For the first step, we need to set parameters for our ability.entity, we then need to tell the ability to use an affector when it's clicked. The affector will do the damage to all enemy units in the area, but is also in charge of who the slow is applied to.
Copy this text into your ability.entity.
Let's deconstruct this a bit:Code:<?xml version="1.0" encoding="UTF-8"?> <ability name="Ability_Tutorial1" icon="icon.tga" anim="ability_2" casttime="1400" castactiontime="450" maxlevel="4" requiredlevel="1,3,5,7" actiontype="target_position" targetradius="200" targetmaterial="/shared/materials/area_cast_legion_indicator.material" casteffecttype="Magic" targetscheme="enemy_units" manacost="90,100,110,125" cooldowntime="10000" range="600" > <onimpact> <spawnaffector name="Affector_Tutorial_Ability1" target="target_position" /> </onimpact> </ability>
Entity files are split into 2 primary sections, the parameters and the actions.
Paramaters define basic attributes that are always in effect, such as the spell's mana cost or it's target type. Actions are what happens when the ability is activated, these two sections are seperated by a ">".
As you can see, our ">" is followed by an <onimpact/> tag. Anything in this tag will be called as soon as the spell is clicked and a target is given. Because our actiontype is target_position, as soon as we click the spell and then click the ground, anything in the <onimpact/> tag will be called - this is where we put our affector to deal damage and slow units hit.
Note that anything with commas seperating the data values "90,100,110,125" are level-dependant. 90 would be the first level of the ability, 125 would be the fourth.
Open up your affector.entity and copy this text:
Once again, this entity has two main sections. In our parameters we've set the radius to match that of our targetradius in our ability.entity. This means that our spell will hit exactly what the template covers, so there's no misleading targeting reticles or the like.Code:<?xml version="1.0" encoding="UTF-8"?> <affector name="Affector_Tutorial_Ability1" radius="200" targetselection="all" targetscheme="enemy_units" effecttype="Magic" > <onimpact> <damage effecttype="Magic" amount="75,150,225,300" /> <applystate name="State_Tutorial_Ability1" duration="3000" /> </onimpact> </affector>
In the actions, we've once again called <onimpact/>, this means that as soon as the affector lands, all the actions inside the tags will be called.
<damage/> is called when we want to damage a target(s), it follows all the normal rules such as Magic Armour and Damage Reflect, so there's no need to code anything extra.
effecttype="" This determines what type of damage we use, Magic and Physical are the primary ones, and putting "" (nothing) will result in True Damage.
amount="" This is the pre-mitigation amount of damage we want the spell to do.
<applystate/> is what we use to slow targets, because it is through an affector, all the enemy units hit will be slowed, instead of just one.
name="" this is where we tell the affector which state to apply, in our case, it will be our custom slow (which we're about to make).
duration="" how long we want the spell to last, measured in milliseconds. (1000 = 1 second)
Now, open your state.entity and copy this text:
Upon deconstructing, you'll notice that this is also seperated into two primary sections. In the parameters, we've set how much this effect slows, what type it is and if it's transferable through spells like Parasite's Ultimate. Slows in Heroes of Newerth are a fraction, and slow exponentially regardless of movement speed. If your hero has 10000 movement speed, even if the cap is 522, it will slow based off the 10000.Code:<?xml version="1.0" encoding="UTF-8"?> <state name="State_Tutorial_Ability1" icon="icon.tga" passiveeffect="" movespeedslow="0.1,0.2,0.3,0.4" effecttype="StatusDebuff" allowtransfer="true" > <onexpired> <apply state name="State_Stunned" duration="1000" /> </onexpired> </state>
In the actions, we've added a new tag called <onexpired/>. This tag calls anything inside it once the state is removed or expires. This does not include dispelling. For our spell, we've set it up so that when it expires, anyone affected by it will be stunned for 1 second. Because State_Stunned is an entity shared between every unit, we don't need to make a seperate state for it.
Finally, we need to add the spell to our hero, open up your hero.entity and find the inventory0="" line. Insert the name of your ability (Ability_Tutorial1), save and pack your map ready for practice mode.
And there we go, that's our first spell constructed. It won't have any effects, but if you fire up a practice game and cast it on some enemies it should work fine. If it doesn't, make sure there aren't any syntax errors in your script, as even wrong capitalization or a missing ">" will mean it won't work.
If you have any other problems, re-copy the script or post a comment below.
4.3 - Modifiers
Modifiers are the technical term for "Heroes of Newerth Light Switch". When activated, they change something about an entity. This can be a small change such as how much mana it costs, or a very large one. A few examples of Modifiers include:
- Blacksmith's Ultimate
- Wildsoul's Ultimate
- Maliken's Sword of the Damned and Ultimate
- Alternate Avatars
All of these are done through the use of modifiers, the simplest way of explaining a modifier would be like this:
If modifier is activated -> Change something.
Alternate avatars use server-side information to turn on a modifier. If you have bought an alt, you gain the ability to select it. This activates the modifier and changes the model/sounds/texture/spell effects of the hero.
Let's do an example of a basic modifier:
The <onframe/> applies it's actions once per frame, since HoN runs at 20 frames per second, these actions will happen 20 times per second.Code:<onframe> <evaluate a="source_agility" b="20" op="gt" /> <setactivemodifier name="thisguyisawesome" /> <else/> </evaluate> </onframe>
<evaluate/> calculates certain parameters that are input by the user, our example checks to see if the hero's agility is higher than 20, and if it is, it calls the actions within.
<setactivemodifier/> is what we use to activate a modifier through the actions, the parameter equivelent is modifierkey="".
So in simple terms, this snippet of script will check every frame to see if the hero's agility is higher than 20, and activates a modifier if it passes true. This modifier could be anything such as making our hero turn green. The edited settings are layed out like this:
We input this into the actions of our .entity file, and this works for any entities. You can copy the entire ability.entity and place it in the <modifier/> tags if you wish to edit everything the ability did.Code:<modifier key="thisguyisawesome" modpriority="100" model="/heroes/zephyr/alt_2/model.mdf" > </modifier>
Pretty cool, isn't it? :)
Work in progress.
Last edited by Nytemair; 02-09-2012 at 07:14 AM.
Premium Tips and Tricks Guide: http://forums.heroesofnewerth.com/sh...php?p=14769758
I am an angry nerd who makes angry music in my bedroom. I also like doing flips.
Reserved. (Advanced Mechanics)
Premium Tips and Tricks Guide: http://forums.heroesofnewerth.com/sh...php?p=14769758
I am an angry nerd who makes angry music in my bedroom. I also like doing flips.
Reserved. (Resources)
Premium Tips and Tricks Guide: http://forums.heroesofnewerth.com/sh...php?p=14769758
I am an angry nerd who makes angry music in my bedroom. I also like doing flips.
Reserved. (Conclusion and Final Notes)
Premium Tips and Tricks Guide: http://forums.heroesofnewerth.com/sh...php?p=14769758
I am an angry nerd who makes angry music in my bedroom. I also like doing flips.
Really needs pictures of how your folder should look like. You said I had to open my hero.entity, but ive created 2: one in my projectile folder and one in my costum_hero folder.
Random question - does the map editor show a lot of white boxes at the moment? It does that for me![]()
S2 Games: Dedicated employees serving dedicated gamers. Continuous development. Never-ending improvement.
-----------------------------
Tech Support and Customer Support: https://www.heroesofnewerth.com/support/
Look for my highlighted text (important information) and grey text (interesting but not required information).
Looks like someone at S2 deleted the whole content of the textures.s2z file for the editor, thus removing all of the editor's UI icons.
It's been like this for a while but I guess S2 will fix it at some point.
If you really want to fix it, I got an older version of the textures.s2z file you can get here:
http://www.mediafire.com/?c2a1oc14my7sgdf
It's missing the water tool icons but its still better than nothing.
On topic: Good work with your guide Nytemair, really impressive.
Maps:
Enfo's Team Survival Beta [Dream] - v1.019 (18/07/2011)
BeHoNeled Alpha (Bejeweled clone) [Dream]
Last edited by Magesunite; 06-13-2012 at 06:20 AM. Reason: More to add
Haven't logged into this game for a very, very, very long time (I've been browsing the forums once every few months for notes about the map editor), I'll finish this guide when it comes out of Beta (if ever), so sorry for people who are currently delving into the custom-creation process, you'll have to wait until my hope for this game sparks again. (When the map editor is released properly).
Mods, feel free to add to this if you want.
Cheers =]
Premium Tips and Tricks Guide: http://forums.heroesofnewerth.com/sh...php?p=14769758
I am an angry nerd who makes angry music in my bedroom. I also like doing flips.
Premium Tips and Tricks Guide: http://forums.heroesofnewerth.com/sh...php?p=14769758
I am an angry nerd who makes angry music in my bedroom. I also like doing flips.
I've been able to work out how to build lanes and creep waves by looking at pre-existing maps now ^^
Still waiting on that map editor, are there any devs or mods out there that can give some details if it's actually even being worked on?
It's been several years and all we've been given is a buggy beta with no work done on it since![]()
Premium Tips and Tricks Guide: http://forums.heroesofnewerth.com/sh...php?p=14769758
I am an angry nerd who makes angry music in my bedroom. I also like doing flips.