Making the Editor aware of your addon's resources.

It's not easy creating an entire faction or era. Post your work and collaborate in this forum.

Moderator: Forum Moderators

Post Reply
fabi
Inactive Developer
Posts: 1260
Joined: March 21st, 2004, 2:42 pm
Location: Germany

Making the Editor aware of your addon's resources.

Post by fabi »

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":

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
Music

Code: Select all

   [editor_music]

      [music]
         name=background-music-2.ogg
         ms_before=500
         append=yes
      [/music]
      ...

   [/editor_music]
Time Schedules

Code: Select all

[editor_times]
    name= _ "Default"
    id=default
    {DEFAULT_SCHEDULE}
[/editor_times]
User avatar
AxalaraFlame
Posts: 690
Joined: December 4th, 2011, 1:07 pm
Location: Pasadina, Caltech

Re: Making the Editor aware of your Era's units

Post by AxalaraFlame »

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. :hmm:
fabi
Inactive Developer
Posts: 1260
Joined: March 21st, 2004, 2:42 pm
Location: Germany

Re: Making the Editor aware of your addon's resources.

Post by fabi »

Updated and renamed the first post.
Post Reply