Explorable ruins

What would you like to see in Freeciv? Do you have a good idea what should be improved or how?
Post Reply
Ignatus
Elite
Posts: 644
Joined: Mon Nov 06, 2017 12:05 pm
Location: St.Petersburg, Russia
Contact:

Explorable ruins

Post by Ignatus »

The idea of getting something useful from Ruins is old but still don't know any ruleset that has made it. My suggestion is to make Ruins explorable, naturally, by Explorers. All bonus extras should have got hut_enter signal call already in 2.6 but something went wrong. However, the more natural and playable way to get the bonus is to mine the extra tile (well, it's yet hardcoded to Settlers flag). Explorers should have chances to unearth one-time bonus in gold, bulbs and culture depending on the former city owner (thus, cities that you have razed after conquering are thought yours and are valued cheaper), city worth and ruins age that are recorded by the same callback that places the ruins; Workers and Colonists also can try mining the site but their success expectations (especially from older ruins) will be less.

To make this behaviour playable for AIs (and our autoexplorers), we will need to inform them about worth of exploring an extra. Curretly, there are two uniform constants related to hut worth: HUT_SCORE=60902 used in explorer_desirable() in server/advisors/autoexplorer.c (modifies autoexploring worth of a tile) and RAMPAGE_HUT_OR_BETTER=99998 used in dai_rampage_want() in ai/default/aiunit.[ch] (worth of entering a hut if an AI-controlled unit can now do it). Also, for not handicapped AIs (i.e. ones for whom exists considerable hut worth) unexplored huts on a continent mean the need to continue exploring it in adv_data_phase_init() in server/advisors/advdata.c . Thus, we can introduce effects like

Code: Select all

 
[eft_ruins_explore_worth]
type = "BonusExploringWorth"
value = 60000           ;      no immediate tech, but no risque
reqs = {"type", "name", "range", "present"
"Extra", "Ruins", "Local", TRUE
"UnitType", "Explorer", "Local", TRUE
"Action", "Mine", "Local", TRUE
"AI", "Handicapped", "Player", FALSE
}
For even more flexibility, we can add a callback

Code: Select all

int consider_explore(player Player, tile Tile, unit Unit?, tactical_role?)
that will be calculated to modify any nonzero effect value (for example, will inform AI players about potential worth of specific ruins).
Post Reply