Page 1 of 2

Problem starting with a ruleset

Posted: Mon Oct 23, 2017 8:47 pm
by Corbeau
Ok, I thought it was going to be more or less obvious, but either I'm too stupid or... not.

So, this is the sequence of problems I am getting when I start the game and first write:

Code: Select all

/rulesetdir Corbeau4


*start*

*BANG*

Looking at the log, I find:

Code: Select all

The server couldn't allocate starting positions.
Failed to create suitable map, retrying with another mapseed
The server couldn't allocate starting positions.
Cannot create suitable map with given settings.


This is probably due to the settings being: map is island-based, one player per continent etc.

HOWEVER, these are different from settings I have in the game.ruleset, nor it is the settings I saved manually from the game pre-start menu. And when I fix them manually, the game starts but not with my ruleset.

Any ideas?

Re: Problem starting with a ruleset

Posted: Mon Oct 23, 2017 10:23 pm
by dunnoob
Corbeau wrote:Any ideas?
Maybe your number of players times minimal native tiles reachable by first start unit, or a similar constraint, needs a bigger map or less players :?:

Re: Problem starting with a ruleset

Posted: Tue Oct 24, 2017 10:36 am
by cazfi
Try running server separately so you can see directly what it says and what it does.

Re: Problem starting with a ruleset

Posted: Sun Nov 12, 2017 1:16 am
by Corbeau
I pinpointed the problem.

Game starts with some Settlers, Workers and Explorers.

When those units are given the flag "Small Land", they are not created at the beginning. When they are given flag "Land", everything is fine and the game starts normally and with them.

It seems there is nothing wrong with those flags by themselves because the moment I build a city, that city can build further Workers ("Small Land", and the class name even shows in Civipedia).

This is the part of units.ruleset that defines those two classes:

Code: Select all

[unitclass_land]
; /* TRANS: Unit class: used adjectivally */
name          = _("?unitclass:Land")
min_speed     = 1
hp_loss_pct   = 0
flags         = "TerrainSpeed", "DamageSlows", "CanOccupyCity", "BuildAnywhere",
                "CollectRansom", "ZOC", "CanFortify", "CanPillage",
                "TerrainDefense", "KillCitizen"

[unitclass_land_small]
; /* TRANS: Unit class: used adjectivally */
name          = _("?unitclass:Small Land")
min_speed     = 1
hp_loss_pct   = 0
flags         = "TerrainSpeed", "DamageSlows", "BuildAnywhere", "CollectRansom",
                "ZOC", "TerrainDefense", "DoesntOccupyTile"


Also, I have created a new unit, "Founders", which are supposed to be a copy of Settlers, but slightly different and with a flag "NoBuild". Everything is fine until I give them this flag and then, again, there is a short circuit.

Any ideas?

Re: Problem starting with a ruleset

Posted: Sun Nov 12, 2017 1:24 am
by cazfi
Are all the same terrains native to "Small Land" than to "Land" units? Maybe some crucial terrain is not native to "Small Land" so they cannot be created to all starting positions.

Re: Problem starting with a ruleset

Posted: Sun Nov 12, 2017 1:33 am
by Corbeau
Oh, hell... There is no "Small Land" in terrain.ruleset at all... It seems I patched units.ruleset and terrain.ruleset from two different rulesets... which is weird because I was pretty sure I took stuff from only one source, but there you go.

Thanks. This should settle the matter.

Re: Problem starting with a ruleset

Posted: Sun Nov 12, 2017 1:59 am
by Corbeau
...except the "NoBuild" part. When I give the starting unit this flag, it doesn't even appear. So, am I misunderstanding how this flag works? I want the original batch of Founders to be available at the start of the game, but after that I don't want them to be built in cities.

Re: Problem starting with a ruleset

Posted: Sun Nov 12, 2017 9:54 am
by wieder
Have you tried comparing the unit you want to make to a King unit? The king unit is also nobuild and should work.

Re: Problem starting with a ruleset

Posted: Sun Nov 12, 2017 2:27 pm
by Corbeau
Hm, good idea, I'm looking at it, but can't say I'm any smarter from it.

So,

Founders:
"Settlers", "NonMil", "AddToCity", "Cities", "IgTer", "NoBuild"

Leader:
"IgZOC", "NonMil", "NoBuild", "NoHome", "SuperSpy",
"Undisbandable", "Unbribable", "GameLoss", "Unique"

Barbarian Leader:
"IgZOC", "NonMil", "Unbribable",
"Undisbandable", "SuperSpy", "NoHome", "NoBuild"

Re: Problem starting with a ruleset

Posted: Sun Nov 12, 2017 3:33 pm
by wieder
Could you post all of the Founder settings? Maybe there is just something weird there.