Theoretical questions about recall lists

The place to post your WML questions and answers.

Moderators: Forum Moderators, Developers

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
Rebel_Angel
Posts: 7
Joined: July 7th, 2012, 9:03 am
Location: Dancing on the head of a pin

Theoretical questions about recall lists

Post by Rebel_Angel »

1. Can AI sides have recall lists?

2. If so, are they capable of using them?

For instance, if I create a unit on an AI side, with x,y=recall,recall, does that unit actually exist? And does the AI know how to recall it? If I use the same enemy leader in two consecutive scenarios (assuming he didn't/can't get killed on his first outing), is it possible to make him recall his surviving units from the previous battle?

3. If a unit somehow moves from the visible map to x,y=recall,recall during a scenario, is this interpreted as death? If it happens to a player's leader, will the player lose (assuming normal win/loss conditions)?

4. If a scenario begins with the player's leader located on the recall list (but other units on-map), will the player instantly lose because he doesn't have a leader?

5. In the same case, if all his on-map units are killed but the leader remains in recall purgatory, will the scenario continue indefinitely (assuming I haven't specified defeat when [not] [have_unit] side=1)?

6. This one could apply to any event, not just recall-related. I just didn't want to make a whole new thread for it...
Is it possible to trigger an event mid-combat, after a unit has suffered a killing blow and dropped to 0 HP, but before it actually dies (thereby pre-empting any die events and experience award to the killer)?
Would attacker_hits and defender_hits, with a filter for 0 or less HP, catch it at the right moment?
Merry meet, and merry part, and merry meet again.

User avatar
TheScribe
Posts: 465
Joined: June 17th, 2012, 8:17 pm
Location: You won't know till it's too late

Re: Theoretical questions about recall lists

Post by TheScribe »

Here's some answers. Sorry if they are wrong, or if I misinturpreted your questions.

1. Yes. If you want their recall list to carry over to another level use this:

Code: Select all

ai_persistent=true
or

Code: Select all

ai_persistent=yes
I'm not sure.

2. As far as I know, yes. I'm not sure if it will though...

4. I think it gives you an error message. (Not quite sure, sorry)

5. Again, I think this can't happen. Error message.

6. Use this:

Code: Select all

[event]
 name=last breath
  [filter]
   id=Bob
  [/filter]
[/event]

I'm not sure what you mean by "x,y=recall,recall". But if you want to add a unit to a recall list just add a unit tag and don't give it x,y posistions. It will be added to the recall list of the selected side. Like so:

Code: Select all

[unit]
 type=Orcish Grunt
 id=Grunt
 name= _ "Grunt"
 side=1
[/unit]
Sorta on a break from the forums ATM, have been for a while. If I was doing something for/with you and I haven't recently, that's why, I will be back soon hopefully.

User avatar
Iris
Site Administrator
Posts: 6646
Joined: November 14th, 2006, 5:54 pm
Location: Chile
Contact:

Re: Theoretical questions about recall lists

Post by Iris »

TheScribe wrote:1. Yes. If you want their recall list to carry over to another level use this:

Code: Select all

ai_persistent=true
or

Code: Select all

ai_persistent=yes
I'm not sure.
It’s persistent=yes/true, and it’s for the [side] declarations. As a rule of thumb, all boolean attributes take either a positive value (which can be provided in regular WML as true or yes) or a negative value (false or no).

Since I don’t know about the rest, I’ll not make conjectures on the matter here.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.

User avatar
Adamant14
Posts: 904
Joined: April 24th, 2010, 1:14 pm

Re: Theoretical questions about recall lists

Post by Adamant14 »

Author of Antar, Son of Rheor ( SP Campaign) | Development Thread + Feedback Thread + Replays of ASoR

Rebel_Angel
Posts: 7
Joined: July 7th, 2012, 9:03 am
Location: Dancing on the head of a pin

Re: Theoretical questions about recall lists

Post by Rebel_Angel »

TheScribe wrote:I'm not sure what you mean by "x,y=recall,recall"
I'm sure I remember reading somewhere that that was the coordinate for units on the recall list. Maybe it's from an old version and has since been changed, or maybe is only used in some specific context. Or I might be remembering wrong...

...So I looked it up. X,y=recall,recall is used to [unstore] a unit to the recall list rather than on-map (since in this case, omitting x,y would return the unit to wherever it was when it was [store]d). Also, it's used to filter units who are currently on a recall list. I knew I'd seen it somewhere...
Merry meet, and merry part, and merry meet again.

User avatar
pyrophorus
Posts: 513
Joined: December 1st, 2010, 12:54 pm

Re: Theoretical questions about recall lists

Post by pyrophorus »

Rebel_Angel wrote:1. Can AI sides have recall lists?

2. If so, are they capable of using them?
Yes.
In the [side] definition, include:

Code: Select all

		persistent=yes
		save_id=H_Army
both in source scenario (where your leader first rises) and where you want the recall list to be used. Using the save_id, you can use the recall list with another leader if you want.
Rebel_Angel wrote: 3. If a unit somehow moves from the visible map to x,y=recall,recall during a scenario, is this interpreted as death? If it happens to a player's leader, will the player lose (assuming normal win/loss conditions)?

4. If a scenario begins with the player's leader located on the recall list (but other units on-map), will the player instantly lose because he doesn't have a leader?

5. In the same case, if all his on-map units are killed but the leader remains in recall purgatory, will the scenario continue indefinitely (assuming I haven't specified defeat when [not] [have_unit] side=1)?
The rule is you MUST have a leader on the map to avoid defeat (at least for non AI sides). The workaround is to put an invisible leader somewhere on the map, out of enemy reach. In my campaign, I use this special unit created with canrecruit=yes on unwalkable terrain:

Code: Select all

[unit_type]
    id=Recruiter
	[base_unit]
		id=Fog Clearer
	[/base_unit]
    movement=0
    hitpoints=2000
[/unit_type]
Rebel_Angel wrote: 6. This one could apply to any event, not just recall-related. I just didn't want to make a whole new thread for it...
Is it possible to trigger an event mid-combat, after a unit has suffered a killing blow and dropped to 0 HP, but before it actually dies (thereby pre-empting any die events and experience award to the killer)?
Would attacker_hits and defender_hits, with a filter for 0 or less HP, catch it at the right moment?
Did you tried the 'last breath' event ? BTW, even in the 'die' event, the unit is not already killed: you can still save it, heal it and restore it later.
Last, x,y=recall,recall works, both in filters and store/restore units.
HTH
Campaign Return to Noelren *** HowTos: WML filtering, WML variables
Please help to to update the Guide to UMC Campaigns

User avatar
junoslord
Posts: 82
Joined: June 11th, 2012, 3:13 pm
Location: Enveloping your left flank.

Re: Theoretical questions about recall lists

Post by junoslord »

Would this have to be consecutive scenarios, or could I use the same leader/army in say scenarios 3, 6, and 7?

How would I handle a previously "dead" leader? I know this happens in Heir to the Throne, and a couple others... you must defeat them and they join you.
America-- Land of the Free, home of the Brave! "And now that we've taken care of the Braves we're coming after the Free."

"BANNED!!! What the hell do you mean BANNED? All I did was call one narrow-minded, power-hungry Nazi moderator a narrow-minded, power-hungry Nazi!"

User avatar
Crendgrim
Moderator Emeritus
Posts: 1328
Joined: October 15th, 2010, 10:39 am
Location: Germany

Re: Theoretical questions about recall lists

Post by Crendgrim »

Untested:

Code: Select all

[event]
  name=last breath

  [filter]
  # filter for the leader
  [/filter]

  [modify_unit]
    [filter]
      x,y=$unit.x,$unit.y
    [/filter]
    side=1
    hitpoints=$unit.max_hitpoints
  [/modify_unit]
[/event]
UMC Story Images — Story images for your campaign!

User avatar
TheScribe
Posts: 465
Joined: June 17th, 2012, 8:17 pm
Location: You won't know till it's too late

Re: Theoretical questions about recall lists

Post by TheScribe »

junoslord wrote:Would this have to be consecutive scenarios, or could I use the same leader/army in say scenarios 3, 6, and 7?
I don't think they have to be consecutive.
Sorta on a break from the forums ATM, have been for a while. If I was doing something for/with you and I haven't recently, that's why, I will be back soon hopefully.

User avatar
pyrophorus
Posts: 513
Joined: December 1st, 2010, 12:54 pm

Re: Theoretical questions about recall lists

Post by pyrophorus »

junoslord wrote:Would this have to be consecutive scenarios, or could I use the same leader/army in say scenarios 3, 6, and 7?
It works across scenarios as well.
Next question has very little to do with OP IMO (and I don't understand what you mean), so I will not reply.
HTH
Campaign Return to Noelren *** HowTos: WML filtering, WML variables
Please help to to update the Guide to UMC Campaigns

User avatar
junoslord
Posts: 82
Joined: June 11th, 2012, 3:13 pm
Location: Enveloping your left flank.

Re: Theoretical questions about recall lists

Post by junoslord »

pyrophorus wrote: Next question has very little to do with OP IMO (and I don't understand what you mean), so I will not reply.
HTH
Sorry, must have been really tired.

What I mean is that in some of the HTH scenarios you must "defeat" an enemy leader, princess whatshername is one. When she dies she returns in the next scenario.

What I'm asking is: If a leader in scenario 3 is "killed" and I return them in scenario 6 would I be able to recall them at the same XP and level as they where when they "died" the first time?
America-- Land of the Free, home of the Brave! "And now that we've taken care of the Braves we're coming after the Free."

"BANNED!!! What the hell do you mean BANNED? All I did was call one narrow-minded, power-hungry Nazi moderator a narrow-minded, power-hungry Nazi!"

JaMiT
Developer
Posts: 511
Joined: January 22nd, 2012, 12:38 am

Re: Theoretical questions about recall lists

Post by JaMiT »

Rebel_Angel wrote:2. If so, are they capable of using them?
Yes. In fact, you could use the recall list as a way to limit recruits for the AI. (If you want an AI side to recruit at most 3 peasants, put 3 peasants in its recall list, do not put "Peasant" in its recruit= list, and give the AI 60 gold to cover the expense. Admittedly, you probably don't want to do this for peasants, of all units...) The AI seems to have a preference for recalls over recruits.
Rebel_Angel wrote:3. If a unit somehow moves from the visible map to x,y=recall,recall during a scenario, is this interpreted as death? If it happens to a player's leader, will the player lose (assuming normal win/loss conditions)?
I think this cannot happen. What can happen is that WML moves the unit from the map to a variable (stores it and kills it off the map), then unstores the unit into the recall list. At which point, the only remaining question should be when the leader loss will be registered (end of turn at the latest, I think).
Rebel_Angel wrote:4. If a scenario begins with the player's leader located on the recall list (but other units on-map), will the player instantly lose because he doesn't have a leader?
This is pretty easy for you to test, no? Experimentation is a great teacher.


junoslord wrote:What I'm asking is: If a leader in scenario 3 is "killed" and I return them in scenario 6 would I be able to recall them at the same XP and level as they where when they "died" the first time?
Store the unit in its last_breath event in scenario 3, set hit points to maximum (in the variable), then unstore from the variable in scenario 6.

Post Reply