Page 1 of 3

More (probably) silly questions

Posted: Tue May 05, 2026 3:15 am
by FriendAtArms
I fixed the "Turn 2 crash" problem I mentioned in my last thread, and I'm moving on to a new one. Hopefully that's all right.

My ruleset has a Temple of Artemis wonder, unlocked by a tech called Syncretism. I want the ToA to replace any Temple improvement in a city where it's built, and only that city.

What happens in practice is, as soon as I research Syncretism, every city with a Temple in its worklist automatically upgrades it to a ToA. (If the Temple was already built, it doesn't get upgraded.) The reason, of course, is that I put this in the Buildings file under Temple:
obsolete_by =
{ "type", "name", "range"
"Building", "Temple of Artemis", "City"
}
Clearly, ToA obsoleting Temple isn't the way to go here. Is there a way I can make this wonder replace a Temple in its own city, but not affect any other Temple?

Re: More (probably) silly questions

Posted: Fri May 08, 2026 11:35 pm
by cazfi
Most rulesets still allow the replaced "normal" improvements to be present, its effects just not active, in such a cases where a wonder replaces an improvement. This is to allow player to be prepared for a loss or obsoletion of the wonder.
To make building's effects inactive that way, just add a requirement that the wonder isn't present in the city, for each effect.
If you really want, you can also add a requirement for the Temple that the ToA isn't present, but that only prevents building new Temple after ToA has already been constructed. It would not affect Temples build already before ToA,

Re: More (probably) silly questions

Posted: Sun May 10, 2026 7:34 pm
by FriendAtArms
I think I understand. I'll try out the "wonder isn't present in the city" requirement, and see if I like what happens. If not, I'll just rethink what the Temple of Artemis does in my ruleset. Thank you!

The next set of questions has to do with the UI (I think). Ahem:

- Is there any way to replace the term "pillage" with "raze"? I want my worker-units to be able to destroy terrain extras as well as build them, but saying they're "pillaging" feels odd to me.

- Just to see if I could, I changed the name of the basic terrain extras: "Irrigation" to "Farm", etc. When a unit with the Settlers flag is on a tile where a "Farm" can be built, the toolbar says "Build Farm". But when that unit is on an invalid tile, the toolbar says "Build Irrigation" (grayed out). The same happens for units without the Settlers flag, regardless of the tile they're on. I know that by changing ui_name_base_fortress and ui_name_base_airbase in the Terrain file, you can make the toolbar use new names for bases. Is there a similar option for other extras?

- I have a disaster called "Famine", which is stopped by an improvement called "Storehouse". Storehouses are always crossed out in city worklists. I know this means the program has categorized Storehouses as redundant, and eventually they shouldn't be crossed out anymore. But the Famine disaster always hits before the program recognizes the need for Storehouses. In fact, the program never recognized the need for Storehouses in any of my playtests, even the ones that went to Turn 100. Is this a UI problem? Or do I need to rewrite either the improvement or the disaster?

Re: More (probably) silly questions

Posted: Thu May 14, 2026 3:17 am
by Dino the Dinosore
- Is there any way to replace the term "pillage" with "raze"?
I thought adding this in actions.ruleset would do it, but it doesn't replace every occurrence of the term "Pillage".

Code: Select all

[action_pillage]
action="Pillage"
ui_name=_("Raze%s")

Re: More (probably) silly questions

Posted: Thu May 14, 2026 3:59 am
by Dino the Dinosore
Oops, that code example is for version 3.3, the version for 3.2 is

Code: Select all

ui_name_pillage = "Raze%s"
I think the fact that it only partially works could be a bug.

Re: More (probably) silly questions

Posted: Fri May 15, 2026 9:12 pm
by FriendAtArms
Well, it's only aesthetics. As is the bit about renaming non-base extras. I don't think the ruleset actually suffers from keeping those features the way they are. If I accidentally stumbled into discovering a bug, I'll have to leave the reporting to you.

I'm still a little concerned about the Storehouse problem though.

Temple of Artemis update: it works exactly how I want now, thanks to tweaking effects for the regular Temple. But when I go to the city's "Happiness" tab, the ToA's effect registers under the "Buildings" layer, not the "Wonders" layer. I've given the ToA "genus = 'GreatWonder'", so there's no problem there. The Wonder's effect looks like this in the Effects file:
[effect_temple_of_artemis_content]
type = "Make_Content"
value = 2
reqs =
{ "type", "name", "range"
"Building", "Temple of Artemis", "City"
}
Should the requirements say "Wonder" instead?

Re: More (probably) silly questions

Posted: Sat May 16, 2026 12:08 am
by cazfi
FriendAtArms wrote: Fri May 15, 2026 9:12 pmBut when I go to the city's "Happiness" tab, the ToA's effect registers under the "Buildings" layer, not the "Wonders" layer.
I think the Happiness display works with an unfortunate hardcoded mapping to the effect types. So it assumes that any "Make_Content" effect comes from a "Building" (It actually shows "Make_Content" effects, but labels it as "Buildings")

Re: More (probably) silly questions

Posted: Sun May 17, 2026 9:43 pm
by Dino the Dinosore
I investigated some more about changing the ui name for actions, and yes there are bugs, but I don't think they can be fixed. The help in supplied actions.ruleset files says -
What each action should be called when showing them to the player.
Using the "pillage" -> "raze" example, the places I found where this doesn't happen:
1 Menu items - the Combat menu has a menu item "Pillage"
2 The info displayed when you get info about a unit (center click) says "Activity: Pillage..."
3 The help text for terrain alterations has "Units may also be able to destroy terrain alterations, by pillaging" and "Can be pillaged by units..."
4 When the unit is pillaging, a graphic "Pg" is shown with it - that comes from the "activities.png" file and is not text.

For #1-3, problem is that there are 2 actions - "Pillage" and "Pillage 2". You could have different ui names for them and there's no way to choose which one to display. Other actions also have > 1 versions, there's "Fortify" and "Fortify 2", "Clean" and "Clean 2", etc. And for #3 - how would you know how to replace, e.g., "pillaging" -> "razing"?

I think it's not worthwhile to file a bug report, we'll just have to live with it as is.

Re: More (probably) silly questions

Posted: Sun May 17, 2026 11:12 pm
by FriendAtArms
Cafzi: Mystery solved! Do you think it's worth making a note in the ToA's help-text warning the player about this quirk, in the unlikely event this ruleset is ever released for the general public?

Dino the Dinosore: Another mystery solved! I agree that it's not worth messing with; even I don't really care about it, and it clearly has no impact on the viability/performance/whatever of Freeciv as a whole.

Okay, moving on to the next question: when I was testing the illness/plague mechanic, both a Size 4 city and a Size 11 city shrank by 1. Do cities always shrink by 1, or is it randomly determined? (I know it was 25% in Civilization 1, but that's clearly not the case here.)

Re: More (probably) silly questions

Posted: Mon May 18, 2026 5:45 am
by John Campbell
FriendAtArms wrote: Sun May 17, 2026 11:12 pmOkay, moving on to the next question: when I was testing the illness/plague mechanic, both a Size 4 city and a Size 11 city shrank by 1. Do cities always shrink by 1, or is it randomly determined? (I know it was 25% in Civilization 1, but that's clearly not the case here.)
It's always 1.

eta: It's been a long, long time since I played Civ 1, but IIRC plagues were disasters like floods or earthquakes, that just occasionally hit cities at random unless they had the right building to prevent it. Freeciv has a mechanic for handling disasters like that, but plague doesn't use it. It works more like pollution, where there's a certain percent chance each turn, influenced by things like city size, presence of certain buildings or techs, and so on, that a given city is hit by plague/generates pollution. Larger cities still only lose 1 population, but they get hit a lot more often.

You can make effects that alter plague chance using the effect type "Health_Pct". It takes a "value" that's the percent the plague percentage is reduced by. Again, that's a percentage of the percentage, not a straight percentage modifier. So if, for example, you have a city that's running at 8% plague chance, and you build an Aqueduct that reduces plague chance by 5%, it doesn't reduce the Plague chance by 5% to 3%, it reduces it by 5% of 8%, or 0.4%, to 7.6%.