You must be logged in to post messages.
Please login or register

Scenario Design and Discussion
Moderated by Sebastien, Mr Wednesday

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: Laws of the Map Editor #7: Numerical Manipulation
posted 02-10-03 04:28 PM CT (US)   
LAWS OF THE MAP EDITOR
Numerical Manipulation

The Laws of the Map Editor series was created by CrystalCrown to help others understand the quirks and unexplained mysteries of the Age of Empires II Map Editor. The author has reached a conclusion on the following subject through logic and inductive reasoning. The author makes no claims on the accuracy of this information and cannot be held accountable for consequences arising from use of such information.


Introduction

Using numbers is one of the most general methods of inputting values into triggers. They are used for a variety of things, including timers, alteration of Units' HP and attack, and more. Inputting numbers gives the user greater control over the aspects of the MAP EDITOR, and it is also one of the simplest things to do.


Countdown Clock

One of the easiest conditions to create is the "Timer" condition. A trigger with a "Timer" condition simply fires after a certain time, specified by the user. Create a "Timer" condition and type the length of the time delay inside the text box. The condition is now complete. Remember that this condition counts by seconds, so if you wish for the trigger to fire after one minute, make sure to type "60" in the text box.


Objects and Areas

Other commonly used conditions are the "Own Objects", "Own Fewer Objects", and "Objects in Area". These conditions will fire exactly as their names may imply. "Own Objects" will fire once the target player owns a number of certain Units that is more than or equal to the number specified in the text box. "Own Fewer Objects" fires under the opposite condition, which is whenever the target player controls less than or equal to the number of the certain unit that was specified. An "Objects in Area" condition will activate once a specified number of a certain unit is located in the determined area.


Unit Characteristics

Numbers are used to change the HP and attack of Units as well. The "Damage Object" effect will deal a specified amount of damage to a certain unit. The "Change Object HP" will raise the maximum HP of a Unit by the specified amount, and the "Change Object Attack" effect increases the Unit's attack by the specified amount.


Negative Numbers and Overflows

While damaging Units and raising their attack is usually sufficient. Sometimes, it might be more applicable to heal Units, and maybe even decrease their attack. One discovers quickly that a negative sign (-) cannot be typed into the text box for these effects. However, there are ways around this. While the negative sign cannot be typed directly into these text boxes, they can be inserted using the copy and paste functions. Simply type the negative sign somewhere else, copy it (right-click + Copy), then paste it (right-click + Paste) into the appropriate text box. Beware, however, that such text boxes will return to the default value (zero) if you check (click) on the effect again. This drawback can be avoided by using the overflow method. This approach calls for the input of a large number into the text box to negate the values of a smaller number. While the logic behind this is a little more complicated, the technique itself is simple. The overflow number used for these effects is 65536 or 216. To decrease a Unit's maximum HP by ten, for example, the number 65526 (65536 - 10) would be typed into the text box. Note, however, that this does not work with the "Damage Object" effect.


Instant Regeneration

The negative sign trick works well with the "Damage Object" effect, but it does not prevent a Unit from "over-healing" or having more HP than its maximum HP. To prevent this, first damage the Unit by its maximum HP, which brings its current HP down to zero. Next, "damage" the Unit by its negative maximum HP to bring it back to full health without going over.


Previous Issues

  1. Walls and Gates
  2. Walk-through on Cliffs
  3. The Beauty of Bridges
  4. Map Copy and BETA Units
  5. Eye Candy Excellence
  6. Trigger Time

CRYSTALCROWN

Play OnlineBecause you really can't gloat about beating the computer.
Learn the FlushSo you don't lose every game in under 20 minutes.

It's not a post count; it's making your posts count.

[This message has been edited by CrystalCrown (edited 02-27-2003 @ 04:33 PM).]

Replies:
posted 02-10-03 04:29 PM CT (US)     1 / 2  
The next couple of LotME issues will seem very basic to the avid designer as they deal with triggers and such. The point of these articles is to help the rookie designer who may have wanted to know these things but were either too afraid to ask, or did not receive an answer. However, I will still stick in a couple tricks here and there for readers to enjoy harder stuff.

Thanks for reading this issue of LotME.


CRYSTALCROWN

Play OnlineBecause you really can't gloat about beating the computer.
Learn the FlushSo you don't lose every game in under 20 minutes.

It's not a post count; it's making your posts count.

[This message has been edited by CrystalCrown (edited 02-10-2003 @ 04:36 PM).]

posted 02-11-03 02:16 AM CT (US)     2 / 2  
Good Job, Crystal. I am proud of you.

Tim Koschuetzki [ aka DarkAngelBGE ]
Wildfire Games Community Administrator, Webmaster, AI Scripter
Contact me: tim@wildfiregames.com
Age of Kings Heaven » Forums » Scenario Design and Discussion » Laws of the Map Editor #7: Numerical Manipulation
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Kings Heaven | HeavenGames