Wolf advancement not happening after scenario 1
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.
Wolf advancement not happening after scenario 1
Hi, I've been working on a three scenario campaign and I have a problem.
By default, a Wolf can't advance to Lvl 2 Great Wolf, so I implemented the following code to allow Wolf advancement:
extra_defines=ENABLE_WOLF_ADVANCEMENT
I placed the code within [campaign] in the main.cfg, and it works, but only on the first scenario.
I tried a work-around. I added a macro that allows a recruited Wolf to advance to Great Wolf, but that solution led to other problems, so I'm now wondering why I needed a work-around in the first place. Shouldn't extra_defines=ENABLE_WOLF_ADVANCEMENT work on all scenarios, not just the first one? How can I make it work on all scenarios?
Thanks.
By default, a Wolf can't advance to Lvl 2 Great Wolf, so I implemented the following code to allow Wolf advancement:
extra_defines=ENABLE_WOLF_ADVANCEMENT
I placed the code within [campaign] in the main.cfg, and it works, but only on the first scenario.
I tried a work-around. I added a macro that allows a recruited Wolf to advance to Great Wolf, but that solution led to other problems, so I'm now wondering why I needed a work-around in the first place. Shouldn't extra_defines=ENABLE_WOLF_ADVANCEMENT work on all scenarios, not just the first one? How can I make it work on all scenarios?
Thanks.
Author of:
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
Re: Wolf advancement not happening after scenario 1
Probably the same as https://github.com/wesnoth/wesnoth/issues/4402
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
Re: Wolf advancement not happening after scenario 1
Thank you, I didn't know about that unfortunate problem.
I wonder, should I abandon the idea of using wolves who can advance in level? Wolves play an important role in the campaign, though.
I have a work-around for wolf advancement but it has four problems.
1) It only works on recruited wolves, so application is limited.
2) The "Leader" who is a wolf (so not recruited) is unable to use the macro so he can't advance in level, which is bad.
3) A Great Wolf doesn't advance to Dire Wolf (not sure why, probably fixable).
4) The XPs needed for advancing to Great Wolf are wrong. They should be 30, not 50.
Here is the macro. I'm not sure how to proceed at this point. Ideas?
I wonder, should I abandon the idea of using wolves who can advance in level? Wolves play an important role in the campaign, though.
I have a work-around for wolf advancement but it has four problems.
1) It only works on recruited wolves, so application is limited.
2) The "Leader" who is a wolf (so not recruited) is unable to use the macro so he can't advance in level, which is bad.
3) A Great Wolf doesn't advance to Dire Wolf (not sure why, probably fixable).
4) The XPs needed for advancing to Great Wolf are wrong. They should be 30, not 50.
Here is the macro. I'm not sure how to proceed at this point. Ideas?
Code: Select all
#define RECRUITED_WOLF_MAY_ADVANCE
[event] # Macro allows a recruited Wolf to advance to Great Wolf
name=prerecruit
first_time_only=no # Note: by default, a Wolf cannot advance in level
[filter] # and needs 50 XP to AMLA
type=Wolf # Note: a Wolf that can advance to Great Wolf
[/filter] # needs 30 XPs to advance
[modify_unit]
[filter]
id=$unit.id
[/filter]
[modifications]
[object]
[effect]
[filter]
type=Wolf
[/filter]
apply_to=new_advancement
replace=yes
types=Great Wolf
[/effect]
[/object]
[object]
[effect]
[filter]
type=Great Wolf
[/filter]
apply_to=new_advancement
replace=yes
types=Dire Wolf
[/effect]
[/object]
[/modifications]
[/modify_unit]
[/event]
#enddef
Author of:
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
Re: Wolf advancement not happening after scenario 1
You can [base_unit] new wolf type with advancements.
Re: Wolf advancement not happening after scenario 1
Thanks, Ravana; that was the solution I needed.
And thanks Shield for your help with coding a new wolf type with advancements off-forum.
And thanks Shield for your help with coding a new wolf type with advancements off-forum.
Author of:
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
Re: Wolf advancement not happening after scenario 1
This is a new Wolf-related problem. I guess I'll add it rather than start a new thread, if that's okay.
This code is supposed to make a recruited Wolf have the Loyal trait -- which it does. However, it also seems to create a bug. An occasional Wolf's XP requirement will be lower as if it had the Intelligent trait, even though it doesn't. Or a Wolf does extra damage as if it had the Strong trait, yet it doesn't. It seems like the Loyal trait sometimes "replaces" a specific trait -- but in name only, as the effects of the displaced trait remain.
This code is supposed to make a recruited Wolf have the Loyal trait -- which it does. However, it also seems to create a bug. An occasional Wolf's XP requirement will be lower as if it had the Intelligent trait, even though it doesn't. Or a Wolf does extra damage as if it had the Strong trait, yet it doesn't. It seems like the Loyal trait sometimes "replaces" a specific trait -- but in name only, as the effects of the displaced trait remain.
Code: Select all
#define LOYAL_WOLVES
[event] # Makes a recruited Wolf unit have the Loyal trait
name=prerecruit
first_time_only=no
[filter]
type=Wolf
[/filter]
[modify_unit]
[filter]
id=$unit.id
[/filter]
[modifications]
{TRAIT_LOYAL}
[/modifications]
{IS_LOYAL}
[/modify_unit]
[/event]
#enddef
Author of:
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
DIY Campaign, Confederacy of Swamp Creatures: Big Battle 1, Confederacy of Swamp Creatures: Big Battle 2, Frogfolk Delivery Service, The Pool of Ek.
- Celtic_Minstrel
- Developer
- Posts: 2207
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: Wolf advancement not happening after scenario 1
Your guess at the issue is roughly correct (though it's a little worse - it doesn't replace the trait entirely but ends up merging the loyal trait into it, which in principle could be different than actually replacing it if the trait has more
Remove the
[effect]
tags than loyal does).Remove the
[modifications]
tag and just place {TRAIT_LOYAL}
directly in [modify_unit]
. This will mean the wolf has three traits, though, so if you'll need to come up with another solution to get around that if it's a problem.Just a note that I personally prefer to see a new thread for each new problem (especially when the two problems are unrelated).