Era-of-InvasionS's ability thread
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.
- francophone
- Posts: 393
- Joined: February 20th, 2010, 2:19 pm
Era-of-InvasionS's ability thread
Is it not possible to have a unit that heals : restores pv, without removing or slow poison?
I did a test, but when a unit is poisoned the healer does not give him pv.
I did a test, but when a unit is poisoned the healer does not give him pv.
Spoiler:
Last edited by francophone on March 21st, 2012, 11:46 am, edited 1 time in total.
Re: Heals without unpoison ?
Make an event that triggers at the beginning of each turn, with heal_unit, setting as primary unit a unit that is next to a unit with that ability and the adjacent unit with that ability as second_unit and with animate=yes. It will heal without unpoison, and it will look absolutely the same.
- francophone
- Posts: 393
- Joined: February 20th, 2010, 2:19 pm
Re: Heals without unpoison ?
Like that ? :
But how specify the next units ?
Spoiler:
Re: Heals without unpoison ?
Code: Select all
[filter]
[filter_adjacent]
ability="heals +6"
[/filter_adjacent]
[/filter]
Co-Creator of The Fellowship of the Clay (BfW 1.10) ~~ Maintainer of the German Code of Conduct
How to isolate problematic WML code ~~ WML error messages and their reasons
How to isolate problematic WML code ~~ WML error messages and their reasons
- francophone
- Posts: 393
- Joined: February 20th, 2010, 2:19 pm
Re: Heals without unpoison ?
I put in the unit file.
[event]
name=side turn
first_time_only=no
[heal_unit]
[filter_adjacent]
ability="heals +6"
[/filter_adjacent]
amount=6
animate=yes
[/heal_unit]
[/event]
Nothing happens
[event]
name=side turn
first_time_only=no
[heal_unit]
[filter_adjacent]
ability="heals +6"
[/filter_adjacent]
amount=6
animate=yes
[/heal_unit]
[/event]
Nothing happens
Re: Heals without unpoison ?
Like this:
I suggest you to make a thread for weapon specials and abilities, and not to ask separately about each of them.
Code: Select all
#define ABILITY_HEALS_6
[dummy]
id=heals +6
name= _ "heals +6"
female_name= _ "female^heals +6"
description=_ "heals +6:
Allows the unit to heal adjacent allied units at the beginning of our turn.
A unit cared for by this healer may heal up to 6 HP per turn.
A poisoned unit cannot be cured of its poison by a healer, and must seek the care of a village or a unit that can cure."
[/dummy]
[/abilities]
[event]
name=side turn
first_time_only=no
[heal_unit]
[filter]
[filter_adjacent]
ability=heals +6
[/filter_adjacent]
side=$side_number
[/filter]
[/filter_second]
ability=heals +6
side=$side_number
[/filter_second]
amount=6
animate=yes
[/heal_unit]
[/event]
[+abilities]
#enddef
- francophone
- Posts: 393
- Joined: February 20th, 2010, 2:19 pm
Re: Heals without unpoison ?
Effectively, with "side turn" must stipulate the turn of who, to make it work.
I do not understand (language problem). Are you telling me to put the code in a block in a file "abilities" in the macros folder of my era?
In the wiki, I can read including here http://wiki.wesnoth.org/WML_Abilities :
I do not understand where I need to put what.
I do not understand (language problem). Are you telling me to put the code in a block in a file "abilities" in the macros folder of my era?
In the wiki, I can read including here http://wiki.wesnoth.org/WML_Abilities :
I was already confirmed that the events only works in these files.And insert this event to your [scenario], [multiplayer], [unit_type] or [era]:
I do not understand where I need to put what.
- francophone
- Posts: 393
- Joined: February 20th, 2010, 2:19 pm
Re: Heals without unpoison ?
Don't work
I think "side turn" is the problem
I will try with "new turn" for test
Edit : Ok, that works with "new turn" notably when a unit is poisoned (heal first)... but for one only unit !!!!
I think "side turn" is the problem
I will try with "new turn" for test
Edit : Ok, that works with "new turn" notably when a unit is poisoned (heal first)... but for one only unit !!!!
Re: Heals without unpoison ?
J'ai dit que je pense qu'il serait meilleur si tu créais une discussion á discuter tous les abilities et weapon specials au lieu de créer de multiple discussions pour chaque chose que tu veux - c'est tout, rien d'important. Par example, tu peux changer le nom de cette discussion á 'Francophone's ability thread' ou quelque chose similaire, et discuter tout ce-que tu veux. Maintenir deux discussions pour des choses similaires est aussi énuissant pour toi.francophone wrote: I do not understand (language problem). Are you telling me to put the code in a block in a file "abilities" in the macros folder of my era?
Je ne suis pas sur quelle version de Battle for Wesnoth t'as, car cette ability a marché sans aucunes problémes á mon ordinateur (aprés la correction de cet erreur mineur que j'ais écris le '[/filter_second] au lieu d'écrire [filter_second], qui était facile a retrouver). Le meme avec la 'feu' ability discuté dans l'autre discussion, cela marchait sans aucune probléme pour moi. Si t'as la version 1.10.1, je n'ai vraiement aucue idée qu'est-ce que ce peut etre, autrement, je pense qu'un upgrade sera assez aidant.
I hope you understood this well. And sorry for making a few mistakes in your (probably) native language, I don't have the french keyboard layout.
- Elvish_Hunter
- Posts: 1575
- Joined: September 4th, 2009, 2:39 pm
- Location: Lintanir Forest...
Re: Heals without unpoison ?
Just to know, what's your Wesnoth version? On the 1.8 series, [heal_unit] was able to heal only the first matching unit. During the 1.9 development cycle, it was changed so [heal_unit] can heal all matching units.francophone wrote:Edit : Ok, that works with "new turn" notably when a unit is poisoned (heal first)... but for one only unit !!!!
Current maintainer of these add-ons, all on 1.16:
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
Re: Heals without unpoison ?
I have said him in French that his problems might be related to having an old version, but good to know it for sure. So weird that many of the weapon specials worked for me and not for him...
- francophone
- Posts: 393
- Joined: February 20th, 2010, 2:19 pm
Re: Heals without unpoison ?
actually I'm on 1.9.5
My era don't works actually on 1.10 (macro "PLAY_SOUND" missing).
So : How does I must modify : "{PLAY_SOUND ("torch.ogg")}" ?
edit : Found! It was the only bug that blocked the launch of the era.
My era don't works actually on 1.10 (macro "PLAY_SOUND" missing).
So : How does I must modify : "{PLAY_SOUND ("torch.ogg")}" ?
edit : Found! It was the only bug that blocked the launch of the era.
- francophone
- Posts: 393
- Joined: February 20th, 2010, 2:19 pm
Re: Heals without unpoison ?
And so with version 1.10.1 my healers heal well around them, but:
1 They also remove a poison
2 The care + 6 is added to that of a village
3 They heal units of side 1 at the beginning of this round of side 1. Not very practical when they heal the enemies instead of their camp.
For 3, I think it is possible to correct this by doing a code for each side.
For other points, I'm in limbo.
1 They also remove a poison
2 The care + 6 is added to that of a village
3 They heal units of side 1 at the beginning of this round of side 1. Not very practical when they heal the enemies instead of their camp.
For 3, I think it is possible to correct this by doing a code for each side.
For other points, I'm in limbo.
- francophone
- Posts: 393
- Joined: February 20th, 2010, 2:19 pm
Re: Heals without unpoison ?
Finally, I think it's as good or better to do with slow poison.
Knowing that I have heals +6 lvl1 then +12, then even at lvl 3 +18, I think better to have slow posion healers for greater than +8, so that the poison is crippling for celests. This is the default of celests healers. Instead of adding 12 or 18 hp to units that loses 8 per turn, so let wins in the final 4 or 10 but still poisoned, this unit does not win more than it loses with slow poison.
So I do need a special code.
But nothing prevents us from looking how to operate the first idea, if someone interested in the WML exercise or the result.
Knowing that I have heals +6 lvl1 then +12, then even at lvl 3 +18, I think better to have slow posion healers for greater than +8, so that the poison is crippling for celests. This is the default of celests healers. Instead of adding 12 or 18 hp to units that loses 8 per turn, so let wins in the final 4 or 10 but still poisoned, this unit does not win more than it loses with slow poison.
So I do need a special code.
But nothing prevents us from looking how to operate the first idea, if someone interested in the WML exercise or the result.
Re: Heals without unpoison ?
I forgot to add a few details. This one should fix two out of three problems. What is so bad about not healing also in villages? It would make healing more useful then, and make you still benefit from villages if you have a healer. It is a nice change. If you don't want it, add a terrain filter there to prevent it from affecting units in villages.francophone wrote:And so with version 1.10.1 my healers heal well around them, but:
1 They also remove a poison
2 The care + 6 is added to that of a village
3 They heal units of side 1 at the beginning of this round of side 1. Not very practical when they heal the enemies instead of their camp.
For 3, I think it is possible to correct this by doing a code for each side.
For other points, I'm in limbo.
Code: Select all
#define ABILITY_HEALS_6
[dummy]
id=heals +6
name= _ "heals +6"
female_name= _ "female^heals +6"
description=_ "heals +6:
Allows the unit to heal adjacent allied units at the beginning of our turn.
A unit cared for by this healer may heal up to 6 HP per turn.
A poisoned unit cannot be cured of its poison by a healer, and must seek the care of a village or a unit that can cure."
[/dummy]
[/abilities]
[event]
name=side turn
first_time_only=no
[heal_unit]
[filter]
[filter_adjacent]
ability=heals +6
side=$side_number #Forgot to add this
[/filter_adjacent]
side=$side_number
[/filter]
[/filter_second]
ability=heals +6
side=$side_number
[/filter_second]
amount=6
animate=yes
restore_statuses=no #This was =no by default before 1.10, but it is now yes by default and I haven't noticed it.
[/heal_unit]
[/event]
[+abilities]
#enddef
Now I think that what you meant by heal without unpoison might be just this:Instead of adding 12 or 18 hp to units that lose 8 per turn, so let it gain in total 4 or 10 hp, but still leave it poisoned, so that this unit does not gain more than it would lose due to slow poison.
Au lieu d'adder 12 ou 18 hp aux units qui perdent 8 hp par tour, fait it obtenir en total 4 ou 10 hp, mais laisser it empoisonné, alors que cette unit ne va pas obtenir plus que serait la perte causé par le slow poison.
Code: Select all
#define ABILITY_HEALS
[heals]
value=12
id=healing
affect_allies=yes
name= _ "heals +12"
female_name= _ "female^heals +12"
description= _ "Heals +12:
Allows the unit to heal adjacent allied units at the beginning of our turn.
A unit cared for by this healer may heal up to 12 HP per turn, or stop poison from taking effect for that turn.
A poisoned unit cannot be cured of its poison by a healer, and must seek the care of a village or a unit that can cure."
affect_self=no
poison=slowed
[affect_adjacent]
adjacent=n,ne,se,s,sw,nw
[/affect_adjacent]
[/heals]
#enddef