gb's questions

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
User avatar
gbnmvfx
Posts: 18
Joined: October 6th, 2017, 8:16 am

gb's questions

Post by gbnmvfx » May 26th, 2018, 8:42 am

Hello Everyone,

I try to create a unit-type. My file looks very similar to the cfg-file of the mage, but it doesn't work. The side with the new unit-type on its recruitment-list is not able to recruit any unit. It doesn't even work if I copy everything from the mage except the id and name. How do I make it work?
Spoiler:
Last edited by gbnmvfx on May 27th, 2018, 7:03 am, edited 5 times in total.

User avatar
Ravana
Moderator
Posts: 1746
Joined: January 29th, 2012, 12:49 am
Location: Estonia

Re: gb's questions

Post by Ravana » May 26th, 2018, 10:37 am

Make sure you have included this unit from your _main.cfg. Easy way to test that is to try debug create unit it.

User avatar
gbnmvfx
Posts: 18
Joined: October 6th, 2017, 8:16 am

Re: gb's questions

Post by gbnmvfx » May 27th, 2018, 6:29 am

I have included the folder "units" in the _main.cfg and the file of the magician is in that folder.
Spoiler:
The debug mode, thanks :). I haven't used it before. The answer to "create Magician" is "Error: Invalid unit type". I have a question: I used the paths that are used in the Mage.cfg, but my file is in another folder. Does Wesnoth search for the core folders in my add-on?
Last edited by gbnmvfx on May 27th, 2018, 7:05 am, edited 1 time in total.

User avatar
Ravana
Moderator
Posts: 1746
Joined: January 29th, 2012, 12:49 am
Location: Estonia

Re: gb's questions

Post by Ravana » May 27th, 2018, 7:04 am

That inclusion needs to be inside [+units][/units].

All previously defined [binary_path] locations can be used in game, including core location.

There is list of available units in debug, shift+c by default.

User avatar
gbnmvfx
Posts: 18
Joined: October 6th, 2017, 8:16 am

Re: gb's questions

Post by gbnmvfx » May 27th, 2018, 7:10 am

Yeah, thank you very much. It works now :).

Post Reply