Rampaging Skills

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,421
Reaction score
596
First Language
Italian
Primarily Uses
RMVXA
Heirukichi Rampaging Skills v1.1


Since two people asked me how to do this in the same day I decided to write a script. This script allows you to create rampaging skills that increase (or decrease) their strength with each successful consecutive use.


How to use this script


This script is plug and play.


To use it you have to copy/paste it in your project below Materials. Once you do it, if you want to create a rampaging skill you can use a.rampage(number) in your skill formula (explanation on how to use number below).


Here is an example of a skill formula (more examples can be found inside the script):

a.atk * 4 * a.rampage(1) - b.def * 2



The a.rampage(number) value is 1 the first time the skill is used by that character and increases every time it is used successfully. If your skill misses or if you use another skill your rampage value goes down to 1.


How to set "number" in rampage


When you write your skill formula you have to set a number value. If you want each skill to have its own rampage you have to set a different number value for each skill, but that's not the only way you can use it. You can use the same value in two or more skills to let them rampage together! If you do, whenever you use one of these skills, the other skills with the same number value in their rampage will be affected too.


Access a skill rampage


It is possible to access a skill rampage in a formula using a.access_rampage(number). Keep in mind that number is not skill id but the number you used in your skill formula.


Script


Download link for my script can be found here.


Terms of Use


This script is free to use in both commercial and non commercial projects as long as you give proper credits.


Note: If you use it in a commercial project please let me know so I can track where it has been used. This is optional but it is much appreciated. :)


Credits


- Heirukichi


Notes


This script is not limited to create rampaging skills. It can be used to have two or more skills linked together (not only rampaging together) so that the strength of one of those will increase/decrease based on the rampage of another skill.


Example: your defensive skill has its strength decreased for each consecutive use of your berserker attack (or vice versa).


It is possible to create a defense breaking skill that increases other skills damage every time it is used consecutively against the same target and even to create a skill that rampages based on how many times the target is successfully hit by that skill (even if different actors are casting it). If you want to let your skill to have a target-based rampage then use b.rampage(number) instead of a.rampage(number). If you want to access target-based rampage then use b.access_rampage(number) instead of a.access_rampage(number).

(11-04-17) version 1.1
  • Added more features to aid creating damage formulae. Fixed instructions where rampage was used incorrectly instead of a.rampage
 
Last edited:
  • Like
Reactions: Kes

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
I think I'm missing something very obvious.
I have my basic attack formula, which is multiplied by the rampage.
But how do I specify how much it is to be multiplied? I might want the damage to be increased by e.g. 20% or only 10%, depending on a range of factors, not least how strong the basic skill is.

For example, I might set the basic damage formula quite low so that the player will only use it in what appears to be a lengthy battle, and won't spam it in dealing with more ordinary encounters, where a couple of ordinary attacks or skills would be more efffective. It then becomes important that I can specify precisely what the multiplier is.
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,421
Reaction score
596
First Language
Italian
Primarily Uses
RMVXA
The rampage value of each skill returns the number of times that skill is used to rampage. You can just multiply that value in your damage formula if you want it to increase more or less. Here are few examples:
Code:
a.atk * 4 + 20 *a.rampage(1) - b.def * 2
#this skill damage increases by 20 (fixed amount) every time a skill with rampage 1 is used.
Code:
basic_dmg = (a.atk*4 - b.def*2); (basic_dmg * (0.8 + 0.2 * a.rampage(1))).to_i
#since I used a float in this calculation it automatically returns a float. you have to convert it back to int using .to_i
#NOTE: rampage value starts at 1 so this is why I used 0.8 instead of 1
Code:
str = a.atk * 4; (str * (0.7 + 0.3 * a.rampage(1)) - b.def * 2).to_i
#This can increase skills' strength very rapidly

These are just few examples. you can use it in your formula to create a skill that deals double damage when used for the first time but deals almost no damage on subsequent uses.

I will add a feature to my script to handle such things much easier. VX Ace formula box is quite small after all. I have to correct instructions in my script as well...it says to use rampage(number) instead of a.rampage(number).

EDIT: I updated my script adding new features. If you want to increase your skill damage by a set percentage every time you can now use a.rampage(skill_damage, percentage, number). The version 1.1 of my script should do everything on its own. Percentage is 20 for 20%. The script itself converts everything to float than back to integer. That's because 20 uses only 2 characters in your formula box while 0.20 uses 4.
Let me know if you find bugs or anything that troubles you, I'll fix them as soon as I can.
 
Last edited:
  • Like
Reactions: Kes

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
Okay, I think I've got it. I shall be creating and testing this character's skills over the next few days, so if I hit any problem, I'll post here again.

Thank you very much for your time and trouble.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
On testing, I get the following error message

upload_2017-11-4_15-33-14.png
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,421
Reaction score
596
First Language
Italian
Primarily Uses
RMVXA
Fixed and re-uploaded. If you don't want to download the whole script again you can just fix it adding a ) at the end of line 180.
 
  • Like
Reactions: Kes

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
Now I am getting the error message
SystemStackError occurred.
stack level too deep

It is definitely from here - when I enable this script I get the message, when I disable it, it goes away. My knowledge of Ruby is too limited to guess which element of the script is doubling up with something else.
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,421
Reaction score
596
First Language
Italian
Primarily Uses
RMVXA
That's kinda strange, I didn't get any error like that with the updated version. That message appears when there is a method calling itself too many times. For what I remember I didn't use any recursive method in the script. I am going to check it. Just give me few minutes.

I can guarantee the script is just fine. I checked it and there is no recursive method in it (even less an endless one). I tested it in a fresh project and it works fine.

I know this might be obvious but occam's razor always helps. Are you sure you didn't copy/paste the script twice? If that's the case it explains everything.
 
Last edited:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
@Heirukichi Forget it - I'm an idiot. I didn't notice that somehow I had copy/pasted this in twice.
Deep apologies for any waste of your time and energy. I think my lack of sleep over the last few days is to blame.

I hope to be able to actually put the skill in and test it properly in a few days time.
Once more, sorry for the inconvenience.
 

Heirukichi

Veteran
Veteran
Joined
Sep 24, 2015
Messages
1,421
Reaction score
596
First Language
Italian
Primarily Uses
RMVXA
Don't worry, it is fine. I figured out that might be the case. Sleep is a man's best friend, it is no wonder that someone who doesn't sleep enough makes mistakes. Go to sleep and don't worry, I'll be here if you still need help with the script after creating your skill.
 
  • Like
Reactions: Kes

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
Thank you for your gracious words and understanding.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,977
Members
137,563
Latest member
cexojow
Top