Jump to content
Brosephus180

Shiggy Longer Item Description crash

Recommended Posts

Was able to figure it out. Figured I'd leave this fix here for anyone else having this problem.

 

Replace line 75 in the script with this:

Spoiler

    return process_cancel   if cancel_enabled?    && Input.trigger?(:B)

 

Share this post


Link to post
Share on other sites

I do. Looks like a copy and paste error.

 

Input.trigger?(: 

by itself does nothing. It makes Ruby throw a temper tantrum.

Input.trigger?(:B)

indicates that command button 'B' is part of the operation process, though technically, one could use any of the eight command buttons here (A/B/C/X/Y/Z/L/R) or even some of the function keys (F5-F9) as well as keys like Tab, Shift, Ctrl, and Alt (:TAB) (:SHIFT) (:CTRL) (:ALT).

What I find odd is the

if cancel_enabled?

part; since when is cancel something that gets disabled? My only encounter with this is in choice commands where the cancel button is opted to do squat, and that makes sense by design choice...(EDIT: I still don't get the part even after looking further into this)

Hmmm...well...at least one was able to figure it out, but one thing to be careful of is quick copy and paste techniques; you may miss something (I know, I've been there!) EDIT: Looks like @Shiggy was the one who made the copy and paste error. It happens! No one is perfect.

Edited by PhoenixSoul
Further Investigation

Share this post


Link to post
Share on other sites

Honestly, I'm more surprised that it wasn't mentionned before (it seems weird but it could have disappear during site migration). I can't seem to be able to edit the post so I will ask a moderator I suppose.
As for why I used

cancel_enabled?

It's because process_handle is a generic method from Window_Selectable and I wanted to make a new version of item for Window_ItemList

And because I was beginning at the time , I copy paste the process_handling code.

What you are supposed to do normally is this:

def process_handling
  super
  return process_description if Input.trigger?(:SHIFT)  #<===== change which button to press to show window
end

as a Ruby programmer (super calls the method with the same name from the supercalss)
or

alias longer_item_description_process_handling process_handling
def process_handling
  longer_item_description_process_handling
  return process_description if Input.trigger?(:SHIFT)  #<===== change which button to press to show window
end

 if you are making a RPG Maker script (the alias makes a copy of the current method, let's say another script situated above this one modify the method by adding a button for :CTRL , it would be overridden by the super way of doing but not by the alias way, so script maker should favor alias for script compatibilities)
 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×