First I edited the
https://freeciv.fandom.com/wiki/Editing_Effects page entry for the City_Radius_Sq effect, adding that the initial value is set by the "init_city_radius_sq = X" in game.ruleset. Then, thinking that the City_Vision_Radius_Sq did something similar with the init_vis_radius_sq setting, I editing the City_Vision_Radius_Sq effect to say that. But when my experimenting convinced me that was wrong, I searched the source code for init_vis_radius_sq and found that it is only used in file gamehand.c function place_starting_unit(), to show visible area around a start unit.
Meanwhile I started getting assert errors
Code: Select all
in map_change_seen() [../../freeciv-3.0.0/server/maphand.c::957]: assertion 'plrtile->seen_count[V_INVIS] + !game.info.fogofwar <= plrtile->seen_count[V_MAIN]' failed.
Please report this message at https://osdn.net/projects/freeciv/ticket/
in city_refresh_vision() [../../freeciv-3.0.0/server/citytools.c::3117]: assertion '(pcity->server.vision)->radius_sq[V_MAIN] >= (pcity->server.vision)->radius_sq[V_INVIS]' failed.
Please report this message at https://osdn.net/projects/freeciv/ticket/
which I eventually figured out were caused by my ruleset file effects.ruleset not having a City_Vision_Radius_Sq effect with no reqs. Every other ruleset I have looked at has a City_Vision_Radius_Sq effect with no reqs, so I figured it was my mistake and not a bug. So I re-edited the wiki page City_Vision_Radius_Sq entry to say that there needs to be one of these with no requirements to set the initial value.
Now that entry has been edited again to refer to init_vis_radius_sq, so I'm confused.
If init_vis_radius_sq really only affects start units, it would be good to update the comment line in game.ruleset. It now is
Code: Select all
; Square of initially visible radius (true distance).
Suggest
Code: Select all
; Square of initially visible radius for start units (true distance).
And, should I file a ticket for the assert errors when there's no City_Vision_Radius_Sq effect with no reqs? It only happens when semi-competent ruleset changers like me push the envelope.