In addition, this suggestion is for extending IfOption (or, again, a new type of IfOption block) beyond its current capability to check true/false.
Code: Select all
IfOption("YourOptionHere",1,EQUALORGREATER)
{
IfOption("YourOptionHere",4,LESSTHAN)
{
...
}
...
}
EQUAL: Executes the block if the option's value is the exact same as the specified value. The default if no flags are specified.
INVERT: Executes the block if the option value is anything but equal to the specified value.
GREATERTHAN: Executes the block if the option value is greater than the specified value.
LESSTHAN: Executes the block if the option value is less than the specified value.
EQUALORGREATER: Executes the block if the option value is equal to, or greater than, the specified value.
EQUALORLESS: Executes the block if the option value is equal to, or less than, the one specified.
If IfOption had this capability, it'd be incredibly useful for mods that have lots of options. For example, if you had a mod with a suite of audio/visual options, you could fit them all in an IfOption block, allowing the player to hide them for when they're not changing them. For another example, say you have options that are interdependent:
Code: Select all
OptionValue "SpawnImpVariants"
{
0,"Off"
1,"Dark Imp Only"
2,"Slime Imp Only"
3,"Mecha Imp Only"
4,"All Imp Variants"
}
IfOption("ImpVariants",1)
{
Slider "Dark Imp Spawn Chance","DarkImpSpawn",1,8,1,0
}
IfOption("ImpVariants",2)
{
Slider "Slime Imp Spawn Chance","SlimeImpSpawn",1,8,1,0
}
IfOption("ImpVariants",3)
{
Slider "Mecha Imp Spawn Chance","MechaImpSpawn",1,8,1,0
}
IfOption("ImpVariants",4)
{
Slider "All Imp Variants Spawn Chance","AllImpVarSpawn",1,8,1,0
}