Help has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...

Feature #697672

Show resource availability in cities

Added by Jacob Nevins almost 5 years ago. Updated 6 months ago.

Start date:
Due date:
% Done:


Estimated time:


The 2.6 civ2civ3_earth modpack, which has various resource effects propagated by trade routes, says in its README:

- All resources affect a bit the chances of plague, so they can be seen in the city UI. [...]

This is a bit of a hack. It feels like we ought to support showing whether a resource is "available" to a city properly.

What I have in mind is an effect "Visible_Resource" which, if true for a resource and city, shows that resource as being "available" to the city in some new bit of the city's UI somehow. This is a bit like "Visible_Walls", in that it has no in-game effect; it's up to the ruleset author to define this corresponding to gameplay effects (e.g., if a trade route resource gives a veteran bonus to certain units built in a city, the ruleset author would define a matching Visible_Resource effect for the city).

I'm in two minds whether to have this specific to resources. On the one hand, one could imagine having this apply to all sorts of universals such as nationality, and displaying the list of universals as a text list. On the other hand, having it specific to resources would allow better UI: graphical representation of the available resources, and being able to filter which cities have resources in the city list.
(2.6 civ2civ3_earth implements its strategic "resources", which would benefit from this treatment, as hut-like extras; I haven't checked if it will be able to use proper resources in 3.0.)

If we do have it specific to resources, maybe it would be useful to have similar effects for Goods and maybe selected other universals? Haven't thought about this at all.

The possibility of displaying graphics for resources in the city UI means that it might be useful to define resources as offset + small sprite in tilesets, so that they can be shown with a bounding box smaller than a tile's in the city UI.


#1 Updated by Jacob Nevins almost 5 years ago

  • Blocks Task #656466: S3_0 datafile format freeze (d3f) added

#2 Updated by David Fernandez (bard) almost 5 years ago

Something like that would be nice, because the "hack" that I use for my civ2civ3_earth pack has a huge impact in performance: it increases a lot the loading times of savegames (more than 2 min in some of my tests). I was going to include a warning in the readme, but I forgot at the end.
I was tempted to remove the plague related effect to restore the performance, but I find really important to see which resources are available in each city, if they have some effect with range "traderoute".

#3 Updated by Marko Lindqvist about 4 years ago

Maybe not have it specific to resources only, but for all the extras, so it would cover also buildable ones. I'm a bit worried about the performance, though. If we need to get effect value for each of the extras (or even resources), potentially MAX_EXTRA_TYPES = 128, every time city is refreshed...

#4 Updated by Marko Lindqvist about 4 years ago

I'm tempted to drop 3.0 target from this.

1) There's no regression here, and none of the first tier rulesets suffer from it
2) We have no idea how to implement it, but it will certainly be relatively big change

#5 Updated by Marko Lindqvist over 3 years ago

  • Blocks deleted (Task #656466: S3_0 datafile format freeze (d3f))

#6 Updated by Marko Lindqvist 6 months ago

  • Sprint/Milestone deleted (3.0.0)

Marko Lindqvist wrote:

I'm tempted to drop 3.0 target from this.

Nobody has objected in over three years.

Also available in: Atom PDF