[Freeciv-Dev] (PR#6025) PATCH: reg_gen_for_units
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
This is first req_gen patch. This creates common framework for all
req_gen patches and implements requirement lists for units. By
installing only this req_gen patch one gains ability to set unlimited
number of tech requirements for units. More importantly, req_gen
framework makes something like following possible in the future,
depending on what we actually implement (README from old req_gen packets)
---------------------------------------------------------------------------
These patches add some flexibility to freeciv rules. I hope some
modpack authors find them usefull.
There is file patch_order.txt, which tells right order to apply
patches. Since the very first patch adds some new files, you have to run
automake for common/Makefile.am before compiling.
Under current rules, there is maximum of one tech requirement for each
unit and building type and maximum of two tech requirements for new
techs. With this patch there can be unlimited number of requirements of
several types.
Currently supported requirement types are:
Tech - Player must have knowledge of certain tech in order to build
unit/building or to research new tech.
Building - Only cities with certain building can build unit/building,
tech can be researched if player have at least one city
affected by building (or wonder).
Government - Player must run certain government.
Nation - Allowed only to certain nation.
Size - Only cities with given minimum size can build
unit/building, tech can be researched if player have at
least one city this big.
Terrain - Only cities on, or adjacent to, given terrain type can
build unit/building. Tech can be researched if player have
at least one such city.
Special - Like Terrain, but for specials (Road, Irrigation...)
For those who want to get really confused:
Not - True if following requirement false.
Or - True if either of the next two requirements is true.
And - True if both of the next two requirements is true
(This is only needed inside "Not" or "Or")
There is also special type "Never", which always (even if inside "Not"
or "Or") totally removes unit/tech/building from game if it exists in
requirement list.
TODO:
- More consistency checkings for rulesets.
- Cleanup.
- AI improvements.
- Helpbrowser. (I expect impr-gen to change help system quite a bit, so
I'm just waiting here.)
- Optimization.
- Currently tech requirements limit only what one can research. It
should also limit what techs one can get by any other means
(steal, conquer, great library, hut...)
Ideas under consideration:
- Requirement type "Year".
- Requirement lists for city growing. (Growing from size 8 requires
Aqueduct etc.)
---------------------------------------------------------------------------
There have already been some discussion about this at #5122.
I just made old patch to apply and compile with latest CVS. So, at
very least, this patch still needs style cleanup. I did run autogame
reggression test to be sure that this patch changes nothing when used
with standard rules. I'll update some more of these patches and do some
more serious testing for whole lot of tehm at once.
Per: Can you test if slowdown caused by this is acceptable to you?
I guess we could simplify code quite a lot by deciding that recursive
requirement types ("Not" and "Or") will never be implemented. I'd rather
keep this semi-support code around so we can drop in those requirement
types when they are needed. I'm quite sure that eventually we do find
cases, where implementing ruleset for some civ-style game does require
those requirement types.
- Caz
req_gen_for_units.diff.gz
Description: req_gen_for_units.diff.gz
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#6025) PATCH: reg_gen_for_units,
Marko Lindqvist <=
|
|