Effects.ruleset file is file related to some ruleset and contains many game rules not restricted to any of game mechanism. In fact, effects.ruleset flow on each game aspects.
Effects look like below:
[effect_internal_name] type = "Type_Of_Effect" value= the_value remember_target_player = VALUE(TRUE/FALSE; default false) remember_target_city = VALUE(TRUE/FALSE; default false) remember_other_player = VALUE(TRUE/FALSE; default false) remember_target_city = VALUE(TRUE/FALSE; default false) remember_target_building = VALUE(TRUE/FALSE; default false) remember_target_tile = VALUE(TRUE/FALSE; default false) remember_target_unit = VALUE(TRUE/FALSE; default false) remember_target_unittype = VALUE(TRUE/FALSE; default false) remember_target_output = VALUE(TRUE/FALSE; default false) remember_target_specialist = VALUE(TRUE/FALSE; default false) remember_target_action = VALUE(TRUE/FALSE; default false) max_activation_number = VALUE(INT; default 0) ; field 1 force_minimum_turn = VALUE(INT; default 0) ; field 2 force_maximum_turn = VALUE(INT; default 0) ; field 3 effect_vacation = VALUE(INT; default 0) ; field 4 max_turn_activated = VALUE(INT; default 0) ; field 5 accumulation_to_wake = VALUE(INT; default 0) ; field 6 reqs = requirement_list
Effect_internal_name is only for debug purpose, but in future it can be used in other ways.Type are type of effect. Value is a strength the effect change of game behaviour selected by type.
Each rememeber and rest of fields, without reqs are related to effect accumulators. Effects accumulators is a new, not yet complete, mechanism. This mechanism allows to pass custom constrains to effect activation rules. Remember fields creates cartesian product of each possibility for each item, where related remember field are set to TRUE. Each item of the cartesian product will create new accumulator effect, when needed.
Field 1 is created to restrict maximum number effect accumulator could been activated (from now, I'm use effect accumulator to write about item from cartesian product),It;s not good to use this field, because it's related to game implementation. If you must use it, then connect your effectt with lua signal.
Field 2 is created to allow change the default behavior of game to activate effect accumulator for only one turn and recheck on each turn. When you set to natural value other than 0 or 1, the effect will be activated for number of turns passed this settings, ever requirements aren't satisfied.
Field 3 is created to restrict turns effect accumulator is activated. Combine it with field 2 or field 3.
Field 4 is created to allow makes a hole in effects. Use it to force minimum number of turns effect is inactive after no requirements are satisfied or maximum turn number went gone.
Field 5 is created to work like 1, but it restricts turn effect accumulator is actived.
/TODO: Describe requirement vector/
To get unlisted here effects, go to Freeciv wiki. I must tell, that no every effects available in Freeciv wiki are working in Progress, but Freeciv wiki is a good start point for searching effect types not described here.
Technology_Progress_Add
This effect type will adds research(given by value of effect) to technologies selecting in OutputTechnology requirement of effect.
Example is:
[effect_eureka_city_built_1] type = "Technology_Progress_Add" value = 10 remember_target_player = TRUE max_activation_number = 2 reqs = { "type", "name", "range" "OutputTechnology", "Masonry", "player" "city_built(X)", "", "lua_event" }
Above effect will add science points to Masonry for player, who build city, but only two times.
# Triggers
Trigers are effects activating other effect on next turn. In fact, single effect can activate many effect. Byt more interesting is other use cases. First effect (triger activator) could activate triger for 10 turns. Second effect, checking triger is activated, could increase production bonus for newly founded cities. So, after researching Monasry, by any player, each city founded on turn n+1 - n+10 will receive production bonus for three turns.
~~~
[effect_masonry_activator]
type = "Trigger"
force_maximum_turn = 20
remember_target_player = TRUE
triger_id = "mr"
reqs =
{
"type", "name", "range"
"IterationOfPlayers", "A", "Global"
"Tech", "Masonry", "A"
}
[effect_masonry_research_1]
remember_target_city = TRUE
force_minimum_turn = 5
type = "Output_Bonus"
value= 100
reqs =
{
"type", "name", "range"
"city_built(X)", "", "lua_event"
"ExactlyObject", "", "OBJ(X)"
"Objects", "Equal(Player,A)", "EffectsFunction"
"OutputType", "Shield", "Local"
}
imports =
{
"case", "type", "name"
"mr", "A", "A"
}
~~~