CharcoalKidd

Villager
Member
Joined
Mar 3, 2015
Messages
27
Reaction score
10
First Language
English
Primarily Uses
I'm not sure if this would fall under Ace support or RGSS3 support, but I'll try it here.

Say I wanted to make a more complicated skill. In this case let's say it has to do with doing more damage depending on the number of states afflicted. If the skill was too long for the formula box, you'd put it in a script;

class Game_Battler < Game_BattlerBase   def status_attack(a,      c = 0      e = a.atk * 2 - b.def * 1      for d in [2,3,4,5,6,7]      if a.state?(d)          c += 1         end      end return e if c == 0   return e * 1.1 if c == 1   return e * 1.3 if c == 2   #so on and so forth   endendOr something like that. If I were to use a skill like this, could I put this in the formula box to modify the strength for a more powerful version of the skill?

Code:
status_attack(a,; e * 2#Or something like this?status_attack(a,; e = a.atk * 4 - b.def * 2
 

Evgenij

Veteran
Veteran
Joined
Aug 28, 2013
Messages
349
Reaction score
100
First Language
German
Primarily Uses
N/A
I think it should work, but keep in mind that this wont work how you expect it:

status_attack(a,; e * 2lets say status_attack(a, B) returns 100 now it would look like this:

100; e * 2Your final damage would be only e * 2 but e is unknown. You would neet to change it to this:

e = status_attack(a,; e * 2or this:

status_attack(a, * 2Greetings
 

Rinobi

Veteran
Veteran
Joined
Mar 24, 2014
Messages
579
Reaction score
220
First Language
English
Primarily Uses
RMVXA
Another simple way to do it.

class Game_Battler < Game_BattlerBase def status_attack(a,b,p) # where "p" modifies the skill's power. c = 0 e = (a.atk * 2 - b.def * 1) * (p / 100) for d in [2,3,4,5,6,7] if a.state?(d) c += 1 end end return e if c == 0 return e * 1.1 if c == 1 return e * 1.3 if c == 2 #so on and so forth endendWhere "p" is equal to the skill's power. Place it anywhere you want in the formula.

status_attack(a,b,100)"100" is the percentage to modify the skill's damage by. Again, there's a lot of different ways to do this.

Code:
class Game_Battler < Game_BattlerBase   def status_attack(a,b,f)      c = 0      e = (a.atk * 2 - b.def * 1)      for d in [2,3,4,5,6,7]         if a.state?(d)            c += 1         end      end   return e if c < 1   return e * (f * c)   #so on and so forth   endend
Code:
 status_attack(a,b,2)
 
Last edited by a moderator:

Latest Threads

Latest Posts

Latest Profile Posts

Another unscheduled stream for Lightestone~ this time because we hit affiliate! Aaaahh- So other than the game we're also going to work on emotes/badges/etc!

www.twitch.tv/riazey
Is it necroposting if I ask for more info in my own months old thread? All the information in the thread is relevant
JRPG TextBox HTML - Part 2:
So I'm resuming work on the Shadowstar Trilogy. I've decided that it will take place between the end of G4 and the start of G5, and two of the Lost Rulers will be Twilight Sparkle and Sunset Shimmer (who is the moon princess in my AU).

Forum statistics

Threads
108,966
Messages
1,040,910
Members
141,429
Latest member
Lark_Larkington
Top