ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Difference between revisions of "VariableNames"

From ModEnc
Jump to: navigation, search
 
(Created (a couple of rules sections are still missing))
Line 1: Line 1:
{{DeeZireInclusion}}<br />
+
{{WrongTitle|[VariableNames]}}
This section is used to determine the global variable names used throughout the single player campaigns. These must be constant throughout all scenarios based on these rules. These are numbered starting from zero. Do not change the number values or else all pre-existing triggers using them will break. There should be no need to amend, edit or change these - they are best left alone. If you need to set your own variables you can do so through individual map files with the use of Local variables (see the Map Editing Guide). You can however define new Globals here and in conjunction with the relevant map file Action= this could provide a crude means of ensuring that your map(s) can only be used with your mod.<br />
+
 
This section specifies the various general behaviour characteristics of the missions that objects can be assigned. Each of the game objects must be in a mission at all times. The mission behaviour is generally hard coded, but there are some behaviour characteristics that can be overridden. Don't modify these or bad crashiness (and at best unpredictable/undesired effects) will result. Each mission to which an object can be assigned can have its own section defined here which will over-write the default values. Red Alert 2 allows the following missions for objects;-<br />
+
== In rules(md).ini ==
<br />
+
This section comprises a list of all Global Variables available in the game. Global Variables are [[ModEnc:Values|boolean]] variables, their state is preserved between missions, but not saved in savegames.
[Sleep] object sits around and plays dead, will not acquire targets<br />
+
 
[Attack] special attack mission used by AI team type logic<br />
+
== In Maps ==
[Move] simply moving to destination<br />
+
This section comprises a list of all Local Variables available in this map. Local Variables are [[ModEnc:Values|boolean]] variables, their state is saved in savegames, but not carried over between missions.
[QMove] special move to destination after other queued moves occur<br />
+
 
[Retreat] object runs away (may even leave the map)<br />
+
== Best of Both Worlds (Blade's post) ==
[Guard] object sits around and will engage an enemy that falls within its weapon range<br />
+
 
[Sticky] just like guard mode, except the object will engage enemies but not pursue them<br />
+
It is (theoretically) possible to carry an event (say capture a battle lab) through to having an effect on some later level (say allowing you to build a certain unit you normally cannot), but it is frustrated by the auto save feature that saves at the start of a level.
[Enter] enter building or transport<br />
+
 
[Capture] engineer entry logic<br />
+
During a level, have some event you want to carry forward set a 'Local'. These are known to be carried by saves games as a nessesity. When the win condition is met, actually have two win triggers that have the 'Local' set or clear as one of the conditions. The clear one just triggers the win, while the set one sets a 'global' as well triggering the win. This will carry over to the next level and the player cannot save in the mean time to wipe it out (only the auto save can...maybe). In the next level, have a trigger that sets a new 'Local' to carry the 'global' during the level if the 'global' is set at the start of the mission. Just repeat this over as many levels as needed in order to carry the value to the level where it will have its effect. I've never really tested this and it remains just a theory of mine and I don't really know if autosave would save before or after the 'global variable' has had chance to convert to a 'local variable' so it remains a potential spanner in the works.
[Eaten] when object is being repaired (applies only to structures)<br />
+
 
[Harvest] the loop controlling harvesting of Ore and dumping at a Refinery<br />
+
[[Category:Rules(md).ini Sections]]
[Area Guard] guard the general area where the object starts at<br />
+
[[Category:Maps Sections]]
[Return] return to co-ordinating object (e.g. spawned object returns to the spawner)<br />
 
[Stop] stop moving or firing at the first available opportunity<br />
 
[Ambush] unused, its effects are unknown<br />
 
[Hunt] scan for and attack enemies wherever they may be on the map<br />
 
[Unload] while dropping off cargo (e.g. Landing Craft unloading passengers)<br />
 
[Sabotage] unit runs to place C4 on a building or Ivan goes to place bomb on object<br />
 
[Construction] structures use this when building up after initial placement<br />
 
[Selling] structures use this for deconstruction after being sold<br />
 
[Repair] used when repairing an object (e.g. Service Depot)<br />
 
[Rescue] special team over-ride mission<br />
 
[Missile] Nuke Silo special launch missile mission<br />
 
[Harmless] object doesn't fire and is not considered in any threat scan<br />
 
[Open] while opening or closing a gate to allow passage<br />
 
[Patrol] patrol a series of waypoints<br />
 
[Paradrop Approach] object is approaching the paradrop site<br />
 
[Paradrop Overfly] object is flying over the paradrop site (i.e. dropping the paratroopers)<br />
 
[Wait] paused and awaiting next mission<br />
 
(YR) [Spyplane Approach]object is flying towards target<br />
 
(YR) [Spyplane Overfly] object is flying over the target
 

Revision as of 14:27, 12 June 2006

This page should correctly be named "[VariableNames]"; it is wrong due to technical restrictions.


In rules(md).ini

This section comprises a list of all Global Variables available in the game. Global Variables are boolean variables, their state is preserved between missions, but not saved in savegames.

In Maps

This section comprises a list of all Local Variables available in this map. Local Variables are boolean variables, their state is saved in savegames, but not carried over between missions.

Best of Both Worlds (Blade's post)

It is (theoretically) possible to carry an event (say capture a battle lab) through to having an effect on some later level (say allowing you to build a certain unit you normally cannot), but it is frustrated by the auto save feature that saves at the start of a level.

During a level, have some event you want to carry forward set a 'Local'. These are known to be carried by saves games as a nessesity. When the win condition is met, actually have two win triggers that have the 'Local' set or clear as one of the conditions. The clear one just triggers the win, while the set one sets a 'global' as well triggering the win. This will carry over to the next level and the player cannot save in the mean time to wipe it out (only the auto save can...maybe). In the next level, have a trigger that sets a new 'Local' to carry the 'global' during the level if the 'global' is set at the start of the mission. Just repeat this over as many levels as needed in order to carry the value to the level where it will have its effect. I've never really tested this and it remains just a theory of mine and I don't really know if autosave would save before or after the 'global variable' has had chance to convert to a 'local variable' so it remains a potential spanner in the works.