Graziani WML Questions

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
sergey
Posts: 475
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: 179
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 214 times
frab-utils.cfg
(1015 Bytes) Downloaded 215 times
16_Crevasses.cfg
(41.28 KiB) Downloaded 209 times
Creator and maintainer of "A goblin adventure" (available) and "From Rocks and Blood"(available) --- Working on a new campaign "Facing Death"
User avatar
EarthCake
Posts: 376
Joined: March 29th, 2019, 1:57 pm
Location: The Wall

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: 179
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
Creator and maintainer of "A goblin adventure" (available) and "From Rocks and Blood"(available) --- Working on a new campaign "Facing Death"
User avatar
EarthCake
Posts: 376
Joined: March 29th, 2019, 1:57 pm
Location: The Wall

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: 475
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: 179
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.
Creator and maintainer of "A goblin adventure" (available) and "From Rocks and Blood"(available) --- Working on a new campaign "Facing Death"
User avatar
josteph
Inactive 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: 2933
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.
User avatar
Graziani
Posts: 179
Joined: December 20th, 2010, 1:04 am
Location: France

Re: Graziani WML Questions

Post by Graziani »

Hi Guys,

I have a problem I'm struggling with magenta team color for two of my custom units.

Let me explain this to you :

1) : My custom unit Troll Bowler in my FRAB campaign have a pink/magenta bag.
In ranged animation, the team color shows correctly, but in standard, Idle and close combat, it stays pink.


2) : I have the same problem with my main character, Godug, but only in combat animation. He have a armband on his right arm, and this armband is showing good team color on idle animation but become pink/magenta during his attack animations.


I made other custom units for this campaign and I never had this problem.
I'm using last photoshop version, and I tried the two color export choices proposed to me. But the same result is occuring. What's happening ? I read the wikis and forum but I have no clue, except those clor export options.

May it be an wml issue ?



Take a look at the pictures below.

Thanks in advance for your help !
Attachments
5.png
5.png (106.68 KiB) Viewed 896 times
4.png
4.png (185.48 KiB) Viewed 896 times
3.png
3.png (51.67 KiB) Viewed 896 times
2.png
2.png (180.11 KiB) Viewed 896 times
1.png
Creator and maintainer of "A goblin adventure" (available) and "From Rocks and Blood"(available) --- Working on a new campaign "Facing Death"
User avatar
Lord-Knightmare
Discord Moderator
Posts: 2337
Joined: May 24th, 2010, 5:26 pm
Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
Contact:

Re: Graziani WML Questions

Post by Lord-Knightmare »

May it be an wml issue ?
It's not. You're not using the right magenta shades. Read up on Team_Color_Shifting
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
User avatar
Graziani
Posts: 179
Joined: December 20th, 2010, 1:04 am
Location: France

Re: Graziani WML Questions

Post by Graziani »

Thanks a lot, I found the color codes :

F49AC1,3F0016,55002A,690039,7B0045,8C0051,9E005D,B10069,C30074,D6007F,EC008C,EE3D96,EF5BA1,F172AC,F287B6,F6ADCD,F8C1D9,FAD5E5,FDE9F1

I think I turned them into something else by copy/pasting somewhere in my creation steps.

Thanks a lot !
Creator and maintainer of "A goblin adventure" (available) and "From Rocks and Blood"(available) --- Working on a new campaign "Facing Death"
User avatar
Graziani
Posts: 179
Joined: December 20th, 2010, 1:04 am
Location: France

Re: Graziani WML Questions

Post by Graziani »

Hi guys, I'm wondering if it's possible to teleport an entire group of units (those units don't have specific ID)

In the follow code I wrote, the player leader is teleporting into one new location.
I want all side 1 units to follow him into one new location close to him.


Code: Select all

        [teleport]
        [filter]
            id=Alban
        [/filter]
            x=15
            y=33
        [/teleport]

        [teleport]  
        [filter]
       side=1
       type=Spearman,Bowman,Swordsman,Pikeman,Javelineer,Royal Guard,Halberdier,Javelineer,Longbowman,Master Bowman
        [/filter]
            x=20
            y=34
        [/teleport]


So I wrote all units types the player may have at this moment of the scenario.
But in my test, only my leader and one spearman get teleported.
In wiki it states that the first unit that match the filter is going to be teleported.
I thought that I could copy that code 10 times to match all player units but that seem very dumb and ineficient (it would not work anyway).


How can I do ? Do you have any idea ? Thanks in advance
Creator and maintainer of "A goblin adventure" (available) and "From Rocks and Blood"(available) --- Working on a new campaign "Facing Death"
vghetto
Posts: 755
Joined: November 2nd, 2019, 5:12 pm

Re: Graziani WML Questions

Post by vghetto »

Here is one way of doing it.
Store the units that you want to teleport then loop over them with [foreach]
User avatar
Graziani
Posts: 179
Joined: December 20th, 2010, 1:04 am
Location: France

Re: Graziani WML Questions

Post by Graziani »

Thanks I'll try this !
Just one more question (basic one, but I couldn't figure how this work), how can I store units without id ? (The recruited ones by the player ?)
I read that a random ID is generated when you recruit units, but how to include these units in tags like [store_unit] [teleport] and the other many tags wesnoth wml have ?
Creator and maintainer of "A goblin adventure" (available) and "From Rocks and Blood"(available) --- Working on a new campaign "Facing Death"
Post Reply