Click here to go to the first staff post in this thread. Thread: Nytemair's ULTIMATE AND EXTREME Map Editor Guide

Page 1 of 2 12 LastLast
Results 1 to 20 of 21
  1. #1
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Nov 2009
    Location
    Queensland, Australia
    Posts
    1,171

    Nytemair's ULTIMATE AND EXTREME Map Editor Guide

    Nytemair's Map Editor Guide!






    Use Ctrl + F to find a section.

    Contents:

    1. Introduction
      • Getting Started
      • Important Information


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


    3. Your First hero
      • Creating Custom Content Overview
      • Adding A Hero
      • Changing Basic Values
      • Getting Your Hero In Game


    4. Item and Spell Creation
      • Getting Started
      • States, Affectors, Gadgets and Projectiles
      • Modifiers
      • Effects and Icons
      • Getting Your Item Into a Shop


    5. Advanced Mechanics
      • Changing Global Values
      • Adding Triggers
      • User Interface
      • Sounds and Music


    6. Resources

    7. Conclusion
    Last edited by Nytemair; 02-09-2012 at 04:02 AM.
    Premium Tips and Tricks Guide: http://forums.heroesofnewerth.com/sh...php?p=14769758

    I miss when HoN was...y'know, good.

  2. #2
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Nov 2009
    Location
    Queensland, Australia
    Posts
    1,171
    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:

    Heroes of Newerth Editor:

    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.
    Extra Programs:

    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.
    1.2 - Important Information

    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 04:01 AM.
    Premium Tips and Tricks Guide: http://forums.heroesofnewerth.com/sh...php?p=14769758

    I miss when HoN was...y'know, good.

  3. #3
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Nov 2009
    Location
    Queensland, Australia
    Posts
    1,171
    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.

    Grid: Activates the grid, allowing you to place things with more precision and symmetry.



    Environment: Allows you to change lighting and environment settings.

    Available to us are a series of powerful editing tools, located on the left of the screen.



    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.
    Brushes:



    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.



    Raise/Lower:
    Fairly simple, manipulates the ground with a soft-selection based brush, when left clicked the ground is pulled up (raised), when right clicked it is pulled down (lowered).







    Flatten:
    Flattens the ground directly under the brush, creating a perfectly horizontal surface. Changing brush strength will affect how quickly it is flattened.







    Cut:
    Cuts a section out of a pre-raised area, reducing it back to the default level.







    Smooth:
    Smooths the area under the brush, removing sharp and hard edges.







    Erase:
    Removes any edited sections under the brush, resetting them back to default.



    Noise:
    Randomly generates varying height maps under the brush, useful for making areas look jagged.






    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 08:35 AM.
    Premium Tips and Tricks Guide: http://forums.heroesofnewerth.com/sh...php?p=14769758

    I miss when HoN was...y'know, good.

  4. #4
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Nov 2009
    Location
    Queensland, Australia
    Posts
    1,171
    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.

    Open up your hero.entity file (it should be completely blank) and paste this:

    PHP Code:
        <?xml version="1.0" encoding="UTF-8"?>
        <hero
            name="Hero_Tutorial"

            team="Legion"
            icon="icon.tga"
            portrait="icon.tga"
            model="null.mdf"
            skin=""

            passiveeffect=""
            spawneffect=""
            respawneffect=""
            selectedsound=""
            selectedflavorsound=""
            confirmmovesound=""
            confirmattacksound=""
            nomanasound=""
            cooldownsound=""
            announcersound=""
            tauntedsound=""
            tauntkillsound=""

            preglobalscale="1.0"
            modelscale="1.5"
            effectscale="1"
            boundsheight="112"
            boundsradius="24"
            selectionradius="48"
            targetoffset="0 0 64"

            category="magic"
            difficulty="1.0"
            movespeed="300"
            turnrate="900"
            turnsmoothing="0.05"
            infoheight="180"

            maxhealth="150"
            healthregen="0.25"
            maxmana="0"
            manaregen="0.01"

            armor="0"
            magicarmor="5.5"

            inventory0="Ability_Tutorial1"
            inventory1="Ability_Tutorial2"
            inventory2="Ability_Tutorial3"
            inventory3="Ability_Tutorial4"
            inventory4="Ability_AttributeBoost"
            inventory5=""
            inventory6=""
            inventory8="Ability_Taunt"

            attackduration="1200"
            attackactiontime="300"
            attackcooldown="1700"
            attackdamagemin="20"
            attackdamagemax="25"
            attacknumanims="2"
            attackoffset="0 50 65"
            attackprojectile="Projectile_Tutorial_Attack"
            attackrange="600"
            attackstarteffect=""
            attackactioneffect=""
            attackimpacteffect=""
            attacktype="ranged"
            combattype="Hero"

            aggrorange="800"
            sightrangeday="1800"
            sightrangenight="1200"
            wanderrange="250"

            corpsetime="3300"
            corpsefadetime="3000"
            corpsefadeeffect="/shared/effects/corpse_sink.effect"

            primaryattribute="Intelligence"
            strength="18"
            strengthperlevel="1.9"
            agility="16"
            agilityperlevel="1.4"
            intelligence="22"
            intelligenceperlevel="2.7"
            
            previewmodel="preview.mdf"
            previewpos="0 0 -50"
            previewangles="0 0 0"
            previewscale="1"
            
            storemodel="preview.mdf"
            storepos="0 0 -20"
            storeangles="0 0 0"
            storescale="0.9"
        >
        </hero>


    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:

    PHP Code:
    name="Hero_Tutorial"         // This is our Hero's name, and is used for reference by other files. Such as tooltips.

        
    team="Legion"         // Our hero's team, you can change this to Hellbourne if you wish.
        
    icon="icon.tga"         // The icon of our hero that shows up when you select him, currently nothing is selected so it will be a white square.
        
    portrait="icon.tga"         // The character portrait that shows up in-game, nothing is currently set either.
        
    model="null.mdf"         // The model file that represents your hero in-game, "null.mdf" is a teapot, and is used by developers before the art team creates a final model. 


    PHP Code:
    movespeed="300"         // Hero's movement speed without any items or bonuses. 300 is about average.
        
    turnrate="900"         // How fast our hero turns, usually not touched.

        
    maxhealth="150"         // Starting health before strength is added, default is 150.
        
    healthregen="0.25"         // Regen before bonuses.
        
    maxmana="0"         // Starting mana before intelligence is added, default is 0.
        
    manaregen="0.01"         // Regen before bonuses.

        
    armor="0"         // Starting Armor before bonuses, 0 is a good starting point.
        
    magicarmor="5.5"         // Default magic armor, the same for all heroes. 


    PHP Code:
    inventory0="Ability_Tutorial1"         // Spell Q
        
    inventory1="Ability_Tutorial2"         // Spell W
        
    inventory2="Ability_Tutorial3"         // Spell E
        
    inventory3="Ability_Tutorial4"         // Spell R
        
    inventory4="Ability_AttributeBoost"         // Stat Boost
        
    inventory8="Ability_Taunt"         // Taunt 


    PHP Code:
    attackduration="1200"         // Cosmetic attack time, can be cancelled without consequences.
        
    attackactiontime="300"         // Mandatory attack time, cancelling during this period stops the attack.
        
    attackcooldown="1700"         // Time between attacks without bonuses.
        
    attackdamagemin="20"         // Min damage.
        
    attackdamagemax="25"         // Max damage.
        
    attackprojectile="Projectile_Tutorial_Attack"         // Defines which projectile to use as the hero's attack, ours will be a teapot.
        
    attackrange="600"         // Attack range.
        
    attacktype="ranged"         // Defines if our hero is melee or ranged. (Used for calculating denied XP and whatnot).
        
    combattype="Hero"        // Different combat types do different damages depending on what they're attacking. For example, Siege deals more damage against buildings. 


    PHP Code:
    primaryattribute="Intelligence"         // Our hero's primary attribute, currently set to Intelligence.
        
    strength="18"         // Starting strength.
        
    strengthperlevel="1.9"            // Strength gained per level.
        
    agility="16"         // Starting agility.
        
    agilityperlevel="1.4"            // Agility gained per level.
        
    intelligence="22"         // Starting intelligence.
        
    intelligenceperlevel="2.7"            // Intelligence gained per level. 



    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:

    PHP Code:
    <?xml version="1.0" encoding="UTF-8"?>
        <projectile
            name="Projectile_Tutorial_Attack"

            speed="1000"
            gravity="2000"

            modelscale="1.0"
            model="null.mdf"

            traileffect=""
            impacteffect=""
        >
        </projectile>


    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!


    PHP Code:
    name="Projectile_Tutorial_Attack" // Make sure this is the same as your [b]hero.entity[/b]

            
    speed="1000"         // Range/second at which your attack flies.
            
    gravity="2000"         // How much it curves in the air.

            
    modelscale="1.0"         // The scale of the projectile.
            
    model="null.mdf"         // Tea!

            
    traileffect=""         // Can define a special effect that follows the projectile, an example would be smoke following a fire ball.
            
    impacteffect=""         // Can define a special effect that plays when the projectile hits, such as an explosion or burst of poison. 


    ____________________________________________
    3.4 - Getting Your Hero In Game

    Once you're done playing around with variables, it's time to see what we've created.

    1. 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.
    2. Tick ZIP under format, .s2z files are modified ZIP files, selecting RAR won't work.
    3. Type in the name of your map followed by .s2z (tutorial_map.s2z)
    4. 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 08:01 AM.
    Premium Tips and Tricks Guide: http://forums.heroesofnewerth.com/sh...php?p=14769758

    I miss when HoN was...y'know, good.

  5. #5
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Nov 2009
    Location
    Queensland, Australia
    Posts
    1,171
    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.

    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.
    4.2 - States, Affectors, Gadgets and Projectiles

    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.

    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>
    Let's deconstruct this a bit:

    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:

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

    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:

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

    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:

    Code:
    <onframe>
    	<evaluate a="source_agility" b="20" op="gt" />
    		<setactivemodifier name="thisguyisawesome" />
    		<else/>
    	</evaluate>
    </onframe>
    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.
    <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:

    Code:
    <modifier key="thisguyisawesome" modpriority="100"
    	
    		model="/heroes/zephyr/alt_2/model.mdf"
    		
    	>
    </modifier>
    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.

    Pretty cool, isn't it? :)

    Work in progress.
    Last edited by Nytemair; 02-09-2012 at 08:14 AM.
    Premium Tips and Tricks Guide: http://forums.heroesofnewerth.com/sh...php?p=14769758

    I miss when HoN was...y'know, good.

  6. #6
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Nov 2009
    Location
    Queensland, Australia
    Posts
    1,171
    Reserved. (Advanced Mechanics)
    Premium Tips and Tricks Guide: http://forums.heroesofnewerth.com/sh...php?p=14769758

    I miss when HoN was...y'know, good.

  7. #7
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Nov 2009
    Location
    Queensland, Australia
    Posts
    1,171
    Reserved. (Resources)
    Premium Tips and Tricks Guide: http://forums.heroesofnewerth.com/sh...php?p=14769758

    I miss when HoN was...y'know, good.

  8. #8
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Nov 2009
    Location
    Queensland, Australia
    Posts
    1,171
    Reserved. (Conclusion and Final Notes)
    Premium Tips and Tricks Guide: http://forums.heroesofnewerth.com/sh...php?p=14769758

    I miss when HoN was...y'know, good.

  9. #9
    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.

  10.   This is the last staff post in this thread.   #10
    Offline
    S2 Staff Member S2 Games Staff
    Join Date
    Jul 2009
    Posts
    38,054
    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.
    -----------------------------



    Also available by emailing support@heroesofnewerth.com!

  11. #11
    Quote Originally Posted by ElementUser View Post
    Random question - does the map editor show a lot of white boxes at the moment? It does that for me
    yeah, i have the same thing going on. i tried everything to fix it, so far nothing.

  12. #12
    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.

  13. #13
    When will this be completed? I look forward to seeing the main section do to with Creeps, Towers, Kongor and the like.

    Quote Originally Posted by Oloko View Post
    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.
    Quote Originally Posted by Oloko View Post
    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.


    Appreciate it I've been having problems with the missing textures.
    Last edited by Magesunite; 06-13-2012 at 07:20 AM. Reason: More to add

  14. #14
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Nov 2009
    Location
    Queensland, Australia
    Posts
    1,171
    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 miss when HoN was...y'know, good.

  15. #15
    Could someone add how to make a neutral creep drop a item?

  16. #16
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Nov 2009
    Location
    Queensland, Australia
    Posts
    1,171
    Quote Originally Posted by `CQB View Post
    Could someone add how to make a neutral creep drop a item?
    Look at Kongor's .entity file, it's an <onkilled> or <ondeath> action.
    Premium Tips and Tricks Guide: http://forums.heroesofnewerth.com/sh...php?p=14769758

    I miss when HoN was...y'know, good.

  17. #17
    Quote Originally Posted by Nytemair View Post
    Look at Kongor's .entity file, it's an <onkilled> or <ondeath> action.
    Wow...Thank's, at first i could not find the entity file. then looked in the resource0.s2z and found everything i needed thanks.

  18. #18
    I've been able to work out how to build lanes and creep waves by looking at pre-existing maps now ^^

  19. #19
    Offline
    Account Icon
    Chat Symbol
    Join Date
    Nov 2009
    Location
    Queensland, Australia
    Posts
    1,171
    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 miss when HoN was...y'know, good.

  20. #20
    I wanna make a FFA map every player spawns on 1 position can u tell me how I do that please ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •