Myth II 1.4.x Map Maker's Guide

If you prefer, you can download this document in PDF format by clicking
here

Table of Contents


Introduction

Fear Enhancements

   The Monster Tag
      Grass Terrain Cost, value 1 - Bre'Unor n00b Rush Bug
      Grass Terrain Cost, value 2 - Selection Box Resizing
      Grass Terrain Cost, value 4 - Charge!
      Grass Terrain Cost, value 8 - Turning on the Move
      Grass Terrain Cost, value 16 - Manabar's a Secret
      Grass Terrain Cost, value 32 - Manabar? What Manabar?
      Grass Terrain Cost, value 64 - Changing Your Stars
      Grass Terrain Cost, value 128 - Lasik Corrective Eye Surgery
      Desert Terrain Cost, value 1 - Double-click to Select
      Desert Terrain Cost, value 2 - I'll Take the High Road
      Desert Terrain Cost, value 4 - A Quick Band-Aid
      Desert Terrain Cost, value 8 - Don't Just Stand There!
      Desert Terrain Cost, value 16 - And Peter Stepped Out of the Boat...
      Desert Terrain Cost, value 32 - Just a Harmless Bob
      Desert Terrain Cost, value 64 - Missile Unit Keeps Attacking After Switching Targets
      Desert Terrain Cost, value 128 - Chance of Blocking
      Negative Mana Recharge
      Negative Attack Mana Cost
      Uses Ammunition, and a Negative Repetitions Value
   The Object Tag
   The Projectile Tag
   The Lightning Tag

Loathing Enhancements

   Attack
   Unit Control
      Unit is Held Flag
      Set Mana Level, With a Value Between 0 and the Unit's Maximum Mana
      Raise Health, Lower Health
      Eliminate Team
      Kill Monsters
      Uncontrollable
   Test Unit
      Lists Same and Lists Differ
      TFL Gameplay Active
      Anticlump Active
   Geometry Filter
      Unit is Taunting
      Multiple Values in Results Action Identifier and Test Inside/Outside (Location) Field
      Subtract Monster Lists
      Monster Type
      Attacking Monsters
      Moving Monsters
      Running Monsters
      Idle Monsters
      Ammunition Less Than
      Ammunition Greater Than
      Combined Power Less Than
      Combined Power Greater Than
      Choose Random Items

Special Plugins




Introduction

Myth II 1.4 is a major advance over version 1.3, with many faults corrected and numerous enhancements to the in-game experience. Along with these are a wealth of new features available to the mapmaker. This document explains what those features are and how to use them. It assumes existing knowledge of how Fear and Loathing work.


Fear Enhancements


The Monster Tag
Looking at the values in this tag we found several that are unused by Myth. These include the Hold with Clear Shot flag, the Skittish Flag, and Terrain Cost values.

As Skittish is never active in Bungie's tags, we decided to use it in combination with Terrain Cost to switch on various new monster features. With the Skittish flag ticked, you may enter the following values in Terrain Cost fields under Terrain Parameters. These values may be added together, so a monster can be configured to act in a very specific way. If Skittish is not ticked, these values will not change monster behaviour.

We realized that using these flags means turning on passability for terrain like Grass and Desert that perhaps a unit shouldn't have (for instance, it could be an aquatic creature). To get around this, make the speed for the grass etc terrains to be zero, and in-game that terrain will be impassable for that unit despite being ticked in Fear.

Grass Terrain Cost, value 1 - Bre'Unor n00b Rush Bug
This applies only to monsters of Melee type with both short and long range attacks, such as bre'Unor. If you've ever played the bre'Unor Attack or Legend of Gor'Ash plugins, you'll know that these units have a habit of ignoring their long range bone-throwing attack and instead running in to start clubbing away at the enemy (and often dying as a result). It occurs when the unit you've told the bre'Unor to attack dies and it auto-selects another target. With this value present, monsters like bre'Unor will continue to use their long range attackunless the enemy is close enough to switch to a shorter range attack, making them much more controllable.

