Disbanding city - how is the supporting city of the new settler decided?

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
Post Reply
DTR
Posts: 4
Joined: Sat May 17, 2025 7:59 pm

Disbanding city - how is the supporting city of the new settler decided?

Post by DTR »

I trird searching but could not find how the engine / ruleset decides what the supporting city of the resulting settler will be when I disband a city. It is not the nearest one, neither the most resourceful one. And why is it not up to my choice?
cazfi
Elite
Posts: 3335
Joined: Tue Jan 29, 2013 6:54 pm

Re: Disbanding city - how is the supporting city of the new settler decided?

Post by cazfi »

From the source code it seems like it should be the nearest city. Can you provide a savegame from which it's possible to reproduce a case where that's not true, for me to debug?
DTR
Posts: 4
Joined: Sat May 17, 2025 7:59 pm

Re: Disbanding city - how is the supporting city of the new settler decided?

Post by DTR »

Thanks, I try to attach the aftermath several turns later. I am just learning the game, I have no intention of going back so I make no autosave and just overwrite the save when I quit the session. Good idea on looking at the source, is that really that well commented that it can be considered the documentation?
The disbanded city was at (178,56), the resulting settler got re-homed to the city at (15,42), though (17,54) was closer.
Attachments
csaknagy.sav.bz2
(59.73 KiB) Downloaded 735 times
DTR
Posts: 4
Joined: Sat May 17, 2025 7:59 pm

Re: Disbanding city - how is the supporting city of the new settler decided?

Post by DTR »

I almost forgot, this is certainly not the most recent version of the game but 2.6.3 from Debian.
DTR
Posts: 4
Joined: Sat May 17, 2025 7:59 pm

Re: Disbanding city - how is the supporting city of the new settler decided?

Post by DTR »

I might have found the reason, this calculation might be done based on something called real_distance, which I find quite strange, though it might be the simplest method.
cazfi
Elite
Posts: 3335
Joined: Tue Jan 29, 2013 6:54 pm

Re: Disbanding city - how is the supporting city of the new settler decided?

Post by cazfi »

DTR wrote: Sun May 18, 2025 5:55 pmI might have found the reason, this calculation might be done based on something called real_distance
Yes, it is.
Post Reply