Is anyone else having a problem with the wolf advancement macro?
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.
-
- Posts: 3
- Joined: July 22nd, 2022, 6:28 pm
Is anyone else having a problem with the wolf advancement macro?
So. I wrote a campaign (An Innocent Man). It has wolves in it. In fact, at first they're the only thing our hero can recruit. Therefore it's kind of important that they are allowed to advance. I therefore, obviously, included the wolf advancement macro, along with two other extra defines (the dwarvish runesmith and dwarvish arcanister ones).
The wolf advancement works fine all the way up to version 1.14. I am currently trying to fettle up the campaign for 1.16 (someone's kindly ported it already, but I want to update it myself). I am currently playtesting it, and I find the wolf advancement has stopped working. I have checked and the macro is not deprecated; in fact it's been rewritten to suit version 1.16. I can think of ways round, but I don't want to have to use them if I can just get this macro to work. Anyone else have this problem?
The wolf advancement works fine all the way up to version 1.14. I am currently trying to fettle up the campaign for 1.16 (someone's kindly ported it already, but I want to update it myself). I am currently playtesting it, and I find the wolf advancement has stopped working. I have checked and the macro is not deprecated; in fact it's been rewritten to suit version 1.16. I can think of ways round, but I don't want to have to use them if I can just get this macro to work. Anyone else have this problem?
-
- Posts: 484
- Joined: August 4th, 2019, 5:27 pm
Re: Is anyone else having a problem with the wolf advancement macro?
There is now a macro you can use to do it, just insert
inside your [campaign] tag that defines a campaign, something like
{ENABLE_WOLF_ADVANCEMENT}
inside your [campaign] tag that defines a campaign, something like
Code: Select all
[campaign]
id=some_id
name="Your campaign's name"
{ENABLE_WOLF_ADVANCEMENT}
...
[/campaign]
Co-founder and current maintainer of IsarFoundation, Afterlife Rated and overall Wesnoth Autohost Project
Developer and maintainer of my fork of World Conquest, Invincibles Conquest II
Developer and maintainer of my fork of World Conquest, Invincibles Conquest II
- beetlenaut
- Developer
- Posts: 2825
- Joined: December 8th, 2007, 3:21 am
- Location: Washington State
- Contact:
Re: Is anyone else having a problem with the wolf advancement macro?
When I tried it, I found that
extra_defines
doesn't work for wolves or anything else. It may be deprecated, and they just forgot to put it in the change log--the mainline campaigns don't use it anymore. However, the macro worked correctly (the way dwarftough demonstrated). Are you actually using the macro, or did you mean that you only tried extra_defines
? Your post is unclear.Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
-
- Posts: 3
- Joined: July 22nd, 2022, 6:28 pm
Re: Is anyone else having a problem with the wolf advancement macro?
Thank you both very much! The problem is clearly extra_defines, and if I just take that out it should all work happily.
Re: Is anyone else having a problem with the wolf advancement macro?
There should already be a warning message about that in the logs. If you're porting to 1.16, it's worth checking the logs to see if there's anything else being reported.
- beetlenaut
- Developer
- Posts: 2825
- Joined: December 8th, 2007, 3:21 am
- Location: Washington State
- Contact:
Re: Is anyone else having a problem with the wolf advancement macro?
Yes, there is. (I was being lazy last night not checking them.) It's also mentioned on the page Compatibility-breaking changes. Neither is exactly obvious though, especially to new people, so I have modified the wiki as well.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
- Celtic_Minstrel
- Developer
- Posts: 2222
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: Is anyone else having a problem with the wolf advancement macro?
Just for the record,
extra_defines
itself is not deprecated. Putting the advancement macros in extra_defines
is deprecated, however. I believe what happens when you actually do it is that it overwrites the contents of the macro with blank so that {ENABLE_WOLF_ADVANCEMENT}
expands to nothing.- beetlenaut
- Developer
- Posts: 2825
- Joined: December 8th, 2007, 3:21 am
- Location: Washington State
- Contact:
Re: Is anyone else having a problem with the wolf advancement macro?
The wiki says that those advancements are the only recognized values forCeltic_Minstrel wrote: ↑September 13th, 2022, 1:05 pm Just for the record, extra_defines itself is not deprecated. Putting the advancement macros in extra_defines is deprecated, however.
extra_defines
. It sounds like you are saying that the key is not deprecated, but all its valid values are. If that's the case, leaving it as a "Removed Key" in the wiki is fine IMHO. Or, is there something else you can do with extra_defines
?Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
-
- Posts: 484
- Joined: August 4th, 2019, 5:27 pm
Re: Is anyone else having a problem with the wolf advancement macro?
extra_defines
just executes #define
macrostatement when the campaign in question is active. Even if the core game at the moment doesn't use it, it can be used still. For example, the Legend of the Invincibles campaign can be used as a dependency for other campaigns to include LotI's RPG system. But some elements of it only makes sense for LotI itself. If your campaign is not ready to enable them, you write extra_defines=NO_LOTI
inside your campaign's definition.Inside LotI such optional pieces of code are encircled by
Code: Select all
#ifndef NO_LOTI
...
#endif
extra_defines=LOTI_LOW_DROPS
So,
extra_defines
is still useful, it can be used by configurable campaign dependencies. Just the core game itself stopped using it right nowCo-founder and current maintainer of IsarFoundation, Afterlife Rated and overall Wesnoth Autohost Project
Developer and maintainer of my fork of World Conquest, Invincibles Conquest II
Developer and maintainer of my fork of World Conquest, Invincibles Conquest II
- Celtic_Minstrel
- Developer
- Posts: 2222
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: Is anyone else having a problem with the wolf advancement macro?
No, your recent edit is incorrect. The list of values forbeetlenaut wrote: ↑September 13th, 2022, 1:40 pmThe wiki says that those advancements are the only recognized values forCeltic_Minstrel wrote: ↑September 13th, 2022, 1:05 pm Just for the record, extra_defines itself is not deprecated. Putting the advancement macros in extra_defines is deprecated, however.extra_defines
. It sounds like you are saying that the key is not deprecated, but all its valid values are. If that's the case, leaving it as a "Removed Key" in the wiki is fine IMHO. Or, is there something else you can do withextra_defines
?
extra_defines
is not exhaustive. You can specify any value you want there, and it will be defined when the campaign is loaded.For example, imagine that you are using a custom faction defined by another add-on. The add-on guards all its custom units behind a
SAMPLE_ADDON_UNITS
define. Putting SAMPLE_ADDON_UNITS
in your campaign's extra_defines
will thus allow you to use those units in your campaign.Those values listed on the wiki were merely a set of sample values that (prior to 1.16) had a useful effect defined by mainline when placed in
extra_defines
. It is not a list of every valid value that can be used.- beetlenaut
- Developer
- Posts: 2825
- Joined: December 8th, 2007, 3:21 am
- Location: Washington State
- Contact:
Re: Is anyone else having a problem with the wolf advancement macro?
I have re-edited the wiki. Hopefully it is correct now and the OP's problem won't happen to anyone else. (I was misled by the previous language in the wiki and the error message in the log. An entry in the change log probably would have made it clear, but that seems to have been forgotten.)
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide