[VX Ace] Sap status as in Final Fantasy V

S.Court

Veteran
Veteran
Joined
Oct 17, 2012
Messages
394
Reaction score
98
First Language
Español
Primarily Uses
RMVXA
Hi, I have a question, is it possible to make a status like Sap works in Final Fantasy V, of course, I know not all have played this game so I'll describe it

With this state, the HP will decrease continuously, like Poison but in real time, but of course, by smaller portions (like 2 HP each second) I'm using Yanfly's battle engine and Yami's ATB, so I need it work with those ones (and also, this state has lots of sense in an Active Time Battle System so...)

I put this here because I'm pretty sure this will requiere a script to work properly, can someone help me with this one? Thank you

Edit: Thanks to Sixth I know now there is a script for that: DoubleX Countdown Addon (http://forums.rpgmakerweb.com/index.php?/topic/31839-doublex-rmvxa-countdown-addon-to-ysa-battle-system-classical-atb/) But I don't get still how to make the sap stat, any help, please?
 
Last edited by a moderator:

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
Try DoubleX's Countdown Addon script.


That script was made for Yami's ATB, so it should work.


That should let you make states which update in real time and not only after each turn.


Just don't ask me how to set it up, because I have no idea. :D


There should be a topic with that script either on this forum or on rpgmakervxace.net.


Or you should ask DoubleX directly about the setup of the script.
 

S.Court

Veteran
Veteran
Joined
Oct 17, 2012
Messages
394
Reaction score
98
First Language
Español
Primarily Uses
RMVXA
Ohh this script will come in handy, thanks Sixth! But I don't get still how to use this one to make this state, could someone help me with this one, please?
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,787
Reaction score
939
First Language
Chinese
Primarily Uses
N/A
#------------------------------------------------------------------------------|# * State Notetags: <custom catb cs: i, c, a> |# Sets a state to use the "Duration In Turns" as the duration in seconds |# "Auto Removal Timing" is ignored and duration ranges from 1 to 99 seconds |# Actions a will be triggered if condition c is met and c will be checked |# every i seconds, where s ranges from 1 to 99 seconds |#------------------------------------------------------------------------------|
Code:
#------------------------------------------------------------------------------|#  * Custom catb countdown condition: c in <custom catb cs: i, c, a>           |#    To make <custom catb cs: i, c, a> work, the requirements in c must be met.|#    These requirements are ruby scripts like those in events.                 |#    The below CATBCX are examples of writing such codes and abtracting them in|#    random cast notetags to aid users in understanding and using c there.     |#    To use CATBCX, set the value of c in random cast notetag as CATBCX.       |#    Users can set their own CATBCX(or whatever name they set) to be used by c.|#    CATBCX names must start with letters and only use alphanumeric characters.|#    (Needs decent scripting knowledge)CATBCX is evaluated in the new method   |#    update_state_catb_countdown(called every second) under class Game_Battler.|#------------------------------------------------------------------------------|    # CATBC1, default = "true"    # c is always true    CATBC1 = "true"
Code:
#------------------------------------------------------------------------------|#  * Custom catb countdown action: a in <custom catb cs: i, c, a>              |#    To make <custom catb cs: i, c, a> work, the actions in a must be defined. |#    These actions are ruby scripts like those in events.                      |#    The below CATBAX are examples of writing such codes and abtracting them in|#    random cast notetags to aid users in understanding and using a there.     |#    To use CATBAX, set the value of a in random cast notetag as CATBAX.       |#    Users can set their own CATBAX(or whatever name they set) to be used by a.|#    CATBAX names must start with letters and only use alphanumeric characters.|#    (Needs decent scripting knowledge)CATBAX is evaluated in the new method   |#    update_state_catb_countdown(called every second) under class Game_Battler.|#------------------------------------------------------------------------------|    # CATBA2, default =    # "@result.clear; @result.make_damage(x, $data_skills[y]); execute_damage(self)"    # a executes x damage to self with type equal to that of skill with id y    CATBA2 = "@result.clear; @result.make_damage(x, $data_skills[y]); execute_damage(self)"
Using reducing 2HP per second as an example, adding <custom catb cs: 1, CATBC1, CATBA2>(for CATBA2, set x as 2 and y as an id of a skill with damage type being HP Damage) to a state's notebox should make that state work as intended, as CATBA2 causes that state to execute x damage to those having that state with type equal to that of skill with id y when CATBC1 returns true, and CATBC1 always returns true per second.
 
Last edited by a moderator:

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
So, in the note-tag "<custom catb cs: i, c, a>":


i = the interval of triggering the effect? If set to 1, the state will be updated every seconds, if set to 2 than the state will be updated every 2 seconds, etc?


c = the condition of the state? So, I could, for example, make conditions like "$game_party.gold % 10 == 0", and that state would only trigger if the party got a gold amount divisible by 10? I know, epic example. :p


a = the actual effect of the state? I noticed that you made a common event example in the script, but common events can't run in the battle normally. Did you make common events work in battles or it is just an impractical example?


And there is the "where s ranges from 1 to 99 seconds" comment. What "s"?


Is it this "s": "<custom catb cs: i, c, a>"? Or something else?


The duration is set in the database editor with the "duration in turns" option or not?


Also, the description says "Lets users set up to 4 states with duration being 1-99 seconds".


What does that mean? We can have only 4 states set up this way or there can be only 4 states like this activated on a battler at once?


Sorry for the many questions! I just want to make sure that I don't misunderstand anything.


The script sounds very useful, and I have it installed in my project, but I never actually used it before, because of the heavy scripting required. Now I learned some scripting and it doesn't seem too intimidating anymore. :D
 

S.Court

Veteran
Veteran
Joined
Oct 17, 2012
Messages
394
Reaction score
98
First Language
Español
Primarily Uses
RMVXA
Ok, I did what you said, and this it shows this mistake



I changed the line of CATB2 to this:

"@result.clear; @result.make_damage(2, $data_skills[152]); execute_damage(self)"

The ability number 152 has HP damage (I didn't put something in the damage formula for this one) and this is what happens

Ohh, I have a question, is there a way when the sap state makes its work, doesn't display the damage per second? I want to remove that display of this damage
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,787
Reaction score
939
First Language
Chinese
Primarily Uses
N/A
So, in the note-tag "<custom catb cs: i, c, a>":

i = the interval of triggering the effect? If set to 1, the state will be updated every seconds, if set to 2 than the state will be updated every 2 seconds, etc?

c = the condition of the state? So, I could, for example, make conditions like "$game_party.gold % 10 == 0", and that state would only trigger if the party got a gold amount divisible by 10? I know, epic example. :p

a = the actual effect of the state? I noticed that you made a common event example in the script, but common events can't run in the battle normally. Did you make common events work in battles or it is just an impractical example?

And there is the "where s ranges from 1 to 99 seconds" comment. What "s"?

Is it this "s": "<custom catb cs: i, c, a>"? Or something else?

The duration is set in the database editor with the "duration in turns" option or not?

Also, the description says "Lets users set up to 4 states with duration being 1-99 seconds".

What does that mean? We can have only 4 states set up this way or there can be only 4 states like this activated on a battler at once?

Sorry for the many questions! I just want to make sure that I don't misunderstand anything.

The script sounds very useful, and I have it installed in my project, but I never actually used it before, because of the heavy scripting required. Now I learned some scripting and it doesn't seem too intimidating anymore. :D
1. The countdown will trigger every second regardless of what the value of i is, but c will only be checked every i seconds and a will only be executed if c is checked and returns true

2. You're right on how c and a works.

3. Some Common Events can be run in battles, as some skills have an effect being Common Event and they can call those Common Events as intended.

The Common Event Effect is implemented using this method:

#-------------------------------------------------------------------------- # * Apply Effect of Use to Other Than User #-------------------------------------------------------------------------- def item_global_effect_apply(effect) if effect.code == EFFECT_COMMON_EVENT $game_temp.reserve_common_event(effect.data_id) end end
4. s is a typo, it should be i, and yes, the duration is set in the database editor with the "duration in turns" option. Actually it can be more than 99 seconds, but as long as the countdown of actor states is greater than 99 seconds it won't be displayed due to how Yanfly Engine Ace - Buff & State Manager works.

5. You can set as many countdown states as you want and you can add as many of them to a battler as you want at once, but only 4 of them will be displayed on the status window due to how YEA - Ace Battle Engine works.

Ok, I did what you said, and this it shows this mistake



I changed the line of CATB2 to this:

"@result.clear; @result.make_damage(2, $data_skills[152]); execute_damage(self)"

The ability number 152 has HP damage (I didn't put something in the damage formula for this one) and this is what happens

Ohh, I have a question, is there a way when the sap state makes its work, doesn't display the damage per second? I want to remove that display of this damage
1. For the error, may you please list all list you used preserving their order?

2. To stop the damage from displaying, change CATBA2 to this instead:

Code:
"@hp -= 2; refresh"
 
Last edited by a moderator:

S.Court

Veteran
Veteran
Joined
Oct 17, 2012
Messages
394
Reaction score
98
First Language
Español
Primarily Uses
RMVXA
1. The countdown will trigger every second regardless of what the value of i is, but c will only be checked every i seconds and a will only be executed if c is checked and returns true

2. You're right on how c and a works.

3. Some Common Events can be run in battles, as some skills have an effect being Common Event and they can call those Common Events as intended.

The Common Event Effect is implemented using this method:

#-------------------------------------------------------------------------- # * Apply Effect of Use to Other Than User #-------------------------------------------------------------------------- def item_global_effect_apply(effect) if effect.code == EFFECT_COMMON_EVENT $game_temp.reserve_common_event(effect.data_id) end end
4. s is a typo, it should be i, and yes, the duration is set in the database editor with the "duration in turns" option. Actually it can be more than 99 seconds, but as long as the countdown of actor states is greater than 99 seconds it won't be displayed due to how Yanfly Engine Ace - Buff & State Manager works.

5. You can set as many countdown states as you want and you can add as many of them to a battler as you want at once, but only 4 of them will be displayed on the status window due to how YEA - Ace Battle Engine works.

1. For the error, may you please list all list you used preserving their order?

2. To stop the damage from displaying, change CATBA2 to this instead:

"@hp -= 2; refresh"
Ok, I changed that and I reordered ths scripts (the problem was the order, the bug fix script was above the countdown script) but the state is not working (I added it as a passive state, just to check)

This is the state tag I put: <custom catb cs: 1, CATBC1, CATBA2> 

This is the line there is in CATBC1: "true"

And this is the line in CATBA2: "@hp -= 2; refresh"

Soooo... Any idea about what could be happening?, thanks again
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,787
Reaction score
939
First Language
Chinese
Primarily Uses
N/A
Do you have all the below 5 scripts?

1. Yanfly Engine Ace - Ace Battle Engine

2. Yanfly Engine Ace - Buff & State Manager

3. YSA Battle System: Classical ATB

4. DoubleX RMVXA Bug Fix to YSA Battle System: Classical ATB

5. DoubleX RMVXA Countdown Addon to YSA Battle System: Classical ATB

1. should be placed above 2., 1. must be placed above 3., which must be placed above 4., which must be placed above 5., and 2. must be placed above 5..

Also, I suspect that the cause could be some compatibility issues, so you may want to show the complete script list preserving their order :)
 
Last edited by a moderator:

S.Court

Veteran
Veteran
Joined
Oct 17, 2012
Messages
394
Reaction score
98
First Language
Español
Primarily Uses
RMVXA
The list is long but okay!

-Yanfly adjust limit

-Yanfly battle system

-Yanfly debug extension

-Yanfly Ace core

-Yanfly passive states

-Yanfly chase player event

-Yanfly victory aftermath

-Yanfly antifail message

-Yanfly JP Manager

-Yanfly learn skill system

-Yanfly skill cost manager

-Yanfly Ace message system

-Yanfly party system

-Yanfly lunatic states

-Yanfly state package - Punishment

-HIme progressive states

-Yanfly save engine

-Yanfly move restrict region

-Yanfly gab window

-Yanfly diagonal scroll

-Yanfly lunatic object

-Yanfly Lunatic Objects Package - Destruction

-Yanfly Lunatic Objects Package - Give and Take

-Yanfly Lunatic Objects Package - Recoil

-Yanfly Slippery tiles

-Yanfly force move tiles

-Galv move extras

-Tsukihime overlay maps

-Tsukihime overlay zoom

-Tsukihime tile swap

-Dekita battle transition

-Victor engine - basic module

-Victor element set

-Victor state auto apply

-Victor target arrow

-Victor toggle target

-Modern algebra windowskin change

-Tsukihime effect manager

-Hime elemental status info

-Hime Effect: Thorn Armor

-Yanfly Button Common Events 

-Yanfly Buff & State Manager

-Modern algebra ATS Advanced choices

-Hime choice options

-Hime shop manager

-Hime sell only store

-Kread-EX scroll wait

-Trevyn Custom Hit Processing Formulas

-Woratana multiple fogs

-Yami Classic ATB

-Yami Engine Symphony - Battle Symphony

-Yami Engine Symphony - Add-on: Holder Battlers

-Yami Engine Symphony - Add-on: Skill Effect Tags

-Yami Engine Symphony - Add-on: Visual Effect Tags

-Yami Engine Symphony - Add-on: Enemy Character Set

-Selchar Weapon Type/State Holder Add-on

-William Couillard Final Fantasy battle log

-Dekita $D13x - Elemental Control

-DoubleX RMVXA Countdown Addon v1.00a to YSA Battle System: Classical ATB

-DoubleX RMVXA Bug Fix v1.04c to YSA Battle System: Classical ATB 
I put the 4 and 5 inverted and now I could open the battle test, but if I put them as you said, the mistake I showed you is displayed
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,787
Reaction score
939
First Language
Chinese
Primarily Uses
N/A
I forgot to mention that DoubleX RMVXA Bug Fixes for Yanfly Engine Ace - Buff & State Manager should be used as well:

http://forums.rpgmakerweb.com/index.php?/topic/22337-doublex-rmvxa-bug-fixes-for-yanfly-engine-ace-buff-state-manager/

Place it below Yanfly Engine Ace - Buff & State Manager but above DoubleX RMVXA Countdown Addon to YSA Battle System: Classical ATB.

Also, DoubleX RMVXA Countdown Addon to YSA Battle System: Classical ATB must be placed below DoubleX RMVXA Bug Fix to YSA Battle System: Classical ATB.
 

S.Court

Veteran
Veteran
Joined
Oct 17, 2012
Messages
394
Reaction score
98
First Language
Español
Primarily Uses
RMVXA
I forgot to mention that DoubleX RMVXA Bug Fixes for Yanfly Engine Ace - Buff & State Manager should be used as well:

http://forums.rpgmakerweb.com/index.php?/topic/22337-doublex-rmvxa-bug-fixes-for-yanfly-engine-ace-buff-state-manager/

Place it below Yanfly Engine Ace - Buff & State Manager but above DoubleX RMVXA Countdown Addon to YSA Battle System: Classical ATB.

Also, DoubleX RMVXA Countdown Addon to YSA Battle System: Classical ATB must be placed below DoubleX RMVXA Bug Fix to YSA Battle System: Classical ATB.
I made what you said, still the same mistake

But this mistake doesn't happen if I put the Classic ATB add-on below the countdown script, the game doesn't show the mistake... Nor the sap state
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,787
Reaction score
939
First Language
Chinese
Primarily Uses
N/A
As it's extremely likely a compatibility issue and you used so many scripts, you may want to give me your Scripts.rvdata2 file.
 

S.Court

Veteran
Veteran
Joined
Oct 17, 2012
Messages
394
Reaction score
98
First Language
Español
Primarily Uses
RMVXA
There you go! Well, you can delete the overlay map, overlay map zoom and a script someone made to display 2 items in the gold part of the menu. Thansk for check this again

Scripts.rar
 

Attachments

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
You wrote that you "opened the battle test".


Testing custom battle scripts in the battle test is not a good idea, because some battle scripts may require certain data to be initialized, and as far as I know, the battle test will not initialize everything.


I might be wrong thou...


Have you tried to enter a real battle in the game itself rather than using the battle test?
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,787
Reaction score
939
First Language
Chinese
Primarily Uses
N/A
Failed to reproduce the error. I used your Scripts.rvdata2 file to run the battle test(I placed the catb bug fix above the countdown addon) and everything works fine, and the only script I disabled is the Overlay Map Zoom script, which should have nothing to do with the issue. May you please tell me when exactly does it happen? Like right after adding a countdown state, right after the countdown state has passed 1 second, etc?
 

S.Court

Veteran
Veteran
Joined
Oct 17, 2012
Messages
394
Reaction score
98
First Language
Español
Primarily Uses
RMVXA
Uhh I put the sap state as a passive state, when I made that, well... That happened

EDIT: Tested without ussing it as passive state and it works, BUT the sap state only does two of damage when the character is hitted by any attack

EDIT 2: I had an idea abuot this state, it's possible to make the damage per second is of 1% of Max HP and it last 99 seconds?
 
Last edited by a moderator:

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,787
Reaction score
939
First Language
Chinese
Primarily Uses
N/A
I tried this snippet:

#==============================================================================|# ** Snippet Implementations |# You need not edit this part as it's about how this snippet works |#------------------------------------------------------------------------------|#------------------------------------------------------------------------------|# * Edit class: Game_BattlerBase |# - Fixes the compatibility issue between DoubleX RMVXA Countdown Addon to YSA-CATB and YEA-PassiveStates|#------------------------------------------------------------------------------|class Game_BattlerBase #----------------------------------------------------------------------------| # Alias method: evaluate_item_with_target | # - Fixes the crash when making a countdown state passive | #----------------------------------------------------------------------------| alias create_passive_state_array_catb_countdown_addon create_passive_state_array def create_passive_state_array(array) create_passive_state_array_catb_countdown_addon(array) # Added to create the enemy countdown sprites and set the countdown @passive_states.each { |state_id| reset_state_catb_countdown(state_id) } # end # create_passive_state_arrayend # Game_BattlerBase#==============================================================================|
The game no longer crashes but as any passive state has 0 remaining turns, the countdown will never trigger. So making a countdown state passive will have a serious compatibility issue. I'll try to work on it.

To make 1% of MHP per second, change CATBA2 to:

Code:
"@hp -= mhp * 0.01; refresh"
 

S.Court

Veteran
Veteran
Joined
Oct 17, 2012
Messages
394
Reaction score
98
First Language
Español
Primarily Uses
RMVXA
It works! But... now the HP is displayed with decimal numbers... Geez, sorry by bothering with this, but is it possible to fix that? I don't want the remaining HP is displayed with decimals



Like this, but besides that it works perfectly
 
Last edited by a moderator:

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,787
Reaction score
939
First Language
Chinese
Primarily Uses
N/A
That's because I made an extremely dumb mistake lol. Change CATBA2 to this instead:

Code:
"@hp = (@hp - mhp * 0.01).to_i; refresh"
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,860
Messages
1,017,038
Members
137,568
Latest member
invidious
Top