RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Item Hit Ratio

0 Members and 1 Guest are viewing this topic.

****
Rep:
Level 76
Praise the Sun (Arcana)
GIAW 14: 1st Place (Hard Mode)
Simply, I'd like to see a way of having Items have a chance of failure. Letting me affect the hit ratio like done with spells. I don't plan to implement it to all of my items, just to the reviving scroll in my game (Antenecros).

*****
my name is Timothy what's yours
Rep:
Level 79
Hello
2014 Most Missed Member2014 Zero to Hero2014 Best IRC Quote2012 Zero To HeroSecret Santa 2012 ParticipantContestant - GIAW 9For frequently finding and reporting spam and spam bots2011 Zero to Hero
That seems quite bastardly to do to your players. Anyway, I'm quite positive that MA will post here and tell you that he's already made a script with 17 more features that does exactly that. The question is when.
it's like a metaphor or something i don't know

pokeball TDSOffline
***
Rep:
Level 84
-T D S-
Silver - GIAW 11 (Hard)Silver - Game In A Week VII
This should do it.

Code: [Select]
#==============================================================================
# ** Game_Battler
#------------------------------------------------------------------------------
#  This class deals with battlers. It's used as a superclass of the Game_Actor
# and Game_Enemy classes.
#==============================================================================

class Game_Battler
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias tds_item_hit_rate_game_battler_calc_hit                      calc_hit 
  #--------------------------------------------------------------------------
  # * Calculation of Final Hit Ratio
  #     user : Attacker, or user of skill or item
  #     obj  : Skill or item (for normal attacks, this is nil)
  #--------------------------------------------------------------------------
  def calc_hit(user, obj = nil)
    # If Object is an Item
    if obj.is_a?(RPG::Item)     
      # Return Object Hit Ratio
      return obj.hit_ratio
    end   
    # Run Original Method   
    tds_item_hit_rate_game_battler_calc_hit(user, obj = nil)
  end 
end

#============================================================================
# ** RPG::Item
#----------------------------------------------------------------------------
# This module handles item information.
#============================================================================ 
module RPG
  class Item < UsableItem
  #--------------------------------------------------------------------------
  # * Get Item Hit Ratio
  #--------------------------------------------------------------------------
  def hit_ratio
    # Check for Hit Ratio
    self.note[/HIT_RATE: ([-0-9]+)/i]
    # Return hit ratio
    return $1 == nil ? 100 : $1.to_i
    end
  end
end

To use it simply add this into the item note box:

Code: [Select]
HIT_RATE: #

# = The Hit rate you want for the item.

The script will assume 100% hit rate if this is not in the note box.

Let me know if this works out for you and if you need anything added to it.

Have a nice day.


That seems quite bastardly to do to your players. Anyway, I'm quite positive that MA will post here and tell you that he's already made a script with 17 more features that does exactly that. The question is when.


How exactly does this help the person asking for help?


*****
my name is Timothy what's yours
Rep:
Level 79
Hello
2014 Most Missed Member2014 Zero to Hero2014 Best IRC Quote2012 Zero To HeroSecret Santa 2012 ParticipantContestant - GIAW 9For frequently finding and reporting spam and spam bots2011 Zero to Hero
Did you whip that up in that window of time?
God you're amazing.
As for my post, it was reassuring positivity.
I just like talking to people ;9
it's like a metaphor or something i don't know

****
Rep:
Level 76
Praise the Sun (Arcana)
GIAW 14: 1st Place (Hard Mode)
Wow, TDS, it worked perfectly, thanks for the swiftness. And to Pacman, in my game's Lore you could call it, the spell, Raise Dead is sort of a sin, using an item called Antenecros is the alternative to it but has a chance of failure, but Raise Dead has no chance of failure but is hard on the cleric to cast, for instance when a cleric casts Raise Dead they would suffer "Weakened Soul" a state that damages Spirit until cured or it passes.

*****
my name is Timothy what's yours
Rep:
Level 79
Hello
2014 Most Missed Member2014 Zero to Hero2014 Best IRC Quote2012 Zero To HeroSecret Santa 2012 ParticipantContestant - GIAW 9For frequently finding and reporting spam and spam bots2011 Zero to Hero
Fair enough. That's actually an incredibly good explanation. I think I read that somewhere in GoV anyway. Would be quite silly if your skills didn't make sense in your lore.
it's like a metaphor or something i don't know