Persistence of recall lists

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.
Post Reply
User avatar
Sgt. Groovy
Art Contributor
Posts: 1471
Joined: May 22nd, 2006, 9:15 pm
Location: Helsinki

Persistence of recall lists

Post by Sgt. Groovy »

Are recall lists tied to the side number or leader?
Tiedäthän kuinka pelataan.
Tiedäthän, vihtahousua vastaan.
Tiedäthän, solmu kravatin, se kantaa niin synnit
kuin syntien tekijätkin.
Urk
Posts: 21
Joined: October 29th, 2005, 9:57 am
Location: Finland
Contact:

Post by Urk »

What are you exactly trying to do? Add more recruitable units, check what units side/leader can recruit or something else?

Answer you look for may be in wiki already
http://www.wesnoth.org/wiki/DirectActionsWML

Also zookeepers comments from this topic might help you
http://www.wesnoth.org/forum/viewtopic.php?t=13079
User avatar
Sgt. Groovy
Art Contributor
Posts: 1471
Joined: May 22nd, 2006, 9:15 pm
Location: Helsinki

Post by Sgt. Groovy »

I'm planning a campaign where the player commands several armies. Each army consists of the leader unit (with a persistent XP and level), his war chest (gold), recruit list and a recall list of veterans from his previous battles. It will not be predefined which army fights each scenario, it's decided by the player between scenarios. Not even the number of armies is predefined, it will be possible to recruit whole new armies during the campaign, and armies are lost when their leader dies in a battle (but the campaign continues with the surviving armies).

It seems apparent that I must [store_unit] each leader and their veterans in the end of each victorious scenario, but when the same leader gets into another battle, I would like the veterans appear normally in the recall list. For this, I would have to create a recall list from stored units in the beginning of each scenario. I haven't found any way to inject units to the recall list, except by making a dummy scenario where those units are recruited. This works in playtesting, but it's not an option for real campaign, unless it's possible to make a dummy scenario that ends without any clicking and never appears to the screen.

I could of course [unstore_unit] everybody at the end of the previous scenario, so that they would appear in the recall list in the next, but can this be done without the units showing up on the screen (like with [recall] show="no")?
Tiedäthän kuinka pelataan.
Tiedäthän, vihtahousua vastaan.
Tiedäthän, solmu kravatin, se kantaa niin synnit
kuin syntien tekijätkin.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

Sgt. Groovy wrote:I haven't found any way to inject units to the recall list, except by making a dummy scenario where those units are recruited. This works in playtesting, but it's not an option for real campaign, unless it's possible to make a dummy scenario that ends without any clicking and never appears to the screen.
You can put units on the recall list by unstoring them to invalid coordinates (good idea to use something like x,y="recall","recall" for clarity). There's also a ready macro in data/utils.cfg for doing this to units on the map. Apparently [store_unit] also works for units on the recall list, so you could do this: mark in the units variables (unit.variables) what army it belongs to, and at the beginning of every scenario store (with kill=yes) all units but the ones belonging to the "current" army. Then unstore them at the end.
Urk
Posts: 21
Joined: October 29th, 2005, 9:57 am
Location: Finland
Contact:

Re: Persistence of recall lists

Post by Urk »

Sgt. Groovy wrote:Are recall lists tied to the side number or leader?
Oh, I read wrong, you meant recall list I read "recruit list", sorry :oops:
Post Reply