Okay, what's up with the macros

The place to post your WML questions and answers.

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.
User avatar
Pentarctagon
Project Manager
Posts: 5567
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Okay, what's up with the macros

Post by Pentarctagon »

I think the clear result then is that it's not supported to have scenarios in the editor's scenarios folder that contains macros. So if you want to play the scenario, you need to do it through your campaign.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
gnombat
Posts: 710
Joined: June 10th, 2010, 8:49 pm

Re: Okay, what's up with the macros

Post by gnombat »

I see quite a lot of errors in the code pasted above:
  1. The _main.cfg file refers to {~add-ons/my_first_campaign/scenarios} instead of {~add-ons/3rd_army/scenarios}.
  2. The scenario .cfg file doesn't have a closing [/scenario] tag.
  3. The scenario .cfg file refers to a macro TRAIT_LEADER which doesn't actually exist. (Or is this a macro that you created?)
  4. Side 2 has two [modifications] open tags (one of them should be a [/modifications] closing tag).
  5. Side 2 has (INCOME 6 2 1} which should be {INCOME 6 2 1}.
Other than all of those, it looks like this scenario should more or less work...
User avatar
malthaussen
Posts: 36
Joined: April 6th, 2024, 11:05 pm

Re: Okay, what's up with the macros

Post by malthaussen »

@pentarctagon The fact that Multiplayer apparently does recognize {DEFAULT_SCHEDULE} muddies the issue somewhat.

I note that the non-campaign scenarios available through Muliplayer (eg, 2p_Aethermaw) have macros as well, but they are located in the main program's "Multiplayer/Scenarios" folder and thus not in the editor's scenario folder.

So, to test that my scenarios are working properly, they have to be played via the campaign, eh? What if I wanted to create a standalone scenario? Where would I put it in the game's labyrinthine folder structure?

-- Mal
"Of two choices, I always take the third."
User avatar
malthaussen
Posts: 36
Joined: April 6th, 2024, 11:05 pm

Re: Okay, what's up with the macros

Post by malthaussen »

@gnombat: thanks for the once-over. I knew there would be syntax errors. I owe you a beer. Where should I send it?

-- Mal
"Of two choices, I always take the third."
User avatar
Pentarctagon
Project Manager
Posts: 5567
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Okay, what's up with the macros

Post by Pentarctagon »

malthaussen wrote: April 11th, 2024, 3:53 am @pentarctagon The fact that Multiplayer apparently does recognize {DEFAULT_SCHEDULE} muddies the issue somewhat.

I note that the non-campaign scenarios available through Muliplayer (eg, 2p_Aethermaw) have macros as well, but they are located in the main program's "Multiplayer/Scenarios" folder and thus not in the editor's scenario folder.

So, to test that my scenarios are working properly, they have to be played via the campaign, eh? What if I wanted to create a standalone scenario? Where would I put it in the game's labyrinthine folder structure?

-- Mal
Scenarios in the editor's scenarios folder are not aware of macros because the scenario editor does not support macros.

Any standalone multiplayer scenarios would instead also go in your add-on. You would then need to reference that scenario's cfg file in your _main.cfg outside of the #ifdef CAMPAIGN_3RD_ARMY block. Probably you would want to put them in a separate folder and reference them as something like {~add-ons/3rd_army/multiplayer-scenarios}.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
Post Reply