Making a custom race
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.
- Bilbo_Sacket
- Posts: 37
- Joined: February 28th, 2021, 4:27 am
Making a custom race
I am trying to create a custom race for an era that I am making. The main purpose is to have a names list separate from wesnoth core, that might be found in another nation. However, units that I assign this race to always show up in miscellaneous.
- Lord-Knightmare
- Discord Moderator
- Posts: 2360
- Joined: May 24th, 2010, 5:26 pm
- Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
- Contact:
Re: Making a custom race
well, you have to define the [race][/race] first with an id and nameBilbo_Sacket wrote: ↑April 9th, 2022, 12:10 am I am trying to create a custom race for an era that I am making. The main purpose is to have a names list separate from wesnoth core, that might be found in another nation. However, units that I assign this race to always show up in miscellaneous.
and the value of that id in [race][/race] is what the value the
race=
is in your unit type file.Sample
Code: Select all
[race]
id=slime
name= _ "Slime"
[/race]
[unit_type]
id="Ooze Slime"
name= _ "Ooze Slime"
race=slime
[/unit_type]
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
- Bilbo_Sacket
- Posts: 37
- Joined: February 28th, 2021, 4:27 am
Re: Making a custom race
Sorry I probably should have included a snippet of code so that it would be easier for you to help, thankyou though, I will check my work and see if your suggestions help.
- Bilbo_Sacket
- Posts: 37
- Joined: February 28th, 2021, 4:27 am
Re: Making a custom race
It appears I did not include the name value, it remains yet to be seen if that will make a difference however until I test it.
- Bilbo_Sacket
- Posts: 37
- Joined: February 28th, 2021, 4:27 am
Re: Making a custom race
It did not work I will post a snippet with details pertaining to the mod removed I am not yet prepared to unveil my work of the last few months to the world.
I appreciate any suggestions.
Code: Select all
#textdomain wesnoth-##########
[race]
id=race
name=_ "race"
male_name= _ "race^race"
female_name= _ "race+female^race"
plural_name= _ "race^race"
num_traits=2
markov_chain_size=3
male_names="J"
description= _ ""#describe the society of the day.#
[/race]
- Celtic_Minstrel
- Developer
- Posts: 2207
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: Making a custom race
That code is correct, so if it doesn't work, the problem is most likely that you've placed it in the wrong place. Unfortunately, without more context, it's impossible for us to point out the exact nature of your error, although I can say that both
[race]
and [unit_type]
must be placed inside a [units]
tag.- Bilbo_Sacket
- Posts: 37
- Joined: February 28th, 2021, 4:27 am
Re: Making a custom race
huh. Your advice was very useful, you addressed my problem exactly, I have tried to create a unique race several times, all ending in disaster because I did not catch that key element of where to call it. Thank you.