Macro suggestions?
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.
-
Lord-High-Crabbe
- Posts: 11
- Joined: April 17th, 2026, 4:12 pm
Re: Macro suggestions?
Neither yet.
Thanks for the useful link
Thanks for the useful link
Re: Macro suggestions?
Whether you use a tool or not, I would recommend looking at a simple campaign like A Tale of Two Brothers to get an idea of how it works.
You will want to create a file which looks basically the same as bigmap.cfg but with your own journey locations.
You will want to create a file which looks basically the same as bigmap.cfg but with your own journey locations.
- Spannerbag
- Posts: 879
- Joined: December 18th, 2016, 6:14 pm
- Location: Yes
Re: Macro suggestions?
Just to consufe you a bit more, if your campaign has branching paths (i.e. when a scenario ends more than one scenario can come next, the actual one launched depending on player actions) then if subsequent scenarios occur in different places they'll have different tracking maps.
In these cases additional logic is needed to conditionally select which tracking map elements to display if/when the two branches rejoin since the player can have arrived at their current tracking map location by at least 2 different routes.
The logic isn't difficult but is something to be aware of.
This is used in mainline The Rise of Wesnoth (TRoW) in scenario 5 where the player has successfully negotiated either;
I'll leave working out the detail to you,
, but both those macros are in
Of course if your campaign has a single path (absolutely nothing wrong with that) then you don't need to know any of this.
Cheers!
-- Spannerbag
In these cases additional logic is needed to conditionally select which tracking map elements to display if/when the two branches rejoin since the player can have arrived at their current tracking map location by at least 2 different routes.
The logic isn't difficult but is something to be aware of.
This is used in mainline The Rise of Wesnoth (TRoW) in scenario 5 where the player has successfully negotiated either;
- Scenario 04a: The Swamp of Esten, or
- Scenario 04b: The Midlands
{TROW_GI_TRACK {JOURNEY_05_NEW} }.I'll leave working out the detail to you,
utils/bigmap.cfg in the TRoW folder/directory tree.Of course if your campaign has a single path (absolutely nothing wrong with that) then you don't need to know any of this.
Cheers!
-- Spannerbag
Re: Macro suggestions?
Macros are useful to keep the code shorter, particularly in the case of variables and conditionals.
is less tiresome than
At some point you will naturally start to gravitate towards using and defining macros wherever you want.
Code: Select all
{VARIABLE gold 50}Code: Select all
[set_variable]
name=gold
value=50
[/set_variable]