Custom race doesn't work

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

Custom race doesn't work

Post by Anagkai »

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)
User avatar
josteph
Inactive Developer
Posts: 741
Joined: August 19th, 2017, 6:58 pm

Re: Custom race doesn't work

Post by josteph »

Judging by data/core/units.cfg, [race] should be enclosed by [+units]...[/units].
User avatar
Bitron
Developer
Posts: 453
Joined: October 19th, 2015, 9:23 am
Location: Germany

Re: Custom race doesn't work

Post by Bitron »

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: 2158
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: Custom race doesn't work

Post by Celtic_Minstrel »

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.
Former maintainer of Steelhive.
Post Reply