changing parameters to units the script
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.
changing parameters to units the script
Hello! I'm sorry placet mine English.
How can change the unit in the process script.
Need to change : experience=59 ,hitpoints=1 ,max_moves=0
Add ability : {ABILITY_CURES}
attempt to 1
attempt to 2
How can change the unit in the process script.
Need to change : experience=59 ,hitpoints=1 ,max_moves=0
Add ability : {ABILITY_CURES}
attempt to 1
Code: Select all
[modify_unit]
type="Elvish Fighter"
[filter]
type="Elvish Fighter"
[/filter]
[store_unit]
[filter]
type="Elvish Fighter"
[/filter]
type="Elvish Fighter"
[/store_unit]
[set_variables]
name = stored_unit.modifications.object
[value]
[effect]
experience=59
increase_total=-99%
max_moves=0
[/effect]
[/value]
[/set_variables]
[unstore_unit]
type="Elvish Fighter"
[/unstore_unit]
[/modify_unit]
Code: Select all
[object]
silent=yes
[filter]
id=lp-2
x=1-46
y=1-21
[/filter]
[effect]
apply_to=last breath
max_moves=0
[abilities]
{ABILITY_CURES}
[/abilities]
[/effect]
[/object]
Re: changing parameters to units the script
Something like
I guessed you wanted both current and max for hp and moves.
Code: Select all
[modify_unit]
[filter]
type="Elvish Fighter"
[/filter]
experience=59
hitpoints=1
max_hitpoints=1
moves=0
max_moves=0
{ABILITY_CURES}
[/modify_unit]
Re: changing parameters to units the script
Can somehow through id
Re: changing parameters to units the script
You can put id for [filter] then.
Re: changing parameters to units the script
Will an unknown type
Re: changing parameters to units the script
If you dont know certain type then dont use that key.
Re: changing parameters to units the script
Solution type above id.
And of life has not changed
And of life has not changed
Code: Select all
[modify_unit]
[filter]
type="Elvish Fighter"
id=Elvish Fighter-3
[/filter]
experience=59
hitpoints=1
moves=0
max_moves=0
[/modify_unit]
Re: changing parameters to units the script
If you use id in filter then everything else in that filter is needless.
- beetlenaut
- Developer
- Posts: 2825
- Joined: December 8th, 2007, 3:21 am
- Location: Washington State
- Contact:
Re: changing parameters to units the script
It's not a bug. Remove
Posting in English is a good idea, but you should repeat the post in your native language. You might get help that is easier to understand. Many people on these forums speak other languages.
type="Elvish Fighter"
. This is probably a mistake. If it doesn't work, you have another mistake.Posting in English is a good idea, but you should repeat the post in your native language. You might get help that is easier to understand. Many people on these forums speak other languages.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
- Elvish_Hunter
- Posts: 1576
- Joined: September 4th, 2009, 2:39 pm
- Location: Lintanir Forest...
Re: changing parameters to units the script
I must admit that I'm having a hard time understanding what are you trying to accomplish Do you want to modify a single unit? A bunch of units? Or a unit type, meaning that all Fighters will be modified? As beetlenaut said, please post both in English and you native language.beetlenaut wrote:Posting in English is a good idea, but you should repeat the post in your native language. You might get help that is easier to understand. Many people on these forums speak other languages.
I'm assuming that you're trying to modify a single unit, so here there is a tip:
Code: Select all
id=Elvish Fighter-3
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: changing parameters to units the script
I all decided through macros.
Code: Select all
{MODIFY_UNIT (id=Elvish Fighter-3) experience 59}
{MODIFY_UNIT (id=Elvish Fighter-3) moves 0}
{MODIFY_UNIT (id=Elvish Fighter-3) max_moves 0}
{MODIFY_UNIT (id=Elvish Fighter-3) hitpoints 1}
Code: Select all
[modify_unit]
[filter]
type="Princess"
id=lp-2
[/filter]
[abilities]
{ABILITY_CURES}
[/abilities]
[/modify_unit]
{MODIFY_UNIT (id=lp-2) moves 0}
{MODIFY_UNIT (id=lp-2) max_moves 0}
I wrote on the Russian forums there silence.beetlenaut wrote:It's not a bug. Removetype="Elvish Fighter"
. This is probably a mistake. If it doesn't work, you have another mistake.
Posting in English is a good idea, but you should repeat the post in your native language. You might get help that is easier to understand. Many people on these forums speak other languages.
Last edited by Elvish_Hunter on February 24th, 2015, 9:32 am, edited 1 time in total.
Reason: Merged double posts
Reason: Merged double posts
- beetlenaut
- Developer
- Posts: 2825
- Joined: December 8th, 2007, 3:21 am
- Location: Washington State
- Contact:
Re: changing parameters to units the script
If you have a problem again, you should write on this forum in Russian (and English). The forums for other languages are often silent.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
- Elvish_Hunter
- Posts: 1576
- Joined: September 4th, 2009, 2:39 pm
- Location: Lintanir Forest...
Re: changing parameters to units the script
dragon_99: please avoid posting two consecutive messages in the same thread in just four minutes. This is what we call double posting, and is against point 1f of our Posting Guidelines. If nobody replied, please just edit your last message instead.
For this reason, I merged your messages.
For this reason, I merged your messages.
I'm still noticing the suspiciousdragon_99 wrote:I all decided through macros.
Elvish Fighter-3
ID, that looks like an automatically generated one. How did you create the unit, exactly? Was it recruited? Because this may change our answer.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)
- ChaosRider
- Posts: 846
- Joined: April 15th, 2012, 1:15 pm
Re: changing parameters to units the script
Maybe this way?
Spoiler:
Creator of WOTG (+2880 units), MWC (+615 units), SurvivorsArea, RandomColosseum, RC WOTG, RC MWC, ColosseumRandomClonesBattle, BetweenDarknessAndLight, StealingWeapons, MoreUnitsForms, MoreDamageTypes, CanBeOnlyOne, ColosseumOneWinner, BonusSpam, CriticalStrike - available at 1.12 Wesnoth server.