[put_to_recall_list]
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.
[put_to_recall_list]
In my campaign, there are different Leaders for the players team. Because of that I use the
Does the Tag only save the units to the standard
save_id
to keep the recall list, BUT: if I use [put_to_recall_list]
in a scenario, and change the leader in the next scenario, the units up put into the recall list with [put_to_recall_list]
are gone.Does the Tag only save the units to the standard
save_id
?Developer of Project Haldric
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Re: [put_to_recall_list]
hmm maybe you use save_id= wrong?
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: [put_to_recall_list]
how could that be possible?
It's within the [side]-Tag, isn't it ?
It's within the [side]-Tag, isn't it ?
Developer of Project Haldric
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Re: [put_to_recall_list]
hmm yes it is. You need (should) use save_id=<id> in both scenarios. Also if one of the sides is controlled by an ai, you also have to use persitent=yes. In every scenario each save_id= may only be used once. Also note that the game will discard units in the recall list if their two of them have the same id=. Also make sure that no ther wml removes those units from the recall list.
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: [put_to_recall_list]
All of it is as it should be in my WML-Code, but they disappeared anyway. I found another solution, but i will try it again however.
Instead of putting them to the recall list, i just hid them.
Instead of putting them to the recall list, i just hid them.
Developer of Project Haldric
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Re: [put_to_recall_list]
It was within the first Scenario. So, could it be possible that the recall-list gets created at the end of the first scenario ? Then it would be logical that the units were gone, because the list hasn't exist at this point.
Developer of Project Haldric
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Re: [put_to_recall_list]
Did hiding them work? (did they appear in the next scenario?)
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: [put_to_recall_list]
I didnt put them onto the recall list with [put_to_recall_list] after hiding, but yes they are visible in the next scenario.
Developer of Project Haldric
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Re: [put_to_recall_list]
hmm i have a new idea, the following could have happened:
After you put all the units to the recall list, the game noticed that the side had no units left on the map, so the side was marked as 'defeated' which usually implies that the side is removed from the carryover system.
You could try to put all units but the sides leader to the recall list with [put_to_recall_list] and see if the problems still occurs.
After you put all the units to the recall list, the game noticed that the side had no units left on the map, so the side was marked as 'defeated' which usually implies that the side is removed from the carryover system.
You could try to put all units but the sides leader to the recall list with [put_to_recall_list] and see if the problems still occurs.
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: [put_to_recall_list]
this sounds valid to me. I deleted the code but I think put the whole side to the recall list and recalled those i wanted to show up again.
Ill try that!
Ill try that!
Developer of Project Haldric
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Re: [put_to_recall_list]
Now.. I tried it this way:
Same problem, all units are gone in the next scenario.
EDIT: Johan is the Side 1 Leader
Code: Select all
[put_to_recall_list]
side=1
[not]
id=Johan, Denvan, Ysedda, Lenvan
[/not]
[/put_to_recall_list]
EDIT: Johan is the Side 1 Leader
Developer of Project Haldric
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Re: [put_to_recall_list]
Which wesnoth wesnoth do you use?
ok i looked at the definition of put_to_recall_list in wml-tags.lua:
This code obviously puts teh units to the recall list with 'wesnoth.put_recall_unit' and removed it from teh recall list right after with 'wesnoth.erase_unit'.
you can fix this in your wml code by adding this
inside your [scenario] that wants to use [put_to_recall_list].
Still i'd like to know which wesnoth version you use to know whoch vernoth versions are effected by this bug.
ok i looked at the definition of put_to_recall_list in wml-tags.lua:
Code: Select all
function wml_actions.put_to_recall_list(cfg)
local units = wesnoth.get_units(cfg)
for i, unit in ipairs(units) do
if cfg.heal then
unit.hitpoints = unit.max_hitpoints
unit.moves = unit.max_moves
unit.attacks_left = unit.max_attacks
unit.status.poisoned = false
unit.status.slowed = false
end
wesnoth.put_recall_unit(unit, unit.side)
wesnoth.erase_unit(unit)
end
end
you can fix this in your wml code by adding this
Code: Select all
[lua]
code = <<
function wesnoth.wml_actions.put_to_recall_list(cfg)
local units = wesnoth.get_units(cfg)
for i, unit in ipairs(units) do
if cfg.heal then
unit.hitpoints = unit.max_hitpoints
unit.moves = unit.max_moves
unit.attacks_left = unit.max_attacks
unit.status.poisoned = false
unit.status.slowed = false
end
wesnoth.put_recall_unit(unit, unit.side)
end
end
>>
[/lua]
Still i'd like to know which wesnoth version you use to know whoch vernoth versions are effected by this bug.
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: [put_to_recall_list]
Uff, i have now clue about lua .. maybe i should take a look at it... seems pretty useful. ^^
Thanks for the code.
Im using the newest developement version: 1.13.2a
Thanks for the code.
Im using the newest developement version: 1.13.2a
Developer of Project Haldric
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Re: [put_to_recall_list]
y that code (the [lua] tag) can just be copied into the [scenario] as-is.
Hmm thats what i thought. mostlikeley this is a bug that doesn't effect 1.12.
(fixing this bug is mostlikeley easier than writing this answer, still this is no guarantee that it will be fixed in next wesnoth release.)
Please next time when reporting things like this, specify the wesnoth version right in the first post, becasue we by default assume that the current stable version (1.12) is used, and for 1.12 things like 'a bug in [put_to_recall_list]' are just quiet unlikeley, so its not the first thing we think of.
thx for reporting this anyway.
Hmm thats what i thought. mostlikeley this is a bug that doesn't effect 1.12.
(fixing this bug is mostlikeley easier than writing this answer, still this is no guarantee that it will be fixed in next wesnoth release.)
Please next time when reporting things like this, specify the wesnoth version right in the first post, becasue we by default assume that the current stable version (1.12) is used, and for 1.12 things like 'a bug in [put_to_recall_list]' are just quiet unlikeley, so its not the first thing we think of.
thx for reporting this anyway.
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: [put_to_recall_list]
I'll keep that in mind!
and thanks again for helping me out with it, works fine now (:
and thanks again for helping me out with it, works fine now (:
Developer of Project Haldric
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code