Jump to content
Saranel

Skill upgrade script request

Recommended Posts

Well, I meant you can use learned skills instead of items as grathnodes. That way you can control what each actor learns. My custom skills also sort of depend on skills being used as grathnodes, because it doesn't copy items. Other wise you could just copy any skill's items. If you look at the bottom of the skill list I use in the demo, you can see how I make grathnode skills instead of items. BTW, I have the name of grathnodes set to metaskills in my demo, but it's easy to change up near the top of the grathnode script.

Share this post


Link to post
Share on other sites

Oh okay, well I took your advice and made the actor specific skills. I'll just have them

learn them as they go, it'll do just fine!

 

I hate to keep asking you stuff but, I don't suppose you would have any idea how to improve a skill's critical hit rate through a grathnode

item or metaskill would you? I tried using a passive states script but that didn't do it. Since you can't just set a set Critical Strike chance

on a skill itself. Just wondering, if not well it's a not a big, the world will keep spinning. :D

Share this post


Link to post
Share on other sites

Well I can try making a script for you. Try using the following script at the end of your script list and adding ":meta_crit_chance => 50" to a grathnode to add a extra 50% crit chance to a skill with the grathnode attached. Though I haven't actually tested this at all...

 

class Game_Battler < Game_BattlerBase

  alias_method :item_cri_skill_base, :item_cri
  def item_cri(user, item)
    basecri = item_cri_skill_base(user, item)
    if item.is_a?(RPG::Item)
      return basecri
    else
      crimult = 1
      GrathSearch.find_note_all(item, user, :meta_crit_chance).each do |i|
        crimult += (i / 100.0)
      end
      return basecri * critmult
    end
  end

end
You might notice I made a module named GrathSearch at the bottom of my Grathnode Tweaks script... this is actualy the kind of stuff I made it for, searching every grathnode attached to a skill so I could modify a skill's properties in addon scripts. Maybe I will write a big script to do this with a skills damange, hit rate, and other things sometime soon... I sort of did this with skill scope and damange already but it's kinda sloopy and based on yet another script by someone else so I probobly should redo it.

 

Edit: BTW, you think I should be adding or multiplying ot make ways to do both in the future? I orginaly was going to go with mutiplying but this script uses adding right now.

Edited by KilloZapit

Share this post


Link to post
Share on other sites

So I installed your script at the bottom of my list and then slapped that line on one of my grathnode skills and

got this error when I tried to use a skill in battle: 

 

Script "Kilo Crit Skill Test Script" line: NameError occurred.

 

undefined local variable or method 'critmult' for #<Game_Enemy:0xbae25e4>

 

Not sure if that actually means something to you or helps but I figured I might as well mention it xD

Uhm, maybe try adding if it thinks multiplying is bad? I have no idea honestly, sorry haha.

Share this post


Link to post
Share on other sites

oopsie...

 

class Game_Battler < Game_BattlerBase

 

alias_method :item_cri_skill_base, :item_cri

def item_cri(user, item)

basecri = item_cri_skill_base(user, item)

if item.is_a?(RPG::Item)

return basecri

else

crimult = 1

GrathSearch.find_note_all(item, user, :meta_crit_chance).each do |i|

crimult += (i / 100.0)

end

return basecri * crimult

end

end

 

end

 

try that.

Share this post


Link to post
Share on other sites

Welp this time around whenever I use a skill it just has a pop-up that says "Failed"

every time. I thought maybe it meant failed to get a critical strike but it just 

kept saying failed after several more tries. 

Share this post


Link to post
Share on other sites

Oh that is kinda a weird bug/feature with skills that do no damage or status effects. Yanfly has a script to fix that though. Just use that script and put <anti fail> in the script's notes.

Edited by KilloZapit

Share this post


Link to post
Share on other sites

It doesn't display the "Failed" message now but it still doesn't

seem to change the skill's critical strike chance. I still can't seem to

get any off.

Share this post


Link to post
Share on other sites

Oh! If I am going to add crit chance like that I should do 'return basecri + crimult' instead of 'return basecri * crimult'. This should work better. You might want to sa

 

class Game_Battler < Game_BattlerBase

  alias_method :item_cri_skill_base, :item_cri
  def item_cri(user, item)
    basecri = item_cri_skill_base(user, item)
    if item.is_a?(RPG::Item)
      return basecri
    else
      crimult = 1
      GrathSearch.find_note_all(item, user, :meta_crit_chance).each do |i|
        crimult += (i / 100.0)
      end
      return basecri + crimult
    end
  end

