More (probably) silly questions

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
FriendAtArms
Posts: 21
Joined: Thu Apr 16, 2026 9:35 pm

Re: More (probably) silly questions

Post by FriendAtArms »

Got it! I grasped the general idea of how Freeciv plagues work from the Classic ruleset's comments, but the comments don't actually mention how much the city shrinks. I wanted to make sure I didn't just have a weird run of luck during my test. And it turns out I didn't! Thank you!

(I fooled around with doing the plague-as-disaster thing in a very early version of this ruleset. But since the city is going to display "plague risk" regardless whether illness_on is set TRUE or FALSE, I figured I might as well put it to use.)
FriendAtArms
Posts: 21
Joined: Thu Apr 16, 2026 9:35 pm

Re: More (probably) silly questions

Post by FriendAtArms »

Next question, and this is just to make sure I understand how "native" tiles and units work.

If I want a particular ship to move down rivers, do I have to assign it its own unit class, which considers tiles with rivers to be "native tiles"? (It seems like this is the case.) Or is there a special moving-down-rivers flag I can assign to that unit, so it can stay in the same unit class as other ships?
John Campbell
Posts: 17
Joined: Wed Jan 18, 2023 6:57 pm

Re: More (probably) silly questions

Post by John Campbell »

FriendAtArms wrote: Tue May 19, 2026 5:22 pm Next question, and this is just to make sure I understand how "native" tiles and units work.

If I want a particular ship to move down rivers, do I have to assign it its own unit class, which considers tiles with rivers to be "native tiles"? (It seems like this is the case.) Or is there a special moving-down-rivers flag I can assign to that unit, so it can stay in the same unit class as other ships?
I think you have to create a new class. There doesn't seem to be any way to assign terrain restrictions at an individual unit level.

My ruleset has had a huge proliferation of unit classes, because it allows flexibility in not just terrain restrictions, but other things like unit transporting, interactions with different building types, ability to attack into or from non-native terrain, and so on. It does result in a lot of repetitive effect clauses, though.

I have four or five different ship classes: Brown Water, which can navigate River, Lake, or Ocean, but not Deep Ocean; Green Water, which can navigate any water terrain; Sail, which can navigate Lake, Ocean, and Deep Ocean, but not River; Sea, which can navigate only Ocean or Deep Ocean; and debatably Hover, which can navigate River, Lake, and Ocean, but not Deep Ocean, but can also travel Swamp, Grassland, Plains, Glacier, and Desert, without MP cost, but is restricted from Hills, Mountains, Forest, and Jungle without a road (but can use Rivers as roads).

This means that things like Port Facilities have to have repeated effects clauses for each class of ship, though.

Brown Water includes Triremes, but also a couple of earlier ship types, Boats and Sailboats, and Ironclads, which I split into Brown Water Ironclads and Armored Cruisers, which are Sail. Green Water includes Longships and Patrol Boats (and I think I need to add another one between them, but I haven't figured out what yet). Sail has the other sailing ship types, from Caravel on up, and Sea the modern ships. All of them get MP bonus from Magellan and the Pharos Lighthouse (though I don't think there's any way to get a Sea unit with the Lighthouse still active), but only Sea get the bonus from Nuclear Power... no more nuclear Triremes, or nuclear Galleons, for that matter.

My Rivers are native_to only Brown Water, Green Water, and Hover. I took the ground units out of the native list after a discussion in an earlier thread here. Land units can still enter River squares if they're native to the underlying terrain, but they don't get road bonuses from them anymore (and I removed the River-road speed multiplier anyway), and they can't use them as roads through non-native terrain (unless they're Hovercraft). It's been working out well. I've been getting a lot more use out of my riverboats under this scheme than previously, where even basic land units could move just as fast on rivers without a boat as with one, and cavalry units could move twice as fast.

(In addition to the ship types, I have Land, Wheeled, Armor, Artillery, Civilian, Diplomat, Light Air, Air, Missile, Warhead, LTA (Lighter Than Air), and Helicopter.)
cazfi
Elite
Posts: 3482
Joined: Tue Jan 29, 2013 6:54 pm

Re: More (probably) silly questions

Post by cazfi »

John Campbell wrote: Tue May 19, 2026 8:24 pmThis means that things like Port Facilities have to have repeated effects clauses for each class of ship, though.
Usually you can add an "user unit class flag" that you give to all ship classes, and then make the effect requirement to be that unit class flag instead of any single class.
FriendAtArms
Posts: 21
Joined: Thu Apr 16, 2026 9:35 pm

Re: More (probably) silly questions

Post by FriendAtArms »

Okay, suspicions confirmed. Thank you!

Next one: another turn-change problem. Each turn, I get one or both of these messages.
in map_change_seen() [../../../../server/maphand.c::931]: assertion 'plrtile->seen_count[V_INVIS] + !game.info.fogofwar <= plrtile->seen_count[V_MAIN]' failed.
in city_refresh_vision() [../../../../server/citytools.c::3087]: assertion '(pcity->server.vision)->radius_sq[V_MAIN] >= (pcity->server.vision)->radius_sq[V_INVIS]' failed.
All this time, I've been assuming it's yet another problem with my ad-hoc tileset. But that "pcity->server.vision" stuff has me thinking otherwise. What's going on here?
cazfi
Elite
Posts: 3482
Joined: Tue Jan 29, 2013 6:54 pm

Re: More (probably) silly questions

Post by cazfi »

The failing sanity checks seem like you have some unit or city that would see stealth ("invisible") units further away than non-stealth units. That makes no sense, and is not supported.
John Campbell
Posts: 17
Joined: Wed Jan 18, 2023 6:57 pm

Re: More (probably) silly questions

Post by John Campbell »

cazfi wrote: Wed May 20, 2026 5:34 pm The failing sanity checks seem like you have some unit or city that would see stealth ("invisible") units further away than non-stealth units. That makes no sense, and is not supported.
How is stealth spotting configured, anyway? I've had some things I'd like to do with it — give Destroyers full spotting radius against Submarines so they have a reason to continue existing after Cruisers are developed, give AWACS longer spotting against Stealth {Fighters,Bombers} — but I haven't been able to find any documentation on how to do it. I had concluded that it just wasn't possible, but this would seem to imply that it is.
Post Reply