veteran lvl error

You can get help here if Freeciv doesn't start on your computer, or if you keep getting fatal errors while playing etc.
Post Reply
Wahazar
Elite
Posts: 362
Joined: Mon Jul 02, 2018 1:49 pm

veteran lvl error

Post by Wahazar »

I got following messages in chat window:

Code: Select all

in utype_veteran_level() [../../../../common/unittype.c::1625]: assertion 'vsystem->levels > level' failed.
in base_get_attack_power() [../../../../common/combat.c::436]: assertion 'vlevel != ((void *)0)' failed.
I'm not reporting it, because I'm using custom ruleset, instead I ask for advice, where I should search for bug in ruleset?
Augmented2 ruleset/modpack for freeciv2.6: http://forum.freeciv.org/f/viewtopic.php?f=11&t=91047
Ignatus
Elite
Posts: 644
Joined: Mon Nov 06, 2017 12:05 pm
Location: St.Petersburg, Russia
Contact:

Re: veteran lvl error

Post by Ignatus »

Have you set vet.chance to 0 for the top level?
Wahazar
Elite
Posts: 362
Joined: Mon Jul 02, 2018 1:49 pm

Re: veteran lvl error

Post by Wahazar »

Ignatus wrote:Have you set vet.chance to 0 for the top level?
Not sure I remember what do you mean "for the top level"...
I have unit, which have:

Code: Select all

veteran_names = _("green")
veteran_raise_chance = 0
veteran_work_raise_chance = 0
veteran_power_fact = 100
veteran_move_bonus = 0
but it can fight.
Some other units from this class can be trained in Barrack, but I have

Code: Select all

      "UnitClass", "Small Land", "Local", TRUE
      "UnitFlag", "NonMil", "Local", FALSE
      "UnitFlag", "NoVeteran", "Local", FALSE
in Barrack effect.
Should I define something other?
Augmented2 ruleset/modpack for freeciv2.6: http://forum.freeciv.org/f/viewtopic.php?f=11&t=91047
Ignatus
Elite
Posts: 644
Joined: Mon Nov 06, 2017 12:05 pm
Location: St.Petersburg, Russia
Contact:

Re: veteran lvl error

Post by Ignatus »

Wahazar wrote:
Ignatus wrote:Have you set vet.chance to 0 for the top level?
Not sure I remember what do you mean "for the top level"...
I mean that any veteran_raise_chance list in the game must end in 0.
I have unit, which have:

Code: Select all

veteran_names = _("green")
...
Some other units from this class can be trained in Barrack
You mean other unit type of the same class? Does it have different veteran system? Does the green-only type have explicit NoVeteran flag (to avoid triggering the barracks effect)? Be sure not to have Veteran_Build effect above defined values for any buildable unit type.
Wahazar
Elite
Posts: 362
Joined: Mon Jul 02, 2018 1:49 pm

Re: veteran lvl error

Post by Wahazar »

Well, I tough that veteran raise chance 0 is enough, there was no "NoVeteran" flag indeed, I will fix it.
But it looks ambiguous and redundant for me.
Augmented2 ruleset/modpack for freeciv2.6: http://forum.freeciv.org/f/viewtopic.php?f=11&t=91047
Post Reply