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.
Skill uses elements/hitratio from weapon

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 71
RMRK Junior
Is there any script that does this? I remember seeing one around, but i cant seem to find it anywhere...
« Last Edit: July 18, 2011, 09:54:04 AM by Mr G W »

**
Rep:
Level 76
Interested RMKR
I don't know about any officially released ones, but I requested one before on rpgmakervx.net (credits go to Zetu from there) and it got answered :) Credits to me for the annotation and instructions lol

Code: [Select]
#Add <w elemental> tag to whatever skill tag box you'd like to have weapon ele


class Game_Battler
 
  alias z_make_obj_damage_value make_obj_damage_value unless $@
  def make_obj_damage_value(user, obj)
    recreate_element_set(user, obj)
    z_make_obj_damage_value(user, obj)
  end
 
  def recreate_element_set(user, obj)
    return unless user.actor?
    return unless obj.welemental
    obj.element_set = []
    return if user.weapons[0].nil?
    obj.element_set = weapons[0].element_set
  end
 
end

class RPG::Weapon < RPG::BaseItem
 
  def welemental
    self.note.scan(/<w[ ]elemental>/i){
    return true}
    return false
  end
 
end

**
Rep: +0/-0Level 71
RMRK Junior
Great. thanks. Is there also a script that sets the skill hit ratio to the same as weapon too?

That script is incompatible with the scripts im using... is there any other script like that?
« Last Edit: July 18, 2011, 11:06:42 AM by Mr G W »

*****
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
To solve that compatibility issue, tell us what scripts you're using, post some that would be hard to find, or upload a project with all the scripts you're using.
And above all, tell us what the error is. You don't need another script if it can be fixed.
it's like a metaphor or something i don't know

**
Rep: +0/-0Level 71
RMRK Junior
Its incompatible with Yanfly Equipment Overhaul. Gives a nonmethoderror, i think its because both override the same Class, it seems the only explanaition i can find.

If i place that script above that one it doesnt give errors, but wont work at all.

*****
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
YEM, YERD or YEZ? It seems to work fine with the YEM one. No errors.
tell us what scripts you're using, post some that would be hard to find, or upload a project with all the scripts you're using.
And above all, tell us what the error is. You don't need another script if it can be fixed.
Please do this.
it's like a metaphor or something i don't know

**
Rep: +0/-0Level 71
RMRK Junior
After testing the script with every other script individually, i have found that its incompatible with the Luck script by modern algebra.

This is the error:

Script weaponElement line 14: NoMethodError occurred.

undefined method 'welemental' for #<RPG::Skill:0x2b5ad60>

Placing it below the luck script fixes the problem, but causes the script to not work...

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Are you sure that's an incompatibility and not just an error with this script? I don't see how Luck would interfere and there is definitely no reason that placing it below the Luck script would cause it to bug. The problem seems to me to be that
Code: [Select]
make_obj_damage_value (user, obj)
is being aliased and the obj it expects is either a Skill or an Item, but then the script checks the obj.welemental method (which doesn't exist because that method is defined only for Weapons). I think this script would throw that error even by itself; I don't think it's an incompatibility. It is, however, a simple enough fix. Where it says:

Code: [Select]
class RPG::Weapon < RPG::BaseItem

Change that to:

Code: [Select]
class RPG::BaseItem

I think the script is still imperfect - maybe I'll write this script for you when I find the time.

**
Rep: +0/-0Level 71
RMRK Junior
Ok, ill try. Well the luck script seems to cause problems and even when i place below it it sometimes gives the error or it just does nothing.

Anyway, changing that makes this error

Script Weaponelement line 17: NameError occurred.

undefined local variable or method 'weapons' for
#<Game_enemy:0xbf9e508>

This script still looks flawed...
« Last Edit: July 21, 2011, 05:13:42 PM by Mr G W »

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
This line:
Code: [Select]
    obj.element_set = weapons[0].element_set

Should be:
Code: [Select]
    obj.element_set = user.weapons[0].element_set

**
Rep: +0/-0Level 71
RMRK Junior
Its working now! thanks!

If possible, im looking for a script that gets the hitratio from the actor.
« Last Edit: July 21, 2011, 07:17:36 PM by Mr G W »