end
Edited by KilloZapit

Share this post


Link to post
Share on other sites

Well it's criting now for sure lol. The only problem is that I think every attack made by me or enemies also crit

regardless of chance to. xD 

Share this post


Link to post
Share on other sites

Oh, hehe oopsie, I should have 'crimult = 0' instead of 'crimult = 1'.

class Game_Battler < Game_BattlerBase

  alias_method :item_cri_skill_base, :item_cri
  def item_cri(user, item)
    basecri = item_cri_skill_base(user, item)
    if item.is_a?(RPG::Item)
      return basecri
    else
      crimult = 0
      GrathSearch.find_note_all(item, user, :meta_crit_chance).each do |i|
        crimult += (i / 100.0)
      end
      return basecri + crimult
    end
  end

end
Edited by KilloZapit

Share this post


Link to post
Share on other sites

I tried it out again and it seems to be working just fine! I assume I can use values other than 50 for the ":meta_crit_chance => 50" correct?

 

Either way you've done it again, really appreciate you assisting me so much! You've been a huge help and I can't thank you enough :D

Share this post


Link to post
Share on other sites

Hehe your welcome! It's the type of thing I have been working on for a while and it's nice to see others make use of it :3

Share this post


Link to post
Share on other sites

Well, I'm glad I could put it to good use! :D

Oh boy, here I am again bugging you... I really tried to solve this by myself for a good while but I just couldn't figure it out. So a play tester mentioned to me that when he

casts "Custom" skills, like the custom version of skills the character learns, they cost nothing. A skill that normally should cost 34 MP doesn't move his MP bar at all.

 

You don't necessarily have to fix it/or give tips about what I'm doing wrong because I was hoping I could just remove the "Create, Rename, Erase" custom commands from

the submenu in the skill section. The best I got was making it so when you did create a custom, it would crash the game. xD

 

Just can't seem to figure out which particular section I need to remove, every time I removed what I thought was it, the game would give me a script error. I suppose if it's

too much of a hassle I could just leave it so it crashes when they try, hopefully to deter players from trying it haha

Share this post


Link to post
Share on other sites

Uh oh... I have a bug somewhere I guess... You will probably need to really mess around with the Skill Menu Config script if you want to remove custom skills... here maybe use this Skill Menu Config and delete all of the Custom Skill scripts for now...

 

module YEA

 

module SKILL_MENU

 

SKILL_COMMANDS =[

:use_skills,

:learn_skill, # Requires YEA - Learn Skill Engine

:grathnode,

] # Do not remove this.

 

USE_COMMANDS =[

:custom_skills,

:stype_list, # Displays all of the actor's usable skill types.

#:passive,

:tp_mode, # Requires YEA - TP Manager

] # Do not remove this.

 

META_COMMANDS =[

:basic,

:stype_list,

] # Do not remove this.

 

DEFAULT_SKILL_MENUS = {

:default => USE_COMMANDS,

}

 

SKILL_MENUS = {

:default => SKILL_COMMANDS,

:use_skills => USE_COMMANDS,

}

 

META_SKILL_MENUS = {

:default => META_COMMANDS,

}

 

COMMAND_SUB_MENUS = {

Scene_Skill => SKILL_MENUS,

Scene_Grathnode => META_SKILL_MENUS,

:default => DEFAULT_SKILL_MENUS,

}

 

CS_VOCAB ={

:custom => "Custom",

:basic => "Basic",

} # Do not blah blah blah I think you get it

 

CUSTOM_SKILL_COMMANDS ={

# :command => ["Display Name", new sym, ext, Handler Method]

:grathnode => [KRX::VOCAB::GRATHNODE, nil,

:graphnode_mode, :command_grath],

:use_skills => ["Use Skills", nil, nil, :command_submenu],

:basic => [CS_VOCAB[:basic], :skill, 0, nil],

} # Do not remove this.

 

end # SKILL_MENU

 

end

 

I think that should remove my custom skills all together. I will have to see if I can fix them, but it's not as if you can't just use normal skills in the meantime.

Share this post


Link to post
Share on other sites

Haha, that works perfect, thanks! I wish I had even a shred of your awesome scripting talent xD

 

Yeah I mean if worst came to worst and they were too integral to your scripts or something, I would've just told the testers