Grass Terrain Cost, value 2 - Selection Box Resizing
All units in Myth 2 draw the size of the selection box (the yellow rectangle that appears when you select the unit) from their first idle sequence, and apply that to all the unit's sequences. With this value present, it will use whatever selection box size is present in the collection for the unit's Taunt and all Attack sequences.For instance, a camouflaged soldier could duck down behind a rock when told to taunt, and its selection box would skrink, making it much harder to hit with paintballs.

Grass Terrain Cost, value 4 - Charge!
This only applies to units that have a Running sequence. It uses two other terrain fields - Snow Terrain Cost must hold a value being the distance in world units from enemies within which the unit will start running, and Rocky Terrain cost holding the percentage by which its speed is to increase (eg 50 to increase speed by 50%). The unit will run not only when ordered to attack, but also when damaged by an enemy within the Snow cost range. We considered stamina, but did not find a satisfactory method of implementing it in Myth.

Grass Terrain Cost, value 8 - Turning on the Move
Myth 2 units will turn on the spot, treading water until headed in the right direction at which time they'll start moving. In TFL they started moving immediately, turning in a curve as they walked. This value makes a monster turn TFL-style, which can be very appropriate for fast, large or flying units.

Grass Terrain Cost, value 16 - Manabar's a Secret
With this active your warlock's mana will not be shown to enemies, only to you.

Grass Terrain Cost, value 32 - Manabar? What Manabar?
This hides the manabar entirely. Useful in cases where mana is used in a technical way to control how a complex unit behaves, and its really not helpful for the player to see what it does.

Grass Terrain Cost, value 64 - Changing Your Stars
For missile units such as a line of archers, when you click on a group of enemies only the clicked unit is highlighted, and the arcs all fire at this one unlucky unit. With this flag, all units in the enemy group will be lit up, and the archers will spread their fire. Shift-click will make them target the one unit if desired. For melee units, this value will give them some of the AI characteristics of missile. When standing around without any player orders (no stop or guard command), if struck by long range fire outside of the unit's activation distance it will decide to retreat like an archer or dwarf does. Standard melee behaviour is to stand firm regardless of damage. Also, if a melee unit with this flag auto-responds to an enemy within range and attacks, and that enemy dies, the unit will not advance to attack other enemies outside activation distance range - again, the same as an archer's behaviour.

Grass Terrain Cost, value 128 - Lasik Corrective Eye Surgery
At present, visual ranges in myth are for long-sighted units, 28 world units and for short-sighted 22. With this value present, units will be able to see 38 world units. Note that when the value in the Grass Terrain Cost field exceeds 128, Fear will change it to a negative number. Don't worry when this happens as it will still work correctly.

Desert Terrain Cost, value 1 - Double-click to Select
Standard myth behaviour is that when you double-click on a unit, all nearby units sharing the same collection tag will be selected. You can click on a dwarf, and the nearby pathfinder dwarf, dwarf hero, and screaming iron assault dwarf will also be selected. This value means that double-click will only include this unit if the clicked unit shares the same _monster_ tag. I've seen plenty of instances where a large collection was duplicated purely to achieve this effect.

Desert Terrain Cost, value 2 - I'll Take the High Road
With Myth 2 Bungie introduced the concept of a flexible maximum range for missile units. You think your archers can only shoot 20 world units? Wrong. Put them on a high hilltop, and their range can extend significantly depending on how low the enemy is. It works the other way as well, the lower you are the closer you have to get to a high target before you can shoot. In TFL this was not the case - maximum range was maximum range. With this value your units will not gain or lose distance because of terrain elevation.

Desert Terrain Cost, value 4 - A Quick Band-aid
Monsters with this flag will not flinch while being healed. They'll just keep doing what they were doing.

Desert Terrain Cost, value 8 - Don't Just Stand There!
Imagine if you will, a warrior chasing a dwarf. The warrior catches him, swings, then stands to think for a second before resuming the chase. Units with this value will not stand to think but will keep on chasing (as was the case in TFL).

Desert Terrain Cost, value 16 - And Peter Stepped Out of the Boat...
... and walked on the water. These units will stick to the surface of water, making ripples as they move. You can define them to have no passability on ground, effectively making a boat unit. (Enter zero in the speed field for all land terrain types).

