![]() |
|
![]() |
Strategy Mode
All strategies are linked to objects. These objects may be a physical entity (i.e. a placed switch in a level, a platform lift, a morph door etc.) or alternatively they can be linked to virtual (or dummy) objects. The correct use of virtual objects is essential in order to get more intricate linked strategies (e.g. making sure something doesn’t happen unless all the conditions are met).
Virtual objects can be created freely within the strategy editing mode of the tools. I would strongly suggest that you name them correctly as you create them - there is a high probability that you will be debugging your strategies if anything doesn’t work, and it’s almost impossible if they’re all called ‘asdassas’.
Editing strategies is best done in "no textures" mode as then it is easier to see the colour coding of the strategies on wireframe objects (and your framerate is faster).
(Note on colours - Green = has strategy. Red = currently selected object)
Once in strategy editing, you need to select the object you wish to work on, then right click and assign a strategy to it. The options available vary depending on what the object is.
Enter Strategy Mode by clicking on Mode/Strategy Data. There are two different types of Strategy Modes: Normal and No Textures. Normal draws everything while No Textures does not draw textures.
Mode
Mode > Module Flags
Enter Module Flags Mode.
Mode > Stability Flags
Enter Stability Flags Mode.
Mode > Exit
Exit Strategy Mode and return to Control Mode.
Find Objects
Browse/search for a specific object. It will be selected automatically.
Find Errors
Locate any strategy errors that might exist in your level.
Misc
Strategy Options (accessed by right-clicking anywhere on the screen)Misc > Reset Fan Wind Speed
Resets the Wind Speed of the selected Fan.
Save - Saves all strategies.There are four types of Strategies: Object, NPC, Module and Virtual Object.
Copy Strategy - Copy strategy data from selected object (if it has any).
Edit Strategy - Edit the selected object's strategy data.
Assign Strategy - Assign a strategy to the selected object.
Delete Strategy - Delete strategy data from the select object.
Create Virtual Object - Creates a Virtual Object (VO). There are several options where you want to create the VO: Here, Above, Below, Left, Right, Front and Behind.
Destroy Virtual Object - If the selected object is a Virtual Object, it will be deleted.
Delete Multiple Strategies - This allows you to delete strategies of any one type.
Platform Lift - Pretty self-explanatory. You can set whether it’s on or off etc. This is different from a track object in that an active lift will move in response to the player’s motion - if he’s at the bottom, the lift will descend for him etc. There are no lateral platform lifts, so don’t set any. The dynamics won’t cope with them at all well. Lifts naturally need a track to work - just set the endpoint where the lift terminates (it doesn’t need to have any sections added at all).NPC Strategies (Assigned to Enemy Generators)
Multi Switch - The standard switch (single-switches are being phased out). It has a target and when it receives a message (either from the player activating it or from another strategy) it sends its own message to it’s target(s). There are a large number of options which can be set - I’ll deal with those in a subsequent section.
Linked Switch - Less useful now we have virtual objects, this is a link switch with a physical presence. It can be used to reduce the number of strategies you’re using (by combining the functionality of a physical switch with linking data) but personally I find that it confuses matters - a larger but simpler web of strategies is far easier to debug / understand.
Track Object - Assigned to objects that are specifically tracks (no to Platform Lifts or Fans though). It is possible for a track to send messages to other strategies upon reaching different points of the track.
Track Object (destructible) - Assigned to objects that are specifically tracks and which can be destroyed, causing the track to stop (not Platform Lifts or Fans though). It is possible for a track to send messages to other strategies upon reaching different points of the track.
Fan - Apply it to fans, and they’ll spin around nicely according to your specifications. That’s all it does. You’ll need to apply the rotational track yourself though.
Placed Object - A catch-all strategy that is applied to all placed objects automatically. Editing placed objects allows a single target to be set , which will be sent a message when the object is destroyed and/or picked up.
Enemy - Assigned as default to all Enemy Generators.Module Strategies (Assigned to Modules)
Lift - This is a teleport lift (from the old PSX version. I won’t go into it here - ask someone) . I doubt you’ll use them much - platform lifts look better and don’t break the AI so much.Virtual Objects
Door - This is an ordinary Morph door. It has options to change whether it’s a prox door, whether it’s opened by a switch, whether it’s locked or not, whether it’s vertical or horizontal and how long it takes to open/close. These are pretty self-explanatory, so doors are relatively easy. The complex bit is how they get messages sent to them.
Airlock - Airlocks are another PSX hangover. I doubt you’ll be using them much, but ask if you want. They were a form of level-transition in the original version of AvP, and to be honest are a bit complicated.
Switch Door - Switch doors are different from ordinary doors. They usually occur in pairs, can get messages from switches etc. but only one can be open at any one time - if one opens, the other will close. Please bear in mind that using any form of locking door like this (including locked proximity doors) will break the far AI of roaming creatures unless they can find another route around the level. This strategy can be applied without an associated door. If this is done then it works like a switch activated door , except that it closes after a short period of time of its own accord.
Lighting Effects - A nice and simple strategy to apply to a module. If there are any lights placed in this module with the ‘no prelight’ flag set to ‘y’ then whatever you set in this mode will be what the light does. This varies from switching on / off through strobing to flickering.
Multi Switch - The standard virtual switch. It can have a single target or several targets. It has a selection of options available. It receives a message and then processes it according to the set rules. On the whole, multi switches tend to be physical objects rather than virtual ones, but virtual ones do crop up when there’s something complex to do.
Linked Switch - An absolute staple of the strategy system, link switches are what allow the designer to specify a collection of conditions that must be met before something happens. A simple link switch has a single target and several links to other switches. A link is simply another switch targeting the link switch. Once all the links are activated, the link switch fires. If even a single link is not on, the switch won’t fire.
Here is a simple diagram:
Only when both switches are activated (i.e. both fans turned off) will the link switch fire and the message be displayed. The total possible number of links to a single switch is 5.
Note that if the link switch is a placed object (rather than a virtual object) , it is necessary to activate the link switch as well for the message to be sent.
Important point: Any multi switch can also be partially turned into a link switch by setting the ‘Extra message data for target’ flag on the targeting switch. This is so that it is possible to have link switches with multiple targets and for even more complex behaviours.
In the diagram, the multi switch has three links to it - switches A, B & C. Switches A & B have the ‘Extra message data for target’ flag set. This is equivalent to them being part of a link set. Switch C does not have this flag set. The behaviour is relatively simple - the multi switch will fire either if both A & B fire, or at any time if C fires (as it is just a simple switch-to-switch message). The other arrows represent other targets of the multi switch that I didn’t add.
Link switch note:
The timer delay option will behave exactly like the timer option for all switches in a link switch set , so there isn’t really any point in using it for switches connected to link switches.
Additional link switch note:
The link switch only sends its message once all the switches in the set are on. As soon as any one of the switches in the set ceases to be on , the link switch will send the reverse message.
Area Switch - An area (or volume) switch is very simple. It is identical to a multi switch in all behaviours except it activates when the player enters the specified volume rather than if the player pressed a button. You specify the volume in the tools (usually it’s sufficient just to specify a module).
Mission Objective - Another relatively simple strategy. It has the following fields:
Description: This is asking for a textstring number from English.txt to be displayed when the objective is activated (and also in the Mission Objectives status panel).
Completed: Another textstring number for when it’s completed.
Order No.: Determines where in the status panel this objective will be displayed (1,2,3 etc.).
Shown at start?: Is it currently shown in the mission objectives screen?
Possible at start?: Is it currently possible to complete this strategy? This can be flipped in two ways.
1) Another mission objective targets it with the ‘mission alteration on completion’ flag.
2) A normal switch targets it with the ‘extra message data for target’ flag set.
Special: Currently used for ‘the player’s finished the level’.
Mission alteration on completion: See above.
Message - This is simply a text message that is displayed on the player’s console. The actual text of the message is defined by the data in the English.txt file in your AvP_VC directory - to add messages you need to check this out and fill in some of the spaces - they’re clearly marked. I suggest also commenting your work, so begin your section with a few # characters (they mean the line is ignored by the code) and a brief description of what you’re doing.
Each textstring has a unique number associated above it, in the form of #. In this case, the textstring would be number 058 in the tools. If you check in your modified English.txt to sourcesafe before you start applying message strategies, the tools will display the textstring you are calling.
Message strategies can be set to start off deactivated , in which case they ignore all requests to show the message. The extra message data flag can be used to activate or deactivate a message. Only an ‘on’ message will cause the strategy to display the message.
Volume of Death - Players will be damaged when they walk into the area of effect of this VO.
Self-Destruct - When activated, this VO will start a countdown to extinction.