New Custom Rousing Ability Help
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.
New Custom Rousing Ability Help
I would like to know if there is something wrong with the synthesis of my code, in my tests, it generated doubts if everything was working correctly. Thanks for any guidance.
I program these things to play in campaigns, I had no time to play for a while.
This ability is quite the face of Orcs kkkkkkkk.
What doesn't seem to be working properly, after further testing, is the experience boost.
I would like to know if I have to use some kind of formula in the event.
PS: I made it easier to read.
I program these things to play in campaigns, I had no time to play for a while.
This ability is quite the face of Orcs kkkkkkkk.
What doesn't seem to be working properly, after further testing, is the experience boost.
I would like to know if I have to use some kind of formula in the event.
PS: I made it easier to read.
Code: Select all
#define ABILITY_ROUSING
[dummy]
id=rousing
name= _ "rousing"
description="This unit incites your lower level allies to fight like savages, increasing the strength of their physical attacks, and decreasing their physical defenses. (8% ATK and -8% DEF times the difference in levels respectively.) Units affected by this ability gain 50% more experience for battling."
[/dummy] # wmlxgettext: [abilities]
[/abilities]
[resistance]
id=rouse_P1
sub={VALUE}
max_value=40
apply_to=blade,pierce,impact
affect_self=no
affect_allies=yes
affect_enemies=no
[affect_adjacent]
adjacent=n,ne,se,s,sw,nw
[/affect_adjacent]
[filter_base_value]
greater_than=-30
[/filter_base_value]
[/resistance]
[leadership]
id=rouse_P2
value="(8 * (level - other.level))"
apply_to=blade,pierce,impact
cumulative=no
affect_self=no
[affect_adjacent]
[filter]
formula="level < other.level"
[/filter]
[/affect_adjacent]
[/leadership]
[event]
name=attack_end
id=rouse_P3
[filter]
[filter_adjacent]
ability=ABILITY_ROUSING
is_enemy=false
[/filter_adjacent]
[/filter]
[set_variable]
name=unit.experience
add=50%
[/set_variable]
[unstore_unit]
variable=unit
text=_ "+50% xp"
red,green,blue=0,200,255
[/unstore_unit]
first_time_only=no
[/event]
[event]
name=attack_end
id=rouse_P4
[filter_second]
[filter_adjacent]
ability=ABILITY_ROUSING
is_enemy=false
[/filter_adjacent]
[/filter_second]
[set_variable]
name=second_unit.experience
add=50%
[/set_variable]
[unstore_unit]
variable=second_unit
text=_ "+50% xp"
red,green,blue=0,200,255
[/unstore_unit]
first_time_only=no
[/event]
#enddef
If from 15 to 30 years old, you have not been successful in life, you are already doomed.
Re: New Custom Rousing Ability Help
You might need to store xp before and after fight in order to see how much it changed and then add 50% of that.
Re: New Custom Rousing Ability Help
I could give you a little example, of how I do this, I try harder, I'm a bit limited.
PS: That wouldn't happen if I were from the exact sciences, but unfortunately I'm from the humanities.
If from 15 to 30 years old, you have not been successful in life, you are already doomed.
Re: New Custom Rousing Ability Help
It may seem like I already have a good knowledge of WML, but it's a big mistake kkkkkkkk
If from 15 to 30 years old, you have not been successful in life, you are already doomed.
Re: New Custom Rousing Ability Help
https://github.com/ProditorMagnus/Agele ... _tutor.cfg shows how to give additional fight xp. For kills you would need additional logic.