vgaming / CreepWars

A "wesnoth" add-on with custom game rules
5 stars 1 forks source link

engine/team_construction: warning: when building level, skipping a unit (id=[]) from side_cfg with no type information, #3

Closed jostephd closed 5 years ago

jostephd commented 5 years ago

Using wesnoth master, Creep Wars 1.5.2

  1. Start a local MP game on Creep Wars narrow
  2. Set sides 3 5 6 7 to "Nobody"
  3. Start the game
  4. On stderr:
warning engine/team_construction: warning: when building level, skipping a unit (id=[]) from side_cfg with no type information,
for side:
allow_changes = yes
allow_player = no
chose_random = yes
color = white
controller = ai
current_player = Computer Player 8
faction = Rebels
faction_name = Rebels
fog = yes
gender = female
gold = 100
income = 0
is_host = no
is_local = yes
leader = Elvish Captain,Elvish Hero,Elvish Ranger,Elvish Marksman,Elvish Druid,Elvish Sorceress,White Mage,Red Mage,Elder Wose
name = Computer Player 8
player_id = josteph
random_leader = Elvish Captain,Elvish Hero,Elvish Ranger,Elvish Marksman,Elvish Druid,Elvish Sorceress,White Mage,Red Mage
recruit = Elvish Fighter,Elvish Archer,Mage,Elvish Shaman,Elvish Scout,Wose,Merman Hunter
share_view = yes
shroud = no
side = 8
team_lock = yes
team_name = East
terrain_liked = Ff,Fa,Ss,Ww
type = Elvish Sorceress
user_description = Computer Player
user_team_name = East
village_gold = 2
village_support = 1
[ai]
        aggression = 0.90
        caution = 0.10
        leader_value = 5.0
        village_value = 0.0
[/ai]
[unit]
[/unit]
[default_faction]
[/default_faction]
[ai]
        recruitment_pattern = fighter,fighter,archer,archer,mixed fighter,healer,scout
[/ai]
soliton- commented 5 years ago

The error message complains about the empty [unit] tag that is also printed in the output there.

vgaming commented 5 years ago

@soliton- yes indeed. I'm still not yet sure what to do about it though. The addon-s WML indeed has empty [unit] tag since wesnoth-1.12. Not sure what a proper fix would be.

vgaming commented 5 years ago

I've removed the empty [unit] [/unit] tag and everything runs fine on 1.14. It probably was a mistake on my part or a 1.12 adaptation then.

I've pushed the new code to 1.14 and 1.15. I'll close the issue when I re-build current master and check if it's fixed there as well.

vgaming commented 5 years ago

Without the useless [unit][/unit] tag, I see no warning on master branch as well, so I guess that fixes it. (And CreepWars-s support for 1.12 is long gone, whether it did support the absence of tag or not...)

vgaming commented 5 years ago

Thanks for raising, it was good to address the warning on time. :+1: