Making the Editor aware of your addon's resources.
Moderator: Forum Moderators
Making the Editor aware of your addon's resources.
From Wesnoth 1.11 on, the editor supports several additional features including the usage of addon resources.
If you want to enable the units from your era to be usable by the unit placement feature,
please add the corresponding [+units] statements to your _main.cfg file.
Don't forget to include files containing your self-made macros the units might depend on.
Example for the "Great Legends Era":
Items
Music
Time Schedules
If you want to enable the units from your era to be usable by the unit placement feature,
please add the corresponding [+units] statements to your _main.cfg file.
Don't forget to include files containing your self-made macros the units might depend on.
Example for the "Great Legends Era":
Code: Select all
...
#ifdef EDITOR
{~add-ons/Great_Legend_Era/macros}
[+units]
{~add-ons/Great_Legend_Era/units}
{~add-ons/Great_Legend_Era/units/humans}
{~add-ons/Great_Legend_Era/units/trolls}
{~add-ons/Great_Legend_Era/units/elementals}
{~add-ons/Great_Legend_Era/units/knightmare}
{~add-ons/Great_Legend_Era/units/orcs}
{~add-ons/Great_Legend_Era/units/elves-desert}
{~add-ons/Great_Legend_Era/units/vampires}
{~add-ons/Great_Legend_Era/units/gargoyles}
{~add-ons/Great_Legend_Era/units/monsters}
[/units]
#endif
...
Items
Code: Select all
...
#ifdef EDITOR
...
[item_group]
id=
name= _ ""
[item]
image=
halo=
id=
name= _ ""
[/item]
[/item_group]
...
#endif
Code: Select all
[editor_music]
[music]
name=background-music-2.ogg
ms_before=500
append=yes
[/music]
...
[/editor_music]
Code: Select all
[editor_times]
name= _ "Default"
id=default
{DEFAULT_SCHEDULE}
[/editor_times]
- AxalaraFlame
- Posts: 690
- Joined: December 4th, 2011, 1:07 pm
- Location: Pasadina, Caltech
Re: Making the Editor aware of your Era's units
I tested it by building some simple maps, but it seems to bring some bugs. The maps with units in certain hexes are considered as "invalid", even though I set the sides and starting positions rightly. I am not sure whether it is a bug, or I did something wrong.
Re: Making the Editor aware of your addon's resources.
Updated and renamed the first post.