There is a possibility for a scenario designer to add scenario-specific options and for players to set such options.
====================
I came accross the following instructions in scenario files (.eug) of the EEP:
This instruction is defined in the header block. Once you load a scenario, you will be able to interact with it throu the menu "Options". For each option defined, <text> is displayed, followed by the status of the instruction (On for yes, Off for no). You can toggle status at will, so interacting with the scenario in crude boolean way.
A variable is created with name <varname> and can be used to choose files, etc. with the following instruction :
The created variable <varname> is NOT a global flag. So to take advantage of it as a flag (and only a local one, bound to the country triggering the event), it can be used to alter the way the country file is processed (or any other file, as far has I understand it, including event files !)
It should be nice to know if there is a way to allow multiple choice in an option, a bit like the option "Game Speed". Likewise, is there any other "hidden" instructions like option = { } or IT...THEN..ELSE ?
====================
Example:
in .eug file:
Once the scenario is selected, the player will find, in the menu "Options", the following choice:
in 1419_por.inc
Depending on the setting choosen, one or the other ai file is loaded. The file portugal2.ai could be set so that Portugal is more interested in exploring the New World then going South to India.
EDIT ========================================
I tried to define 200 option statements without trouble: they are all displayed and selectable.
====================
I came accross the following instructions in scenario files (.eug) of the EEP:
Code:
option = {
name = "[COLOR=LemonChiffon]<text>[/COLOR]"
tag = [COLOR=LemonChiffon]<varname>[/COLOR]
status = yes | no
}
This instruction is defined in the header block. Once you load a scenario, you will be able to interact with it throu the menu "Options". For each option defined, <text> is displayed, followed by the status of the instruction (On for yes, Off for no). You can toggle status at will, so interacting with the scenario in crude boolean way.
A variable is created with name <varname> and can be used to choose files, etc. with the following instruction :
Code:
¤IF [COLOR=LemonChiffon]<varname>[/COLOR]
... choice 1
¤ELSE
... choice 2
¤ENDIF
The created variable <varname> is NOT a global flag. So to take advantage of it as a flag (and only a local one, bound to the country triggering the event), it can be used to alter the way the country file is processed (or any other file, as far has I understand it, including event files !)
It should be nice to know if there is a way to allow multiple choice in an option, a bit like the option "Game Speed". Likewise, is there any other "hidden" instructions like option = { } or IT...THEN..ELSE ?
====================
Example:
in .eug file:
Code:
header = {
...
option = {
name = "Historical Portugal Expansion in XVth century"
tag = por_historical
status = yes
}
}
Historical Portugal Expansion in XVth century ON
He can toggle this option at will.
in 1419_por.inc
Code:
¤IF por_historical
ai = "portugal.ai"
¤ELSE
ai = "portugal2.ai"
¤ENDIF
Depending on the setting choosen, one or the other ai file is loaded. The file portugal2.ai could be set so that Portugal is more interested in exploring the New World then going South to India.
EDIT ========================================
I tried to define 200 option statements without trouble: they are all displayed and selectable.
Last edited: