Activate dependencies
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.
- LordAwsomeness
- Posts: 203
- Joined: August 12th, 2013, 2:20 pm
- Location: U.S.A.
Activate dependencies
So I am trying to use macros and stuff from a separate add-on but the game keeps saying I am missing the macros. I have placed the
{~add-ons/LA_MP_Pack/utils/paths.cfg}
in the main.cfg of the new add-on I am trying to make under the #ifdef MULTIPLAYER yet it still does not recognize that I have the macros installed. What is the right way to fix this?
I want the dependencies to be reliant on each other but still separate because I want to create different scenarios and gamemodes that are not tied in together as separate downloads that are independent of each other. but the resource pack is to be the core of any of the rest of the scenarios if that makes sense.
I also plan to use units from another add-on so how would I make sure there aren't any issues with that as well?
{~add-ons/LA_MP_Pack/utils/paths.cfg}
in the main.cfg of the new add-on I am trying to make under the #ifdef MULTIPLAYER yet it still does not recognize that I have the macros installed. What is the right way to fix this?
I want the dependencies to be reliant on each other but still separate because I want to create different scenarios and gamemodes that are not tied in together as separate downloads that are independent of each other. but the resource pack is to be the core of any of the rest of the scenarios if that makes sense.
I also plan to use units from another add-on so how would I make sure there aren't any issues with that as well?
- Been playing Wesnoth since 2004 and the 1.0.x versions.
- Creator of Undead Invasion MP Scenario Pack.
- Creator of Valeria MP Adventure
- Creator of LA_RPG ERA
- Creator of Undead Invasion MP Scenario Pack.
- Creator of Valeria MP Adventure
- Creator of LA_RPG ERA
Re: Activate dependencies
Separate addons have separate preprocessing context. If you want to use macros defined in addon A from addon B then addon B must {include} something from addon A which defines those macros.
- LordAwsomeness
- Posts: 203
- Joined: August 12th, 2013, 2:20 pm
- Location: U.S.A.
Re: Activate dependencies
what would that look like? How would I do that? I defined the file that is needed that I use as the mother file for all of my macros and utils. It has all of the paths for each other file in Addon B that addon A needs
- Been playing Wesnoth since 2004 and the 1.0.x versions.
- Creator of Undead Invasion MP Scenario Pack.
- Creator of Valeria MP Adventure
- Creator of LA_RPG ERA
- Creator of Undead Invasion MP Scenario Pack.
- Creator of Valeria MP Adventure
- Creator of LA_RPG ERA
Re: Activate dependencies
Then include the file before you need content of those macros.
Example https://github.com/doofus-01/wesnoth-Tr ... in.cfg#L17
Example https://github.com/doofus-01/wesnoth-Tr ... in.cfg#L17
- LordAwsomeness
- Posts: 203
- Joined: August 12th, 2013, 2:20 pm
- Location: U.S.A.
Re: Activate dependencies
hmm I did something similar. Idk what the difference is but I am still not getting it to work. here is a copy of my code:Ravana wrote: ↑October 20th, 2019, 8:57 pm Then include the file before you need content of those macros.
Example https://github.com/doofus-01/wesnoth-Tr ... in.cfg#L17
Code: Select all
[binary_path]
path=data/add-ons/LA_MP_Pack
[/binary_path]
#ifdef MULTIPLAYER
{~add-ons/LA_RPG_Maps/scenarios/LA_RPG_RTG.cfg}
#ifhave ~add-ons/LA_MP_Pack/LA_RPG_Era.cfg
{~add-ons/LA_MP_Pack/utils/paths.cfg}
{~add-ons/LA_MP_Pack/LA_RPG_Era.cfg}
{LA_MP_PATHS}
#endif
#endif
Last edited by LordAwsomeness on October 20th, 2019, 9:38 pm, edited 1 time in total.
- Been playing Wesnoth since 2004 and the 1.0.x versions.
- Creator of Undead Invasion MP Scenario Pack.
- Creator of Valeria MP Adventure
- Creator of LA_RPG ERA
- Creator of Undead Invasion MP Scenario Pack.
- Creator of Valeria MP Adventure
- Creator of LA_RPG ERA
Re: Activate dependencies
Include the file before you need content of those macros.
Currently {~add-ons/LA_RPG_Maps/scenarios/LA_RPG_RTG.cfg} is before {~add-ons/LA_MP_Pack/utils/paths.cfg}.
Currently {~add-ons/LA_RPG_Maps/scenarios/LA_RPG_RTG.cfg} is before {~add-ons/LA_MP_Pack/utils/paths.cfg}.
- LordAwsomeness
- Posts: 203
- Joined: August 12th, 2013, 2:20 pm
- Location: U.S.A.
Re: Activate dependencies
yep that worked
thank you so much!
How would I do the same for units from a different add-on?
thank you so much!
How would I do the same for units from a different add-on?
- Been playing Wesnoth since 2004 and the 1.0.x versions.
- Creator of Undead Invasion MP Scenario Pack.
- Creator of Valeria MP Adventure
- Creator of LA_RPG ERA
- Creator of Undead Invasion MP Scenario Pack.
- Creator of Valeria MP Adventure
- Creator of LA_RPG ERA
Re: Activate dependencies
In MP units are global, so nothing to do. Never worked with campaigns.
- LordAwsomeness
- Posts: 203
- Joined: August 12th, 2013, 2:20 pm
- Location: U.S.A.
Re: Activate dependencies
okay so as long as they are installed they should work without any major issues?
- Been playing Wesnoth since 2004 and the 1.0.x versions.
- Creator of Undead Invasion MP Scenario Pack.
- Creator of Valeria MP Adventure
- Creator of LA_RPG ERA
- Creator of Undead Invasion MP Scenario Pack.
- Creator of Valeria MP Adventure
- Creator of LA_RPG ERA
- Celtic_Minstrel
- Developer
- Posts: 2166
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: Activate dependencies
If you wanted to include units from a different campaign you'd probably need to include that campaign's units directory in your campaign's `[units]` tag.
Re: Activate dependencies
Don't forget the unit's sprites, portraits, and attack icons.
- Celtic_Minstrel
- Developer
- Posts: 2166
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: Activate dependencies
Yeah, for that you'd need to add a
[binary_path]
tag referencing the campaign as well.- LordAwsomeness
- Posts: 203
- Joined: August 12th, 2013, 2:20 pm
- Location: U.S.A.
Re: Activate dependencies
awesome!! Thank you so much for your help!Celtic_Minstrel wrote: ↑October 21st, 2019, 12:26 am If you wanted to include units from a different campaign you'd probably need to include that campaign's units directory in your campaign's `[units]` tag.
- Been playing Wesnoth since 2004 and the 1.0.x versions.
- Creator of Undead Invasion MP Scenario Pack.
- Creator of Valeria MP Adventure
- Creator of LA_RPG ERA
- Creator of Undead Invasion MP Scenario Pack.
- Creator of Valeria MP Adventure
- Creator of LA_RPG ERA