Problem starting with a ruleset

Contribute, display and discuss rulesets and modpacks for use in Freeciv here.
User avatar
Corbeau
Elite
Posts: 789
Joined: Mon Jan 13, 2014 11:13 pm

Problem starting with a ruleset

Postby Corbeau » Mon Oct 23, 2017 8:47 pm

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?

User avatar
dunnoob
Elite
Posts: 326
Joined: Mon Dec 23, 2013 3:13 am
Location: Hamburg
Contact:

Re: Problem starting with a ruleset

Postby dunnoob » Mon Oct 23, 2017 10:23 pm

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 :?:

cazfi
Elite
Posts: 1510
Joined: Tue Jan 29, 2013 6:54 pm

Re: Problem starting with a ruleset

Postby cazfi » Tue Oct 24, 2017 10:36 am

Try running server separately so you can see directly what it says and what it does.

User avatar
Corbeau
Elite
Posts: 789
Joined: Mon Jan 13, 2014 11:13 pm

Re: Problem starting with a ruleset

Postby Corbeau » Sun Nov 12, 2017 1:16 am

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?

cazfi
Elite
Posts: 1510
Joined: Tue Jan 29, 2013 6:54 pm

Re: Problem starting with a ruleset

Postby cazfi » Sun Nov 12, 2017 1:24 am

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.

User avatar
Corbeau
Elite
Posts: 789
Joined: Mon Jan 13, 2014 11:13 pm

Re: Problem starting with a ruleset

Postby Corbeau » Sun Nov 12, 2017 1:33 am

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.

User avatar
Corbeau
Elite
Posts: 789
Joined: Mon Jan 13, 2014 11:13 pm

Re: Problem starting with a ruleset

Postby Corbeau » Sun Nov 12, 2017 1:59 am

...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.

wieder
Hardened
Posts: 202
Joined: Thu Jul 27, 2017 10:43 am

Re: Problem starting with a ruleset

Postby wieder » Sun Nov 12, 2017 9:54 am

Have you tried comparing the unit you want to make to a King unit? The king unit is also nobuild and should work.

User avatar
Corbeau
Elite
Posts: 789
Joined: Mon Jan 13, 2014 11:13 pm

Re: Problem starting with a ruleset

Postby Corbeau » Sun Nov 12, 2017 2:27 pm

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"

wieder
Hardened
Posts: 202
Joined: Thu Jul 27, 2017 10:43 am

Re: Problem starting with a ruleset

Postby wieder » Sun Nov 12, 2017 3:33 pm

Could you post all of the Founder settings? Maybe there is just something weird there.