Tomorrow, I will public my work of effects accumulator's for Progress.
Effect accumulator is extension of effect mechanism to allow do new thinks, such like:
- Discovering future tech will gain bonus, mod author could mark how many times user get benefits from discovering future tech
- It could be used in conjunction with eureka system (not implemented yet) to restrict times user get bonus in research to certain technology
- If I implement effects like set city size, there's possibility to set first build city by player larger population than normal (or for built palace in first player's city)
- New way to implement technology like philisophy
-
...
And many, many more.
Below I describe syntax:
Code: Select all
[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)
force_minimum_turn = VALUE(INT; default 0)
force_maximum_turn = VALUE(INT; default 0)
effect_vacation = VALUE(INT; default 0)
force_maximum_turn" = VALUE(INT; default 0)
max_turn_activated = VALUE(INT; default 0)
reqs = requirement_list
For example:
Code: Select all
[effect_science_bonus]
type = "Output_Bonus"
value= 2000
remember_target_player = TRUE;
max_turn_activated = 7
reqs =
{
"type", "name", "range"
"OutputType", "Science", "Local"
}
We can use above to boost science of each player (remember_target_player is necessary now) by 21%, but only for 7 fist turn. To boost science of each player for 7 turns, when player build first city, we could connect it with my previous changes (events requirements) like bellow:
Code: Select all
[effect_science_bonus]
type = "Output_Bonus"
value= 2000
remember_target_player = TRUE;
max_turn_activated = 7
reqs =
{
"type", "name", "range"
"OutputType", "Science", "Local"
"city_buld(X)", "", "lua_event"
}
And now remember_target_player is necessary, because without it, effect will activate themselves once any player build first city, so if player A build city in turn 1 and player B built city in turn 10, then player B won't get boost bonus.
I think you understood my idea. Presented here effects works with current code. I will polish code responsible for this mechanism tomorrow and probably publish changes.
Aughh.. I'm very sad, because I must use GCC function wrapper for free, but that cost my program can take on themselves.