Desert Terrain Cost, value 32 - Just a Harmless Bob
With this you can make a unit not auto-target enemies by definition. Sure you can do this with scripting too, but this makes scripting unnecessary for such units which is pretty handy for multiplayer maps. Blue & Grey cannon have this flag. Note that the unit will attack when you tell it to - it just won't fire of its own accord when an enemy walks past.

Desert Terrain Cost, value 64 - Missile Unit Keeps Attacking After Switching Targets
Imagine if you will a group of archers you've told to attack some fleeing arcs. The target you clicked on dies. Your arcs auto-switch to another arc in the enemy group, but they cease chasing - as soon as the new targets are out of range your arcs stop firing. This flag will make your arcs keep up the chase once you've told them to attack, until you give another command.

Desert Terrain Cost, value 128 - Chance of Blocking
To be honest I'm not sure how well this works, but anyway ... if you have this value present, enter the chance of blocking in the Steep terrain cost field. A value of 0 will be the default behaviour, negative values down to -30 should make the unit want to block more often, and positive values up to 128 should make it block less often. All sorts of variables affect whether a unit will block, so it may be hard to see the difference depending on the unit you're applying it to. Remember if you want to make Steep terrain impassable, enter a speed of zero for it.

Ok, lets move away from Terrain Costs and look at some other things...

Negative Mana Recharge: Yes, now you can make your unit's mana run down rather than charge up.

Negative Attack Mana Cost: An attack can now be made to increase a unit's mana rather than drain it.

Uses Ammunition, and a Negative Repetitions Value: For units that have ammunition this is essentially a reload attack. It will only be available when ammo has run out entirely, and will restore ammunition to the value specified in the Attack's Repetitions field.
The Object Tag
Damage resistance can now be negative. You could, for instance, provide negative resistance to Gas damage, then make a Shaman unit with a magic Gas attack that heals units with this object value.
The Projectile Tag
You can now make the damage caused by a projectile negative, making units feel better about themselves rather than wanting to lie down and die. Healing damage with a negative value means that healing behaves normally, but has no effect on enemies, only friends.

For Confusion damage, the amount of time units stayed confused was previously a result of the amount of mana expended in the attack - made sense as only warlocks had confusion. Now if no mana was used, the confusion time will be determined by the amount of damage in the projectile's tag, relative to the victim's object tag resistance to confusion.

As a side note, area-of-effect Healing damage projectiles will no longer blow up satchel charges and demolish destructable scenery.
The Lightning Tag
When Bungie made myth 2 they halved the size of a world unit as part of making the mesh more detailed. Most values throughout the game, such as unit and projectile speeds, were doubled to take this into account. They forgot, however, to look at the lightning code. What happened as a result was that the individual segments that make up a bolt were now half the length they were before, resulting in a twisting knotty line with hairy forks coming off it - a very different effect from what had been seen in TFL. You can restore the appearance of TFL lightning by putting a value >= 0.500 in the fade duration field. If you put a positive value that is less than 0.5, the lightning will come partway towards TFL, but still retain the m2 curvature.


Loathing Enhancements


Scripting has been extended in several key areas. Much more can be achieved with far fewer map actions, and many more things are now possible than was previously the case. A new parameter, Deactivates on Failure has been added to all map actions.
Attack
A new flag has been added - Close on Enemies. Where a unit has two or more attacks this will make them use the shortest-range attack. You cannot use this in conjunction with Attack All Enemies Flag, but instead you must provide an obje list to the Attack map action. This is the scripting equivalent of the new Shift-Ctrl-Click attack command by which players can make units like bre'Unor close in for melee.
Unit Control
Unit is Held Flag: When this is present and has a True value, it will make the unit freeze in place. It won't flinch, it won't turn to look at enemies, it won't switch idle positions, it won't even blink. The only way to release the unit is with another Unit is Held with a False value, or for it to die of course.

Set Mana Level, with a value between 0 and the unit's maximum mana: Pretty self-explanatory

Raise Health, Lower Health: Modifies a unit's health by the specified amount, similar to if it was damaged by a projectile.

Eliminate Team: The team of the first monster in the list passed to the action will be eliminated and its units fade from the map. For netgame use only.

Kill Monsters: You can not only make units die, but also specify whether they suffer a hard or soft death.

