Ronove

♫꒰・‿・๑꒱
Veteran
Joined
Mar 12, 2012
Messages
1,082
Reaction score
373
First Language
English
Primarily Uses
RMMV
Yay! Works like a charm. Now is there a way to make it do 2 different debuffs or would this be limited to just doing one?
 

Fomar0153

Arkz
Restaff
Joined
Mar 13, 2012
Messages
1,326
Reaction score
493
First Language
English
Primarily Uses
RMMZ
Hmm:



Code:
if rand(100)<85;b.add_debuff(0, 5);b.add_debuff(1, 5);end;10+4*a.atk-2*b.def
Might run out of room.

I'll try and finish my tutorial on bypassing the length and using more scripting features soon.
 

Ronove

♫꒰・‿・๑꒱
Veteran
Joined
Mar 12, 2012
Messages
1,082
Reaction score
373
First Language
English
Primarily Uses
RMMV
Didn't run out of room! Thanks a bunch, I totally appreciate it. :lol:
 

Warpmind

Twisted Genius
Veteran
Joined
Mar 13, 2012
Messages
936
Reaction score
579
First Language
Norwegian
Primarily Uses
Try:



Code:
if rand(100)<85;b.add_debuff(0, 5);end;10+4*a.atk-2*b.def
The 0 is for the stat

0 - Max HP

1- Max MP

2 - ATK

and so on

The 5 is for number of turns.
*Bow* *Scrape* *Repeat*

I, too, make a note of this for later reference. Every little bit of code I can analyze helps. :D
 

lohenien

Veteran
Veteran
Joined
Mar 15, 2012
Messages
153
Reaction score
8
First Language
english
Oh, I stand corrected. I'm used to using states as my debuffs instead of the actual Ace debuff options that's why I thought you could set percents. That is an option though, use states for your debuffs.
 

Knightmare

Knight of the Night
Veteran
Joined
Mar 14, 2012
Messages
1,238
Reaction score
302
First Language
English
Primarily Uses
RMMZ
I'm thinking of using a script that allows formulas for each individual weapon. If I wanted a weapon to do damage in a range of say 8-16 how would I do that?
 

Fomar0153

Arkz
Restaff
Joined
Mar 13, 2012
Messages
1,326
Reaction score
493
First Language
English
Primarily Uses
RMMZ
I'm thinking of using a script that allows formulas for each individual weapon. If I wanted a weapon to do damage in a range of say 8-16 how would I do that?
Set variance to 0. And then it would be: min + rand(range)

So in the 8-16 example:

8+rand(9)
 

Knightmare

Knight of the Night
Veteran
Joined
Mar 14, 2012
Messages
1,238
Reaction score
302
First Language
English
Primarily Uses
RMMZ
Thanks Foam I appreciate that!
 

dionisiovega

Villager
Member
Joined
Apr 3, 2012
Messages
14
Reaction score
0
First Language
english
Primarily Uses
Really looking forward to the tutorial about bypassing the formula textbox length, that is starting to give me some problems.
 

lohenien

Veteran
Veteran
Joined
Mar 15, 2012
Messages
153
Reaction score
8
First Language
english
Really looking forward to the tutorial about bypassing the formula textbox length, that is starting to give me some problems.
I believe you can already do this simply by calling a function instead of typing it all out in the damage window.
 

dionisiovega

Villager
Member
Joined
Apr 3, 2012
Messages
14
Reaction score
0
First Language
english
Primarily Uses
I had created a separate script to handle several different attack formulas I was using, but all of them were never run completely as they errored out for some reason.

Thankfully Fomar added a tutorial for what I asked on his website, and it solved my problem. Never realized I needed class Game_Battler < Game_BattlerBase.
 

Guy

Villager
Member
Joined
May 27, 2012
Messages
16
Reaction score
1
First Language
English
Primarily Uses
How would you get the formula to add a status ailment only if the spell crits?
 

Fomar0153

Arkz
Restaff
Joined
Mar 13, 2012
Messages
1,326
Reaction score
493
First Language
English
Primarily Uses
RMMZ
Sorry critical hits are determined after the custom formula is ran.
 

Guy

Villager
Member
Joined
May 27, 2012
Messages
16
Reaction score
1
First Language
English
Primarily Uses
Darn, well I got another silly question. ><

I am trying to make my healing spell do x 2 healing when the caster has a heal boosting buff... otherwise the spell works like normal. I can't get it to work.

> In formula box in Database:



Code:
a.heal_spell_formula
Script Editor:



Code:
class Game_Battler < Game_BattlerBase 

  def heal_spell_formula
    if a.state?(44); ( a.mat * 1 ) ; else; ( a.mat * 2 ) ; end
  end

end
Sorry for so many questions. ><
 

Yato

(aka Racheal)
Veteran
Joined
Mar 17, 2012
Messages
825
Reaction score
347
Primarily Uses
Few things I noticed, Guy. Once you are working with a function in a class, 'a' and 'b' no longer apply. So it would simply be



Code:
if state?(44); ( mat * 1 ) ; else; ( mat * 2 ) ; end
but I think you have it backwards to what you intended. Right now it will use double the magic stat when the state is not inflicted.

and nitpicky things that don't matter per se

-mat * 1 is more than is needed. You can just use mat.-You can shorten the code to



Code:
state?(44) ? mat*2 : mat
 
Last edited by a moderator:

Guy

Villager
Member
Joined
May 27, 2012
Messages
16
Reaction score
1
First Language
English
Primarily Uses
Thank you!

:wub:

I was so busy trying to make it just like you would right it out in the script box in the database. :wacko:
 

Fafnir

And yet, these hands will never finish anything.
Veteran
Joined
Apr 26, 2012
Messages
317
Reaction score
26
Primarily Uses
How would you get the formula to add a status ailment only if the spell crits?
The only way I can think of is the one Fomar himself pointed out a few posts above:
Try:



Code:
if a.mp>=100;@result.critical=true;(a.atk*4-b.def*2)*3;else;(a.atk*4-b.def*2);end;
Make sure the skill has no crit chance and turn the formula into this:



Code:
if rand<=cri;@result.critical=true;FORMULA*3;b.add_state(STATEID);else;FORMULA;end;
Where FORMULA is your base damaging formula, STATEID is the id of the state you want to inflict and I am assuming crit is still triple damage, otherwise you'd need to change that as well.
 

Xypher

Veteran
Veteran
Joined
Apr 1, 2012
Messages
148
Reaction score
26
Primarily Uses
c=formula; if b.result.critical;b.add_state(state_id);end;c

e.g

c=a.mat*4-b.mdf*2; if b.result.critical;b.add_state(8);end;c
 

Fafnir

And yet, these hands will never finish anything.
Veteran
Joined
Apr 26, 2012
Messages
317
Reaction score
26
Primarily Uses

Latest Threads

Latest Posts

Latest Profile Posts

Quite the versatile cast so far :p

Characters.PNG
Degica Games Turn Komodo | RPG Maker News #77

Well, rats. Was really looking forward to trying out FPS Creator, but trying to install and set it up was pretty much impossible for my tiny brain to comprehend. So much for that, then.
Ah, home once more! I think I can safely work on my games now.
Let's hope power remains on for the day

Forum statistics

Threads
112,405
Messages
1,068,090
Members
146,055
Latest member
djdune
Top