Due to a sudden burst in spammer activity, account creation has been temporarily disabled. Sorry for the inconvenience to any new potential contributors.
Option
From AGEWiki
These are player-selectable choices that appear in the Ledger during gameplay.
Not all scenarios contain selectable options.
Contents |
The Selection Value of an Option
In the game, when a player chooses an option by clicking on it, a "selection value" is set. This value is evaluated by the command CheckOption
- By default, any option not chosen has the selection value = 0
- A "simple option" in the ledger when chosen has a value = 1
- A "Multiple Choice" event (really an option), the value is set equal to the choice taken (1,2,3 etc)
Military Options Screen
The Military Options Screen contains a description of all Military Options open to a player along with the cost of these options (in terms of Victory Points). These options will vary according to the scenario being played. Not all scenarios contain selectable Military Options.
The Message Log indicates when Military Options are (or become) available. Players take advantage of these options by left-clicking the option text on the Ledger screen. A signature appears next to the option to indicate that it has been selected. Certain options may be selected multiple times (as long as the player can afford the associated costs).
Diplomatic Options Screen
The Diplomatic Options Screen contains a description of all scenario options open to a player along with the cost of these options (in terms of Victory Points). These options will vary according to the scenario being played. Not all scenarios contain selectable Options.
Multiple Choice Events
MC events are shown as pop-up messages in the interface. They are scripted with the same command as the Historical options, except that you'll provide several text and tooltips for the command. You'll also need in addition to create a GenMCEvent command. As for their processing, it follows the same logic as single choice event: instead of reacting to one possibility (one event dealing with the fact the player clicked on the option), you'll need to check the choice made by the player and create an event for each possible choice.
Nb: Also, see MCEvent in VGN section below on this page.
AACW Options System
AGEOD's American Civil War (AACW) has a significantly different option structure (and are basically deprecated) See the AACW Wiki for specifics
Scripting and commands used
- You have first to define the option, so it is shown to the player. For that you'll need to issue a ChangeActorPool command, specifying various parameters, for example the text and tooltip of the option. Understand though that this command does not handle the outcome, when the player activate the option.
- For MC options, you also have to issue a GenMCEvent command.
- That the option is single choice or multi-choices, the logic is the same: Once the option is defined, it is shown to the player in the interface. If this is a single choice option, it will be shown in a dedicated page of the ledger. if this is a MC option, it will show as a red message (pop-up) in the Messages Panel.
- The outcome of an option is handled within the script engine, during hosting, but only if you planned for that via writing additional events. If you don't, as the definition of an option with ChangeActorPool doesn't handle its outcome (what happens when the player clicks on it), then nothing will happen. This is an important concept: options are handled by a script you do, not by the code itself.
- In the case of a single choice event, you'll thus make a single event. First, you'll want to check if the Actor is enabled, i.e if the option was defined before anything, for that, use ActorEnabled. Then you'll check if the player (or AI) has chosen the option (some can be shown for a long time before the player chose it). For this test, use CheckOption. A value of 0 means the option is not chosen, a value of 1 means choice 1 (the only choice for single choice options) is chosen. For a MC event, this is really the same logic, with a value of 2 checking that choice 2 is made, and so on.
- If both conditions are met, then you'll handle the outcome of the event in the Actions block, as with other events. In addition to the script you'll add to handle the game effect, it will be necessary, most of the time, to disable the option. Use ChangeActorPool (really a Set in fact) to set the MaxUse of the option to 0, thus disabling it. Failing that, and the options will remain the next turn (This can be on purpose, to have an option that can be activated each turn).
- For a MC event, you'll need one event for each possible choice, with also perhaps an event handling choice 0, i.e the absence of choice, is encountered (say the player forgot or did not want to chose anything in your MC event!).
- The AI logic will also be handled by you, by event. Often these events are called 'AIActivate', i.e you create an event deciding when the AI choose an option, and at which level. The rest will be the same, with the events handling the outcome applying to the AI as if a human player.
- You can also encounter an event structure called 'Regen', standing for 'Regenerate', it is an event handling the logic of regenerating, i.e representing, the event (with a ChangeActorPool with a MaxUse of 1).
Multi-choices Events in VGN
- Its also possible in VGN to have MC options which are not shown in the message panel, but instead in a ledger screen. Several screens of the ledger handle one type of historical options (example the Goverment screen handle Laws & Reforms options). In this case, you can create a MC event which is not of the MCEvent type ($gmaOptionGov e.g), and don't need to have a link created toward the message panel with a GenMCEvent command. The MC option will appears only on the ledger screen and will generate a pop-up when clicked upon.
- Valid GameActors for VGN ledger MC Events are:
- $gmaOptionMil
- $gmaOptionVar
- $gmaOptionDip
- $gmaOptionCol
- $gmaOptionTech
- $gmaOptionTrade
- $gmaOptionGov
- $gmaOptionSoc
- $gmaOptionRel
- $gmaOptionInd
- $gmaOptionNav
- $gmaOptionPop
- $gmaOptionReinf
- $gmaOptionPol
- $gmaOptionFin
- $gmaMCEvent
- $gmaNotify