what can cause a lack of starting positions?

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
eldritch_cookie
Posts: 22
Joined: Sat Mar 05, 2022 6:41 pm

what can cause a lack of starting positions?

Post by eldritch_cookie »

i am creating a ruleset but although the version i have loads if i use rules fantasy, it doesn't start and when tried closes the server, when i opened a server in the terminal to know what was the problem it said it couldn't allocate a starting position, however i have terrains with the "Starter" flag and my terrains have native_to ="Land" in them so what could be causing this? , my version of freeciv is the latest development one
terrain.ruleset https://hst.sh/fijuqavafe.makefile,
map/extras/main.ruleset https://hst.sh/odevopurek.ini ,
map/resources.ruleset https://hst.sh/lehekuxate.ini ,
map/land.ruleset https://hst.sh/pupexeyaku.makefile ,
units.ruleset https://hst.sh/sirerasibo.makefile ,
units/starter.ruleset https://hst.sh/vuzomuzocu.ini ,
game.ruleset https://hst.sh/evojehefac.cs ,
civconfig.ruleset https://hst.sh/alakiwokam.ini ,
actions/main.ruleset https://hst.sh/awobozalin.cs

i probably will create a github repo when this ruleset gets to a minimum of playability
cazfi
Elite
Posts: 3093
Joined: Tue Jan 29, 2013 6:54 pm

Re: what can cause a lack of starting positions?

Post by cazfi »

Did you try with just one player game, i.e., requiring just one starting position? It could be worth testing. If you could get to the game that way, it would also allow you to see what kind of map gets generated by your terrain ruleset - maybe those starting terrains are more rare than you expect.
eldritch_cookie
Posts: 22
Joined: Sat Mar 05, 2022 6:41 pm

Re: what can cause a lack of starting positions?

Post by eldritch_cookie »

cazfi wrote:Did you try with just one player game, i.e., requiring just one starting position? It could be worth testing. If you could get to the game that way, it would also allow you to see what kind of map gets generated by your terrain ruleset - maybe those starting terrains are more rare than you expect.
ok, i probably should have just created a github repository with all the files and linked it here, i am basing my ruleset on the stub ruleset, and as i am just starting and testing, there is only one nation the testing one, i can't generate a map for a single player. that said your suggestion is really good, is there any way of viewing the generated map without playing? i even tried to generate a huge 800,000 tiles map, to check if it was only rare, but no something in ,my ruleset is preventing any of the suitable terrains from being chosen.
i created a github for the ruleset https://github.com/dark-ether/freeciv-fantasy-ruleset , in the future it will be available under the GPL, which version does freeciv use?
Last edited by eldritch_cookie on Wed Mar 09, 2022 1:05 pm, edited 3 times in total.
cazfi
Elite
Posts: 3093
Joined: Tue Jan 29, 2013 6:54 pm

Re: what can cause a lack of starting positions?

Post by cazfi »

Placing starting positions is part of the map generation, i.e., map is not completely ready at that point, so no, there's no easy way to see the generated map if you cannot create at least one starting position.

Two things you could try to inspect the problem:
1) Add (temporarily) "Starter" flag for all land terrains. Maybe you can then get to the game to see what terrains map is made of. Maybe property_??? -values of some terrain make it so attractive to the map generator that it places it everywhere, leaving no place for other terrains.
2) Try to load the ruleset to ruledit to see that all the terrains are listed (i.e. loaded correctly)

Having all the files easily available, e.g., from github would enable me to test myself too.

Also, it might be a coincidence, but there has been some changes to map generator within last seven days - those might have introduced bugs.
eldritch_cookie
Posts: 22
Joined: Sat Mar 05, 2022 6:41 pm

Re: what can cause a lack of starting positions?

Post by eldritch_cookie »

cazfi wrote:Placing starting positions is part of the map generation, i.e., map is not completely ready at that point, so no, there's no easy way to see the generated map if you cannot create at least one starting position.

Two things you could try to inspect the problem:
1) Add (temporarily) "Starter" flag for all land terrains. Maybe you can then get to the game to see what terrains map is made of. Maybe property_??? -values of some terrain make it so attractive to the map generator that it places it everywhere, leaving no place for other terrains.
2) Try to load the ruleset to ruledit to see that all the terrains are listed (i.e. loaded correctly)

Having all the files easily available, e.g., from github would enable me to test myself too.

Also, it might be a coincidence, but there has been some changes to map generator within last seven days - those might have introduced bugs.
only saw your message after i edited mine, i did add the starter flag to all land terrains and when loaded in ruledit the terrains show , however i still can't generate a map, that seems to imply my map is only ocean , but now that you mentioned the coincidence , i recall that i only started to have this bug after i updated to the latest development release, so it may be worth looking into that, however i find it difficult to believe that it prevents all maps from being generated, so probably there is something specific to my ruleset which makes me encounter this bug.
cazfi
Elite
Posts: 3093
Joined: Tue Jan 29, 2013 6:54 pm

Re: what can cause a lack of starting positions?

Post by cazfi »

This might be because your ruleset has no resources for those terrains -> no resources get generated -> no place on map is good enough to be starting position.
eldritch_cookie
Posts: 22
Joined: Sat Mar 05, 2022 6:41 pm

Re: what can cause a lack of starting positions?

Post by eldritch_cookie »

cazfi wrote:This might be because your ruleset has no resources for those terrains -> no resources get generated -> no place on map is good enough to be starting position.
yes it was this,probably should be added as a requirement on the check for validity of ruleset.it probably let me do this because i technically had a resource but no terrain generated it. setting a terrain to the resource immediately fixed the problem. now i will have to think about which resources i will want on each terrain,the only thing that came to my mind for now was to have mithril be a resource.
nef
Elite
Posts: 324
Joined: Mon Jun 25, 2018 5:01 pm

Re: what can cause a lack of starting positions?

Post by nef »

cazfi wrote:This might be because your ruleset has no resources for those terrains -> no resources get generated -> no place on map is good enough to be starting position.
What is the criteria for these resources? As you may recall I have removed 'shield' as a resource on grassland and replaced it with an extra (for civ1). I have not noticed any problem, but I will now look for it. The reason I ask is that I may need to be a little more 'creative' with terrain.ruleset and Lua to avoid this start position problem.
cazfi
Elite
Posts: 3093
Joined: Tue Jan 29, 2013 6:54 pm

Re: what can cause a lack of starting positions?

Post by cazfi »

nef wrote:
cazfi wrote:This might be because your ruleset has no resources for those terrains -> no resources get generated -> no place on map is good enough to be starting position.
What is the criteria for these resources?
I didn't look closely, but just noticed that the start position selection code looks at resources. Currently I assume it to be just count of resources within the city radius, i.e., it doesn't really look in to what the resource provides (if anything)
nef
Elite
Posts: 324
Joined: Mon Jun 25, 2018 5:01 pm

Re: what can cause a lack of starting positions?

Post by nef »

I didn't look closely, but just noticed that the start position selection code looks at resources. Currently I assume it to be just count of resources within the city radius, i.e., it doesn't really look in to what the resource provides (if anything)
I was actually hoping that this may be the case because then I can just reinstate the existing shield resource but without the actual shield. If I do see a problem I will try this to see if it is a fix. (And, of course, it may be a way of more generally controlling this 'feature' of mapgen.)
Post Reply