Uncontrollable: Makes a unit uncontrollable (or restores it to the player), similar to if you marked it as such in Loathing. This not only makes it blue, but the unit stops telling the player what it can see, and if it dies the Casualty sound isn't played.
Test Unit
Lists Same and Lists Differ: Both require that you provide the TUNI with both a subj list and an enem list. Lists Same will make the TUNI succeed if, and only if, both lists hold exactly the same monsters. Lists Differ will succeed if there is at least one monster in one list and not in the other.

TFL Gameplay Active: The TUNI will succeed if the game is using TFL Gameplay.

Anticlump Active The TUNI will succeed if the game is using Anticlump.
Geometry Filter
Unit is Taunting: Why wasn't this always in myth I wonder?

Multiple Values in Results Action Identifier and Test Inside/Outside (Location) Field: You can now have a GEOM output a List of monsters to perhaps 4 different map actions, being subj in one, obje in another enem in the 3rd and cent in the 4th. The number of entries in Results Action Identifier and the Test Field must be the same.

Subtract Monster Lists: For this you must provide the GEOM with both a monster_identifier subj list and a monster_identifier obje list. It will populate the Results Action Identifier action(s) with units in the subj list that are not in the obje list.

Minimum Number of Items: Without at least this many items the GEOM will not succeed.

Monster Type: You can enter the 4 byte code for a monster tag and have the GEOM filter according to units of that type.

Attacking Monsters: Looks for units in the process of attacking (or blocking).

Moving Monsters: Looks for units that are moving somewhere.

Running Monsters: Looks for units that are actually running, not walking.

Idle Monsters: Looks for units with spare time on their hands.

Ammunition Less Than: Looks for units with ammunition level less than the specified amount

Ammunition Greater Than: Looks for units with ammunition greater than specified amount.

Combined Power Less Than: Looks for units with combined power less than the specified amount.

Combined Power Greater Than: Looks for units with combined power greater than the specified amount.

Choose Random Items: If used with Maximum Number of Items, the monster or markers chosen will be selected at random from the available list.

Note: Scripters should know that in Myth II v1.4, hitting Ctrl-F12 will toggle the recording of detailed script debugging information during a game to myth_log.txt.


Special Plugins


With 1.4 you can make special types of plugin. Hang onto your hat, and grab your favourite hex-editor. Better find a comfy chair and swig some black coffee while you're at it. Ok, lets look at what you can do:-

Normally the first 4 bytes in a plugin have the following hex values:- 00 01 FF FF. The first two designate what type of plugin it is (00 02 is a patch), while the second two are a version number, which for plugins was unused until now.

If you change the second two bytes to 00 02, you've designated that your plugin is compatible with the TFL Gameplay option in 1.4. Its up to you to check that it actually is compatible - this just means that the annoying popup asking if you really wanted TFL or just Anti-Clumping won't appear. It doesn't apply to tagset plugins, just those with meshes. "How", I hear you ask, "do I make my map TFL Gameplay compatible?". The simplest way is just to place Bungie units, and don't give them any special abilities or physics of their own. If you do include customized units, make sure that the unit and monster tag IDs are different from those in the Unity Patch, so those units play the same way in both regular Myth 2 and TFL. Above all, test your creation thoroughly with TFL Gameplay turned on and off to ensure that it works as you'd expect it to.

Here's where we really get clever. If you change the second two bytes to 00 03 and enter the URL as the name of another plugin, you're specifying that your plugin needs the other one loaded in order to work. When someone clicks on your plugin to activate it, a message will appear telling them to activate the other one as well. So why is this needed?

Ok, imagine there's a 100mb plugin called The Fallen Levels, with half the TFL solos ported to myth 2. It has all the collections and sounds already there. You want to make a variant that substitutes all thrall for krid giants, and dorfs for Alric with Balmung. Using this method, you could make your plugin hold only the meshes you've altered, and then anyone with The Fallen Levels could play your plugin - you wouldn't need to include the map collections etc in your plugin, making it a much smaller download.

Finally, the Unity Patch distributed as part of 1.4 has the value 00 01 for the 2nd two bytes. These are reserved for this patch - don't use them in your plugins, else BadThings™ will happen.


In writing these out, I can't help but think that I've forgotten something. If so, look for this document to be upgraded in the future...
-Iron