Please, can someone explain how City_Image (effect) works?

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
Post Reply
omero
Posts: 48
Joined: Fri Mar 31, 2023 10:43 am

Please, can someone explain how City_Image (effect) works?

Post by omero »

Hello!

In many different effects.ruleset (from both vanilla and modpacks), I noticed something the like of:

Code: Select all

; free granary, etc, runs out
[effect_city_image_1]
type    = "City_Image"
value   = 1
reqs    =
    { "type", "name", "range"
      "MinSize", "5", "City"
    }

; needs Aqueduct
[effect_city_image_2]
type    = "City_Image"
value   = 1
reqs    =
    { "type", "name", "range"
      "MinSize", "8", "City"
    }

; needs Sewer System
[effect_city_image_3]
type    = "City_Image"
value   = 1
reqs    =
    { "type", "name", "range"
      "MinSize", "16", "City"
    }
It does not make any sense to me that value=1 (the index of the city image in given a style) and a city MinSize that is supposed to mean that the city is BIG and the related comment implying it NEEDS something to grow further.

How's that supposed to work... I don't get it.
cazfi
Elite
Posts: 3111
Joined: Tue Jan 29, 2013 6:54 pm

Re: Please, can someone explain how City_Image (effect) works?

Post by cazfi »

Effects are cumulative.

City < 5 has no active effects -> uses image 0.
City >= 5 fulfills requirements of just one effect -> uses image 1.
City >= 8 fulfills requirements of two effects -> uses image 2.
omero
Posts: 48
Joined: Fri Mar 31, 2023 10:43 am

Re: Please, can someone explain how City_Image (effect) works?

Post by omero »

cazfi wrote: Sun Jul 09, 2023 8:48 pm Effects are cumulative.

City < 5 has no active effects -> uses image 0.
City >= 5 fulfills requirements of just one effect -> uses image 1.
City >= 8 fulfills requirements of two effects -> uses image 2.
Is this documented anywhere?
Yes. Want all the gory details :)
cazfi
Elite
Posts: 3111
Joined: Tue Jan 29, 2013 6:54 pm

Re: Please, can someone explain how City_Image (effect) works?

Post by cazfi »

omero wrote: Sun Jul 09, 2023 9:09 pmIs this documented anywhere?
https://www.freeciv.org/wiki/Editing_Effects : "all such effects of this type that have all their requirements evaluated to true are summed and give the effect value" (bolding mine).
But the authoritative (and versioned! - should be accurate for specific freeciv version it's part of) document README.effects seems not to have that part!
cazfi
Elite
Posts: 3111
Joined: Tue Jan 29, 2013 6:54 pm

Re: Please, can someone explain how City_Image (effect) works?

Post by cazfi »

cazfi wrote: Sun Jul 09, 2023 9:40 pmBut the authoritative (and versioned! - should be accurate for specific freeciv version it's part of) document README.effects seems not to have that part!
-> osdn #48374
omero
Posts: 48
Joined: Fri Mar 31, 2023 10:43 am

Re: Please, can someone explain how City_Image (effect) works?

Post by omero »

cazfi wrote: Sun Jul 09, 2023 9:48 pm
cazfi wrote: Sun Jul 09, 2023 9:40 pmBut the authoritative (and versioned! - should be accurate for specific freeciv version it's part of) document README.effects seems not to have that part!
-> osdn #48374
Yes.
That is v2.6 version. I should have stated it clearly and bold.

The cumulative part of an effect becomes evident when one differentiates (for instance) a building.
Suppose we want the granary to be split in a two parts:
a) granary (25% retention of food when city size shrinks/grows)
b) warehouse (additional 25% retention... blah blah)

I suppose the original comments meant to indicate that a city a certain size should appear ... a certain way and when needs something (an improvement), an appropriate image (according to the styles) is used... but ... it got lost?

This 'city needs an improvement to grow beyond size X' has been one of my most ... teeth grinding motive. WHAT IMPROVEMENT?!

I understand now why so. I understand why i want an aqueduct, then a sewer system, then maybe other things to allow 'scaled' growth...
Acqueduct and Sewer are fairly "standard". But then one might consider adding other "steps" in between (another building, another tech).
The steps dont even have to be in a specific order... The point is to reach the "unlock the city unlimited growth" stage...
Or in other words, 'consider' the cumulative effects and requirements...

I understand this is old stuff for most... Im slow to catch up.
Thanks for clarifying. Cheers o/
Post Reply