Skill Equip

@Kevin Eontrainer


In 95% of all cases, error messages like "undefined for NIL" are caused by loading an incompatible saved game. Installing a script usually requires you to start a new game (unless the script is rather simple and doesn't need a setup by new game).


If that is not the case, you either misconfigured the script or have a compatibility problem.


In all cases, I suggest you follow the link "how to use a script" in my signature as that tutorial not only explains about script configuration, but also provides bughunting help.
@Kevin Eontrainer


In 95% of all cases, error messages like "undefined for NIL" are caused by loading an incompatible saved game. Installing a script usually requires you to start a new game (unless the script is rather simple and doesn't need a setup by new game).


If that is not the case, you either misconfigured the script or have a compatibility problem.


In all cases, I suggest you follow the link "how to use a script" in my signature as that tutorial not only explains about script configuration, but also provides bughunting help.

I started a new game but the error persist...


I'm using Yanfly menu engine and  Expanded Skill Description by Soulpur777


I think I fixed it 😀


I put this script on top of Expanded Skill Description script and it works. Thank Goodness
@Kevin Eontrainer


In 95% of all cases, error messages like "undefined for NIL" are caused by loading an incompatible saved game. Installing a script usually requires you to start a new game (unless the script is rather simple and doesn't need a setup by new game).


If that is not the case, you either misconfigured the script or have a compatibility problem.


In all cases, I suggest you follow the link "how to use a script" in my signature as that tutorial not only explains about script configuration, but also provides bughunting help.

There's a problem though.. The menu appears but does absolutely nothing...


Do I have to do something to make it work?


I think its incompatible with the Expanded Skill Desc script.. But when I remove the Expanded skill desc, it causes error!
@Kevin Eontrainer, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.


This has nothing to do with this topic. Please make a new topic in script support, giving links to the scripts that are involved and provide screenshots of the exact error message, including a screenshot of the console output of the backtracer script as described in my tutorial "how to use a script".
@Kevin Eontrainer, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.


This has nothing to do with this topic. Please make a new topic in script support, giving links to the scripts that are involved and provide screenshots of the exact error message, including a screenshot of the console output of the backtracer script as described in my tutorial "how to use a script".

Sorry... I thought it worked but.. it just does nothing. I'll create anew topic then. thanks
Is there a way for each actor to have a different amount of skill slots? I'm not talking about the functionality of the Limitations add-on. I mean a different amount of default general slots for each actor (the slots that show on the left window).
For the purposes of my project, I need the player character to start at 0 slots, while other characters that will join later already have many available slots regardless of the slots of the player character.
If so, writing how to do it would be greatly appreciated. If the script doesn't support that kind of function, it's fine, I'll just change plans a bit.
Thank you very much for the script. I still love it just as is.
Totally did not read properly.
Mawichan already mentioned that said add-on isn't what she's looking for.

After taking a quick look it doesn't look like it's in the instructions proper, but there are some note-tags that this script provides.

<skill slots: X> overwrites the DEFAULT_MAX_EQUIPS constant, can be 0. Usable on Actors and Classes.(classes take priority)

<change slots: X> can both increase and decrease skill slots. Usable on Classes and Equips.

<skill info bluetext: whitetext> used on skills for adding on to a skill's description seen in the right Equip Skill window.

<non equip skill> Used on skills that you want usable all the time/no need to equip.

The <skill slots: X> note-tag would be the one Mawichan's interested in.
That's exactly what I was looking for indeed! Thank you very much, you've saved me again.
(I feel like one of the little green aliens from Toy Story haha. The ones that say "you've saved us, we are eternally grateful" XD)
But really, you have no idea how many roadblocks were cleared up by sharing that information.
Is there a way to call skill equip menu without going into skill menu? I have a common event that I want to access instead.
My Ruby skills aren't the best. Does it have something to do with Window_LearnSkillCommand?
It uses the default skill menu, so this should open it:
Code:
SceneManager.call(Scene_Skill)
If you want to open the skill menu for a specific actor, you can use this script call before the above mentioned one:
Code:
$game_party.menu_actor = $game_party.members[index]
Just replace the index with the index of the party member you want the skill menu to start on. Indexes start from 0 (that's the first member in party).
Sorry for bumping up such an old thread, but I've read through it and tried googling, but I can't find what I need (although some of this stuff has been said in the thread).

Is there a way to change individual actors skill slots? I wanted to tie the number of slots to stat, and at certain breakpoints add an extra slot. I found that, which somewhat allows me to increase slots in game - but for the whole party. So an edit of that script for each individual actor.

And I don't want the player to be able to use unequiped spells outside of battle. In my game we can only "remember" spells at a safe spot (done easily with a switch), so player will have to plan ahead (should I use my two slots for pure offensive spells, or put a heal in one because that next bit is tough?). This is, obviously, negated if player can heal outside of battle as he pleases 😉 This post is pretty much requesting the same thing, but ends with - ever helpful - variant of "nvm I got it".

And lastly, is there any way for certain spells to require more than one slot? Let's say player learn a powerful, "decimate all enemies" kind of spell, but since it's such a strong spell he needs to use 3 slots to equip it. Is something like that possible?

Thanks a lot for any and all help I can get with that!
I think this is the addon he mentioned: https://github.com/suppayami/rmvxa-collection/blob/master/Skill Equip - Limitation.rb
But it will need some adjusts to allow the slots to be reconfigured in-game.
I have played around with that addon (and main script), tried to make some extra method to change slots etc. But couldn't. I've noticed that it took the data from items, so I did a small walk around with the issue - I've created some Amulet items (and extra slot using Multi Equip already in game) that grant extra spell slots (and require certain investment in a stat, just as I originally wanted). I can now easily grant those items to player on level up, or just put them around the game. Still, thanks a lot, I wouldn't probably think of that!

Now I need some help with the other two issues, mainly the fact that player can use unequipped spells from menu!


//Edit

Okay, I found a way to disallow player from using unequipped spells. Basically, what I did was to add an extra condition for spell use - to check if the spell is on player's equipped list. A very small change in Window_SkillList, but seems to be working just fine.
Lines 68-70 in default script:
Code:
  def enable?(item)
    @actor && @actor.usable?(item) && @actor.equipped_skills.include?(item)
  end
Download link led to a malicious URL for me.
Use this: https://github.com/suppayami/rmvxa-collection/blob/master/Skill Equip.rb
This seems like a pretty massive bug but I is Galv's Timed Atks, this is not issue in scripts themselves other than the fact this script seemings blocks...

FORCE.ACTIONS for actors, they don't work if you use a commonevent to trigger a second atk on a enemy target.

Found the fix, lol it literally just Eureka'd ME RIGHT AS I POSTED, I had an Empty Action#150 using the Force Action to avoid text box info but with this script thats no longer possible, thankfully I'd already got rid of those info boxes for using atks so I TRIED using the force action with the actual party member & it worked. Not a Fix for the issue just a work around.
EDIT NVM, this below code works but it wasn't what was triggering my bug issue, private select, actor not in party crash, if you add any conditional branch checking for an actor thats not in party you crash.

Modified Code that might solve some bugs.

#--------------------------------------------------------------------------
# alias method: skills
# Overwrite in Battle
#--------------------------------------------------------------------------
alias yes_skill_equip_skills skills
def skills
if $game_party.in_battle && !$game_troop.all_dead?
@equip_skills.select{|id|id != 0}.collect{|id|$data_skills[id]}+ yes_skill_equip_skills.select{|s|s.non_equip_skill}
else
(@skills | added_skills).sort.collect {|id| $data_skills[id] }
end
end
end # Game_Actor



NEW UPDATE THIS WORKED MORE OR LESS
BUT I DON'T KNOW WHY IT WORKS SO...
IT FIXED THE BATTLE TEST SOME HOW?
NOT ENTIRELY SURE IF THIS IS WORKING!
PRETTY MUCH THE ORGINAL CODE TOO.

#--------------------------------------------------------------------------
# new method: equip_skill
#--------------------------------------------------------------------------
def equip_skill(index, id)
return false unless skill_equippable?(id)
if @equip_skills.include?(id) && id != 0
@equip_skills[@equip_skills.index(id)] = @equip_skills[index]
end
@equip_skills[index] = id
end

#--------------------------------------------------------------------------
# new method: skill_equippable?
#--------------------------------------------------------------------------
def skill_equippable?(id)
return true
end

#--------------------------------------------------------------------------
# new method: equipped_skills
#--------------------------------------------------------------------------
def equipped_skills
@equip_skills.select{|id|id != 0}.collect{|id|$data_skills[id]}
end

#--------------------------------------------------------------------------
# alias method: skills
# Overwrite in Battle
#--------------------------------------------------------------------------
alias yes_skill_equip_skills skills
def skills
if $BTEST
return yes_skill_equip_skills
else
if $game_party.in_battle && !$game_troop.all_dead?
return equipped_skills + yes_skill_equip_skills.select{|s|s.non_equip_skill}
else
return yes_skill_equip_skills
end
end
end
end # Game_Actor

Original thread: https://forums.rpgmakerweb.com/threads/skill-equip.6727/