Units only showing as '?'

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
AetherBytes
Posts: 2
Joined: March 21st, 2019, 3:51 am

Units only showing as '?'

Post by AetherBytes »

I'm new to modding, and I'm trying to create an Era, and with it 1 extra faction. The faction only has 3 units on it, 2 of which can be leaders, 2 of which can be recruited. However, when I try to select them in the leader selection menu, they only show up as ? with no picture, as well as having none recruitable. They have the correct id and file paths, and I don't know whats causing it. I don't know what I'd need to upload to help you guys, so if you need a certain file ask and I'll post it.
Attachments
Screenshot_30.png
User avatar
Pentarctagon
Project Manager
Posts: 5564
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Units only showing as '?'

Post by Pentarctagon »

Moved to the WML Workshop, since this is going to be related to your WML.

As far as what to upload, Wesnoth's log file can be helpful, as is uploading your current code so that others can take a look at it directly themselves.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
AetherBytes
Posts: 2
Joined: March 21st, 2019, 3:51 am

Re: Units only showing as '?'

Post by AetherBytes »

Got it, I'll post a copy a the log here and in attachments, and the addon in the attachments

Code: Select all

Battle for Wesnoth v1.14.5
Started on Thu Mar 21 14:55:14 2019

Automatically found a possible data directory at C:\Users\USER\AppData\Local\Battle for Wesnoth 1.14.5

Data directory:               C:\Users\USER\AppData\Local\Battle for Wesnoth 1.14.5
User configuration directory: C:\Users\USER\Documents\My Games\Wesnoth1.14
User data directory:          C:\Users\USER\Documents\My Games\Wesnoth1.14
Cache directory:              C:\Users\USER\Documents\My Games\Wesnoth1.14\cache

Setting mode to 1366x768
Checking lua scripts... ok
20190321 14:55:32 warning preprocessor: Redefining macro ABILITY_PSRME_MEDICINE without explicit #undef at ~add-ons/18thCentury_MP_Era/./macros/abilities.cfg:1
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:17
previously defined at ~add-ons/18thCentury_MP_Era/./macros/abilities.cfg:1
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:10
20190321 14:55:32 warning preprocessor: Redefining macro ABILITY_PSRME_NAVAL_CARPENTER without explicit #undef at ~add-ons/18thCentury_MP_Era/./macros/abilities.cfg:39
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:17
previously defined at ~add-ons/18thCentury_MP_Era/./macros/abilities.cfg:39
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:10
20190321 14:55:32 warning preprocessor: Redefining macro ABILITY_PSRME_FORTIFY without explicit #undef at ~add-ons/18thCentury_MP_Era/./macros/abilities.cfg:68
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:17
previously defined at ~add-ons/18thCentury_MP_Era/./macros/abilities.cfg:68
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:10
20190321 14:55:32 warning preprocessor: Redefining macro ABILITY_PSRME_GUERILLA without explicit #undef at ~add-ons/18thCentury_MP_Era/./macros/abilities.cfg:118
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:17
previously defined at ~add-ons/18thCentury_MP_Era/./macros/abilities.cfg:118
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:10
20190321 14:55:32 warning preprocessor: Redefining macro ABILITY_PSRME_INFILTRATION without explicit #undef at ~add-ons/18thCentury_MP_Era/./macros/abilities.cfg:133
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:17
previously defined at ~add-ons/18thCentury_MP_Era/./macros/abilities.cfg:133
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:10
20190321 14:55:32 warning preprocessor: Redefining macro ABILITY_PSRME_SWIFTNESS without explicit #undef at ~add-ons/18thCentury_MP_Era/./macros/abilities.cfg:148
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:17
previously defined at ~add-ons/18thCentury_MP_Era/./macros/abilities.cfg:148
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:10
20190321 14:55:32 warning preprocessor: Redefining macro ABILITY_PSRME_INTIMIDATE without explicit #undef at ~add-ons/18thCentury_MP_Era/./macros/abilities.cfg:158
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:17
previously defined at ~add-ons/18thCentury_MP_Era/./macros/abilities.cfg:158
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:10
20190321 14:55:32 warning preprocessor: Redefining macro ABILITY_PSRME_LEADERSHIP without explicit #undef at ~add-ons/18thCentury_MP_Era/./macros/abilities.cfg:204
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:17
previously defined at ~add-ons/18thCentury_MP_Era/./macros/abilities.cfg:204
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:10
20190321 14:55:32 warning preprocessor: Redefining macro ABILITY_PSRME_FLAGSHIP_LEADERSHIP without explicit #undef at ~add-ons/18thCentury_MP_Era/./macros/abilities.cfg:256
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:17
previously defined at ~add-ons/18thCentury_MP_Era/./macros/abilities.cfg:256
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:10
20190321 14:55:32 warning preprocessor: Redefining macro ABILITY_PSRME_CARPENTER without explicit #undef at ~add-ons/18thCentury_MP_Era/./macros/abilities.cfg:305
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:17
previously defined at ~add-ons/18thCentury_MP_Era/./macros/abilities.cfg:305
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:10
20190321 14:55:32 warning preprocessor: Redefining macro ABILITY_PSRME_GARRISON without explicit #undef at ~add-ons/18thCentury_MP_Era/./macros/abilities.cfg:325
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:17
previously defined at ~add-ons/18thCentury_MP_Era/./macros/abilities.cfg:325
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:10
20190321 14:55:32 warning preprocessor: Redefining macro ABILITY_PSRME_HOSPITAL without explicit #undef at ~add-ons/18thCentury_MP_Era/./macros/abilities.cfg:369
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:17
previously defined at ~add-ons/18thCentury_MP_Era/./macros/abilities.cfg:369
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:10
20190321 14:55:32 warning preprocessor: Redefining macro WEAPON_SPECIAL_SIEGE_WEAPON without explicit #undef at ~add-ons/18thCentury_MP_Era/./macros/specials.cfg:1
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:20
previously defined at ~add-ons/18thCentury_MP_Era/./macros/specials.cfg:1
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:10
20190321 14:55:32 warning preprocessor: Redefining macro WEAPON_SPECIAL_INACCURACY without explicit #undef at ~add-ons/18thCentury_MP_Era/./macros/specials.cfg:18
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:20
previously defined at ~add-ons/18thCentury_MP_Era/./macros/specials.cfg:18
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:10
20190321 14:55:32 warning preprocessor: Redefining macro WEAPON_SPECIAL_SHRAPNEL without explicit #undef at ~add-ons/18thCentury_MP_Era/./macros/specials.cfg:31
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:20
previously defined at ~add-ons/18thCentury_MP_Era/./macros/specials.cfg:31
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:10
20190321 14:55:32 warning preprocessor: Redefining macro WEAPON_SPECIAL_FLANK without explicit #undef at ~add-ons/18thCentury_MP_Era/./macros/specials.cfg:49
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:20
previously defined at ~add-ons/18thCentury_MP_Era/./macros/specials.cfg:49
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:10
20190321 14:55:32 warning preprocessor: Redefining macro WEAPON_SPECIAL_SNIPER without explicit #undef at ~add-ons/18thCentury_MP_Era/./macros/specials.cfg:68
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:20
previously defined at ~add-ons/18thCentury_MP_Era/./macros/specials.cfg:68
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:10
20190321 14:55:32 warning preprocessor: Redefining macro WEAPON_SPECIAL_SNEAK without explicit #undef at ~add-ons/18thCentury_MP_Era/./macros/specials.cfg:80
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:20
previously defined at ~add-ons/18thCentury_MP_Era/./macros/specials.cfg:80
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:10
20190321 14:55:32 warning preprocessor: Redefining macro WEAPON_SPECIAL_BOARDING without explicit #undef at ~add-ons/18thCentury_MP_Era/./macros/specials.cfg:101
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:20
previously defined at ~add-ons/18thCentury_MP_Era/./macros/specials.cfg:101
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:10
20190321 14:55:32 warning preprocessor: Redefining macro WEAPON_SPECIAL_CAPTUREART without explicit #undef at ~add-ons/18thCentury_MP_Era/./macros/specials.cfg:119
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:20
previously defined at ~add-ons/18thCentury_MP_Era/./macros/specials.cfg:119
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:10
20190321 14:55:32 warning preprocessor: Redefining macro WEAPON_SPECIAL_CAPTURESHIP without explicit #undef at ~add-ons/18thCentury_MP_Era/./macros/specials.cfg:145
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:20
previously defined at ~add-ons/18thCentury_MP_Era/./macros/specials.cfg:145
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:10
20190321 14:55:32 warning preprocessor: Redefining macro WEAPON_SPECIAL_MOB without explicit #undef at ~add-ons/18thCentury_MP_Era/./macros/specials.cfg:186
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:20
previously defined at ~add-ons/18thCentury_MP_Era/./macros/specials.cfg:186
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:10
20190321 14:55:32 warning preprocessor: Redefining macro WEAPON_SPECIAL_STORM without explicit #undef at ~add-ons/18thCentury_MP_Era/./macros/specials.cfg:197
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:20
previously defined at ~add-ons/18thCentury_MP_Era/./macros/specials.cfg:197
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:10
20190321 14:55:32 warning preprocessor: Redefining macro WEAPON_SPECIAL_OPEN_FIELD without explicit #undef at ~add-ons/18thCentury_MP_Era/./macros/specials.cfg:213
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:20
previously defined at ~add-ons/18thCentury_MP_Era/./macros/specials.cfg:213
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:10
20190321 14:55:32 warning preprocessor: Redefining macro WEAPON_SPECIAL_HARASS without explicit #undef at ~add-ons/18thCentury_MP_Era/./macros/specials.cfg:229
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:20
previously defined at ~add-ons/18thCentury_MP_Era/./macros/specials.cfg:229
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:10
20190321 14:55:32 warning preprocessor: Redefining macro WEAPON_SPECIAL_RETREAT without explicit #undef at ~add-ons/18thCentury_MP_Era/./macros/specials.cfg:246
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:20
previously defined at ~add-ons/18thCentury_MP_Era/./macros/specials.cfg:246
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:10
20190321 14:55:32 warning preprocessor: Redefining macro WEAPON_SPECIAL_SABOTAGE without explicit #undef at ~add-ons/18thCentury_MP_Era/./macros/specials.cfg:255
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:20
previously defined at ~add-ons/18thCentury_MP_Era/./macros/specials.cfg:255
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:10
20190321 14:55:32 warning preprocessor: Redefining macro PSRME_BOAT_ANIM without explicit #undef at ~add-ons/18thCentury_MP_Era/./macros/animation-utils.cfg:1
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:26
previously defined at ~add-ons/18thCentury_MP_Era/./macros/animation-utils.cfg:1
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:10
20190321 14:55:32 warning preprocessor: Redefining macro PSRME_EXPLOSION without explicit #undef at ~add-ons/18thCentury_MP_Era/./macros/animation-utils.cfg:37
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:26
previously defined at ~add-ons/18thCentury_MP_Era/./macros/animation-utils.cfg:37
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:10
20190321 14:55:32 warning preprocessor: Redefining macro PSRME_SELF_EXPLOSION without explicit #undef at ~add-ons/18thCentury_MP_Era/./macros/animation-utils.cfg:96
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:26
previously defined at ~add-ons/18thCentury_MP_Era/./macros/animation-utils.cfg:96
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:10
20190321 14:55:32 warning preprocessor: Redefining macro PSRME_BURN_ANIM without explicit #undef at ~add-ons/18thCentury_MP_Era/./macros/animation-utils.cfg:139
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:26
previously defined at ~add-ons/18thCentury_MP_Era/./macros/animation-utils.cfg:139
    included from ~add-ons/18thCentury_MP_Era/_main.cfg:10
Failed to convert a string from utf8 to UCS4
Failed to convert a string from utf8 to UCS4
Failed to convert a string from utf8 to UCS4
Failed to convert a string from utf8 to UCS4
Failed to convert a string from utf8 to UCS4
Failed to convert a string from utf8 to UCS4
Failed to convert a string from utf8 to UCS4
Failed to convert a string from utf8 to UCS4
Failed to convert a string from utf8 to UCS4
Failed to convert a string from utf8 to UCS4
Failed to convert a string from utf8 to UCS4
Failed to convert a string from utf8 to UCS4
Failed to convert a string from utf8 to UCS4
Failed to convert a string from utf8 to UCS4
Failed to convert a string from utf8 to UCS4
Failed to convert a string from utf8 to UCS4
Most of it is for a different addon that works, and the "Failed to convert a string from utf8 to UCS4" line is there even without the addon im making, so it can't be that.
Attachments
Addon.zip
(389.62 KiB) Downloaded 353 times
wesnoth-20190321-145514-1112.log
(12.18 KiB) Downloaded 347 times
User avatar
josteph
Inactive Developer
Posts: 741
Joined: August 19th, 2017, 6:58 pm

Re: Units only showing as '?'

Post by josteph »

The line {~add-ons/Custom_Addon/units/} doesn't include the unit files units/dragons/*.cfg, so the game doesn't even know the unit types. There are a few ways to fix this, for example, you can change the line to {~add-ons/Custom_Addon/units/dragons/} and then it should work. See https://wiki.wesnoth.org/PreprocessorRe ... ive_.7B.7D
Post Reply