Graziani WML Questions

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.
User avatar
sergey
Posts: 443
Joined: January 9th, 2015, 9:25 pm

Re: Graziani WML Questions

Post by sergey »

I tested your code and recall list is carried to the next scenario.
And here my Leader appears alone with empty recall list.
Alone? What about the other units that you unstored (Darlasan, Eirur) ?

In scenario 16 your veterans from previous scenarios are available, correct?

What is your Wesnoth version?

Please attach the whole scenario files.
Author of SP scenario Dragon Fight and SP campaign Captured by a Nightmare.
Created The Rise of Wesnoth (alternative mechanics) version of the mainline campaign.

User avatar
Graziani
Posts: 96
Joined: December 20th, 2010, 1:04 am
Location: France

Re: Graziani WML Questions

Post by Graziani »

Alone? What about the other units that you unstored (Darlasan, Eirur) ?
Yes, he is alone, without Crolog, Eirur, Darlasan... He still have his XP, but nothing more.

I'm using Wesnoth 1.14.7


I attached the files. Thanks for your help.
Attachments
17_Fin.cfg
(30.86 KiB) Downloaded 86 times
frab-utils.cfg
(1015 Bytes) Downloaded 88 times
16_Crevasses.cfg
(41.28 KiB) Downloaded 88 times
Currently on goblin campaign "A goblin adventure" (available) and troll campaign "From Rocks and Blood"(not available yet)

User avatar
EarthCake
Posts: 367
Joined: March 29th, 2019, 1:57 pm
Location: Meereen

Re: Graziani WML Questions

Post by EarthCake »

Maybe you should make special utils file to store units, or put it in frab-utils, with name
#define STORE_GODUG and
#define UNSTORE_GODUG
,
and then in scenario when you store, {STORE_GODUG} and vica verse.
If that doesn't help, that would be easier way than to unstore and store units every time.

Also, I cannot find any problem in your code.

Why do you store units in [prestart] of Crevasses? Shouldn't you store them just before [endlevel] tag?

User avatar
Graziani
Posts: 96
Joined: December 20th, 2010, 1:04 am
Location: France

Re: Graziani WML Questions

Post by Graziani »

EarthCake wrote:
May 25th, 2019, 8:46 am
Why do you store units in [prestart] of Crevasses? Shouldn't you store them just before [endlevel] tag?
I'm storing units in prestart of lvl 16 because in my story, the leader and his 3 heroes split in two teams. First team in lvl 15 with leader and one heroe, second team in lvl 16 without leader and the two other heroes. They are all back together in lvl 17.
That's why i take time to store and unstore because i need that function only in these three levels.

But I'll try today, it could help
Maybe you should make special utils file to store units, or put it in frab-utils, with name
#define STORE_GODUG and
#define UNSTORE_GODUG
Currently on goblin campaign "A goblin adventure" (available) and troll campaign "From Rocks and Blood"(not available yet)

User avatar
EarthCake
Posts: 367
Joined: March 29th, 2019, 1:57 pm
Location: Meereen

Re: Graziani WML Questions

Post by EarthCake »

Have you tried to just not recall these heroes in lvl 15 and then recall them in lvl 16 (in that lvl just don't recall leader in lvl 16), and then recall all of them in lvl 17.
Of course, tell in lvl 14 that they will split.

That will maybe work.

User avatar
sergey
Posts: 443
Joined: January 9th, 2015, 9:25 pm

Re: Graziani WML Questions

Post by sergey »

Graziani, here is the reason of the bug. You have a code at the end of the scenario:

Code: Select all

[kill]
  animate=no
  [filter]
    type=canon
  [/filter]
[/kill]
It deletes all units on the map and in the recall list, because filter is ignored. See https://wiki.wesnoth.org/DirectActionsWML#.5Bkill.5D , you should not use filter inside the kill command.

Correct code is:

Code: Select all

[kill]
  animate=no
  type=canon
[/kill]
Author of SP scenario Dragon Fight and SP campaign Captured by a Nightmare.
Created The Rise of Wesnoth (alternative mechanics) version of the mainline campaign.

User avatar
Graziani
Posts: 96
Joined: December 20th, 2010, 1:04 am
Location: France

Re: Graziani WML Questions

Post by Graziani »

[kill]
animate=no
[filter]
type=canon
[/filter]
[/kill]
Woah... It's crazy i couldn't imagine it was the reason of my bug. Moreover, type=canon is not good code, because the unit is named FRAB Canon. I made a double mistake.
So it's very important to understand that the entire side is killed with this tag if it's not done properly...

Thank you so much, my campaign work normally.
Currently on goblin campaign "A goblin adventure" (available) and troll campaign "From Rocks and Blood"(not available yet)

User avatar
josteph
Developer
Posts: 741
Joined: August 19th, 2017, 6:58 pm

Re: Graziani WML Questions

Post by josteph »

For future reference, this class of bug should be caught by the schema validator, though this specific case doesn't cause a warning currently.

User avatar
Ravana
Forum Moderator
Posts: 2366
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Graziani WML Questions

Post by Ravana »

That is only relevant if wesnoth runs schema validation during loading.

Post Reply