Some questions regarding 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
absinthia
Posts: 10
Joined: June 3rd, 2021, 7:03 am

Some questions regarding wml

Post by absinthia »

After years of playing i finally decided that it was time to create my first campaign. Every time i tried before i got stuck in the wml language and i gave up, now finally i managed to push on and slowly im getting the hang of it a bit. I've now been busy for 3 days straight trying to learn wml through changing abilities.cfg etc. After a while some questions arose.
It would be nice if some1 could react with the proper wml fragment to use or with a push in the good direction to find the answer myself. Lastly, if theres some1 willing to guide/help :eng: me a bit for my thousand other questions and doesnt mind me asking questions through pm(so as not to clog the forum too much)... plz send me a pm :D

1 how to create a level/experience cap for specific units inside a scenario
2 since i use the no-randomness mod, is there a variable/filter/mask that i can use over specific units inside a scenario in which the hp&dmg gets multiplied by 10?
3 how to make it so that friendly healers will also heal enemies
4 how to specify that a certain castle overlay becomes active after a certain event has triggered
5 how to trigger the change of the scenarios main objective through an event
6 where can i find out how slow works? cann i add a value for duration and/or percentage into the abilities.cfg
7 where can i find out how poison works? can i add a value for dmg and/or duration inside the abilities.cfg
8 my campaign is meant to be played with no-randomness, but then poison,slow etc always hit... is there a possibility to integrate no randomness into the campaigns files and then use rng for poison,slow etc effect to hit or not?
9 i love chess because its all about the cycle of action-reaction, now i was wondering if it would be possible to create a "yahtsee-table" for every units to-hit chance. lets say a value has in rng the ranging from 1-10, now every unit has a table with the nrs 1 till 10 in a pop-up and the player can decide which nr to use, click that and then that nr becomes unavailable(grey-out) till all nrs in the table have been clicked once and the table resets


Thnx in advance <3
User avatar
Lord-Knightmare
Discord Moderator
Posts: 2340
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: Some questions regarding wml

Post by Lord-Knightmare »

how to create a level/experience cap for specific units inside a scenario
You can experience_modifier= to vary the max_experience units have in a scenario, the value is always a percentage. Higher values mean units need more XP to advance.
how to make it so that friendly healers will also heal enemies
Not sure why you or anyone would do this, but you can achieve this by adding team_name=player,enemy. This makes the healer side allied to both and they heal both.
how to specify that a certain castle overlay becomes active after a certain event has triggered
I am assuming you want to add some lighted beacon? or, something? If so then use remove_item and item on that hex
how to trigger the change of the scenarios main objective through an event
define a new [objectives] for that side inside the event.

As for the rest, you can look up the Wiki for documentation on various WML.
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
User avatar
lhybrideur
Posts: 357
Joined: July 9th, 2019, 1:46 pm

Re: Some questions regarding wml

Post by lhybrideur »

absinthia wrote: June 4th, 2021, 11:42 am 5 how to trigger the change of the scenarios main objective through an event
you can also use a show_if inside the objectives that check a variable whose value you will change in the event
absinthia
Posts: 10
Joined: June 3rd, 2021, 7:03 am

Re: Some questions regarding wml

Post by absinthia »

Lord-Knightmare wrote: June 4th, 2021, 12:37 pm
how to create a level/experience cap for specific units inside a scenario
You can experience_modifier= to vary the max_experience units have in a scenario, the value is always a percentage. Higher values mean units need more XP to advance.
my PC's have 9 levels and at 3 points transformation events, so what if i want unit elvy not become higher than level 6 max, since at lvl 6 the transformation starts(which will be played in the next scenario)
how to make it so that friendly healers will also heal enemies
Not sure why you or anyone would do this, but you can achieve this by adding team_name=player,enemy. This makes the healer side allied to both and they heal both.
what if my PC henk should be able to heal a enemy in its own turn and maybe getting attacked by the same enemy in the enemies turn
how to specify that a certain castle overlay becomes active after a certain event has triggered
I am assuming you want to add some lighted beacon? or, something? If so then use remove_item and item on that hex
gotta find out what the castle overlay terrain code, so i can change it with a change terrain inside the event
how to trigger the change of the scenarios main objective through an event
define a new [objectives] for that side inside the event.

As for the rest, you can look up the Wiki for documentation on various WML.
User avatar
Celtic_Minstrel
Developer
Posts: 2166
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: Some questions regarding wml

Post by Celtic_Minstrel »

absinthia wrote: June 4th, 2021, 11:42 am 7 where can i find out how poison works? can i add a value for dmg and/or duration inside the abilities.cfg
Poison damage is defined in the game config. It's not possible to vary it per ability, but if you just want to change it globally, you can edit game_config.cfg. This can also be done on scenario start with some simple Lua code, which would be necessary if you want to distribute your changes as an add-on.
Lord-Knightmare wrote: June 4th, 2021, 12:37 pm
how to make it so that friendly healers will also heal enemies
Not sure why you or anyone would do this, but you can achieve this by adding team_name=player,enemy. This makes the healer side allied to both and they heal both.
It's probably also possible with a custom heal ability? If the heal ability has affect_enemies=yes, that should work, right?
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
User avatar
lhybrideur
Posts: 357
Joined: July 9th, 2019, 1:46 pm

Re: Some questions regarding wml

Post by lhybrideur »

absinthia wrote: June 6th, 2021, 10:43 am
Lord-Knightmare wrote: June 4th, 2021, 12:37 pm
how to create a level/experience cap for specific units inside a scenario
You can experience_modifier= to vary the max_experience units have in a scenario, the value is always a percentage. Higher values mean units need more XP to advance.
my PC's have 9 levels and at 3 points transformation events, so what if i want unit elvy not become higher than level 6 max, since at lvl 6 the transformation starts(which will be played in the next scenario)
I would create two different unit types. The first one that goes up to level 6.
Then the transformation would modify units of this type into the other unit type which would be the transformed unit.
Post Reply