fable_lake-Support-WML

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
fable_lake
Posts: 67
Joined: March 14th, 2021, 1:38 pm

fable_lake-Support-WML

Post by fable_lake »

Hi to all

I will not extend it, so I have the following problem:
One of the main characters of Melody of Wrath, i.e. Thogru, during his promotion path, can acquire the Lunar Glow abillity. The whole ability works fine, but the point is more that I would like his unit to change overnight and return to its normal appearance during the day.


I would like to know the answer to how to make it through WML to make it go through the night transformation, but only after it is promoted and acquires the Lunar Glow ability.
Last edited by fable_lake on July 15th, 2022, 9:14 pm, edited 1 time in total.
fable_lake
Posts: 67
Joined: March 14th, 2021, 1:38 pm

Re: fable_lake-Support-WML

Post by fable_lake »

Ravana wrote: July 28th, 2021, 7:35 am Check EoMa example https://github.com/ProditorMagnus/Agele ... s.cfg#L707
Thanks! I will look at it
fable_lake
Posts: 67
Joined: March 14th, 2021, 1:38 pm

Re: fable_lake-Support-WML

Post by fable_lake »

So ... Ravana your proposal is not bad, but:
Everything is fine and works good as long as the Night Transform ability is in the character's skill from the beginning. On the other hand, when I add this skill to the unit advancement path and through promotion it gets it, the skill doesn't work. I don't know what's wrong with the code, but something doesn't match.
User avatar
beetlenaut
Developer
Posts: 2813
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: fable_lake-Support-WML

Post by beetlenaut »

If you post the code you have now, we can probably tell you what needs to be fixed.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
fable_lake
Posts: 67
Joined: March 14th, 2021, 1:38 pm

Re: fable_lake-Support-WML

Post by fable_lake »

beetlenaut wrote: July 28th, 2021, 9:50 pm If you post the code you have now, we can probably tell you what needs to be fixed.
Yeach you are right


This are files with curent code that not working propelly, I m not sure what is not ok so I post three all
Last edited by fable_lake on July 15th, 2022, 9:15 pm, edited 1 time in total.
User avatar
beetlenaut
Developer
Posts: 2813
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: fable_lake-Support-WML

Post by beetlenaut »

Your crystal form macro breaks out of [abilities] to write an [event] in the containing tag, and then reopens [+abilities] at the end. This works inside [unit_type] because events are allowed there. It doesn't work inside advancements because breaking out of [abilities] in that case puts the game inside [effect] where events are not allowed.

To fix it, I would put the crystal form event in [unit_type] so it's always active, and add a [filter] to the {TRANSFORM_UNIT} macro that checks the unit for the ability.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
fable_lake
Posts: 67
Joined: March 14th, 2021, 1:38 pm

Re: fable_lake-Support-WML

Post by fable_lake »

beetlenaut wrote: July 29th, 2021, 7:53 am To fix it, I would put the crystal form event in [unit_type] so it's always active, and add a [filter] to the {TRANSFORM_UNIT} macro that checks the unit for the ability.

So I made some tries and I don't really understand how to place [filter] that checks the presence of ability that units have got through advancement to make use of the macro {TRANSFORM_UNIT}, how should it look like? By which tag in [filter] I can do that?
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: fable_lake-Support-WML

Post by Lord-Knightmare »

Another solution would be add the crystal form event as a global event into every scenario so that's always available.
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
User avatar
beetlenaut
Developer
Posts: 2813
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: fable_lake-Support-WML

Post by beetlenaut »

fable_lake wrote: July 29th, 2021, 2:48 pm how should it look like? By which tag in [filter] I can do that?
The standard unit filter has an ability tag, so it would look like this:

Code: Select all

[filter]
    ability=Crystal_Form
    # This uses your ability's ID
[/filter]
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
fable_lake
Posts: 67
Joined: March 14th, 2021, 1:38 pm

Re: fable_lake-Support-WML

Post by fable_lake »

beetlenaut wrote: July 29th, 2021, 5:50 pm
fable_lake wrote: July 29th, 2021, 2:48 pm how should it look like? By which tag in [filter] I can do that?
The standard unit filter has an ability tag, so it would look like this:

Code: Select all

[filter]
    ability=Crystal_Form
    # This uses your ability's ID
[/filter]

Thank you for the exact explanation
Post Reply