to ignore the custom section.

 

Well it turns out that Vampirism like skills aren't working now. Like ones that absorb HP based on the damage you deal.

It just says "Null" when it goes to heal me.

Edited by Saranel

Share this post


Link to post
Share on other sites

Was it working before when you had custom skill stuff? I don't know why they wouldn't work without it. What are your damage formulas for them? Same as my demo? Also, I think I figured out why my custom skills were not costing and mp or tp. Because it checks to make sure only RPG::Skill objects can cost stuff! I could overwrite that but I think it might be simpler to overwrite "is_a?" on Game_Custom_Skill to make sure the game always thinks it's a skill.

 

Edit: If you wanna use custom skills again I updated them to work right. Skill can download the demo with the updated scripts here.

Edited by KilloZapit

Share this post


Link to post
Share on other sites

Yeah they worked just fine before with your custom skill scripts. I used the same formula pretty much as your Health Boost skill

and it would always heal me. Yeah I guess if all else fails, I'll just use your new updated custom skills.

Share this post


Link to post
Share on other sites

So your using my "r.hp_damage / 6" formula?

Edited by KilloZapit

Share this post


Link to post
Share on other sites

Yeah, I just copy pasted the skill from your demo. They worked just fine, then I decided to change the 6 to a 7.

That worked just fine. Then I swapped to your script that gets rid of "Create, Edit, Rename" options in the

skills menu and it stopped working.

 

Wait a minute, I just started testing it out again and it works just fine? Maybe it's because I think I loaded up a save

from a previous version last time. I didn't realize it wouldn't update my save file with new changes. I'm thinking that might

be it?

Edited by Saranel

Share this post


Link to post
Share on other sites

It could also be that the result was less then 1... you could try "(r.hp_damage / 7.0).ceil" to make sure it always rounds up.

Share this post


Link to post
Share on other sites

Something I've been meaning to mention, been busy the last several days but for some reason I can equip a skill more than once. Like my version of your HP Boost can be

slotted on to a skill multiple times sometimes. If I fully close out of the menu I can't anymore. Then later I'll be able to do it again for some reason. :o

 

 

Also I can't believe I never saw this before, but I'm sure you're aware with the keywords used for the grathnode script "for_all"? I just realized items/skills with that

keyword can be put into skills that target "all allies" and "all enemies" meaning that if I put a heal on a "for_all?" skill or item then attach that node to a "Hit all enemies"

attack skill, it'll damage the enemies then heal them. Or if I put a damage node on a "heal all" skill, it'll hurt everyone after healing them. 

 

I'm wondering if you know a way to maybe separate the keyword "for_all?" into something like "for_all_enemies?" and "for_all_allies?" so mixing them up

wasn't possible. If I should be asking the author of the grathnode script instead, then please disregard that last bit. :) Just thought you'd like to know.

Edited by Saranel

Share this post


Link to post
Share on other sites

Hmmm can you tell me more about when yiou are able to do it? I might need to refresh the list of grathnodes more often. It might not update properly all the time when you attach something allowing you to attach more copies untill you leave the menu... I thought I had that problem once and fixed it...

 

As for scopes, they actualy work by running methods on the skill, so if you wanted you could add some scope functions like this:

 

class RPG::UsableItem < RPG::BaseItem

  def for_all_opponents?
    @scope == 2
  end

  def for_all_friends?
    [8, 10].include?(@scope)
  end

end
Really maybe I should add a better eval-based way to do it but eh...

Share this post


Link to post
Share on other sites

Let' see, as far as I know I can double equip skill gems/skills when I first load my save. Or when I guess I first open up the game, it lets me equip two of them but if I equip one over the

other it fixes itself and stops me from doing it again. I really haven't seen much else other than that, I was changing damage formulas alot on some skills and every time I opened the

game it would let me double equip. 

 

I suppose the term "<unique>" isn't working right with skill items and passives? I honestly don't know.

 

So as for that new snippet of a script, I should add that in to the Grathnode script section with the others and replace "for_all?" with it?

Share this post


Link to post
Share on other sites

Hmm... I will have to take a deeper look at it I guess.

 

As for the script segment, I would place it in a new script somewhere, or at the start or end of my grathnode tweeks script. Don't overwrite anything with it. Then you should be able to use for_all_opponents? and for_all_friends? as scopes

Edited by KilloZapit

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted