Breaking Up effects.ruleset
Posted: Sat Jul 09, 2016 11:03 pm
effects.ruleset is a monstrous file, difficult to navigate and thus edit or even understand. I propose breaking up effects.ruleset into 5 different files: effects.ruleset, effects_technology.ruleset, effects_government.ruleset, effects_improvement.ruleset, and effects_wonder.ruleset (and ai_effects.ruleset too, of course)
As a general rule, the 'anchor' which is the most active determiner if an effect should even exist should be responsible for placement of an effect into one of the files.
Wonder should generally trump Improvement, Improvement should trump Government, Government should trump Technology, Technology trumps none of the others, and the remainder remain in the original file.
Wonders are listed under their appropriate buildings. Wonders generally trump Improvements when placing effects, but only if both are equal. Wonder negations do not trump Improvement positions. (ex: City Walls effect should still be placed with improvements with other City Wall effects, despite being negated by Great Wall)
Improvements are listed under their appropriate buildings. Improvements always trump governments when placing effects, as many Improvements have different effects under each government. (ex: cathedral_2 effects of -1 content requires cathedral(imp), communism(gov), and negate with mike's chapel(won) and should be placed with Improvement effects)
Most Governments are listed under their appropriate governments. A couple also have technology requirements, but as government is an active choice and technology is passive, government requirement always trumps tech requirement in placement. (ex: partisan communism effect should be placed with governments rather than technology)
Technology classification is simple. All remaining effects with technology requirements get technology placement.
Any effects with none of these requirement types remain in effects.ruleset.
As a general rule, the 'anchor' which is the most active determiner if an effect should even exist should be responsible for placement of an effect into one of the files.
Wonder should generally trump Improvement, Improvement should trump Government, Government should trump Technology, Technology trumps none of the others, and the remainder remain in the original file.
Wonders are listed under their appropriate buildings. Wonders generally trump Improvements when placing effects, but only if both are equal. Wonder negations do not trump Improvement positions. (ex: City Walls effect should still be placed with improvements with other City Wall effects, despite being negated by Great Wall)
Improvements are listed under their appropriate buildings. Improvements always trump governments when placing effects, as many Improvements have different effects under each government. (ex: cathedral_2 effects of -1 content requires cathedral(imp), communism(gov), and negate with mike's chapel(won) and should be placed with Improvement effects)
Most Governments are listed under their appropriate governments. A couple also have technology requirements, but as government is an active choice and technology is passive, government requirement always trumps tech requirement in placement. (ex: partisan communism effect should be placed with governments rather than technology)
Technology classification is simple. All remaining effects with technology requirements get technology placement.
Any effects with none of these requirement types remain in effects.ruleset.