Custom race doesn't work

The place to post your WML questions and answers.

Moderators: Forum Moderators, Developers

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
Anagkai
Posts: 54
Joined: February 12th, 2012, 10:05 am

Custom race doesn't work

Post by Anagkai » October 13th, 2018, 4:15 pm

Some units should have a custom race. They don't have, though.

That's the race code:

Code: Select all

[race]
    id=AGK Insects
    name=insects
    num_traits=2
    markov_chain_size=2
    male_name= _ "race^Insect"
    female_name= _ "race+female^Insect"
    plural_name= _ "race^Insect"
    description= _ ""
	ignore_global_traits=yes
	{TRAIT_STRONG}
	{TRAIT_RESILIENT}
	{TRAIT_QUICK}
	{TRAIT_HEALTHY}
[/race]
This is inside the data folder of my campaign. I used "race=AGK Insects" inside the unit file to apply the race.
My campaigns: Princess Nilwyn (available) & Home of the Undead (available)

josteph
Developer
Posts: 147
Joined: August 19th, 2017, 6:58 pm

Re: Custom race doesn't work

Post by josteph » October 13th, 2018, 8:41 pm

Judging by data/core/units.cfg, [race] should be enclosed by [+units]...[/units].

User avatar
Bitron
Moderator
Posts: 441
Joined: October 19th, 2015, 9:23 am
Location: Germany

Re: Custom race doesn't work

Post by Bitron » October 13th, 2018, 9:15 pm

IIRC, WML has trouble dealing with empty strings. You might want to comment the description= _ "" line out or do something like description= _ "will follow soon".

User avatar
Celtic_Minstrel
Developer
Posts: 1275
Joined: August 3rd, 2012, 11:26 pm
Contact:

Re: Custom race doesn't work

Post by Celtic_Minstrel » October 28th, 2018, 11:30 pm

I've never heard of issues with empty strings in WML. An empty translatable string is pointless mind you (but I think wmlxgettext will just ignore it), but description="" should not cause any problems.
Author of The Black Cross of Aleron campaign and Default++ era.
Maintainer of Steelhive.

Post Reply