Currently Online

Latest Posts

Topic: Order of addons

MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 20:06
Posts: 335
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2024-05-13, 09:54

I have made several dependent addons for the European tribe. Including Craft Addon, Food Addon, Terraforming Addon and Trading Addon. All these addons require the basic European tribe as I have not included all the basic definitions in each addon.

The problem now is that the addons in the manager are sometimes sorted before and sometimes after the main addon. The ones behind it function completely normally. Those in front of it are not, due to the dependencies. How is the order of the addons decided in the manager and how can I influence this as an addon developer?


My widelands addons: https://drive.google.com/file/d/1jopANlODo41T2reHJ0zaCOMYxq_rxXP-/view?usp=sharing

Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 17:07
Posts: 1984
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2024-05-13, 16:20

That's what the "requires" key in the addon file is for. If the add-on "extended.wad" sets requires="base.wad", then Widelands will demand that if "extended.wad" is enabled, then "base.wad" must be enabled too and sort earlier in the list of add-ons than "extended.wad".


Top Quote
MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 20:06
Posts: 335
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2024-05-13, 17:43

Nordfriese wrote:

That's what the "requires" key in the addon file is for. If the add-on "extended.wad" sets requires="base.wad", then Widelands will demand that if "extended.wad" is enabled, then "base.wad" must be enabled too and sort earlier in the list of add-ons than "extended.wad".

It works for two (terraforming, trading) of them, but not for craft and food addon.


My widelands addons: https://drive.google.com/file/d/1jopANlODo41T2reHJ0zaCOMYxq_rxXP-/view?usp=sharing

Top Quote
MarkMcWire
Avatar
Topic Opener
Joined: 2017-02-08, 20:06
Posts: 335
Ranking
Tribe Member
Location: Eisenach, Germany
Posted at: 2024-05-14, 13:24

Manuell sorting solved the problem.


My widelands addons: https://drive.google.com/file/d/1jopANlODo41T2reHJ0zaCOMYxq_rxXP-/view?usp=sharing

Top Quote