Complete.Org:
Mailing Lists:
Archives:
freeciv-dev:
August 1999: [Freeciv-Dev] patch: remove remaining hardwired tech effects (PR#118) |
[Freeciv-Dev] patch: remove remaining hardwired tech effects (PR#118)[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
This patch adds some more data about techs to ruleset files, so that the tech_type_id enum values are not used anywhere in the code. This is better for modpacks (otherwise have to make sure eg Bridge Buildings is in just the right position in tech list etc), and allows for soon making the number of techs variable (like unit types). Added game.rtech entries for: + int temple_plus; /* eg Mysticism */ + int construct_bridges; /* eg Bridge Building */ + int construct_fortress; /* eg Construction */ + int construct_rail; /* eg Railroad */ (temple_plus in buildings.ruleset, others in techs.ruleset) And tech lists for: + int pop_pollution[MAX_NUM_TECH_LIST]; /* pop = population */ + int partisan_req[MAX_NUM_TECH_LIST]; /* all required for uprisings */ + int trade_route_reduce[MAX_NUM_TECH_LIST]; /* reduce to 2/3 cumulative */ Specifically, in techs.ruleset files: +; Pollution due to population is multipied by the index of +; the rightmost tech player knows: (eg times 2 if player +; knows Automobile) +population_pollution = "Industrialization", "Automobile", + "Mass Production", "Plastics" + +; All of following must be known by city owner for +; partisan uprising to occur: (as well as other conditions) +partisan_required = "Communism", "Gunpowder" + +; Each of the following known by the player establishing +; a trade route reduces the initial revenue by cumulative +; factors of 2/3: +trade_route_reduce = "Railroad", "Flight" (These lists could perhaps be better implemented as tech flags, but this is probably good enough...) There is also some slightly questionable stuff about AI tech wants/hints for governemnts, re aicity.c: ai_manage_cities(). Questionable because its somewhat complicated and should probably be folded into more general government evaluation routines. But I put in replacement stuff because I wasn't sure how important it is, and the general goverment eval stuff still needs to be updated and integrated. Regards, -- David
gen_techs.diff.gz
|