PDA

View Full Version : [READ] Map Editor Guide, FAQ, Links



Bangerz
02-08-2011, 08:11 AM
How do I create a map?

To create a blank map from a template:

Start editor.bat in your HoN directory folder.
Instead of creating a new map, open test_simple or any other map. (Consider using this size 7 blank map courtesy of S3RK here (http://www.mediafire.com/?3h44r5bcv4yhqfd))
Use the map options to change the name and size of the map
Save the map as a new name.

How to play dev maps on your HoN client:

Press Ctrl+F8 (to open console)
SetSave cg_dev 1


How to mark your map as non-dev:

Travel to your Maps directory (/Heroes of Newerth/game/maps)
Open your map with WinRar(or similar) and extract the worldconfig file
Open your worldconfig file with NotePad++(or similar)
On the second line of the file, travel to the far right which you should then see dev="true", change this value to dev="false"
Save the new file and drag the new file back into WinRar and overwrite the old file
Open up HoN, Select Practise Mode, Select your Map, Play


How do I use the terrain editor?



A YouTube guide to terrain editing by Hot_To_Go can be found here (http://forums.heroesofnewerth.com/showthread.php?t=212087)



How do I create a hero?



Idejder's How to make a Hero (http://forums.heroesofnewerth.com/showthread.php?t=23946) guide is an excellent starting point



Where can I suggest map editor improvements or report bugs?



Please post any suggestions for the map editor in this thread (http://forums.heroesofnewerth.com/showthread.php?t=221992)


Is there scripting documentation?

There is now!
See below for a list of commands and tags or the detailed guide (WIP).


Events
Actions A
Actions B
Actions C
Tutorial Actions
Tool (Ability/Item) Properties
Tool actiontype List
Ability Specific Properties
Entity Action Targets
Commands / Orders
Orbital Projectiles
Spell and Particle Effects
Detailed Guide


Is there a debugging tool?

Not exactly, however the following commands are useful:

Map Tags:

<printdebuginfo/>


This prints all current entity information to the console at the time it is called, useful for using inside events in abilities, states, heroes etc


<printvalue label="^y Visible Variable Label" value="variableName" />


This prints the label and value of the variable named in the value attribute to the console.


Console Commands:

ui_debugscript 1


Shows a trace of current UI stack in the console.



How do I...?

Here are a collection of common scripting questions. More will be added over time.

... award gold / xp?


Use <givegold source="source_entity" target="target_entity" amount="" b="" op="" /> or

Create a gadget


<gadget name="Gadget_Gold_XP_Giver"
iscontrollable="false" invulnerable="true"
globalexperience="true" deadexperience="true"
goldbountymin="100" goldbountymax="100"
>
</gadget>
And have the target hero kill it


<spawnunit name="Gadget_Gold_XP_Giver" source="target_entity" target="target_position" pushentity="true" team="255" />
<kill source="this_entity" target="stack_entity" experiencebountymul="0.00" goldbountymult="0.10" nocorpse="true" nodeathanim="true" />


... have my map send chat messages, give text alerts, and spawn timer bars?

These things require a UI mod to be contained within your Map combined with the use of the clientuitrigger tag. You can create your own or use a template.




Download this mod and place it in your map (link)
Add this line to game.resources: <interface file="/ui/bang_custommap_interface.interface"/>
Add this line to fe2.interfaceset: <interface name="bang_custommap_interface" file="/ui/bang_custommap_interface.interface" precache="true" />
Add this line to <onaddplayer>: <setoverlayinterface entity="target_entity" name="bang_custommap_interface" />



Chat Message: <clientuitrigger name="Map_Message" param="Hello World" />
Debug Chat Message: <clientuitrigger name="Map_Message_Debug" param="Hello Debugger" /> (visible only when map_debug set true in console)
Spawn a timer: <clientuitrigger name="Map_TimerStart" param="25000" />
Alert Message: <clientuitrigger name="Map_Alert_Message" param="Alert! Stuff happening!" />



... alter hero selection screen using the map (no select screen)?

In game_info.entity


<game
name="Game_Rules"
noheroselect="true"
Spawn hero using


<onaddplayer>
<spawnunit name="Hero_HeroName" source="target_entity" target="pos0" pushentity="true" team="1" proxy="target_entity" />
<setowner entity="stack_entity" player="target_entity" />
<sethero entity="target_entity" hero="stack_entity" />
</onaddplayer>


... alter hero selection using the map (no default heroes)?

See No Default Heroes (http://forums.heroesofnewerth.com/showthread.php?t=218282)

... create map borders?



See Create Map Borders (http://forums.heroesofnewerth.com/showthread.php?t=221800)


...create neutral ceep camps?


See Neutral Creep Camps 1 (http://forums.heroesofnewerth.com/showthread.php?t=222144)
Or Neutral Creep Camps 2 (http://forums.heroesofnewerth.com/showthread.php?t=203664)

... manage creep pathing?


See Lane Nodes/Creep Pathing

(http://forums.heroesofnewerth.com/showpost.php?p=12768245&postcount=50)

... manage boss spawning?


See Kongor Bug Fix/Explanation (http://forums.heroesofnewerth.com/showthread.php?t=200579)


... give a variable damage buff?



<!-- set percent damage bonus based on charges -->
<setvar0 a="charges" b="100" op="div" />
<setvar0 a="1" b="var0" op="add" />
<damage effecttype="SuperiorMagic" amount="10,11,12,13,14,15" b="var0" op="mult" />


... make unit spawner with dynamic pathing?


See Making multiple creep spawning and pathing (http://forums.heroesofnewerth.com/showthread.php?t=275498)


Coming Soon ™
... have more than 4 abilities on a unit?
... have more than 20 modifiers/abilities?
... have more than 20 items in the shop?
... control unit respawning?
... create a scoring system?
... control shop access?
... create a round/zoning system with teleportation?

(http://forums.heroesofnewerth.com/showthread.php?t=200579)

Bangerz
02-08-2011, 08:11 AM
Events

Used to declare where you want actions to happen. Usually the most "outside" tags.


<onframe /> // Processed once each frame
<onframeimpact /> // Processed once each frame per target (affectors only)
<oninterval /> // Processed once each interval (affectors)
<onbegin /> // The owner has activated this entity (orders only)
<onstart /> // This entity has begun to activate
<onprecost /> // A chance for the tool to modifier its activation cost
<onaction /> // This entity has reached its action time (called once per activatation)
<onpreimpact /> // This entity has reached its action time (before impact, called once per valid target)
<onpredamage /> // This tool's specific damage event only. Runs before damage is even calculated, to modify damage done but after evasion
<ondamageevent /> // This tool's specific damage event and damage done. Used mainly in attack abilities to modifier the damage of an attack. Runs right before the damage is done, so you can still modify it
<ondoubleactivate /> // Tool has been double-activated (needs to be tagged as double activate)
<onimpact /> // This entity has reached its action time (called once per valid target)
<onimpactinvalid /> // This entity has reached its action but the impact was invalid
<oncomplete /> // Tool successfully activates (orders only)
<oncancel /> // Tool failed to activate (orders only)
<onactivatestart /> // The owner activated an ability or item (start of activation, earliest point)
<onactivateprecost /> // The owner activated an ability or item (before the cost of that ability is taken)
<onactivatepreimpact /> // The owner activated an ability or item and it has reached its action time (before impact)
<onactivateimpact /> // The owner activated an ability or item and it has reached its action time
<onactivateend /> // Processed after an activated tool reaches the end of its cast time
<onabilitystart /> // The owner has activated an ability other than this entity
<onabilityimpact /> // An ability other than this entity has reached its action time
<onabilityfinish /> // An ability other than this entity has finished sucessfully
<onabilityend /> // Processed after an activated ability other than this entity reaches the end of its cast time
<ontoggleon /> // This tool with action type "toggle" has been turned on
<ontoggleoff /> // This tool with action type "toggle" has been turned off
<onchannelstart /> // The owner has started the channel time of this entity
<onchannelframe /> // Processed each frame the owner is channeling this tool
<onchannelbreak /> // The owner has stopped channeling before the channel time completed
<onchannelend /> // The owner has completed the full channel time of this entity
<onattackstart /> // Processed when the owner begins an attack (earliest point, good for overriding animations /> adding impact actions)
<onattack /> // Processed when the owner reaches the attack action time
<onattackpreimpact /> // Processed when the owner successfully attacks another entity before damage and evasion
<onattackpredamage / // Processed when the owner successfully attacks another entity before damage
<onattackdamageevent /> // Called every time this entity deals damage. Includes <damage /> calls
<onattackimpact /> // Processed when the owner successfully attacks another entity and impacts (this is the same time as onattack for melee heroes with no projectile)
<onattackimpactinvalid /> // Processed when the owner successfully attacks another entity but the impact was invalid
<onattackend /> // Processed when the owner completes an attack, successful or not
<onattackedstart /> // An attack has been started on this entity (earliest point, includes spells)
<onattackedpreimpact /> // This entity has been attacked, but damage/effects/evasion have not yet been applied (includes spells)
<onattackedpredamage /> // This entity has been attacked, but damage/effects have not yet been applied (includes spells)
<onattackeddamageevent /> // Called every time this entity takes damage. This includes the <damage /> call
<onattackedpostimpact /> // This entity has been attacked and damage/effects have been applied (does not trigger on a miss/evade, includes spells)
<onattackingstart /> // This entity has started an attack (includes spells and damage calls, everything)
<onattackingpreimpact /> // Processed when the owner successfully attacks another entity before damage and evasion (includes spells and damage calls, everything)
<onattackingpredamage /> // Processed when the owner successfully attacks another entity before damage (includes spells and damage calls, everything)
<onattackingdamageevent /> // Called every time this entity deals damage. This is the first event of a <damage /> call (includes spells and damage calls, everything)
<onattackingpostimpact /> // Processed when the owner successfully attacks another entity after damage and evasion (includes spells and damage calls, everything)

<ondamage /> // This entity has dealt some amount of damage (after damage is dealt)
<ondamaged /> // This entity has taken some amount of damage (after damage is dealt)
<onstunned /> // This entity has been stunned (no longer used)
<onkilled /> // This entity has been killed
<onexpired /> // This entity has died due to its lifetime expiring
<ondeath /> // This entity has dieded :(
<onkill /> // This entity killed another entity
<onindirectkill /> // This entity indirectly killed another entity (through pets, for example)

<onspawn /> // Processed when spawn is called
<onrespawn /> // Processed when respawn is called
<onlevelup /> // Hero levelup

<oninflict /> // New state applied to an entity
<onrefresh /> // Resfreshed state on an entity
<oninflicted /> // Entity has had a new state applied to it
<onownerrespawn /> // This entity's owner has respawned
<onrelease /> // This entity has lost its binding (?)
<ontouch /> // This entity collided with another entity (touch needs to be declared, used in projectiles)
<ontouched /> // This entity has been touched by another entity
<onthink /> // Executed before neutral NPC "thinking" occurs
<ontargetacquired /> // Executed when a unit changes or acquires a target

<onlearn /> // This ability was just learned for the first time
<onupgrade /> // This tool was leveluped
<oncreate /> // Item was created
<onpurchase /> // Item was just purchased
<ontimer /> // Timer trigger (or finishes/expires)
<onpickup /> // Item was moved into a new inventory

<checkcost /> // Runs every frame, can call <invalidate /> to 'grey' out an ability until a condition is met / used to check for custom manacosts
<checktriggeredcost /> // Runs when the ability is triggered (if it is toggled, for example). Used to check for custom manacosts.
<activatecost /> // Runs when an ability is activated and the manacost is taken (if applicable), used to do custom manacosts or costs for using abilities
<getthreatlevel /> // Used for custom agro scripting, based on base.gamemechanics level of threat

<onlobbystart />
<onaddplayer />
<onentergame />

Bangerz
02-10-2011, 06:39 PM
Actions A

What you want to happen within a certain Event. These are the "inside" tags.


<absorbdamage // When in a damage event, absorbs the max amount of damage. When the max is exceeded, passes true
max="0"
/>

<accumulatedamage // All damage done to the entity is added to this entity's accumulator at the given scale
entity="this_entity"
scale="0"
/>

<activatemodifierkey // Activates the named modifier key on the given entity
entity="this_entity"
name="Name"
/>

<addattackpreimpactactions /> // Adds the sub actions to the current attack's preimpact

<addattackpredamageactions /> // Adds the sub actions to the current attack's predamage

<addattackdamageeventactions /> // Adds the sub actions to the current attack's damageevent

<addattackimpactactions /> // Adds the sub actions to the current attack's impact

<addattackimpactinvalidactions /> // Adds the sub actions to the current attack's impactinvalid

<addcharges // Adds count worth of charges to the entity for the given duration. Default duration is infinite.
entity="this_entity"
count="1"
timed="false" // Each charge's duration is independent of each other if true. Otherwise, adding a charge resets the duration of all charges.
duration="-1"
/>

<addcritical // Used in attack/damage event, gives a given chance to multiply damage by the multiplier
chance="1.0"
multiplier="1.0"
/>

<adjustagility // Usable only in an abilityattribute ability. Permenantly increases the entity's agility by the value.
entity="this_entity"
value="0"
/>

<adjustintelligence // Usable only in an abilityattribute ability. Permenantly increases the entity's intelligence by the value.
entity="this_entity"
value="0"
/>

<adjuststrength // Usable only in an abilityattribute ability. Permenantly increases the entity's strength by the value.
entity="this_entity"
value="0"
/>

<aggression // Gives sight of the source to the target as if they attacked them from fog
source="source_entity"
target="target_entity"
/>

<applystate // Applies a state with the given name to the target for the duration
name="Name"
duration="0"
charges="0" // Sets the initial charges of the state
chargesmult="0" // Multiplies the state's charges by this value
ischannel="false" // Used in channels to designate if this state should auto-expire when the channel ends
istoggle="false" // Used in toggles to designate if this state should auto-expire when the toggle ends
proxy="Proxy" // Sets the initial proxy of the state
pushentity="false" // Pushes this state onto the stack after it is created
stack="false" // Lets multiple copies of the same state from different source stack on the same target
continuous="false" // Makes this state have no duration, it will last until it is manually expired elsewhere
timeout="0" // How often the state checks if it should start it's expire or expire itself. Usually set to "frametime"
spawner="inflictor_entity"
inflictor="source_entity"
target="target_entity"
statelevel="0" // Sets the level of the state
/>

<areaofeffect // Does an instant AOE with the given parameters, hitting every unit in the radius that fits the targetscheme and selection. This should be used instead of affectors for instant 0 duration AOEs.
targetscheme="TargetScheme"
effecttype="EffectType"
ignoreinvulnerable="false"
target_position="center"
targetselection"all"
radius="0"
innerradiusoffset="0"
maxtotalimpacts="0"
maximpactspertarget="1"
firsttarget="FirstTarget" // Given entity is the first target every time
ignore="Ignore" // Given entity is ignored
global="false"
includetrees="false"
>
// Can do more actions here, every unit hit runs through these actions in order of being hit
</areaofeffect>

<attack // Does an instant attack from the source to the target if the targetscheme and effecttype of the target are valid (from the source)
source="source_entity"
target="target_entity"
targetscheme="TargetScheme"
effecttype="EffectType"
facetarget="false" // Instantly turns the source to face the target when the attack is done
/>

<attackaction // Does an instant attack from the source to the target if the targetscheme and effecttype of the target are valid (from the source). Skips the normal attack events before the action.
source="source_entity"
target="target_entity"
targetscheme="TargetScheme"
effecttype="EffectType"
/>

<aura // Causes an aura that has radius and applies the state and/or gadget listed as long as the effecttype and targetscheme are met. The duration is how long the state stays on them outside of the aura.
state="Name"
gadget="Name"
radius="0"
duration="0"
targetscheme="TargetScheme"
effecttype="EffectType"
ignoreinvulnerable="false"
condition="" // Sets a condition for the state to be applied to enemies
reflexivestate="" // A state that is applied to the owner of the aura when an enemy is under its effects
propagatecondition="" // Sets a condition for the aura to be active
stack="false" // Lets multiple aura of the same state stack
notooltip="false" // Removes the tooltip for the aura
/>

<bind // Binds the target to the entity
target="target_entity"
entity="this_entity"
vertical="false" // When true, the bound target retains it's z position instead of snapping to the projectile's
turn="false" // Turns the target to face in the direction the projectile is traveling
unbindondeath="false" // Unbinds the target when it dies
nopush="false" // When true, when the to a projectile will not break channeling
/>

<bonusdamageadd // Adds the listed damage (a, or a / b with the operator) to the next attack, uses source if the target is blank
source="source_entity"
target=""
a="0"
b="0"
op="Operator" // Valid operators are NONE "none", ADDITION "add", SUBTRACT "sub", MULTIPLY "mult", DIVIDE "div", MINIMUM "min", and MAXIMUM "max".
/>

<bonusdamagemult // Used in <onattack />, multiplies the attackdamage by the value (a, or a / b with the operator), uses source if the target is blank
source="source_entity"
target=""
a="0"
b="0"
op="Operator" // Valid operators are NONE "none", ADDITION "add", SUBTRACT "sub", MULTIPLY "mult", DIVIDE "div", MINIMUM "min", and MAXIMUM "max".
/>

<bounce // Causes the current attack or projectile to bounce the count number of times, searching the range around the bounce-off-of target, multiplying damage by damagemult and only hitting the targets of the fitting targetscheme.
count="0"
range="0"
damagemult="0"
targetscheme="TargetScheme"
seek="random" // Controls how the bounce target is choosen. Can also be closest or farthest
maxbouncespertarget="1"
/>

<breakchannel // Breaks any current channeling abilities of the entity
entity="this_entity"
/>

<broadcastmessage // Broadcasts the type of message at the source entity's position, used right now to alert the team when a courier dies based on type
source="source_entity"
type="Type" // Currently can only be either "walkingcourier" or "flyingcourier"
/>

<calculatedamage // Returns the damage after reduction calculations from the source to the target of the given amount, effecttype, and supertype.
source="source_entity"
target="target_entity"
amount="0"
effecttype="EffectType"
supertype="SuperType"
/>

<canactivate /> // Returns true if the ability can be activated. For example, if the target is stunned, it will return false since you can't use abilities while stunned.

<canattack /> // Runs the same check that your auto attack. Basically a <cantarget /> using your attack target scheme automatically.

<cancel // Used in orders, cancel the entity (order) when called
entity="this_entity"
/>

<cantarget // Checks if the source can hit the target given the parameters. Example: If targetscheme is enemy_units and you attack an allied creep, it will return false, but if you attack an enemy creep it's true.
source="source_entity"
target="target_entity"
targetscheme="TargetScheme"
effecttype="EffectType"
ignoreinvulnerable="false"
/>

<casteffecttype // Used to check if the current ability in the event caused by the entity has the selected effecttype. For example, can be used to check if someone uses an attack ability so power supply won't gain charges.
entity="this_entity"
effecttype="EffectType"
/>

<chain // Used in affectors, when the onimpact is hit and this is inside, will basically call the affector again on top of the current target (excluding it from possible targets) as many times as chained. Example, chain lightning
count="0"
/>

<chance // Passes the call if it randoms past the chance value
threshold="0"
/>

<changeaccumulator // Sets the accumulator of the entity to a and b using the op. a in this action is always accumulator of the entity before the change.
entity="this_entity"
b="0"
op="ValueOp" // Valid operators are NONE "none", ADDITION "add", SUBTRACT "sub", MULTIPLY "mult", DIVIDE "div", MINIMUM "min", and MAXIMUM "max".
/>

<changecurrentcombatdamage // Used in a combat event to change the current combat damage. Takes the combat damage before change as a and sets it using b and op.
b="0"
op="ValueOp" // Valid operators are NONE "none", ADDITION "add", SUBTRACT "sub", MULTIPLY "mult", DIVIDE "div", MINIMUM "min", and MAXIMUM "max".
/>

<changedamage // Used to change the current damage. Takes the damage before change as a and sets it using b and op. Example is setting the incoming damage to 1 so a pet can take a certain number of hits.
b="0"
op="ValueOp" // Valid operators are NONE "none", ADDITION "add", SUBTRACT "sub", MULTIPLY "mult", DIVIDE "div", MINIMUM "min", and MAXIMUM "max".
/>

<changeduration // Used to change the current duration. Takes the duration before change as a and sets it using b and op. Starts the duration over even if it was half done.
b="0"
op="ValueOp" // Valid operators are NONE "none", ADDITION "add", SUBTRACT "sub", MULTIPLY "mult", DIVIDE "div", MINIMUM "min", and MAXIMUM "max".
/>

<changehealth // Used to change the current target's health by +- the value set by a/b/op.
source="source_entity"
target="target_entity"
a="0"
b="0"
op="ValueOp" // Valid operators are NONE "none", ADDITION "add", SUBTRACT "sub", MULTIPLY "mult", DIVIDE "div", MINIMUM "min", and MAXIMUM "max".
/>

<changetotalduration // Used to change the total duration. Takes the duration before change as a and sets it using b and op. If a state is half done, it will still be half done after this.
b="0"
op="ValueOp"
/>

<clearcriticals /> // Removes all current criticals out of the current combat event

<clearproxy // Clears the current proxy of given index of the current entity
index="0"
/>

<clonebackpack // Clones the source's backpack into the target's
source="source_entity"
target="target_entity"
/>

<combatsupertype // When used inside of a combat Event, checks if the current supertype matches. If so, it passes true. (Can only be spell or attack)
supertype="SuperType"
/>

<combateffecttype // When used inside of a combat Event, checks if the current effecttype matches. If so, passes true. Can be any effecttype.
effecttype="EffectType"
/>

<compare // Compares two values, A and B, using the operator choosen. Passes to below when true.
a="ValueA"
b="ValueB"
op="Operator"
/>

<complete // Used in orders, completes the current order when called
entity="this_entity"
/>

<condition // Used to check against certain conditions or compare two values. Passes to below if returns true
source="source_entity"
target="target_entity"
test="" // Valid operators are EQUALS "eq", NOT_EQUALS "ne", LESS_THAN "lt", LESS_THAN_OR_EQUALS "le", GREATER_THAN "gt", GREATER_THAN_OR_EQUALS "ge". Can also check for "isready", which returns true if the ability is ready to activate.
/>

<consume // Checks for the given item number and if the recipe is used/charges are counted and consumes them, usually resulting in a live unit morphing into another unit as a result. Exmaple: Ground to winged courier
item="Item"
count="1"
userecipe="false"
ignorecharge="false"
/>

<currentdamagesupertype // Only used in <ondamage /> and <ondamaged />. Checks if the current supertype matches. If so, passes true. (Can only be spell or attack)
supertype="SuperType"
/>

<currentdamageeffecttype // Only used in <ondamage /> and <ondamaged />. Checks if the current effecttype matches. If so, passes true. Can be any effecttype.
effecttype="EffectType"
/>

<damage // Deals the given damage from the source to the target of the given effecttype. Can change the damage based on b/op.
source="source_entity"
target="target_entity"
min="0" // Has to be a number, cannot be a variable
max="0" // Has to be a number, cannot be a variable
amount="0" // Has to be a number, cannot be a variable. CAN ONLY USE MIN/MAX OR AMOUNT, NOT BOTH.
effecttype="EffectType"
nonlethal="false" // Can this damage kill?
b="0" // CAN be a variable - use this to change damage on the fly
op="Operator" // Valid operators are NONE "none", ADDITION "add", SUBTRACT "sub", MULTIPLY "mult", DIVIDE "div", MINIMUM "min", and MAXIMUM "max"
inflictor="this_entity"
supertype="SuperType"
/>

<damagesupertype // When used inside of a damage Event, checks if the current supertype matches. If so, it passes true. (Can only be spell or attack)
supertype="SuperType"
/>

<damageeffecttype // When used inside of a damage Event, checks if the current effecttype matches. If so, passes true. Can be any effecttype.
effecttype="EffectType"
/>

<deactivatemodifierkey // Turns off the named modifier key of the entity
entity="this_entity"
name="Name"
/>

<defer // Defers the application of a state for a set amoutn of time
time="Time"
mult="0"
/>

<delete // The source deletes the target entity from the world
source="source_entity"
target="target_entity"
/>

<disjoint // Disjoints the target entity, causing any midair projectiles to not hit this target
source="source_entity"
target="target_entity"
/>

<dispel // Removes all of the states with the type given off the target
source="source_entity"
target="target_entity"
type="Type"
/>

<distance // Returns the distance between the source and target (in units)
source="source_entity"
target="target_entity"
/>

<else /> // Everything that can return true/false causes an else to happen after the tag close. For example, can be used to cover situations outside of the condition you are testing. Only usable AFTER something that would return it anyawy.

<elsecondition // Used to check against certain conditions or compare two values. Passes to below if returns true. Replaces an else command.
source="source_entity"
target="target_entity"
test="" // Valid operators are EQUALS "eq", NOT_EQUALS "ne", LESS_THAN "lt", LESS_THAN_OR_EQUALS "le", GREATER_THAN "gt", GREATER_THAN_OR_EQUALS "ge". Can also check for "isready", which returns true if the ability is ready to activate.
/>

<entitytype // Checks if the target is the given entity type. If it is, passes true.
source="source_entity"
target="target_entity"
type="Type"
/>

<evaluate // Evaluates the given math and returns it as the result.
a="0"
b="0"
op="ValueOp" // Valid operators are NONE "none", ADDITION "add", SUBTRACT "sub", MULTIPLY "mult", DIVIDE "div", MINIMUM "min", and MAXIMUM "max".
/>

<expire // Expires the entity (a state) immediately
entity="this_entity"
/>

<expirestate // The source expires a state named Name off the target
source="source_entity"
target="target_entity"
name="Name"
/>

<forgetattacks // Causes the target to stop current attacks and remove current aquired targets. Used when a hero goes stealth mainly so they do not finish an attack and break the stealth
source="source_entity"
target="target_entity"
/>

<givemana // The source gives the target the amount worth of mana after the b/op operation
source="source_entity"
target="target_entity"
amount="0" // Cannot be a variable, has to be a number
b="0"
op="AmountOp" // Valid operators are NONE "none", ADDITION "add", SUBTRACT "sub", MULTIPLY "mult", DIVIDE "div", MINIMUM "min", and MAXIMUM "max".
/>

<hasmodifier // Checks if the target entity has the named modifier active. If yes, passes true
entity="this_entity"
name="Name"
/>

<heal // The source heals the target the amount worth of health after the a/b/op
source="source_entity"
target="target_entity"
a="0"
b="0"
op="AmountOp" // Valid operators are NONE "none", ADDITION "add", SUBTRACT "sub", MULTIPLY "mult", DIVIDE "div", MINIMUM "min", and MAXIMUM "max".
/>

<invalidate /> // Used in <checkcost /> and <activatecost /> to invalidate the cast of an ability if certain conditions are met. When called, just cancels the cast of the ability as if it never happened.

<kill // The source kills the target instantly.
source="source_entity"
target="target_entity"
experiencebountymul="1.0" // Experience the target gives when it dies from this action
goldbountymult="1.0" // Gold the target gives when it dies from this action
nocorpse="false"
nodeathanim="false"
/>

<killillusions /> // If the current target was an illusion, kills it instantly

<killtrees // Kills all the trees in the radius
radius="0" // No radius means to kill the target entity if it is a tree
usealtdeathanims="false"
/>

<levelpets // Levels the named pets to the value level
name="Name"
value="Value" // Usually this is "level", so when an ability levels up it transfers it's current level to the pet
/>

<lockbackpack // Locks the entity's backpack so any items in it cannot be dropped, sold or moved and that entity cannot purchase more into the backpack
entity="this_entity"
/>

<morph // The source morphs the target into the named entity. Usually a self cast
source="source_entity"
target="target_entity"
name="Name"
/>

<multcharges // Multiplies the entity's charges by the value and sets that as the new number of charges
entity="this_entity"
value="0"
/>

Bangerz
02-10-2011, 06:39 PM
Actions B


<negate // Negates the effects of an offensive spell targetted at the owner when triggered.
immunitytype="ImmunityType" // Only negates spells of the given immunity type
/>

<order // The source issues an order of the given command to the target unit.
source="source_entity"
target="target_entity"
command="Command" // Can be such things as attack, wander, stop, assist, follow, hold, etc. Can also be "event" which calls an order.entity of the given OrderName
parameter="Parameter" // Unused
queue="back" // Can be set to front or back
force="false" // Forces the entity to do this order and nothing else for the duration
forceduration="0" // Only used if force is true, and says how long it lasts
restrict="false" // Sets to true if the event order is used
ordername="Name" // Name of the order.entity to use
value0="Value0" // Unused
duration="0" // Duration of the order
block="Block" // Used in tutorial, unused
/>

<peekstack /> // Sets the current stack as the result

<ping // Issues a map ping of the given name at the target position
name="Name"
position="target_position"
/>

<playanim // Plays the animation of given Name with X variations included at the given speed and length
source="source_entity"
target="target_entity"
name="Name"
variations="0"
channel="Channel" // Artisty-Thing
speed="1.0"
length="Length"
seq="Seq" // Used in animations used in quick succession that you don't want reset between
/>


<playeffect // Plays the listed effect at the source position/entity with a given owner
source="source_entity"
target=""
effect="Effect"
owner="source_entity"
occlude="false" // Should this effect hide itself in fog?
/>

<playtauntsound // The source plays his taunting sound at the target
source="source_entity"
target="target_entity"
/>

<popentity /> // Removes the top entity stack item

<popstack /> // Removes the top value stack item

<popup // The source plays popup Name at the target position with the value of a/b/op
source="source_entity"
target="target_entity"
name="Name"
a="0"
b="0"
op="Operator" // Valid operators are NONE "none", ADDITION "add", SUBTRACT "sub", MULTIPLY "mult", DIVIDE "div", MINIMUM "min", and MAXIMUM "max".
/>

<print // Prints the text in the console when called
text="Text"
/>

<printdebuginfo /> // Prints the debug information into the console when called

<printvalue // Prints the given value with a custom label (if wanted) when called
label="Label"
value="value"
/>

<protecteddeath // The source protects the target from death, used in Aegis
source="source_entity"
target="target_entity"
/>

<push // The source pushes the target the value force/forceb/forceop for the given duration
source="source_entity"
target="target_entity"
force="0"
forceb="0"
forceop="Operator" // Valid operators are NONE "none", ADDITION "add", SUBTRACT "sub", MULTIPLY "mult", DIVIDE "div", MINIMUM "min", and MAXIMUM "max".
duration="0"
frame="false" // Instead of duration, pushes every frame as long as the push is applied
perpendicular="false" // Pushes in a perpendicular direction from the source. Used as a "push to the side" movement
/>

<pushability // Pushes the given named ability onto the stack
name="Name"
/>

<pushentity // Pushes the given named entity onto the stack, OR, searches in a radius for the first available target and pushes that entity onto the tsack
entity="Entity"
searchfortarget="false"
searchorigin="source_entity"
radius="0"
targetscheme="TargetScheme"
ignoreinvulnerable="false"
/>

<pushentitybyname // Pushes the given named entity onto the stack
name="Name"
/>

<pushentityproxy // Pushes the given named entity's proxy (by index) onto the stack
entity="this_entity"
index="0"
/>

<pushentitysearch // Searches in a radius for the first available target and pushes that entity onto the tsack
origin="source_position"
radius="0"
targetscheme="TargetScheme"
ignoreinvulnerable="false"
global="false" // Sets it to a global search instead of a radius
/>

<pushstack // Pushes the given value after a/b/op onto the stack
a="0"
b="0"
op="Operator" // Valid operators are NONE "none", ADDITION "add", SUBTRACT "sub", MULTIPLY "mult", DIVIDE "div", MINIMUM "min", and MAXIMUM "max".
/>

<recallpets // Causes the named pet to get a move order back to its owner
name="Name"
/>

<reducecooldown // Reduces the cooldown of the entity by the duration given
entity="this_entity"
duration="0"
/>

<refreshabilities // The source refreshes the target's abilities
source="source_entity"
target="target_entity"
/>

<refreshinventoryitems // The source refreshes the target's items in their inventory except those in the exclude line, seperated by spaces
source="source_entity"
target="target_entity"
excluded="Excluded"
/>

<removecharge // Removes one charge from the entity
entity="this_entity"
/>

<resetattackcooldown // Resets the source's attack cooldown
source="source_entity"
/>

<resetcooldown // Resets the cooldown of the entity
entity="this_entity"
/>

<resettimer // Resets the timer of the entity
entity="this_entity"
/>

<resettouches // Resets the touches of the source
source="source_entity"
/>


<retarget // Used for projectiles, retargets it towards the target in mid-flight
source="source_entity"
target="target_entity"
/>

<return /> // Causes a projectile to be returned back to its origin

<savehealth // Saves the current target's health to this entity so it can be used later through the "healthlost" variable
source="source_entity"
target="target_entity"
entity="this_entity"
/>

<scaledamage // Scales the current incoming damage by the % given through scale
scale="1"
/>

<setaccumulator // Sets the entity's accumulator based on a/b/op. Accumulator is a permenant value that persists through all events.
entity="this_entity"
value="0"
valueb="0"
valueop="ValueOp" // Valid operators are NONE "none", ADDITION "add", SUBTRACT "sub", MULTIPLY "mult", DIVIDE "div", MINIMUM "min", and MAXIMUM "max"
/>

<setactivemodifierkey // Sets the active modifier key of the entity to the name given
entity="this_entity"
name="Name"
/>

<setattackactioneffect // Overrides the current attack's action effect to the effect given
effect="Effect"
/>

<setattackimpacteffect // Overrides the current attack's impact effect to the effect given
effect="Effect"
/>

<setattackprojectile // Overrides the current attack's projectile to the one named
name="Name"
/>

<setcharges // Sets the charges of the entity to the value of a/b/op
entity="this_entity"
a="0"
b="0"
op="Operator" // Valid operators are NONE "none", ADDITION "add", SUBTRACT "sub", MULTIPLY "mult", DIVIDE "div", MINIMUM "min", and MAXIMUM "max"
/>

<setdamage // Sets the damage of the current event to the value of a/b/op
a="0"
b="0"
op="Operator" // Valid operators are NONE "none", ADDITION "add", SUBTRACT "sub", MULTIPLY "mult", DIVIDE "div", MINIMUM "min", and MAXIMUM "max"
/>

<seteffecttype // Sets the effecttype of the value in name to the given type
name="Name" // An example of this is combat_damagetype in the <onpreimpact /> event to change the attacks effecttype
effecttype="Effecttype"
/>

<setent0 // Sets the entity as the ent0 variable that can be recalled later. Only exists inside of the event it is made, so it 'expires' quickly.
entity="Entity"
name="Name"
/>

<setent1 // Sets the entity as the ent1 variable that can be recalled later. Only exists inside of the event it is made, so it 'expires' quickly.
entity="Entity"
name="Name"
/>

<setent2 // Sets the entity as the ent2 variable that can be recalled later. Only exists inside of the event it is made, so it 'expires' quickly.
entity="Entity"
name="Name"
/>

<setent3 // Sets the entity as the ent3 variable that can be recalled later. Only exists inside of the event it is made, so it 'expires' quickly.
entity="Entity"
name="Name"
/>

<setgoldlossbonus // Sets the target's bonus gold lost from death to the value given
source="source_entity"
target="target_entity"
value="0"
/>

<setgoldlossmultiplier // Sets the target's gold lost from death multiplied by the value
source="source_entity"
target="target_entity"
value="0"
/>

<setignoreattackcooldown // Unused
source="source_entity"
target="target_entity"
value="0"
/>

<setparam // Sets the parameter of the entity to the value of a/b/op. Parameter is a permenant value that persists through all events.
entity="this_entity"
a="0"
b="0"
op="Operator" // Valid operators are NONE "none", ADDITION "add", SUBTRACT "sub", MULTIPLY "mult", DIVIDE "div", MINIMUM "min", and MAXIMUM "max".
/>

<setproxy // Sets the proxy of the entity to the target or can search for a target instead of declaring one outright. The proxy is a permenant entity that is remembered through all events of that entity
entity="this_entity"
target="target_entity"
searchfortarget="false"
searchorigin="source_entity"
radius="0"
targetscheme="TargetScheme"
ignoreinvulnerable="false"
index="0" // Index of the proxy for orders
/>

<setrespawnhealthmultiplier // Sets the health of the target when they respawn to the value as a percent
source="source_entity"
target="target_entity"
value="1.0"
/>

<setrespawnmanamultiplier // Sets the mana of the target when they respawn to the value as a percent
source="source_entity"
target="target_entity"
value="1.0"
/>

<setrespawnposition // Sets the respawn position of the target when they respawn to the position listed
source="source_entity"
target="target_entity"
position="target_position"
/>

<setrespawntime // Sets the whole respawn time of the target when they die to the value of a/b/op
source="source_entity"
target="target_entity"
a="0"
b="0"
op="Operator" // Valid operators are NONE "none", ADDITION "add", SUBTRACT "sub", MULTIPLY "mult", DIVIDE "div", MINIMUM "min", and MAXIMUM "max".
/>

<setrespawntimebonus // Changes the bonus respawn time of the target to the value listed when they are killed (used in <onkilled /> )
source="source_entity"
target="target_entity"
value="Value"
/>

<setrespawntimemultiplier // Changes the bonus respawn time of the target to their bonus time multiplied by the value listed when they are killed (used in <onkilled /> )
source="source_entity"
target="target_entity"
value="Value"
/>

<setvalue // Sets the named value to the value of a/b/op. An example of values are damage_attempted, combat_lifesteal, combat_deflection, and combat_truestrike
name="Name"
a="0"
b="0"
op="Operator" // Valid operators are NONE "none", ADDITION "add", SUBTRACT "sub", MULTIPLY "mult", DIVIDE "div", MINIMUM "min", and MAXIMUM "max".
/>

<setvar0 // Sets the value of a/b/op to the variable var0, which can be called later in the same event. Only exists inside of the event it is created.
a="0"
b="0"
op="Operator" // Valid operators are NONE "none", ADDITION "add", SUBTRACT "sub", MULTIPLY "mult", DIVIDE "div", MINIMUM "min", and MAXIMUM "max".
/>

<setvar1 // Sets the value of a/b/op to the variable var1, which can be called later in the same event. Only exists inside of the event it is created.
a="0"
b="0"
op="Operator" // Valid operators are NONE "none", ADDITION "add", SUBTRACT "sub", MULTIPLY "mult", DIVIDE "div", MINIMUM "min", and MAXIMUM "max".
/>

<setvar2 // Sets the value of a/b/op to the variable var2, which can be called later in the same event. Only exists inside of the event it is created.
a="0"
b="0"
op="Operator" // Valid operators are NONE "none", ADDITION "add", SUBTRACT "sub", MULTIPLY "mult", DIVIDE "div", MINIMUM "min", and MAXIMUM "max".
/>

<setvar3 // Sets the value of a/b/op to the variable var3, which can be called later in the same event. Only exists inside of the event it is created.
a="0"
b="0"
op="Operator" // Valid operators are NONE "none", ADDITION "add", SUBTRACT "sub", MULTIPLY "mult", DIVIDE "div", MINIMUM "min", and MAXIMUM "max".
/>

<spawnaffector // Spawns a named affector at the target position or on the target entity with any number of properties
name="Name"
source="source_entity"
target="target_entity"
direction="target_position" // Direction the affector is facing
firsttarget="target_entity"
level="LevelProperty"
owner="source_entity"
ischannel="false"
istoggle="false"
distance="0" // Distance away from the target the affector spawns
count="1"
countb="0"
countop="CountOperator" // Valid operators are NONE "none", ADDITION "add", SUBTRACT "sub", MULTIPLY "mult", DIVIDE "div", MINIMUM "min", and MAXIMUM "max".
distribute="false" // Distributes the count worth of affectors evenly around the target going outwards
proxy="Proxy" // Sets the proxy entity
pushentity="false" // Pushes this entity onto the stack
param="0" // Sets the parameter of this affector
positionorigin="source_entity" // Used for setting the origin for the position modifiers
positionvalue="0" // Radius
positionmodifier="" // Used to say what positional modifier to use. Can be "minonline" or "pointonline"
ignore="Ignored" // Entity to be ignored
/>

<spawnillusion // Spawns count number of illusions of the target for lifetime duration. The damage they deal and take can be changed, along with the effects associated with them. Owner is who controls them.
source="source_entity"
target="target_entity"
count="1"
lifetime="0"
receivedamagemultiplier="1.0"
inflictdamagemultiplier="1.0"
spawneffect="Effect"
deatheffect="Effect"
owner="source_entity"
uncontrollable="false"
pushentity="false" // Pushes the illusion onto the stack
playdeathanim="false" // Illusion plays the death animations of the unit copied when it is killed or not
inheritactions="false" // Smoothly inherits the actions of the unit spawned so if they were spawned on top of them, it would be impossible to tell the difference between real and illusion
spawncircular="false" // Spawns illusions in a circle instead of on top of the target, moves the target as part of the circle
spawncircularradius="0" // Radius of the circle when spawncircular is true
/>

<spawnitem // The source spawns the named item at the target, offset by the distance (x/y). Offsetspace is who the offset is based off of (what direction they are facing is 'front')
source="source_entity"
target="target_entity"
name="Name"
offset="0 0"
offsetspace="target_entity"
/>

<spawnlinearaffector // Spawns a named linear affector at the target position or on the target entity with any number of properties. basically a line of affectors of the given name as far as the target_position
name="Name"
source="source_entity"
target="target_entity"
direction="target_position" // Direction the affector is facing
firsttarget="target_entity"
level="LevelProperty"
owner="source_entity"
ischannel="false"
istoggle="false"
pushentity="false" // Pushes this entity onto the stack
targetorigin="target_entity"
targetvalue=""
targetmodifier=""
directionorigin="target_position"
directionvalue=""
directionmodifier="" // can be "pointpastline" for example
/>

<spawnprojectile // Spawns a projectile from the source (with offset) to the target, see the specific section for orbital attributes
source="source_entity"
target="target_entity"
name="Name"
bind="" // Binds the entity listed to the projectile
bindturn="false" // Makes the bound entity turn in the direction the projectile does
bindnopush="false" // Makes it so binding to the projectile does not stop channeling
unbindondeath="false" // Unbinds the bound entity if they die
bindstate="" // A state to be on the bound target as long as they are bound
ignoretargetoffset="false" // Ignores the target's offset when it binds them
proxy="" // Sets the listed entity as the proxy of this projectile
offset="0 0 0"
offsetspace="source_entity" // Sets who the offset is based off of
ischannel="false"
istoggle="false"
pushentity="false" // Pushes this projectile onto the stack when created
param="0" // Sets the param of this projectile when created
noresponse="false" // Makes it so this projectile cannot be responded to. This involves things like Nullstone or reactionary abilities. It will not proc those
/>

<spawnunit // The source spawns a unit (Name) at the target, spawning count number of them with other properties
source="source_entity"
target="target_entity"
name="Name"
count="0"
mount="entity" // Mounts (binds) the unit to the entity
bind="entity" // Binds the entity to this unit
fixedposition="false" // Fixes the position of the unit to where it spawns
inheritmodifiers="true" // Makes the unit inherit the modifiers of the source
ischannel="false"
istoggle="false"
maxactive="0" // Only this number of this unit can be active at once
facing="entity" // Sets the facing direction of the spawned unit in relation to the entity listed
angle="0" // Angle it is turned when spawned
offset="0 0 0" // Offset from the offsetspace entity
offsetspace="target_entity" // Entity is who the offset is based off of for where it spawns
pushentity="false" // Pushes this unit into the stack when created
lifetime="0" // Sets the lifetime to the value of a/b/op
lifetimeb="0"
lifetimeop="LifetimeOp" // Valid operators are NONE "none", ADDITION "add", SUBTRACT "sub", MULTIPLY "mult", DIVIDE "div", MINIMUM "min", and MAXIMUM "max".
proxy="entity" // Sets the proxy of this unit to the entity listed
team="" // Sets the team of the spawned unit. Usually a "result" after an <evaluate a="target_team" /> call
snaptargettogrid="false" // Snaps the unit to the grid
/>

<splashdamage // Causes a splash damage call usually in <onattack /> or added as an impact action for onattackstart. It only hits the targets and effecttypes that are valid. Splash deals value of a/b/op
targetscheme="TargetScheme"
effecttype="EffectType"
radius="0"
a="0" // Can use "total_adjusted_damage" if this is splashing normal attacks
b="0"
op="Operator" // Valid operators are NONE "none", ADDITION "add", SUBTRACT "sub", MULTIPLY "mult", DIVIDE "div", MINIMUM "min", and MAXIMUM "max".
nonlethal="false" // Can the splash kill?
centerontarget="false" // Centers the splash circle on the target hit instead of on the attacking hero. Used for ranged splash.
supertype="SuperType"
/>

<split // Used in <onattack /> and splits the attack into count # of different projectiles that hit units within the range/targetscheme given. Damage the split shots do is multiplied by the damagemult.
count="0"
range="0"
damagemult="0.0"
targetscheme="TargetScheme"
/>

<startattack // Starts an attack from the source to the target as long as the targetscheme and effecttype pass.
source="source_entity"
target="target_entity"
targetscheme="TargetScheme"
effecttype="EffectType"
facetarget="false" // Causes the source to face the target
/>

<startcooldown // Starts the cooldown of the entity listed or toolname if one is given for the duration of a/b/op
entity="this_entity"
toolname=""
duration="0"
durationb="0"
durationop="Operator" // Valid operators are NONE "none", ADDITION "add", SUBTRACT "sub", MULTIPLY "mult", DIVIDE "div", MINIMUM "min", and MAXIMUM "max".
/>

<startexpire // Starts the expire time of the listed entity (a state) if it is continuous and has a duration that can run out
entity="this_entity"
/>

<startfade // Starts the entity listed to fade into stealth over the duration of a/b/op. If no duratoin is given, uses the fadetime of the state. Also a stealthtype is required.
entity="this_entity"
a="0"
b="0"
op="Operator" // Valid operators are NONE "none", ADDITION "add", SUBTRACT "sub", MULTIPLY "mult", DIVIDE "div", MINIMUM "min", and MAXIMUM "max".
/>

<starttimer // Starts the timer of the entity listed for the duration of a/b/op
entity="this_entity"
duration="0"
durationb="0"
durationop="Operator" // Valid operators are NONE "none", ADDITION "add", SUBTRACT "sub", MULTIPLY "mult", DIVIDE "div", MINIMUM "min", and MAXIMUM "max".
/>

<takecontrol // Transfers the target to be under the source's control. Maxactive limits the maximum number of units you can have active through this call.
source="source_entity"
target="target_entity"
maxactive="0"
/>

<takemana // The source takes the target's mana in the amount of a/b/op
source="source_entity"
target="target_entity"
amount="0" // Can only be a number, not a variable
amountb="0"
amountop="Operator" // Valid operators are NONE "none", ADDITION "add", SUBTRACT "sub", MULTIPLY "mult", DIVIDE "div", MINIMUM "min", and MAXIMUM "max".
/>

<targettype // Checks if the target is the given target type. If it is, passes true.
source="source_entity"
target="target_entity"
type="Type"
/>

<teleport // Teleports the source to the target
source="source_entity"
target="target_entity"
interpolate="false" // Interpolates between the two points to try to make it "smoother"
facetarget="false" // Faces the source towards the target when moved
specifyangle="false" // Can specify the angle of the source at the end of the teleport. used with angle
angle="0"
positionorigin="source_entity"
positionvalue=""
positionmodifier=""
/>

<testactivate // If the target is within X distance of the source, passes true
source="source_entity"
target="target_entity"
distance="0"
/>

<testnearby // Used mainly in the <onthink /> of NPCs to make them check for conditions. Returns a number based on the valid targets in range that met the conditions of the test
radius="0"
targetscheme="TargetScheme"
ignoreinvulnerable="false"
origin="source_entity"
/>

<toggleoff // Toggles off the named ability when used
name="Name"
/>

<transferitemstohero /> // Used only by couriers at the moment, runs the source (courier) to the target (user of the ability) and tranfers the items the hero owns to him.

<transferstate // Steals the state named under entity from the target and applies it to the source
source="source_entity"
target="target_entity"
entity="this_entity"
/>

<unbind // Unbinds the target from anything he is bound to
target="target_entity"
/>

<useability // Causes the source to use the ability in slot on the target. Can force this for a duration and restrict it's usage as well. Can be used with an order.entity
source="source_entity"
target="target_entity"
slot="-1"
queue="front"
force="false"
forceduration="0"
restrict="false"
ordername=""
value0="" // Unused
block="" // Unused
/>

<useitem // Causes the source to use the item on the target. Can force this for a duration and restrict it's usage as well. Can be used with an order.entity
source="source_entity"
target="target_entity"
queue="front"
force="false"
forceduration="0"
restrict="false"
ordername=""
value0="" // Unused
block="" // Unused
/>



Actions C

These exist but are most likely broken.

<soullink />
<breaksoullink />

Bangerz
02-10-2011, 06:39 PM
Tutorial Actions

These actions exists but are only to be used in the Tutorial or other such maps that use threads and very custom scripting


<changeteam />
<clientuitrigger />
<closeshop />
<createcamera />
<giveitem />
<givegold source="source_entity" target="target_entity" amount="value" />
<lockcontrol />
<lockitem />
<lockshop />
<movecamera />
<openshop />
<setactiverecipe />
<setactiveshop />
<setaicontroller />
<setcamera />
<setexperience />
<setgamephase />
<setgold />
<sethero />
<setinterface />
<setlevel />
<setoverlayinterface />
<setowner />
<setscriptvalue />
<setteamsize />
<spawn />
<spawnclientthread />
<spawnneutrals />
<spawnthread />
<startmatch />
<terminate />
<unlockcontrol />
<unlockitem />
<unlockshop />
<wait />
<waituntilcompare />
<waituntilcondition />
<waituntilmessage />
<yield />
<foreachitem />
<foreachplayer />
<loop />
<scriptcondition />
<scriptthread />
<setpos0 />
<setpos1 />
<setpos2 />
<setpos3 />
<while />
<whilescriptcondition />


Tool (Ability/Item) Properties

These are all of the valid properties that can go in the "top half" of an ability of item. The format is "XXXXX YYYYY" where X's are the property and Y's are the input needed (float [number w/ decimals], int [whole number only], uint [No negative, whole number only], bool [true/false], etc). Ends up being XXXX="ZZZZZ" where Z's are the value that fits the type that Y is.


actiontype actiontype
maxlevel uint
baselevel uint

casteffect effect
actioneffect effect
impacteffect effect
bridgeeffect effect

anim animation
animchannel int
casttime uint
castactiontime uint
channeltime uint
manacost float
toggleoffmanacost float
activemanacost float
triggeredmanacost float
cooldowntime uint
toggleoffcooldowntime uint
cooldownondamage uint
range float
forcerange float
minrange float
rangebuffer float
targetradius float
maxdelta float
forcedelta float
targetmaterial material
allowoutofrangecast bool
allowoutofboundscast bool
allowautocast bool
usepathforrange bool
casteffecttype EffectType
targetscheme TargetScheme
ignoreinvulnerable bool
projectile projectile_name
statuseffecttooltip state_name1
statuseffecttooltip2 state_name2

useproxy bool
proxytargetscheme TargetScheme
proxyeffecttype EffectType
proxyselectionradius float
proxyselectionmethod TargetSelection (closest, fartherst, random, etc)
proxyallowinvulnerable bool
proxytargetmaterial material

searchradius float
disabled bool

notargetradius floar
notargetmaterial material
nocasteffecttype EffectType
notargettargetscheme TargetScheme
notargetignoreinvulnerable bool

ischanneling bool
deferchannelcost bool
deferchannelimpact bool
channelrange float

cooldowntype string
frontqueue bool
inheritmovement bool
noninterrupting bool
ignorecooldown bool
autotoggleoffwhendisabled bool
autotoggleoffwithtriggeredmanacost bool
nostopanim bool
noresponse bool
novoiceresponse bool
needvision bool
doubleactivate bool
activatescheme ActivateScheme
carryscheme CarryScheme
clonescheme CloneScheme
chargecost uint
attackeffecttype EffectType
attackdamagetype EffectType



Tool actiontype List


passive
toggle
no_target
target_entity
target_position
global
target_self
facing
self_position
attack
attack_toggle
target_dual
target_dual_position
target_vector


Ability-specific properties


requiredlevel uint
interface string
subslot int
keyslot int
nosilence bool



Entity Action Targets


source_entity
source_position
source_target_offset
source_attack_offset
source_owner_entity
source_owner_position
target_entity
target_position
target_target_offset
target_attack_offset
target_owner_entity
target_owner_position
inflictor_entity
inflictor_position
inflictor_target_offset
inflictor_owner_entity
inflictor_owner_position
proxy_entity
proxy_position
stack_entity
stack_position
this_entity
this_position
this_target_offset
this_attack_offset
this_owner_entity
this_owner_position
this_inflictor_entity
this_inflictor_position
this_spawner_entity
this_spawner_position
this_target_entity
this_target_position
this_owner_target_entity
this_owner_target_position
this_proxy_entity
this_proxy_position
this_proxy_entity1
this_proxy_position1
this_proxy_entity2
this_proxy_position2
this_proxy_entity3
this_proxy_position3
delta_position
ent0
ent0_position
ent1
ent1_position
ent2
ent2_position
ent3
ent3_position


Commands / Orders


attack
move
stop
hold
follow
patrol
ability
ability2
attack_move
sentry
dropitem
giveitem
touch
guard
wander
aggressive_wander
aggro
event
guard_follow
follow_guard
assist
attack_follow



Orbital Projectiles

New properties for projectiles unrelated to orbiting:

dieonmaxtouches - if true, kill the projectile when maxtouches is reached
dieonmaxtouchespertarget - if true, kill the projectile when maxtouchespertarget is reached


You can put these properties on spawnprojectile, or in the projectile entity itself. If both exist, the ones on spawnprojectile will be used.

orbit, bool - true to orbit
orbitclockwise - true to orbit clockwise
orbitradius - how far away from the target to orbit
orbitspeed - how fast, in degrees per second, does the projectile orbit the target
orbitacceleration - how fast, in degrees per second, is speed increased
orbitminspeed - Minimum speed for the projectile when orbiting (you can do negative acceleration)
orbitmaxspeed - Max speed for the projectile when orbiting
orbitmaxtouches - total max touches per orbit
orbitmaxtouchespertarget - max touches per target per orbit
orbitdieonmaxtouches - if orbitmaxtouches is reached and this is true, kill the projectile
orbitdieonmaxtouchespertarget - if orbitmaxtouchespertarget is reached and this is true, kill the projectile

These two properties can only be used on the spawnprojectile command, because they don't really make sense to put in the entity.

orbitstartingtheta - starting location in degrees (0 is directly to the right, rotating counter-clockwise)
orbitstartingthetafromzero - false means the starting theta is an absolute position, true means to base it off the current time

These are useful if you want to spawn a projectile some time after one has already been spawned, but place it in a relative location to it.

e.g.
<spawnprojectile orbitstartingtheta="0" orbitstartingthetafromzero="true" ... />
...
...
<spawnprojectile orbitstartingtheta="180" orbitstartingthetafromzero="true" ... />

That would spawn two projectiles that are orbiting directly opposite from each other.

Bangerz
02-10-2011, 06:39 PM
Spell and Particle Effects

These tags are used in the creation of effects.


<effect>
useentityeffectscale true,false 0,1 (should be used for global effects used on multiple heroes... i.e. state.effect impact.effect etc.)
deferred true,false 0,1 (allows the sprites to fade correctly)
persistent true,false 0,1 (allows emitters to finish emitting even after gadget/entity etc. is terminated. note: if persistent is set to true make sure all emitters have a life or count.)

<particlesystem>
name="John Doe" used to name your particle systems. typically they are named system0 or system1 but you can use any name you want, just make sure that you call it correctly in the spawnparticlesystem tag.
space set to world or entity... if set to entity the emitter stays with the hero. set it to world if u want the particles to drag or be left behind.
scale can set scale to whatever you want ie: 1, 50 or even .2 but keep in mind it's cleaner to have it set to 1.

<particle>
color should have three numbers ie: color="1 1 1". the order of the numbers is for red green blue (rgb).
alpha can range from 0-1... ie: alpha=".5" means transparency is at 50%.
size used to bring the sprite to a certain size. good to use startsize midsize and endsize to get more variety out of the same sprite.
width will change the width of the sprite... will scale only the width of the sprite leaving the height alone.
height will change the height of the sprite... will scale only the height of the sprite leaving the width alone.
scale you can set scale to whatever you want ie: 1, 50, .5, 10.5 etc. good to use startscale midscale and endscale to get more variety out of the same sprite. scale and size are closely related they are there to give more control to the user.
pitch
yaw
frame
param
stickiness
anchor
widthdistort exactly what it says... will distort the width only
heightdistort exactly what it says... will distort the height only
scaleu
scalvv
offsetu
offsetv
weight
lockup
lockright
turn
flare
emitter can be used to call an emitter inside another emitter by name... so, it is typically used for embedding emitters.

** keep in mind that most settings in the particle tag can use start, mid, and end settings too. for example startcolor="1 1 1" midcolor="1 0 1" endcolor="1 0 0".
you can control when the mid setting hits with midcolorpos. midcolorpos=".25" will happen sooner, and midcolorpos=".85" will happen later. if midcolorpos is not being
used the default is set to ".5"

<simpleemitter>
owner
life
count
timenudge
delay
loop
spawnrate
particlelife
particletimenudge
particledirectionspace {global, local}
gravity
speed
acceleration
minangle
maxangle
inheritvelocity
material
direction
directionalspace
drag
friction
bone
position
offsetsphere
offsetcube
offsetdirection
offsetradial
offsetradialangle
collide
subframepose

<orbiteremitter>
owner
life
count
timenudge
delay
loop
spawnrate
particlelife
particletimenudge
gravity
speed
acceleration
minangle
maxangle
inheritvelocity
material
direction
directionalspace
drag
friction
bone
position
origin
cylindrical
offset
orbit
orbitangle

<trackeremitter>
owner
life
count
timenudge
delay
loop
spawnrate
particlelife
particletimenudge
gravity
speed
acceleration
minangle
maxangle
inheritvelocity
material
direction
directionalspace
drag
friction
bone
position
targetbone
targetposition
offsetsphere
offsetcube
offsetdirection
offsetradial
offsetradialangle
tracktype {distance, angular, gravity, cgravity, target, lerp}
trackspeed
distancelife

<meshemitter>
owner
life
count
timenudge
delay
loop
spawnrate
particlelife
particletimenudge
gravity
speed
acceleration
minangle
maxangle
inheritvelocity
material
direction
directionalspace
drag
friction
mesh
position
offsetsphere
offsetcube
offsetdirection
offsetradial
offsetradialangle
collide

<skeletonemitter>
owner
life
count
timenudge
delay
loop
spawnrate
particlelife
particletimenudge
speed
gravity
acceleration
minangle
maxangle
inheritvelocity
material
direction
directionalspace
drag
friction
position
offsetsphere
offsetcube
offsetdirection
offsetradial
offsetradialangle

<twopointtrailemitter>
owner
life
count
timenudge
delay
loop
spawnrate
particlelife
particletimenudge
speed
gravity
acceleration
minangle
maxangle
inheritvelocity
material
direction
directionalspace
drag
friction
bone_a
bone_b
position_a
position_b
offsetsphere
offsetcube
offsetdirection
offsetradial
offsetradialangle
texpostime
texposscale
texstretchscale
subframepose

<trailemitter>
owner
life
count
timenudge
delay
loop
spawnrate
particlelife
particletimenudge
speed
gravity
acceleration
minangle
maxangle
inheritvelocity
material
direction
directionalspace
drag
friction
bone
position
offsetsphere
offsetcube
offsetdirection
offsetradial
offsetradialangle
texpostime
texposscale
texstretchscale
subframepose

<light>
*owner
life
timenudge
delay
loop
bone
position
color
falloffstart
falloffend

<beam>
owner_a
owner_b
bone_a
bone_b
position_a
position_b
life
timenudge
delay
loop
color
alpha
size
taper
tile
frame
param
material

<groundsprite>
*owner
bone
position
life
timenudge
delay
loop
color
alpha
pitch
roll
yaw
size
width
height
scale
frame
param
material
directionalspace

<billboard>
*owner
life
timenudge
delay
loop
bone
position
color
alpha
pitch
roll
yaw
size
width
height
scale
frame
param
depthbias
lockup
lockright
turn?
flare
material
directionalspace

<model>
name
owner
life
timenudge
delay
loop
directionalspace
bone
position
color
alpha
pitch
roll
yaw
scale
model
skin
material
anim
parentmodel
parentskeleton

<tracer>
owner_a
owner_b
bone_a
bone_b
position_a
position_b
life
timenudge
delay
loop
color
alpha
width
length
speed
acceleration
taper
tile
frame
param
material

<sound>
*owner
life
timenudge
delay
loop
bone
position
falloff
volume
pitch
sound2d
soundloop
fadein
fadeoutstarttime
fadeout
speed1
speed2
speeduptime
slowdowntime

<precipemitter>
owner
life
count
timenudge
delay
loop
spawnrate
particlelife
particletimenudge
gravity
speed
acceleration
minangle
maxangle
inheritvelocity
material
direction
directionalspace
drag
friction
drawdistance
collide

<terrainemitter>
owner
life
count
timenudge
delay
loop
spawnrate
particlelife
particletimenudge
gravity
speed
acceleration
minangle
maxangle
inheritvelocity
material
direction
directionalspace
drag
friction
range
collide

<modifier>
name
life
timenudge
delay
loop
color
alpha
material

Bangerz
02-10-2011, 06:40 PM
Oloko's Detailed Tag Guide

Complete:

absorbdamage
accumulatedamage
activatemodifierkey
addattackpreimpactactions
addattackpredamageactions
addattackdamageeventactions
addattackimpactactions
addattackimpactinvalidactions
addcharges
addcritical
adjustagility
adjustintelligence
adjuststrength
aggression
applystate
areaofeffect
attack
attackaction
aura


WIP:

breakchannel
broadcastmessage
calculatedamage
cancel
changeaccumulator
changedamage
changeduration
closeshop
createcamera
disjoint
distance
evaluate
expire
forceimpact
forgetattacks
giveitem
invalidate
levelpets
lockbackpack
lockcontrol
lockitem
lockshop
morph
movecamera
multcharges
openshop
orderdisjoint
playtauntsound
popentity
protecteddeath
push
pushability
pushentity
pushentitybyname
pushentityproxy
pushentitysearch
pushstack
reducecooldown
refreshabilities
refreshinventoryitems
removecharge
resetcooldown
resettimer
resettouches
retarget
savehealth
scaledamage
setaccumulator
setactiverecipe
setactiveshop
setaicontroller
setattackactioneffect
setattackimpacteffect
setattackprojectile
setcamera
setcharges
seteffecttype
setent0
setent1
setent2
setent3
setexperience
setgamephase
setgold
setgoldlossbonus
sethero
setinterface
setlevel
setoverlayinterface
setowner
setparam
setpos0
setpos1
setpos2
setpos3
setproxy
setrespawnhealthmultiplier
setrespawnmanamultiplier
setrespawnposition
setrespawntime
setrespawntimebonus
setscriptvalue
setteamsize
setvalue
setvar0
setvar1
setvar2
setvar3
spawn
spawnillusion
spawnitem
spawnneutrals
spawnthread
startcooldown
startexpire
startfade
starttimer
toggleoff
transferitemstohero
unlockcontrol
unlockitem
unlockshop
wait
waituntilcondition
waituntilmessage
yield
scriptthread
combatevent
targettype
entitytype
foreachitem
scriptcondition
whilescriptcondition
foreachplayer
hasmodifier
negate
consume
casteffecttype
currentdamageeffecttype
damageeffecttype
damagesupertype
combateffecttype
combatsupertype
testactivate
canactivate
cantarget
compare
else
elsecondition
condition
chance

absorbdamage
When in a damage event, absorbs the max amount of damage. When the max is exceeded, passes true and execute the code inside its tags (see usage). This action will use the entity's accumulator to calculate the total damage absorbed until now, so if you change the value of the accumulator it will affect this action.
Used by Accursed's 2nd spell.
Usage:

<state
name="State_AbsorbDamage"

icon="icon.tga"
effecttype="StatusBuff"

displaylevel="true"
>
<ondamaged>
<absorbdamage max="200">
<expire />
</absorbdamage>
</ondamaged>
</state>This state here would absorb a total of 200 damage. If the entity gets damaged by 200 or more when he has the state. The scripts inside the absorbedamage is executed, so it will be expired.
Returned: true or false. true if the max damage is reached otherwise false.
Attributes:


max: The total amount of damage that will be absorbed.


accumulatedamage
All damage done to the entity is added to this entity's accumulator at the given scale. To use the accumulator go see the setaccumulator action.
Used in Armadon's 3rs spell, Defiler ultimate and Gladiator ultimate.
Usage:

<state
name="State_LifeSteal_After"
>
<ondamage>
<accumulatedamage scale="0.25" />
</ondamage>

<onexpired>
<heal target="source_entity" a="accumulator" />
</onexpired>
</state>This state here would add to the accumulator 25% of the damage done. Then when the state expire, we heal the source_entity (the hero that "casted" the state) for the total amount of the accumulator. This mean that when the state will expire, it will be healed of 25% of the total damage done during the state effect.
Attributes:


entity: Entity that will have the accumulator changed. Default: this_entity.
scale: The % of the total damage that will be added to the accumulator. 0 to 1. Default: 0.


activatemodifierkey
Activate a specific modifier key on a given entity.
Used in the tutorial.
Usage:

<activatemodifierkey entity="target_entity" name="no_sell" />This would give the modifier "no_sell" to the target_entity. The idea here is to had a modifier on items that will stop the user from selling items when it has the "no_sell" modifier.
Attributes:


entity: The entity that will have the modifier applied to. Default: this_entity.
name: The modifier name.


addattackpreimpactactions
Adds the sub actions to the current attack's preimpact.

addattackpredamageactions
Adds the sub actions to the current attack's predamage.

addattackdamageeventactions
Adds the sub actions to the current attack's damageevent.

addattackimpactactions
Adds the sub actions to the current attack's impact.

addattackimpactinvalidactions
Adds the sub actions to the current attack's impactinvalid.

addcharges
Adds count worth of charges to the entity for the given duration. This can also be used to get the amount of charges on an external entity.
Used in almost every spells that uses charges.
Usage:


<state
name="State_SpecialDOT"

impactinterval="1000"
maxcharges="10"
>

<onimpact>
<addcharges />
<damage effecttype="Magic DOT" amount="10" b="charges" op="mult" />
</onimpact>
</state>Here the state would impact every 1sec. On impact, it will add one charge to the total amount of charges and deals 10 * charges of damage.
Alternate usage:

<state
name="State_Buff"

>

<onframe>
<addcharges entity="proxy_entity" count="0" />
<condition test="result eq 0">
<expire />
</condition>
</onframe>
</state>This state here is spawned with the ability has its proxy_entity. On frame, it will add 0 charges to the proxy_entity but it will receive as the result of the action the new charges count. Then if the result is 0, we have no more charges so we remove the "State_Buff". This is only an example, this state here does nothing.
Returned: The amount of charges of the entity.
Attributes:


entity: The entity that we add charges to. Default: this_entity.
count: The amount of charges that will be added. Default: 1.
timed: true or false. Each charge's duration is independent of each other if true. Otherwise, adding a charge resets the duration of all charges. Default: false.
duration: Duration of the charges. Default: -1 (no duration).


addcritical
Used in attack damage event, gives a given chance to multiply damage by the multiplier. Note here that a passive critical bonus should be done using ability attributes rather than a script action.
Used in Scout's 3rd ability, Puppet Master 3rd ability and Swiftblade 3rd ability.
Usage:

<ability


actiontype="passive"
>
<onattackstart>
<condition test="distance gt 500" source="source_entity" target="target_entity">
<addcritical chance="1.0" multiplier="2.0" />
</condition>
</onattackstart>
</ability>This passive ability has a critical that has a 100% chance to do 2 times the damage if the target is more than 500 units from the "caster".
Attributes:


chance: 0.0 to 1.0. The % of chances to trigger the critical. Default: 1.
multiplier: Damage done will be multiplied by this number. Default: 1.


adjustagility, adjustintelligence, adjuststrength
Usable only in an abilityattribute ability. Permenantly increases the entity's attribute by the value.
Used in Devourer's 3rd ability.
Usage:


<abilityattribute
name="Ability_Adjust_Strength"

icon="icon.tga"

actiontype="passive"
>
<onkill propagatetoillusions="false" >
<adjuststrength value="-1" />
</onkill>
</abilityattribute>This passive ability will REDUCE the strength of the hero by 1 each time it kills something.

Attributes:


entity: Entity that will have it's attribute changed. Default: this_entity.
value: The amount of attribute to add. Can be negative to reduce. Default: 0.


aggression
Gives sight of the source to the target as if they attacked them from fog.
Used in the Taunt ability.
Usage:

<ability
name="Ability_Aggression"

actiontype="target_entity"
targetscheme="enemy_heroes"
>
<onimpact />

<onimpact>
<aggression source="source_entity" target="target_entity" />
</onimpact>
</ability>
This spell would give the sight of the caster to the target when casting the spell.
Attributes:


source: The entity that will be shown. Default: source_entity.
target: The entity that will gain sight of the source. Default: target_entity.


applystate
Applies a state with the given name to the target for the duration. If the state is already present on the entity, it will trigger the onrefresh event.
Usage:

<ability
name="Ability_ApplyState"

actiontype="target_entity"
targetscheme="enemy_heroes"
>
<onimpact />

<onimpact>
<applystate name="State_ApplyState_self" target="source_entity" proxy="target_entity" />
</onimpact>
</ability>
This spell would apply a state to the caster at the spell impact. The stat will also have its proxy set to the target_entity. This is useful when you want to have a state that will take action depending of the target state.
Attributes:


name: The name of the state to apply.
duration: The duration in MS before the state expire. Default: 0.
charges: This doesn't seems to work. Sets the initial charges of the state. Default: 0.
chargesmult: Multiplies the state's charges by this value. Default: 0 (doesn't make sense).
ischannel: true or false. Used in channels to designate if this state should auto-expire when the channel ends. Default: false.
istoggle: true or false. Used in toggles to designate if this state should auto-expire when the toggle ends. Default: false.
proxy: Sets the initial proxy entity of the state.
pushentity: true or false. Pushes this state onto the entity stack after it is created. Default: false.
stack: true or false. Lets multiple copies of the same state from different source stack on the same target. Default: false.
continuous: true or false. Makes this state have no duration, it will last until it is manually expired elsewhere. Default: false.
timeout: How often the state checks if it should start it's expire or expire itself. Usually set to "frametime". Default: 0.
spawner: Set the entity that spawn the state. Default: inflictor_entity.
inflictor: Set the inflictor entity on the state. Default: source_entity.
target: The target that will have the state apply to. Default: target_entity.
statelevel: Sets the level of the state. If not set, it will use the current entity (the ability, affector, projectile, etc.) level.


areaofeffect
Does an instant AOE with the given parameters, hitting every unit in the radius that fits the targetscheme and selection. This should be used instead of affectors for instant 0 duration AOEs. Every unit hit by the areaofeffect runs through given actions in order of being hit.
Note: Make sure to set the targetscheme and the targetselection attributes or it will not work.
Usage:

<ability
name="Ability_AreaOfEffect"

actiontype="self_position"
targetscheme="enemy_units"

targetradius="500"

casteffecttype="Magic"
>
<onimpact>
<areaofeffect
radius="500"
maxtotalimpacts="3"
targetselection="random"
targetscheme="enemy_units"
effecttype="Magic"
>
<applystate name="State_Stunned" duration="2000" />
<damage effecttype="Magic" amount="200" />
</areaofeffect>
</onimpact>
</ability>This spell will do an areaofeffect of 500units in radius around the caster. It will "hit" 3 random enemy units. Each time a unit is "hit", it will stun it and damage it for 200 magic damage (total of 3 times). If there is only 1 unit, it will be stuned and damaged only once (see attributes to know why).
Attributes:


targetscheme: The targetscheme of entities that should be hit by the areaofeffect.
effecttype: The effect type of the areaofeffect.
ignoreinvulnerable: true or false. Does the areaofeffect targets invulnerable entities? Default: false.
center: The origin of the areaofeffect. Default: target_position.
targetselection: The selection type on the targets.
radius: The areaofeffect radius. Default: 0.
innerradiusoffset: The offset from the origin where the radius should start. E.g: if innerradiusoffset="50" and radius="100", entities that are 50 units from the areaofeffect will not be hit. Those that are from 51 to 100 units will be hit. Default: 0.
maxtotalimpacts: The maximum number of entities that will be hit.
maximpactspertarget: The maximum number of impact per entities. Default: 1.
firsttarget: Given entity is the first target every time.
ignore: Given entity is ignored.
global: true or false. Is the areaofeffect global (whole map). Default: false.
includetrees: true or false. Are trees hit. Default: false.


attack
Does an instant attack from the source to the target if the targetscheme and effecttype of the target are valid (from the source).
Usage:

<affector
name="Affector_Attack"

radius="200"
lifetime="-1"

targetselection="closest"
targetscheme="enemy_units"
maximpactspertarget="1"
>
<onimpact>
<attack targetscheme="enemy_units" source="this_owner_entity" />
<resetattackcooldown/>
</onimpact>
</affector>This affector here could be spawned on hero, making it attack every enemy units once in a radius of 200. The idea is to make a spell, like a charge, deals the actual hero damage rather than a fixed damage (including attack modifier).
Attributes:


source: The entity that will attack. Default: source_entity.
target: The target of the attack. Default: target_entity.
targetscheme: The targetscheme to test if the attack can be done.
effecttype: The attack effecttype.
facetarget: true or false. Instantly turns the source to face the target when the attack is done. Default: false.


attackaction
Does an instant attack from the source to the target if the targetscheme and effecttype of the target are valid (from the source). Skips the normal attack events before the action.
Attributes:


source: The entity that will attack. Default: source_entity.
target: The target of the attack. Default: target_entity.
targetscheme: The targetscheme to test if the attack can be done.
effecttype: The attack effecttype.


aura
Causes an aura that has radius and applies the state and/or gadget listed as long as the effecttype and targetscheme are met. The duration is how long the state stays on them outside of the aura.
This "action" is not to be used inside of an event. It's a element of a entity.
Notes: A state applied by an aura will continually be refreshed on its targets. This mean that the oninflict event will only be triggered when a unit get the aura first and then it will trigger the onrefresh event of the state. It also seems each time the aura will refresh the state, it will lose its proxy entities. When leaving the range of the aura, it will then expire the aura, making the onexpired event trigger.
Usage:

<ability
name="Ability_SimpleAura"

actiontype="passive"
>
<aura state="State_SimpleAura" radius="900" targetscheme="ally_ranged_units" effecttype="Buff" propagatecondition="not_stealthed" />
</ability>This is a simple passive ability that has a aura. The aura will apply the state State_SimpleAura to all ally ranged units in a 900 radius IF the ability owner is not stealthed. It also specify that the aura is a Buff.


<ability
name="Ability_Arachna3"

icon="icon.tga"
maxlevel="4"
requiredlevel="1,3,5,7"

actiontype="no_target"
frontqueue="true"
inheritmovement="true"
casttime="0"
castactiontime="0"
cooldowntime="1000"
cooldowntype="arachnaauratoggle"
noresponse="true"
>

<modifier key="arachnaauratoggle_heroes" modpriority="100"
displayname="true"
>
<onimpact>
<setactivemodifierkey name="" />
</onimpact>

<aura state="State_Arachna_Ability3" radius="900" targetscheme="ally_ranged_heroes" effecttype="Buff" propagatecondition="not_stealthed" />
</modifier>

<modifier key="" modpriority="100"
displayname="true"
>
<onimpact>
<setactivemodifierkey name="arachnaauratoggle_heroes" />
</onimpact>

<aura state="State_Arachna_Ability3" radius="900" targetscheme="ally_ranged_units" effecttype="Buff" propagatecondition="not_stealthed" />
</modifier>
</ability>Here is the current (23/02/2011 - 2.0.15) Arachna's aura ability. It uses modifiers to change the targetscheme of the aura. Using modifiers is the best way to manipulate an aura since you can't affect it using actions.
Attributes:


name: The name of the state to apply.
gadget: The name of the gadget to apply.
radius: The radius of the aura. Going over the limit will make the aura gobal. Default: 0.
duration: The state duration in MS. This mean that if an entity that has the aura leave the radius, it will still have the state for the given duration. Default: 0.
targetscheme: The targetscheme of the aura.
effecttype: The effecttype of the aura.
ignoreinvulnerable: true or false. Does the aura target invulnerable entities? Default: false.
condition: Sets a condition for the state to be applied.
reflexivestate: A state that is applied to the owner of the aura when an entity is under of its effects.
propagatecondition: Sets a condition for the aura to be active.
stack: true or false. Lets multiple aura of the same state stack. Default: false.
notooltip: true or false. Removes the tooltip for the aura. Default: false.

Bangerz
02-10-2011, 06:50 PM
WIP
Actions in this section aren't complete, consult the official documentation first.

breakchannel
Used to break a channeling spell. This will trigger the onchannelbreak event.
Used in Electrician's 1st spell and Flint Beastwood's ultimate.
Usage:

<onchannelframe>
<condition test="target_health_percent lt 0.5" target="source_entity">
<breakchannel />
</condition>
</onchannelframe>While channeling, if the caster health percentage is lower than 50%, it will break the channeling.
Attributes:


entity: The entity that will have its channeling ability broke.


calculatedamage
Calculate how much damage of a specific effect would do to a target entity. There is no real damage done to the targeted entity with this, it only calculate how much damage it would actually do including armor, magic armor, damage immunity, etc.
Used in Dampeer's ultimate, Flint Beastwood's 2nd spell and Soul Reaper ultimate.
Usage:

<ability
name="Ability_Calculate_Damage"

actiontype="target_entity"
targetscheme="enemy_nonboss_units"
casteffecttype="Magic"
>
<onimpact>
<damage amount="200" effecttype="Magic" />
<calculatedamage amount="200" effecttype="Magic" />
<popup name="critical" a="result" source="target_entity" target="target_entity" />
</onimpact>
</ability>
This ability would deal 200 magical damage to the targeted entity. Since the target magical armor will probably influence the actual damage it will receive, the calculatedamage action is used to return the real damage the entity would received. We then display the result in a critical popup on the target.
Returned: The amount of damage the target would received.
Attributes:


amount: The amount of damage to calculate.
effecttype: The type of damage done to the target. Magic, Physical, Physical, Splash, DOT, SuperiorMagic, SuperiorPhysical, Interrupting, Cleave, Returned. If empty then it will be true damage.


cancel
This action is used in Order entities and not Abilities. It will cancel the order, it's particularly useful when the order is forced on the unit. It will trigger the oncancel event.
Used in Rampage's 1st spell and Legionnaire's 2nd spell.
Usage:

<order
name="Order_Cancel_Order"

triggerrange="100"
>
<onframe>
<condition test="distance gt 600">
<cancel />
</condition>
</onframe>
</order>Here the order would be canceled when the entity his more than 600 units away from its target. This could be useful to create something like a "fear", where the entity is ordered to run away from a unit, but will stop when it gets more than 600 units from it.

changeaccumulator
This will make a arithmetical operation on the current accumulator value and change it for the result. This can also be used to find the accumulator value of another entity using the result.
Used in Dark Lady's 3rd spell and Nome's Wisdom item.
Usage:

<ability

name="Ability_ChangeAccumulator"

actiontype="target_entity"
targetscheme="enemy_units"
casteffecttype="Magic"

maxcharges="800"
>
<onlearn>
<setaccumulator value="1" />
<setcharges a="1" />
</onlearn>

<onimpact>
<damage amount="2" b="charges" op="mult" />
<setcharges a="1" />
<setaccumulator value="1" />
</onimpact>

<onframe>
<condition test="accumulator gt 0 and accumulator lt 800">
<changeaccumulator b="frametime" op="add" />
<setcharges a="result" />
</condition>
</onframe>
</ability>This spell here add one charge per second using an accumulator. This is very useful to use an accumulator in case like this, since the frametime might be something like 0.065, so it would be rounded to 0 charges, but the accumulator will keep track of it. Then we deal two times the number of charges in damage and reset the number of charge and the accumulatorto 1. The accumulator will stop adding charges at 800.
Returned: The new accumulator value.
Attributes:


entity: The entity that will have its accumulator changed. Default: this_entity
b: The value we will use in the operation.
op: The operand to use.


changedamage
This will make a arithmetical operation on the current damage value and change it for the result.
Used in most gadget that dies after a specific number of hit.
Usage:

<gadget

name="Gadget_GenericGadget"

maxhealth="4"
...
>
<ondamaged>
<changedamage b="1" op="min"/>
</ondamaged>
</gadget>This would make the damage done to the gadget reduced to 1. Since the gadget has 4 HP, it would die after getting hit 4 times.
Attributes:


b: The value to use in the operation.
op: The operand to use.


changeduration
Change the duration of an entity. This is known to work on state, it was not tested on other kind of entity.
Used in charges based skill that recharge every X seconds.
Usage:

<state
name="State_Chipper_Ability1_Charges"

ishidden="true"
impactinterval="4000"
maxcharges="1,2,2,3"

>
<oninflict>
<starttimer entity="proxy_entity" duration="4000" />
</oninflict>

<onimpact>
<addcharges entity="proxy_entity" count="1" />
<condition test="charges gt 1">
<starttimer entity="proxy_entity" duration="4000" />
<changeduration b="4000" op="max" />
</condition>
<removecharge />
<setaccumulator entity="proxy_entity" value="1" />
</onimpact>
</state>Chipper 1st ability state that add charges. This state is given a duration of 4sec and a certain amount of charges. When it add a charge to it's proxy_entity, if it still has more charges to add, it will reset the duration of the state to 4sec. That way it can add more charges if it needs to, otherwise it will expire.
Attributes:

clientuitrigger
Trigger a UI trigger with a set perameter value. For more information about UI triggers, you should go see in the modification forum.
Used in the tutorial.
Usage:

<clientuitrigger name="skill_popup" param="1" />This would trigger "skill_popup" with a param value of 1.
Attributes:


name: The UI trigger name.
param: The parameter of the trigger. This need to be a static value, you can't send variables.


createcamera
Create a new camera at the given position. You should use the setcamera action to set the camera to a player. You can also move the camera using the movecamera action.
Used in the tutorial.
Usage:

<createcamera name="pcam1" position="1000.0 1000.0" />This will create a new camera with the name "pcam1" at the position (1000, 1000).
Attributes:


name: The name that you will use in your script to refer to the camera.
position: The position where the camera should be.
pushentity: true or false. If true, the camera will be pushed in the entity stack. Default: false.


forceimpact
This is usually used within a projectile to force the trigger of the onimpact event.
Used in "Projectile_Kraken_Ability2", in the ontouch event. If the touched entity is a tree or building, then it will trigger the onimpact event to make kraken stop is charge.
Usage:


<forceimpact />


spawnneutrals
It will spawn the neutrals on the map.
Used in the tutorial map.
Usage:


<spawnneutrals />
This will trigger all neutrals camp to spawn.

giveitem
Give an item to the target unit or its stash.
Used in the tutorial.
Usage:

<giveitem target="source_entity" name="Item_Lifetube" />Give to the source_entity the item "Item_Lifetube".
Attributes:


target: The unit that will receive the item, or its stash.
name: The item name that will be given to the unit.
stash: true or false. true if the item needs to be put in the stash. Default: false.
pushentity: true or false. true if you want to push the entity on the entity stack. Default: false.


movecamera
It will move a camera to a position. It can be moved to the position over a certain duration and can also block script execution before getting to the position. It should be used with the combination of the createcamera and setcamera actions.
Used in the tutorial.
Usage:

<onaddplayer>
<createcamera name="pcam1" position="1000.0 1000.0" pushentity="true" />
<setcamera entity="target_entity" camera="stack_entity" />
<setent0 name="pcam1" /> <!-- We can now use the name of the newly created camera at any point and set it like this -->
<setent1 name="player_hero" />
<movecamera entity="ent0" positionentity="ent0" />
</onaddplayer>This will create a camera with the name "pcam1" and push it on the entity stack. The camera is then set to the current player that was added in the game (using the onaddplayer event). Then we move the camera to the entity "player_hero". This script wouldn't work with more than one player.
Attributes:


entity: The camera entity we are moving.
positionentity: The entity we are moving the camera to. You can use positionname if you don't want to move it to an entity.
positionname: The position name of a "Trigger_Marker" entity set in the entitylist file of the map. You can use positionentity if you don't want to use a position name.
duration: The duration of the camera move in MS. e.g: a duration of 5000 would move the camera from the current position to the target over 5sec. Default: 0.
block: true or false. If the script after the camera move should be blocked until the move is done. Should be used if you want to move your camera over time and execute the script after finishing moving it. Default: false.
interpolate: true or false. Default: unknown.


setcamera
Set the camera of a player. It can also be used to "unlink" a camera from a player. You need to use this when you create a new camera to assign it to a player or want to unlink a camera.
Used in the tutorial.
Usage:

<onaddplayer>
<createcamera name="pcam1" position="1000.0 1000.0" pushentity="true" />
<setcamera entity="target_entity" camera="stack_entity" />
</onaddplayer>Here a camera is created when a player is added in the game and set the newly camera to that player. This script wouldn't work with more than one player.
Attributes:


entity: The player entity you want to set the camera to.
camera: The camera we want to set. This attribute can be empty if you want to unlink the current camera of the player.


setexperience
Change the current experience of a specific entity to the given value. If you know what experience is needed to attain a certain level, it can be used to change the level of a hero.
Used in the tutorial.
Usage:

<setexperience entity="target_entity" value="500" />This would set the spell target_entity's experience to 500.
Attributes:


entity: The entity that will have is experience changed.
value: The experience value that will be set.


setgamephase
This will change the current game phase to the specified one with the specified duration.
Current known game phase is "pre_match".
Used in the tutorial map.
Usage:


<setgamephase name="pre_match" duration="3000" />
This will start the pre_match phase with a duration of 3 seconds.
Attributes:


name: The phase name we want to set.
duration: The time duration of the phase in MS.


setgold
This will change the current gold of the targeted player to the set value. This will not add/remove gold to the current total gold of a player, but replace it.
It is used in the tutorial.
Usage:

<foreachplayer>
<setgold entity="target_entity" value="0" />
</foreachplayer>This would change the gold of every player in the game to 0.
Attributes:


entity: The player entity that will have is gold changed.
value: The new total gold value of the player.


sethero
The hero will now be the targeted player hero.
Used in the tutorial. It's useful when you don't pick a hero, but rather spawn it. You can then set the hero for each player.
Usage:

<foreachplayer>
<spawnunit name="Hero_Warlock" source="target_entity" target="pos0" pushentity="true" />
<changeteam entity="stack_entity" team="1" />
<setowner entity="stack_entity" player="target_entity" />
<sethero entity="target_entity" hero="stack_entity" />
</foreachplayer>This will spawn a "Hero_Warlock" for every player at pos0. It will then change the team of the unit to team 1. The the owner is changed to the current player in the loop. And then we finally set the hero of the actual player in the loop on the newly created unit.
Attributes:


entity: The player entity that the hero will be set to.
hero: the hero entity that we assign to the player.


setlevel
Change the level of an ability to the given value. This will NOT change a hero level, it will only work on abilities. You can set the level of an ability higher than the number of "spell points" you have. e.g: A hero level 1 can have a spell level 4 using this action even if he could only get one spell level 1. It will not use any "spell points" when leveling the spells, so you will still have that remaining one spell to choose.
Used in the tutorial.
Usage:

<setent1 name="player_hero" />
<pushability source="ent1" name="Ability_AttributeBoost" />
<setlevel entity="stack_entity" value="1" />Here using the setent1 command, we choose the target hero that has the spell we want to level. Then using the pushability we push in the stack the ability we want to level, in this case it's "Ability_AttributeBoost". Then we set thte level of that ability to 1.
Attributes:


entity: The ability entity that we want to level.
value: The level of the ability.


setowner
Change the entity owner. This shouldn't be used to take control of unit like Ophelia's spell, see takecontrol for this.
Used in the tutorial.
Usage:

<foreachplayer>
<spawnunit name="Hero_Warlock" source="target_entity" target="pos0" pushentity="true" />
<changeteam entity="target_entity" team="1" />
<setowner entity="stack_entity" player="target_entity" />
<sethero entity="target_entity" hero="stack_entity" />
</foreachplayer>This will spawn a "Hero_Warlock" for every player at pos0. Then the owner is set to the current player.
Attributes:


entity: The entity that will have its owner changed.
player: The player entity that will be the new owner of the entity.


setscriptvalue
Set a value to a script variable. It is used to initialize the variable and to change its value. Script values are global variable that you can access anywhere in a script without loosing its value because of the variable life scoop. Sadly, there doesn't seems to be a way to use those values in other actions than scriptcondition, whilescriptcondition and waituntilmessage.
Used in the tutorial.
Usage:

<setscriptvalue name="goats" value="5" />This will set the script variable "goats" to a value of 5.
Attributes:


name: The script variable name.
value: The value to set to the variable.


spawn
This will spawn a predefined entity from the entity list into the game. In the entitylist of the map, you will need to have a name set to the entity and also have the attribute dormant="1".
Used in the tutorial.
Usage:

<spawn name="my_hero" />It will spawn the entity with the name "my_hero" in the entitylist of the map.
Attributes:


name: The name of the entity to spawn. It is set in the entitylist file of the map.
owner: The entity that will own the newly spawned entity.


wait
Stop script execution for a certain amount of time.
Used in the tutorial.
Usage:

<wait duration="3000" />This will stop script execution for 3 seconds.
Attributes:


duration: Time in MS that the script will be stopped.


waituntilcondition
Script will stop executing until a certain condition is met. Conditions work like the ones in the condition action.
Used in the tutorial.
Usage:

<waituntilcondition target="source_entity" test="hasstate State_Test" />This will wait for the source_entity to get the state "State_Test" before continuing script execution.
Attributes:


test: The condition to test.
target: The target of the test.
source: Source of the test.


waituntilmessage
The script will stop executing and will wait for a message from the "SendScriptMessage" command of the UI to be returned with a specific value.
Used in the tutorial.
Usage:

<setscriptvalue name="selection" value="0" />
<setscriptvalue name="response" value="0" />
<waituntilmessage name="response" value="1" />
<scriptcondition name="selection" value="1" >
<!-- Code Here -->
</scriptcondition>Here two script value are initialized to 0. Then we stop executing scripts until the message with the variable name "response" is sent with a value of 1. At the same time the UI send a message of "response" with the value 1, it set the value of "selection" to a number between 1-5 depending of the user action. The script will then resume and we can use scriptcondition to make actions depending of the user choices.

Attributes:


name: The script variable that we are waiting to receive from the UI.
value: The value the variable need to have so the script can resume.


yield
This is used to give control to other thread while in a whilescriptcondition action. You can find more info about yield on this Wiki page (http://en.wikipedia.org/wiki/Coroutine).
Used in the tutorial.
Usage:


<scriptthread name="camfollow_witchslayer">
<setent3 name="witchslayer" />
<setent0 name="pcam1" />
<whilescriptcondition name="cam_follow_witchslayer" value="1" >
<movecamera entity="ent0" positionentity="ent3" interpolate="true" />
<yield />
</whilescriptcondition>
</scriptthread>The yield action here will let other thread to exectue script, which will let the scriptvalue "cam_follow_witchslayer" to change at some point and stop the loop.

Schm0ftie
02-24-2011, 08:44 AM
Nice, thank you Bangerz and all that guys who take part in every guide =)
Finally something to read through ^^

FlameStick
02-24-2011, 08:50 AM
WoW really nice now i wont have to bother Oloko for every little thing :)

tojooko
02-24-2011, 09:53 AM
Some feedback.
1. In <changeaccumulator ../>, <changecurrentcombatdamage />, <changedamage />, <changeduration />, <changetotalduration /> events is missing a="0"
2.About giving gold: The <givegold source="this_entity" target="target_entity" amount="0"/> from tutorial works fine for me, so maybe add it
3. <onrefresh /> // Resfreshed state on an entity
Well , maybe I should have reported it, but in version 2.13 (have't checked after last big patch) refreshed state looses his proxy_entity (but not his ID). I'd prefer you marking it here so nobody will waste time searching for bugs here like me:P. And if it is fixed and I'm wrong... I'll be happy that S2 found even such little bug

Realy thanks for it guys. I've spent 1h reading it and fixing my code. It seems new update is comming:P

Gazmanic
02-24-2011, 11:12 AM
Thanks alot for taking the time to compile this. It will be of great use to me :D

Oloko
02-25-2011, 06:45 AM
Some feedback.
1. In <changeaccumulator ../>, <changecurrentcombatdamage />, <changedamage />, <changeduration />, <changetotalduration /> events is missing a="0"
2.About giving gold: The <givegold source="this_entity" target="target_entity" amount="0"/> from tutorial works fine for me, so maybe add it
3. <onrefresh /> // Resfreshed state on an entity
Well , maybe I should have reported it, but in version 2.13 (have't checked after last big patch) refreshed state looses his proxy_entity (but not his ID). I'd prefer you marking it here so nobody will waste time searching for bugs here like me:P. And if it is fixed and I'm wrong... I'll be happy that S2 found even such little bug

Realy thanks for it guys. I've spent 1h reading it and fixing my code. It seems new update is comming:P

1. I don't know for the others, but <changeaccumulator /> doesn't have a "a" attribute. It works as if a "a" attribute is always there and set to "accumulator". Manning you can only do operations on the current accumulator value. If you want to change the value of the accumulator before, then use the <setaccumulator /> action.

2. Don't you mean <setgold />? There is no <givegold /> used in the tutorial. I never tried using <givegold /> before so I don't know if it works.

3. I noticed this too when I was testing the aura action (since it only refresh the state). I started adding it in my detailed documentation and I'll see what to do with the official one. I wasted a lot of time with this too. :p

Thanks for your feedback and correction!

If you guys have suggestion on what you would like to see in this thread please do tell us.
I'm currently working on the detailed documentation for scripting, but if you guys prefer the short one, then I'll work on other guides/tutorials first.

an7hraxjax
02-25-2011, 08:00 AM
This guide is just soooo amazingly good. I'm willing to help filling the holes!
Some handy commands that weren't completely in the list :


<foreachplayer>
<setent1 name="player_hero" /> <!-- puts an entity in a cache memory "ent1" for easy reuse -->
<!-- "player_hero" is a hero, declared in the entitylist -->
<changeteam entity="target_entity" team="1" /> <!-- puts player (you) to hellbourne -->
<setowner entity="ent1" player="target_entity" /> <!-- makes you owner of the entity "player_hero" -->
<sethero entity="target_entity" hero="ent1" /> <!-- makes "player_hero" your main hero -->

<givegold target="ent1" amount="20"/> <!-- gives a positive number gold to target unit ("player_hero") -->
<setgold entity="target_entity" value="800"/> <!-- set player gold -->
<giveexperience target="ent1" amount="100"/> <!-- gives a positive number of experience to target unit ("player_hero" in ent1 here) -->
<setexperience entity="ent1" value="5" /> <!-- sets experience of target unit ("player_hero") -->
<givemana target="ent1" amount="100"/> <!-- gives a positive number of mana to target unit ("player_hero") -->
<takemana target="ent1" amount="100"/> <!-- takes a positive number of mana of target unit ("player_hero") -->

<setgamephase name="pre_match" duration="10000" /> <!-- match, after_match (look red hp of shrine), but not very useful so far -->
</foreachplayer>
All tested and working.
This is why i never used the gold/experience giving gadgets ... not needed with these commands.

KUNITZ
02-25-2011, 10:45 AM
Nice! I've been waiting for something like this for a while now, glad to see someones doing their job :)

tojooko
02-26-2011, 01:43 PM
About " have my map send chat messages, give text alerts, and spawn timer bars?"

Download this mod and place it in your map (link) Can you fix link, please?

@Oloko

1. I don't know for the others, but <changeaccumulator /> doesn't have a "a" attribute. It works as if a "a" attribute is always there and set to "accumulator". Manning you can only do operations on the current accumulator value. If you want to change the value of the accumulator before, then use the <setaccumulator /> action.
THB never used accumulator yet:P I just thought it's misspelling


2. Don't you mean <setgold />? There is no <givegold /> used in the tutorial. I never tried using <givegold /> before so I don't know if it works.
I'm sure it's <givegold>, an7hraxjax posted about it too. It's useful, becouse gold popup appears from source_entity. I use it in my reworked bounty gold bonus (It's not linear).

Do you need any help with your Detailed Tag Guide? Maybe I can help with it, when my net is too laggy for playing :P

dandylion
03-01-2011, 01:09 PM
This is absolutely insane. Thank you so much.

Edit: Schmoftie has a slightly more complete Neutral Camp guide than I do. (with pictures like a boss)

Linkity link. (http://forums.heroesofnewerth.com/showthread.php?t=222144)

ElementUser
03-01-2011, 02:42 PM
Just a note to people:

-If possible, avoid using <condition test as it consumes a lot of game resources. Use <compare, <targettype, <cantarget, <canactivate, etc. instead if possible. Especially once maps are official, this will be very important.

an7hraxjax
03-02-2011, 03:48 AM
I want to add a tip for people who want to add stuff to /resources/base.mechanics (like custom targetschemes, popups, ...):
Don't put this file in your map, but make a resources2.s2z (like there is resources0.s2z and resources999.s2z from modmanager).

Doing this reduces the load time A LOT. When scripting, you often have to reload your map. If base.mechanics is included in your map, it reloads all spells and models of all heroes, and often you don't use all those heroes.
If you put this file in a separate .s2z file, it loads only the first time.

You have to renew this with every patch, but this is also the case when you put it in your map.

Bangerz
03-02-2011, 06:25 AM
The resources folder in the map is essentially the same as the game folder, so you can have any files from the resources folder as loose files in your game folder (I use a second copy) and edit them that way.

Oloko
03-02-2011, 06:35 AM
@Oloko

THB never used accumulator yet:P I just thought it's misspelling


If you think there is more error in the documentation, don't hesitate to report them.



I'm sure it's <givegold>, an7hraxjax posted about it too. It's useful, becouse gold popup appears from source_entity. I use it in my reworked bounty gold bonus (It's not linear).


I will test it myself and add it to the documentation if everything works.



Do you need any help with your Detailed Tag Guide? Maybe I can help with it, when my net is too laggy for playing :P

I really appreciate the offer, but I would like to do it myself. It takes me an average of 45min to 1h per action. So I know I won't be done anytime soon but its still something I want to do.


Just a note to people:

-If possible, avoid using <condition test as it consumes a lot of game resources. Use <compare, <targettype, <cantarget, <canactivate, etc. instead if possible. Especially once maps are official, this will be very important.

That is really helpful, thanks a lot. I didn't know about this so I always wondered why they were so many "actions" like this when I could use a condition. I will make a special note in my detailed documentation.

an7hraxjax
03-02-2011, 09:27 AM
The resources folder in the map is essentially the same as the game folder, so you can have any files from the resources folder as loose files in your game folder (I use a second copy) and edit them that way.I'd like to know why you have to load a map 2 times before it shows up right ... is this because of the custom resource files in the map ?

In other words, if I put the whole resource folder out of the map file, it will load right after a HoN restart ? This instead of good loading after one game?

ElementUser
03-03-2011, 09:25 PM
Brief "How to Modify Files Outside of a Map" Guide

1) Go to the \game folder in Heroes of Newerth's directory (default is C\Program Files\Heroes of Newerth\game). Be sure this one is not the one in "My Documents". Find resources0.s2z

http://img806.imageshack.us/img806/4633/tutorial1b.jpg

2) Using an archiver program (WinRAR and 7zip are common/popular; 7zip is free and very efficient), open up resources0.s2z and extract the desired folders/files to be edited. Make sure the folder/files get extracted into the \game folder where you have resources0.s2z

http://img153.imageshack.us/img153/3994/tutorial2w.jpg

*** Make sure to keep file structure/pathways the same if you do not wish to extract the whole folder. For instance, if I wanted to change a specific file (ability.entity of Glacius' Tundra Blast), then I would create the following pathway:

\game\heroes\frosty\ability_01\ability.entity

3) Use a text-editing program to modify the files. Most files can be edited this way. I highly recommend Notepad++ since it is amazing & used to script HoN. It is also free!

ElementUser
03-03-2011, 09:32 PM
Also there's are a few differences between accumulator and param I just found out, so they do exist.

1 of them is that param can't be used in <starttimer /> while accumulator can. Very strange.

I still like using param more when passing variables from 1 entity to another because you can do it directly.

an7hraxjax
03-05-2011, 03:56 PM
To Bangerz : command="patrol" gives "S2Game : Unrecognized Unit Command"

ElementUser
03-06-2011, 07:00 PM
I think they actually removed patrol a while ago for some weird reason.

Thysios
03-06-2011, 07:02 PM
I think they actually removed patrol a while ago for some weird reason.

I don't remember patrol ever working in the first place.

ElementUser
03-06-2011, 09:45 PM
There's a thing called "serverentity" now.

It's a boolean (so serverentity="true" or serverentity="false"). I'm not certain of its true functionality but I believe it has something to do with deterring mods from forcefully displaying that state (ie, the old Mana Battery/Power Supply state "show" mod).

serverentity does appear in the Mana Battery/Power Supply states, as well as one of Empath's ultimate state.

@Thysios: I remember it working at one point, but that was super early.

an7hraxjax
03-07-2011, 05:37 AM
Is it possible to give the precise behaviour of all the command ? In my attempt to make AI, I was looking for a command : move to that location, but aggro if you see someone. I didn't test all of them, but so far is aggressive_wander the only working one .. which made that I had to reduce wander range (cuz the random move commands to cliffs etc spams the console with pathing errors).

Also a good addition to this guide would be a list with all possible values you can use in your calculations (a="",b="",op="" or value="", ..) .

"charges"
"accumulator"
"result" use <evaluate a="some_value"/> or <changeaccumulator target="some_entity"/> to put something in result
"timer"
"var0","var1","var2","var3"
"team","target_team","proxy_team" returns "0" for neutral, "1" for legion, "2" for hellbourne, or a custom number
"health","target_health","proxy_health","source_health"
"damage_applied" ... and probably a lot more (mana, movespeed, attackspeed, str-agi-int, ..) ... but I don't know much about this.
And is there a way to use <print /> to print these values?

edit : found the <printvalue label="Name it" value="somevalue"/>

Oloko
03-07-2011, 08:26 AM
I use "attack_follow" in my Enfos to order my waves to "attack-move" to the end.

an7hraxjax
03-08-2011, 10:28 AM
Another little bug in the list : the event <onlevelup> does not exist (i think)
The console doesn't recognize anything inside this event.

dandylion
03-09-2011, 01:17 PM
Question: Is there a command to "defeat" a team? Is the only current way to "end the game" to destroy a main base structure? How can you have an entity in the game (say a Legion tower) destroy another predefined unit (say a Hellbourne Base Structure)? Do you have to use a name supplied to it or create a specific targetscheme to target the enemy structure globally?

My current idea is that when a certain skill reaches 100 charges, it will spawn a global affector that can only target enemy main base structures, and then destroy it, causing the game to end. It would be much simpler if I could forego the base structure entirely and if there was a "defeat" command to use, with a team number as a parameter, but if that hasn't been created yet, would the affector and a special targetscheme do the trick? I've been tinkering with it, and haven't had much luck yet.

dandylion
03-09-2011, 01:35 PM
Found my issue was simply a missing " mark. facepalm.

Works well now. When the charges reach a predefined number, it kills the opposing team's main base through a global affector and a custom targetscheme.

That being said... is there still an easier way to do it? For future reference that is.

Oloko
03-09-2011, 02:12 PM
You can do it the way you did. I know for my Enfos I used the courier script to find the main base. I think it's pushentitysearch. It's the same idea as what you did, but without the need of creating an affector.
If you have a name set in your entitylist file for your main base. I think you can use <pushentitybyname name="MY_NAME" /> (never tried this one) or <setent0 name="MY_NAME" />.

I have no idea what is the best way to do this but my guess is that using the name is faster than searching it using a targetscheme.

Also, I think you can make any entity to make you lose on death if it as the isbase="true" attribute (at least for building I guess), but I'm not 100% sure.

dandylion
03-10-2011, 02:48 PM
Link to this is broken




... have my map send chat messages, give text alerts, and spawn timer bars?

dandylion
03-31-2011, 08:36 PM
Is there currently any trigger set to when a target is healed?

I would like to create an ability that can negate all healing, but am having difficult finding an appropriate way of handling when a unit is healed, and tracking how much they were healed by.

ElementUser
03-31-2011, 08:42 PM
There's no <onhealed> tag :(

However, there is something in Fayde's ult state that multiplies the heal by a given value.


healmultiplier="-0.5"

an7hraxjax
04-05-2011, 03:17 PM
I need some information on <setpos0> (and the others) ...
This is what I got so far :

<pos0
// saves a position in pos0 (use <printdebuginfo/> to see it)
name="Name" // a name of an entity declared in entitylist or in game_info.entity
position="source_entity" // use the position of an entity (when you don't know the name)
positionmodifier="minonline" // pointonline, minonline, maxonline
positionend="target_position"
positionvalue="0" // a positive value for something in front of source, negative for in the back.
/>

This is limited for positions on the line between position and positionend.

I want to target a gadget, 500 units to the right of my hero. (in other words, offset="500 0") and similar above, to the left and under my hero.
ATM I use spawnaffector, but I cannot use an offset :S (it uses distance).
And setpos is similar, you cannot use offset... this makes me pretty sad.

Only solution is to spawnunit a dummy, with an aura that applies the command oninflict. But that feels like a resource-heavy solution :S I don't like it.
Other solution is to bind an invisible dummy with aura to up-under-left-right, and use them as proxies. But this confuses me a lot.

Final goal of all this : steer a unit with arrow keys, disable mouse input to move.
But I hope <setpos0/> can do more than I know atm !

tojooko
04-05-2011, 05:27 PM
Well I've checked my code, where I use <setpos> and it has offsetspace="this_owner_entity" parametr



<setpos0 position="this_owner_entity" offsetspace="this_owner_entity" offset="-41 1000 0" />
I hope it will help

an7hraxjax
04-05-2011, 05:42 PM
Oh tnx a trazillion.

Edit : I want to add this :
If you use offsetspace on a unit that can turn around, it will return a position related to the view of that unit.
In other words, offset="10 0 0" return a position to the right for the unit, not to the right on your screen.
To get a position to the right on your screen, I used

<setent0 name="Legion_Base"/> (as declared in entitylist)
<setpos0 position="source_entity" offsetspace="ent0" offset="0 256 0" />
I think there might be a global option?

Another note : offset doesn't work without offsetspace declaration.

Oloko
04-05-2011, 08:03 PM
I think that if you use source_position rather than source_entity, it will use the default angle rather than the unit angle to set the offset, since you're using a position and not a entity as the offsetspace.

an7hraxjax
04-06-2011, 05:14 AM
I think that if you use source_position rather than source_entity, it will use the default angle rather than the unit angle to set the offset, since you're using a position and not a entity as the offsetspace.confirmed.

an7hraxjax
04-07-2011, 10:52 AM
Found another function, it's not listed here :
<showchannelbar duration="1000,2000,3000,4000" /> (in gladiator/ability03/ability.entity)

Schm0ftie
04-10-2011, 01:44 PM
There's a thing called "serverentity" now.

It's a boolean (so serverentity="true" or serverentity="false"). I'm not certain of its true functionality but I believe it has something to do with deterring mods from forcefully displaying that state (ie, the old Mana Battery/Power Supply state "show" mod).

serverentity does appear in the Mana Battery/Power Supply states, as well as one of Empath's ultimate state.

@Thysios: I remember it working at one point, but that was super early.

Serverentity is also used in engineers 3rd ability
"State_Engineer_Ability3_Iseeyou"
"State_Engineer_Ability3_Run"
"State_Engineer_Ability3_Charges"

You know now its exact function?

an7hraxjax
04-13-2011, 06:25 AM
I just noticed this :
If you give an offset as argument to setpos0, it MUST have 3 coordinates (x,y,z), or it won't work! This is not needed in spawn-commands.

<setpos0 position="source_entity" offsetspace="source_entity" offset="x y z" />

vs

<spawnunit offset="x y"/>

Also I'd like to see some updates on the guides on the first page of this topic :)
I use them a lot !

Schm0ftie
04-15-2011, 06:13 PM
Found a maxowned="1" used for alchemist bones
to restrict having more then one bones.



<item
name="Item_Gloves3"

icon="icon.tga"

cost="900"
components="Item_GlovesOfHaste Item_GlovesOfHaste"
anim="item_1"
attackspeed="0.3"

actiontype="target_entity"
targetscheme="enemy_non_player_controlled_creeps"
casteffecttype="Transmute"
range="600"
casttime="300"
castactiontime="100"
casteffect="cast.effect"
manacost="25"
cooldowntime="0"
cooldowntype="gloves3"

maxcharges="2"
maxowned="1"
bindonpickup="true"
>
...
</item>

Jahjah
04-16-2011, 09:10 AM
Just wondering if anyone knows if its possible to show tower-range-indicators in the map editor or some easy tool to know how far the tower shoots.
tnx in advanced

Schm0ftie
05-04-2011, 07:18 AM
I have a question:
Is this list a official list of which commands / parameters are available / allowed ?
Or is this a list of all commands people found in the game files by looking through the
files and try and error the parameters for them?

If it is the second case, is there any official documentation (like a API ) from S2 or
will there be any one in the (near) future ?

Oloko
05-04-2011, 07:48 AM
I think this is the "official" documentation given out by S2. Some info are not up to date, so it's probably missing a couple of action as it was already mentioned by other members. All new actions that were added in newer patches are not in it too. It's the same for attributes that were added for some actions.
So you should still look at some command usage from existing script when you can and when a new hero is release, its always better to look at the script to see if there isn't something new in it.

ElementUser
05-04-2011, 03:54 PM
Oloko when you have time you should update the orbitalprojectile (in Silhouette's ability_01) scripting in here =D

Oloko
05-04-2011, 08:35 PM
Oloko when you have time you should update the orbitalprojectile (in Silhouette's ability_01) scripting in here =D

Forgot to add it, thanks for reminding me. :)

I added the section about Orbital Projectiles. Thanks to whoever at S2 made the documentation about it!

an7hraxjax
06-10-2011, 11:47 AM
a small update on the action list, patch 2.0.34
extracted from libgame_shared

Alphabetically :

<accumulatedamage/>
<activatemodifierkey/>
<addcharges/>
<addcritical/>
<adjustagility/>
<adjustintelligence/>
<adjustscore/>
<adjuststrength/>
<aggression/>
<applystate/>
<attack/>
<attackaction/>
<bind/>
<bonusdamageadd/>
<bonusdamagemult/>
<bounce/>
<breakchannel/>
<breaksoullink/>
<broadcastmessage/>
<calculatedamage/>
<cancel/>
<chain/>
<changeaccumulator/>
<changecurrentcombatdamage/>
<changedamage/>
<changeduration/>
<changehealth/>
<changeteam/>
<changetotalduration/>
<clearcriticals/>
<clearproxy/>
<clearteamtarget/>
<clientuitrigger/>
<clonebackpack/>
<closeshop/>
<complete/>
<createcamera/>
<damage/>
<deactivatemodifierkey/>
<defer/>
<delete/>
<disjoint/>
<dispel/>
<distance/>
<evaluate/>
<expire/>
<expirestate/>
<forceimpact/>
<forgetattacks/>
<getprojectileorbitradius/>
<getprojectiletheta/>
<getyaw/>
<giveexperience/>
<givegold/>
<giveitem/>
<givemana/>
<heal/>
<hidechannelbar/>
<invalidate/>
<kill/>
<killillusions/>
<killtrees/>
<levelpets/>
<lockbackpack/>
<lockcontrol/>
<lockitem/>
<lockshop/>
<morph/>
<movecamera/>
<multcharges/>
<openshop/>
<order/>
<orderdisjoint/>
<peekstack/>
<ping/>
<playanim/>
<playeffect/>
<playtauntsound/>
<pointonpath0/>
<popentity/>
<popstack/>
<popup/>
<print/>
<printdebuginfo/>
<printpos/>
<printvalue/>
<protecteddeath/>
<push/>
<pushability/>
<pushentity/>
<pushentitybyname/>
<pushentityproxy/>
<pushentitysearch/>
<pushprojectiletarget/>
<pushstack/>
<recallpets/>
<reducecooldown/>
<refreshabilities/>
<refreshinventoryitems/>
<releasecontrol/>
<removecharge/>
<resetattackcooldown/>
<resetcooldown/>
<resettimer/>
<resettouches/>
<retarget/>
<return/>
<savehealth/>
<scaledamage/>
<selectentity/>
<setaccumulator/>
<setactivemodifierkey/>
<setactiverecipe/>
<setactiveshop/>
<setaicontroller/>
<setattackactioneffect/>
<setattackimpacteffect/>
<setattackprojectile/>
<setcamera/>
<setcharges/>
<setdamage/>
<setdeathanim/>
<seteffecttype/>
<setent0/>
<setent1/>
<setent2/>
<setent3/>
<setexperience/>
<setgamephase/>
<setgold/>
<setgoldlossbonus/>
<setgoldlossmultiplier/>
<sethero/>
<setignoreattackcooldown/>
<setinterface/>
<setlevel/>
<setoverlayinterface/>
<setowner/>
<setparam/>
<setpos0/>
<setpos1/>
<setpos2/>
<setpos3/>
<setprojectileorbitradius/>
<setproxy/>
<setrespawnhealthmultiplier/>
<setrespawnmanamultiplier/>
<setrespawnposition/>
<setrespawntime/>
<setrespawntimebonus/>
<setrespawntimemultiplier/>
<setscriptvalue/>
<setteamsize/>
<setvalue/>
<setvar0/>
<setvar1/>
<setvar2/>
<setvar3/>
<showchannelbar/>
<soullink/>
<spawn/>
<spawnaffector/>
<spawnclientthread/>
<spawnillusion/>
<spawnitem/>
<spawnlinearaffector/>
<spawnneutrals/>
<spawnprojectile/>
<spawnthread/>
<spawnunit/>
<splashdamage/>
<split/>
<startattack/>
<startcooldown/>
<startexpire/>
<startfade/>
<startmatch/>
<starttimer/>
<takecontrol/>
<takemana/>
<teleport/>
<terminate/>
<testnearby/>
<toggleoff/>
<transferitemstohero/>
<transferstate/>
<transferstates/>
<unbind/>
<unlockcontrol/>
<unlockitem/>
<unlockshop/>
<useability/>
<useitem/>
<wait/>
<waituntilcompare/>
<waituntilcondition/>
<waituntilmessage/>
<yield/>
Original, by theme


<adjustscore/>
<pointonpath0/>
<forceimpact/>
<setaicontroller/>
<unlockcontrol/>
<lockcontrol/>
<unlockitem/>
<lockitem/>
<giveitem/>
<spawnneutrals/>
<startmatch/>
<setgamephase/>
<setactiverecipe/>
<setactiveshop/>
<unlockshop/>
<lockshop/>
<closeshop/>
<openshop/>
<setgold/>
<setexperience/>
<setlevel/>
<sethero/>
<setowner/>
<clientuitrigger/>
<spawnclientthread/>
<spawn/>
<movecamera/>
<setcamera/>
<createcamera/>
<setscriptvalue/>
<waituntilmessage/>
<waituntilcondition/>
<waituntilcompare/>
<terminate/>
<yield/>
<wait/>
<spawnthread/>
<setoverlayinterface/>
<setinterface/>
<changeteam/>
<setteamsize/>
<deactivatemodifierkey/>
<activatemodifierkey/>
<reducecooldown/>
<lockbackpack/>
<clonebackpack/>
<clearcriticals/>
<addcritical/>
<distance/>
<cancel/>
<complete/>
<pushentityproxy/>
<startexpire/>
<invalidate/>
<resettimer/>
<starttimer/>
<pushentitysearch/>
<transferitemstohero/>
<calculatedamage/>
<seteffecttype/>
<setvalue/>
<broadcastmessage/>
<playtauntsound/>
<aggression/>
<breakchannel/>
<toggleoff/>
<resettouches/>
<setattackimpacteffect/>
<setattackactioneffect/>
<setattackprojectile/>
<setent3/>
<setent2/>
<setent1/>
<setent0/>
<setpos3/>
<setpos2/>
<setpos1/>
<setpos0/>
<setvar3/>
<setvar2/>
<setvar1/>
<setvar0/>
<pushentitybyname/>
<pushability/>
<startfade/>
<setparam/>
<clearproxy/>
<setproxy/>
<changetotalduration/>
<changeduration/>
<popentity/>
<pushentity/>
<peekstack/>
<popstack/>
<pushstack/>
<evaluate/>
<defer/>
<push/>
<levelpets/>
<recallpets/>
<retarget/>
<adjustintelligence/>
<adjustagility/>
<adjuststrength/>
<expire/>
<savehealth/>
<changeaccumulator/>
<setaccumulator/>
<accumulatedamage/>
<changecurrentcombatdamage/>
<setdamage/>
<changedamage/>
<scaledamage/>
<spawnitem/>
<setcharges/>
<multcharges/>
<removecharge/>
<addcharges/>
<setgoldlossbonus/>
<setgoldlossmultiplier/>
<setrespawnposition/>
<setrespawnmanamultiplier/>
<setrespawnhealthmultiplier/>
<setrespawntime/>
<setrespawntimebonus/>
<setrespawntimemultiplier/>
<protecteddeath/>
<forgetattacks/>
<orderdisjoint/>
<disjoint/>
<morph/>
<hidechannelbar/>
<showchannelbar/>
<resetcooldown/>
<startcooldown/>
<refreshinventoryitems/>
<refreshabilities/>
<clearteamtarget/>
<spawnillusion/>
<kill/>
<delete/>
<setactivemodifierkey/>
<releasecontrol/>
<takecontrol/>
<dispel/>
<breaksoullink/>
<soullink/>
<setdeathanim/>
<killtrees/>
<killillusions/>
<selectentity/>
<useitem/>
<useability/>
<order/>
<setignoreattackcooldown/>
<resetattackcooldown/>
<bonusdamagemult/>
<bonusdamageadd/>
<attackaction/>
<startattack/>
<attack/>
<getyaw/>
<pushprojectiletarget/>
<setprojectileorbitradius/>
<getprojectileorbitradius/>
<getprojectiletheta/>
<spawnprojectile/>
<spawnlinearaffector/>
<spawnaffector/>
<spawnunit/>
<unbind/>
<bind/>
<return/>
<split/>
<bounce/>
<chain/>
<playeffect/>
<playanim/>
<teleport/>
<transferstates/>
<transferstate/>
<expirestate/>
<applystate/>
<takemana/>
<givemana/>
<giveexperience/>
<givegold/>
<ping/>
<popup/>
<changehealth/>
<heal/>
<splashdamage/>
<damage/>
<testnearby/>
<printpos/>
<printvalue/>
<printdebuginfo/>
<print/>


New actions : printpos, startmatch (!!), transferstates , show/hidechannelbar , adjustscore (??), pointonpath0 (??)

Also a list with conditions (returning a result) and similar commands :


<onframe/>
<aura/>
<scriptthread/>
<isability/> NEW !! you can use these to check if the source of damage is an ability or an item
<isitem/> NEW !!
<hasmodel/> NEW !!
<lineofeffect/> NEW !! line area, returns number of units affected
<areaofeffect/> circle area, returns number of units affected
<combatevent/>
<targettype source="entity" target="target_entity" type="Type"/> returns 1 if entity is the given targettype, example "all_heroes"
<entitytype source="entity" target="target_entity" type="Type"/> returns 1 if entity is the given entitytype, example "Hero_Engineer"
<scriptcondition/>
<loop/>
<whilescriptcondition/> can be used in scripts in game_info, for instance to lock a camera to an entity (see witchslayer part in tutorial)
<while/>
<foreachproxy target="an entity with proxies"/> a loop that puts each proxy in the target_entity buffer
<foreachplayer/> a loop that goes over each player ( =/= hero ), it puts the player in the target_entity buffer
<foreachitem target="an entity that carries items"/> a loop that goes over each item the target is carrying
<hasmodifier entity="this_entity" name="someModifier"/> returns 1 if entity has that modifier active
<addattackimpactinvalidactions/>
<addattackimpactactions/>
<addattackdamageeventactions/>
<addattackpredamageactions/>
<addattackpreimpactactions/>
<absorbdamage/>
<negate/>
<consume/>
<casteffecttype/>
<currentdamageeffecttype/>
<currentdamagesupertype/>
<damageeffecttype/>
<damagesupertype/>
<combateffecttype/>
<combatsupertype/>
<canattack/> returns 1 if not disarmed
<testactivate/>
<isstealthed/>
<isready/>
<canactivate/> returns 1 if an ability/item can be activated (= not on cooldown, not stunned)
<cantarget/>
<compare a="var0" b="1" op="gt"/>
<else/> if result = 0 , this part is executed
<elsecondition/>
<condition source="" target="target_entity" test="charges eq 1"/>
<chance threshold="0.6"/> a binary chance, returning 1 (60%) or 0 (40%)



edit: looks like i lost a part of my post -.-

Fuga
06-10-2011, 07:07 PM
But where do I learn the language which is used to create honmods

Schm0ftie
06-11-2011, 09:21 AM
Honmods are written in xml too (correct me if i am wrong).
They are basicly done as a honmod file which is just a renamed .zip archieve.
How a honmod file is structure you can find here. If you want more informations
you should look into the modifications forum. I hope i couuld help you a little bit.

http://forums.heroesofnewerth.com/showthread.php?t=25883
Check the point 5. honmod format.

Angstfisher
07-18-2011, 12:53 PM
Theres nothing about <onready/> which can be found in Silhouttes first ability (Q) which is what is used to trigger the blade spawning.

Tafelpoot
07-27-2011, 03:33 PM
update on the action list, patch 2.0.40.3 ..
use this command in linux console and browse the raw data :

$ strings libgame_shared-x86.so > libdump.txt

<pushhero/>
<takegold/> (go go tower defence games !)

Luke_Allstar
07-29-2011, 03:17 PM
Finnaly there is a scriptcommand for taking away gold with the <takegold/> command!
and just like with the courier, with <pushhero/> and <morph/>, tower upgrades are possible

Tafelpoot
07-29-2011, 06:00 PM
new action commands for patch 2.1.0.1 :

<setignoreattackcooldown/>
<getprojectiledistancetraveled/> (only for radial projectiles ?)
<setprojectilebounds/>

edit :

The <compare/> command now allows to put a source attribute, this will make a lot of code cleaner.
Example of the improved compare with pushhero and takegold in the courier upgrade spell :

<pushhero />
<compare source="stack_entity" a="source_gold" b="200" op="ge">
<takegold amount="200" source="this_owner_entity" target="stack_entity" />
<morph name="Pet_FlyngCourier" />
<broadcastmessage source="stack_entity" type="flyingcourier" />
</compare>

ElementUser
08-02-2011, 02:51 PM
New scripting tags (a very small list):

<takecontrol inheritmodifiers="true" />

- the inheritmodifiers="true" in <takecontrol /> seems to indicate that the modifiers from your hero transfer to the unit you're taking control of

<selectentity request="true" />

- not sure what the "request" boolean is supposed to mean, but <selectentity /> should be obvious; forces your selection to the target unit

<releasecontrol target=""/>

- releases control of the target; unsure which faction the target would go to (haven't tested it yet)

<onready />

- event triggers when the ability is off cooldown; once the cooldown is started, it will trigger again when it goes off cooldown

ElementUser
08-02-2011, 02:55 PM
Serverentity is also used in engineers 3rd ability
"State_Engineer_Ability3_Iseeyou"
"State_Engineer_Ability3_Run"
"State_Engineer_Ability3_Charges"

You know now its exact function?

Yes I do actually.

It means the file can't be edited client-side. In other words, the entity is set in stone by the server.

Angstfisher
08-05-2011, 09:22 AM
New scripting tags (a very small list):

<takecontrol inheritmodifiers="true" />

- the inheritmodifiers="true" in <takecontrol /> seems to indicate that the modifiers from your hero transfer to the unit you're taking control of

<selectentity request="true" />

- not sure what the "request" boolean is supposed to mean, but <selectentity /> should be obvious; forces your selection to the target unit

<releasecontrol target=""/>

- releases control of the target; unsure which faction the target would go to (haven't tested it yet)

<onready />

- event triggers when the ability is off cooldown; once the cooldown is started, it will trigger again when it goes off cooldown
<onready /> isn't exactly new, its been there since silhouettes release. atleast I think so, I found it in Silhouettes ability. I was asking about it a few posts back.

ElementUser
08-09-2011, 09:04 PM
New one coming next patch:

<modifier responsetype="" />

- the responsetype parameter is basically a boolean check for other things to see if it will trigger them or not; for instance, <onabilityfinish /> for Vindicator's aura. If set to something not blank, then it won't trigger it.

Rubidxx
08-22-2011, 12:15 PM
I'm very noob at this, but how do we add units and such into the map-editor? I would like to spawn some creeps (trying to make a run kitty run map cause it got a pretty simple concept :O)

Edit: Found the neutral creeps, more questions on the way

Also, i want to play my map on the hon client, but ctrl f8 + SetSave cg_dev 1 does nothing, and my map, its in the folder map game heroes of newerth, wont show up in my client. Anyone help please?

Edit 2: ah i think i found that too. more questions on the way

Nope, I used the steps at the start of this thread, but when i tried to overwrite the file i got this error ! Cannot create __rzi_42.4534480 can anyone help? I'll paste these steps here.

Travel to your Maps directory (/Heroes of Newerth/game/maps)
Open your map with WinRar(or similar) and extract the worldconfig file
Open your worldconfig file with NotePad++(or similar)
On the second line of the file, travel to the far right which you should then see dev="true", change this value to dev="false"
Save the new file and drag the new file back into WinRar and overwrite the old file
Open up HoN, Select Practise Mode, Select your Map, Play



! Cannot create __rzi_42.4534480

Jonathan
08-22-2011, 01:02 PM
Is the file being used by another program? try closing hon, maybe another winrar window has it already open,..

Rubidxx
08-22-2011, 01:50 PM
I don't think that the file is used by another program, as I did try closing all the HoN related programs. Also checked task manager for processes that might do the bug. Nothing.

tojooko
08-22-2011, 02:05 PM
Googled for this error and found:


With some security settings in Windows 7 (and Vista?) you can't edit files in the zips. Try copying the zip files to your Documents folder, editing there, deleting the zip files in the Mods folder, then move your copy from your Documents folder to the Mods folder.




Alternatively start your zip program (7 zip, winzip, etc) as admin. Right click on the actual executable, select properties, click on compatiblity tab, check box "run this program as admin".


This second solution makes sense for me. You should be able to run as admin by pressing Shift + RMB on exe/shortcut.

Rubidxx
08-22-2011, 03:19 PM
thanks! It worked, when i create a game, my map stands there, but another problem comes up, It's that when i load the map it stops at 1/10 on the loading bar, the blue thing that shows you loading thing blabalhbabalah
can anyone help?

tojooko
08-22-2011, 04:25 PM
Hmm, I'm not sure what cause it :(
Maybe upload it and send me PM with link so I can test it

Jonathan
08-22-2011, 05:31 PM
thanks! It worked, when i create a game, my map stands there, but another problem comes up, It's that when i load the map it stops at 1/10 on the loading bar, the blue thing that shows you loading thing blabalhbabalah
can anyone help?
Do you have any entities(units) on your map?

Rubidxx
08-23-2011, 09:43 AM
Do you have any entities(units) on your map?

I do have some buildings on the map, but no units (creeps, heroes)

Also, here is the link to my map, It suck balls right now, but anyways, try to check if you are able to load it.

http://www.mediafire.com/?7f1fd6153742lbj

Jonathan
08-23-2011, 10:27 AM
I do have some buildings on the map, but no units (creeps, heroes)

Also, here is the link to my map, It suck balls right now, but anyways, try to check if you are able to load it.

http://www.mediafire.com/?7f1fd6153742lbj
You can't have spaces in the file name.

Rubidxx
08-23-2011, 10:55 AM
wha? Is that true? Well, anyways i did renamed the file so it got no spaces. But anyways, nothing special happened, its the same :O

Jonathan
08-23-2011, 11:29 AM
I renamed it to run.s2z and it worked

edit: go in the console and do: 'startgame practice "test" "map:run"'

Rubidxx
08-23-2011, 01:15 PM
omg thx! It worked now!

anyways, sorry for being a total noob, but how do we spawn the hero at the top left corner at the start of the game?

Edit: I've looked up in this guide, and found that we can set a hero, so instead of choosing a hero in the hero selection, we get a hero in-game, the it was called sethero, and the code is here:
<foreachplayer>
<spawnunit name="Hero_Warlock" source="target_entity" target="pos0" pushentity="true" />
<changeteam entity="stack_entity" team="1" />
<setowner entity="stack_entity" player="target_entity" />
<sethero entity="target_entity" hero="stack_entity" />
</foreachplayer>

But where should i place it? and all of it? the </foreachplayer> at the end too? Please help,

-From a newbie noob guy who wants to make a run kitty run map, and i just realized that it would be super hard to script the sircles that other can step on when you die :/

Edit 2 : Is it in recourses game settings? too scared to place the scripts there

Tafelpoot
08-23-2011, 02:33 PM
Rubidxx, if you have a lot of questions, you can always ask them in IRC (http://www.vinthian.com/hon/), the #honscience channel. The player spawning happens in game_info.entity , I suggest you have a good look at the tutorial to see how they use it. Or in some of the maps you find here.

Rubidxx
08-23-2011, 03:09 PM
ah, thank you!

tojooko
10-05-2011, 03:29 PM
Well, I've decided to take a break from HoN and (maybe) forum. I've decided too to publish all what I've made with updating guide. It's not 100% done (Only actions and events list, but I hoped to make more). I ask Oloko or ElementUser for a little favor to update 1st page with it, I think this update is worth it)
Good luck with scripting here:)

ACTIONS (http://pastebin.com/isjZwJHP) The text hat you have entered is too long (52001 characters). Please shorten it to 35000 characters long.

Events:

<onframe /> // Processed once each frame
<onframeimpact /> // Processed once each frame per target (affectors only)
<oninterval /> // Processed once each interval (affectors)
<onbegin /> // The owner has activated this entity (orders only)
<onstart /> // This entity has begun to activate
<onprecost /> // A chance for the tool to modifier its activation cost
<onaction /> // This entity has reached its action time (called once per activatation)
<onpreimpact /> // This entity has reached its action time (before impact, called once per valid target)
<onpredamage /> // This tool's specific damage event only. Runs before damage is even calculated, to modify damage done but after evasion
<ondamageevent /> // This tool's specific damage event and damage done. Used mainly in attack abilities to modifier the damage of an attack. Runs right before the damage is done, so you can still modify it
<ondoubleactivate /> // Tool has been double-activated (needs to be tagged as double activate)
<onimpact /> // This entity has reached its action time (called once per valid target)
<onimpactinvalid /> // This entity has reached its action but the impact was invalid
<oncomplete /> // Tool successfully activates (orders only)
<oncancel /> // Tool failed to activate (orders only)
<onactivatestart /> // The owner activated an ability or item (start of activation, earliest point)
<onactivateprecost /> // The owner activated an ability or item (before the cost of that ability is taken)
<onactivatepreimpact /> // The owner activated an ability or item and it has reached its action time (before impact)
<onactivateimpact /> // The owner activated an ability or item and it has reached its action time
<onactivateend /> // Processed after an activated tool reaches the end of its cast time
<onabilitystart /> // The owner has activated an ability other than this entity
<onabilityimpact /> // An ability other than this entity has reached its action time
<onabilityfinish /> // An ability other than this entity has finished sucessfully
<onabilityend /> // Processed after an activated ability other than this entity reaches the end of its cast time
<ontoggleon /> // This tool with action type "toggle" has been turned on
<ontoggleoff /> // This tool with action type "toggle" has been turned off

<onchannelstart /> // The owner has started the channel time of this entity
<onchannelframe /> // Processed each frame the owner is channeling this tool
<onchannelbreak /> // The owner has stopped channeling this entity before the channel time completed
<onchannelend /> // The owner has completed the full channel time of this entity

<onchannelingstart /> // The owner has started any channel time
<onchannelingframe /> // Processed each frame the owner is channeling
<onchannelingbreak /> // The owner has stopped any channeling before the channel time completed
<onchannelingend /> // The owner has completed the full time of any channeling

<onattackstart /> // Processed when the owner begins an attack (earliest point, good for overriding animations /> adding impact actions)
<onattack /> // Processed when the owner reaches the attack action time
<onattackpreimpact /> // Processed when the owner successfully attacks another entity before damage and evasion
<onattackpredamage / // Processed when the owner successfully attacks another entity before damage
<onattackdamageevent /> // Called every time this entity deals damage. Includes <damage /> calls
<onattackimpact /> // Processed when the owner successfully attacks another entity and impacts (this is the same time as onattack for melee heroes with no projectile)
<onattackimpactinvalid /> // Processed when the owner successfully attacks another entity but the impact was invalid
<onattackend /> // Processed when the owner completes an attack, successful or not

<onattackedstart /> // An attack has been started on this entity (earliest point, includes spells)
<onattackedpreimpact /> // This entity has been attacked, but damage/effects/evasion have not yet been applied (includes spells)
<onattackedpredamage /> // This entity has been attacked, but damage/effects have not yet been applied (includes spells)
<onattackeddamageevent /> // Called every time this entity takes damage. This includes the <damage /> call
<onattackedpostimpact /> // This entity has been attacked and damage/effects have been applied (does not trigger on a miss/evade, includes spells)

<onattackingstart /> // This entity has started an attack (includes spells and damage calls, everything)
<onattackingpreimpact /> // Processed when the owner successfully attacks another entity before damage and evasion (includes spells and damage calls, everything)
<onattackingpredamage /> // Processed when the owner successfully attacks another entity before damage (includes spells and damage calls, everything)
<onattackingdamageevent /> // Called every time this entity deals damage. This is the first event of a <damage /> call (includes spells and damage calls, everything)
<onattackingpostimpact /> // Processed when the owner successfully attacks another entity after damage and evasion (includes spells and damage calls, everything)

<ondamage /> // This entity has dealt some amount of damage (after damage is dealt)
<ondamaged /> // This entity has taken some amount of damage (after damage is dealt)
<onstunned /> // This entity has been stunned (no longer used)
<onkilled /> // This entity has been killed
<onexpired /> // This entity has died due to its lifetime expiring
<ondeath /> // This entity has dieded
<onkill /> // This entity killed another entity
<onindirectkill /> // This entity indirectly killed another entity (through pets, for example)

<onspawn /> // Processed when spawn is called
<onrespawn /> // Processed when respawn is called
<onlevelup /> // Hero levelup
<onsmackdowned /> Hero has beed smackdowned

<oninflict /> // New state applied to an entity
<onrefresh /> // Resfreshed state on an entity
<oninflicted /> // Entity has had a new state applied to it
<onownerrespawn /> // This entity's owner has respawned
<onrelease /> // This entity has lost its binding (?)
<ontouch /> // This entity collided with another entity (touch needs to be declared, used in projectiles)
<ontouched /> // This entity has been touched by another entity
<onthink /> // Executed before neutral NPC "thinking" occurs
<ontargetacquired /> // Executed when a unit changes or acquires a target

<onlearn /> // This ability was just learned for the first time
<onready /> // This tool became ready
<onupgrade /> // This tool was leveluped
<oncreate /> // Item was created
<onpurchase /> // Item was just purchased
<ontimer /> // Timer trigger (or finishes/expires)
<onpickup /> // Item was moved into a new inventory

<checkcost /> // Runs every frame, can call <invalidate /> to 'grey' out an ability until a condition is met / used to check for custom manacosts
<checktriggeredcost /> // Runs when the ability is triggered (if it is toggled, for example). Used to check for custom manacosts.
<activatecost /> // Runs when an ability is activated and the manacost is taken (if applicable), used to do custom manacosts or costs for using abilities
<getthreatlevel /> // Used for custom agro scripting, based on base.gamemechanics level of threat

<onlobbystart />
<onaddplayer />
<onentergame />



If anyone want to work with it I can send to him source code of my HoN's script parser(C#) (It's very basic, but helpful)

Cheers
tojooko

P.S. I recommend to use Oloko's Netbeans module, it's great tool!

Techies
10-11-2011, 03:45 PM
Just a note, if you gonna do something like "noheroselect = true" and you have a trigger_spawnpoint(Player_Start)
Your gonna gonna get a random hero on the map.

If you don't have a trigger_spawn entity, the match won't start and the match timer will show a weird number which means stuff like neutrals won't spawn and buildings will be invulnerable. So you gonna have to start the map via script.

Just take note when making a map where you don't want a player to select from a dozen heroes. This is what I took from TafelPoot's code to get directly into the game with a single controllable hero for legion.



"Game_Rules"
noheroselect="true"
nolobby="true"

<onaddplayer>
<setteamsize team="1" size="1" />
<changeteam entity="target_entity" team="1" />
</onaddplayer>

<onentergame>
<spawnthread name="basic_hero_control" />
</onentergame>

<scriptthread name="basic_hero_control" >
<spawn name = "player_hero"/>
<foreachplayer>
<setent1 name="player_hero" />
<changeteam entity="target_entity" team="1"/>
<setowner entity="ent1" player="target_entity" />
<sethero entity="target_entity" hero="ent1" />
<setgamephase name="match" duration="5000" />
</foreachplayer>
</scriptthread>
>

Schyler
11-19-2011, 08:32 PM
Under Ability-specific properties you need to add "nostun" as a boolean, a property which I accidentally found in OllyDbg (never used in HoN thus far) that allows you to use the ability that contains it while stunned (combine with nosilence to use an ability at any time regardless).

-S

ElementUser
01-02-2012, 09:55 AM
NEW TAG ADDED

<onorderdisjointed />

- Calls on abilities and states; functions as a reactionary tag to the <orderdisjoint />
- Whenever <orderdisjoint /> is called on the unit that has the ability/state on them, then <onorderdisjointed /> is called

Gonna be using this to fix a lot of bugs :)

XroW
05-04-2012, 09:54 PM
Will there be any uppdates here? :)
really want to have some answers on this:

Coming Soon ™
... have more than 4 abilities on a unit?
... have more than 20 modifiers/abilities?
... have more than 20 items in the shop?
... control unit respawning?
... create a scoring system?
... control shop access?
... create a round/zoning system with teleportation?

(http://forums.heroesofnewerth.com/showthread.php?t=200579) (http://forums.heroesofnewerth.com/showthread.php?t=200579)

Volko_Biatch
04-04-2013, 09:00 PM
Sadly, you can't change the team of a building.
Nothing of this will change a passive tower to a hellbourne tower. :(

<changeteam entity="this_entity" team="2" />
<changeteam entity="source_entity" team="2" />
<changeteam target="this_entity" team="2" />
<changeteam target="source_entity" team="2" />

I put entity and target since Macrohard's (this very post, inside tutorial spoil) and Tojooko's ( http://pastebin.com/isjZwJHP ) syntax are different for the changeteam function. Any troubleshooting ? Or intented ?


EDIT : takecontrol function make the trick since it make the same team between the source and target. But there's no way to make the team back to neutral / passive / none. :/

tojooko
04-05-2013, 03:41 PM
EDIT : takecontrol function make the trick since it make the same team between the source and target. But there's no way to make the team back to neutral / passive / none. :/

If it works as you say I see easy workaround, spawn any entity with team you need (e.g. team = "2"), use changeteam with source="stack_entity" and delete just spawned entity.
Pseudocode (may need more arguments):
<spawnunit name="NAME" team = "2" team="2" pushentity="true"/>
<changeteam source="stack_entity"/>
<delete target="stack_entity"/>

Jonathan
04-06-2013, 10:15 AM
From what I've seen, <changeteam /> can only change the team of a player (for example in a <foreachplayer>) and not a unit. Contrary to what the Guide Update says, it changes the team of the entity="" and not the target="".

For example:


<foreachplayer includespectators="false">
<changeteam entity="target_entity" team="1" />
</foreachplayer>


<takecontrol /> seems to be the correct way of changing the team of a unit (do what tojooko said but with <takecontrol /> instead of <changeteam />).