Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Luck Stat, dafuk?
userjosh704
post Oct 15 2012, 08:48 AM
Post #1


I win.
Group Icon

Group: Revolutionary
Posts: 119
Type: Writer
RM Skill: Masterful




I was hoping for some new stats in the next RPGmakers - M.Def and Luck specifically. THIS luck stat is useless. I was hoping for a miscellaneous stat which I could use to influence different things like critical hit rate/evasion/second wind/counterattack rate/monster item drop rate/etc. Can someone give me some ideas and tips for this stat?

Also, what's the deal with the counterattack ability? How come it's actually phys.evade and counterattack simultaneously?


edit: in the scripting section Game_Battler, line 486-490 it says
QUOTE
#--------------------------------------------------------------------------
# * Calculate Critical Rate of Skill/Item
#--------------------------------------------------------------------------
def item_cri(user, item)
item.damage.critical ? user.cri * (1 - cev) : 0


can I edit this to
item.damage.critical ? user.luk * (1 - luk) : to make critical hits influenced by luck?

This post has been edited by userjosh704: Oct 15 2012, 08:55 AM


__________________________


Go to the top of the page
 
+Quote Post
   
ZarroTsu
post Oct 15 2012, 09:34 AM
Post #2


Human
Group Icon

Group: Revolutionary
Posts: 189
Type: Developer
RM Skill: Advanced




QUOTE (userjosh704 @ Oct 15 2012, 12:48 PM) *
THIS luck stat is useless.

If by "useless" you mean "capable of bumping a 1% status infliction rate up to 100%", then...

QUOTE
I was hoping for a miscellaneous stat which I could use to influence different things like critical hit rate/evasion/second wind/counterattack rate/monster item drop rate/etc. Can someone give me some ideas and tips for this stat?

But... Those ALL exist in the game already. Why fuck with one stat when you could just have status menus list the existing other stat?

I mean you CAN do what you're planning on doing, but why not just use an entirely separate variable if you're going that far? Because you want to use the system's curve schematic?

This post has been edited by ZarroTsu: Oct 15 2012, 09:35 AM
Go to the top of the page
 
+Quote Post
   
userjosh704
post Oct 15 2012, 09:50 AM
Post #3


I win.
Group Icon

Group: Revolutionary
Posts: 119
Type: Writer
RM Skill: Masterful




Let's start with: How do I use my Luck stat decide whether or not an attack is a crit or not?


__________________________


Go to the top of the page
 
+Quote Post
   
ZarroTsu
post Oct 15 2012, 03:48 PM
Post #4


Human
Group Icon

Group: Revolutionary
Posts: 189
Type: Developer
RM Skill: Advanced




Allow me to redirect you here.
Go to the top of the page
 
+Quote Post
   
Night_Runner
post Oct 15 2012, 11:27 PM
Post #5


Level 50
Group Icon

Group: +Gold Member
Posts: 1,520
Type: Scripter
RM Skill: Undisclosed




CODE
  #--------------------------------------------------------------------------
  # * Calculate Critical Rate of Skill/Item
  #--------------------------------------------------------------------------
  def item_cri(user, item)
    item.damage.critical ? user.luk.to_f / (self.luk+ user.luk).to_f : 0
  end


The code will generate a random number between 0 - 1, and if the number returned by item_cri is greater than that random number, then the item will be a critical.
What I've done is taken the percentage of the item user's luck compared to the defender's luck.
So if the user's luck is double the defender's luck, you have double the chance of getting a critical (compared to the chance of not getting a critical)

Keep in mind the item has to be able to do critical damage, otherwise it's kinda pointless...

Technically you're supposed to use the luk_effect_rate function when using the luck variable, but it didn't seem appropriate for this... I'll let you play around with it happy.gif


__________________________
K.I.S.S.
Want help with your scripting problems? Upload a demo! Or at the very least; provide links to the scripts in question.

Most important guide ever: Newbie's Guide to Switches
Go to the top of the page
 
+Quote Post
   
ZarroTsu
post Oct 16 2012, 02:58 AM
Post #6


Human
Group Icon

Group: Revolutionary
Posts: 189
Type: Developer
RM Skill: Advanced




QUOTE (Night_Runner @ Oct 16 2012, 03:27 AM) *
play around with it ^_^

He won't, because you gave him something that works. And now he doesn't need to learn anything.
Go to the top of the page
 
+Quote Post
   
userjosh704
post Oct 16 2012, 05:19 AM
Post #7


I win.
Group Icon

Group: Revolutionary
Posts: 119
Type: Writer
RM Skill: Masterful




QUOTE (Night_Runner @ Oct 16 2012, 12:27 AM) *
CODE
  #--------------------------------------------------------------------------
  # * Calculate Critical Rate of Skill/Item
  #--------------------------------------------------------------------------
  def item_cri(user, item)
    item.damage.critical ? user.luk.to_f / (self.luk+ user.luk).to_f : 0
  end


The code will generate a random number between 0 - 1, and if the number returned by item_cri is greater than that random number, then the item will be a critical.
What I've done is taken the percentage of the item user's luck compared to the defender's luck.
So if the user's luck is double the defender's luck, you have double the chance of getting a critical (compared to the chance of not getting a critical)

Keep in mind the item has to be able to do critical damage, otherwise it's kinda pointless...

Technically you're supposed to use the luk_effect_rate function when using the luck variable, but it didn't seem appropriate for this... I'll let you play around with it happy.gif


Thanks. I'll tinker around.


__________________________


Go to the top of the page
 
+Quote Post
   
amerk
post Oct 16 2012, 10:30 AM
Post #8


Level 56
Group Icon

Group: Global Mod
Posts: 1,784
Type: None
RM Skill: Undisclosed
Rev Points: 15




QUOTE (ZarroTsu @ Oct 16 2012, 05:58 AM) *
QUOTE (Night_Runner @ Oct 16 2012, 03:27 AM) *
play around with it happy.gif

He won't, because you gave him something that works. And now he doesn't need to learn anything.


This is considered spam. If you don't have anything of value to post, then don't post.


__________________________
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 20th May 2013 - 12:57 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker