disallow_modification query
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.
- Spannerbag
- Posts: 759
- Joined: December 18th, 2016, 6:14 pm
- Location: Yes
disallow_modification query
Hi,
Can
The wiki isn't clear if this is also recognised inside
My reason for asking is that there is a chance at sometime in the (distant) future I might create a mod/resource.
The thought occurred: is it possible to release something as both a mod (where players can specify a config) and a resources (where the campaign author sets the config)?
However if the player has the mod version installed, the campaign must be able to ignore the
I suspect the two are separate and it'll have to be one or the other - but thought I'd ask.
Cheers!
-- Spannerbag
Can
disallow_modification
be used anywhere else besides [modification]
?The wiki isn't clear if this is also recognised inside
[resource]
so I thought I'd ask here.My reason for asking is that there is a chance at sometime in the (distant) future I might create a mod/resource.
The thought occurred: is it possible to release something as both a mod (where players can specify a config) and a resources (where the campaign author sets the config)?
However if the player has the mod version installed, the campaign must be able to ignore the
[modification]
.I suspect the two are separate and it'll have to be one or the other - but thought I'd ask.
Cheers!
-- Spannerbag
Re: disallow_modification query
You can [filter_condition] for it in any case.
-
- Posts: 1456
- Joined: August 26th, 2018, 11:46 pm
- Location: A country place, far outside the Wire
Re: disallow_modification query
I don't really know anything about mods/resources/lotsofotherstuff, but I would point out that if you look in data/_main.cfg you can see the order in which stuff gets loaded.
Also, I swear there's a way to query the active mods (like what you see in a save file active_mods="...") from lua. All I can find is wesnoth.scenario.mp_settings (see active_mods).
Anyway, you can probably have one check for the other and take corrective action as necessary.
Also, I swear there's a way to query the active mods (like what you see in a save file active_mods="...") from lua. All I can find is wesnoth.scenario.mp_settings (see active_mods).
Anyway, you can probably have one check for the other and take corrective action as necessary.
Speak softly, and carry Doombringer.
Re: disallow_modification query
Make the modification load the resource, instead of putting an extra copy of it into the modification. That way, if a campaign author has already enabled the resource, the mod is just telling the engine to enable a resource that's already enabled.
- Spannerbag
- Posts: 759
- Joined: December 18th, 2016, 6:14 pm
- Location: Yes
Re: disallow_modification query
Thanks for the post, that was my thought: use a "wrapper" mod - but from the wiki I got the impression this wasn't allowed.
Would this be as simple as having a mod that basically did a
[load_resource]
?Thanks also to Ravana and white_haired_uncle for your posts, it's all appreciated.
Cheers!
-- Spannerbag
Re: disallow_modification query
If the modification used [load_resource], then the code will be included only once even if bot the scenario and the active mode use [load_resource] for the same resource.The thought occurred: is it possible to release something as both a mod (where players can specify a config) and a resources (where the campaign author sets the config)?
Try out the dark board theme.
- Spannerbag
- Posts: 759
- Joined: December 18th, 2016, 6:14 pm
- Location: Yes
Re: disallow_modification query
Thanks for the clarification/confirmation, much appreciated.
Another chink of light dispels another small bit of darkness.

Cheers!
-- Spannerbag