ProcraftyNation's Weight Limit with Yanfly's Item Discard not updating weight.

Discussion in 'Javascript/Plugin Support' started by Br0wnSyndrome, Jan 28, 2018.

  1. Br0wnSyndrome

    Br0wnSyndrome Drunk Programmer Member

    Messages:
    18
    Likes Received:
    10
    Location:
    Canada
    First Language:
    English
    Primarily Uses:
    RMMV
    The functionality is all there, as the item does get discarded, but the weight doesn't decrease instantly.
    The updated weight is only shown when the scene is closed and re-opened.
    Any way I could make it update instantaneously, without having to close and reopen the scene?
    upload_2018-1-27_15-3-50.png
    upload_2018-1-27_15-5-58.png

    Any help for updating the "weight", even if its done within the actual .js files would be appreciated!
     

    Attached Files:

    #1
    Sauteed_Onion likes this.
  2. Llareian

    Llareian Jack of All Trades, Master of None Veteran

    Messages:
    603
    Likes Received:
    1,400
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    I would love to help with this, but I can't find ProcraftyNation's Weight Limit plugin. (The link from the forum page does not work.) Do you have a current link to a new ProcraftyNation site for this?

    It should be a simple fix of putting a window refresh into Yanfly's Item Discard in the function Scene_Item.prototype.performDiscardItem. Without seeing ProcraftyNation's plugin, I'm not sure which window to refresh.
     
    #2
  3. Br0wnSyndrome

    Br0wnSyndrome Drunk Programmer Member

    Messages:
    18
    Likes Received:
    10
    Location:
    Canada
    First Language:
    English
    Primarily Uses:
    RMMV
  4. Llareian

    Llareian Jack of All Trades, Master of None Veteran

    Messages:
    603
    Likes Received:
    1,400
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    Okay, I tested this with only YEP_ItemCore, YEP_X_ItemDiscard, and DEX_WeightLimit, and it worked in a blank project, regardless of if Weight Limit was above or below the Yanfly plugins in the Plugin Manager. (Though I noticed even before fixing that it looks nicer if Weight Limit is below the Yanfly plugins.)

    In the YEP_X_ItemDiscard.js file, open it in your favorite text or code editor and look for "Scene_Item.prototype.performDiscardItem". The first line of the function reads "$gameParty.loseItem(item, quantity);". Add a new line below that (above the "if" statement) and type the following:
    Code:
    this._weightLimitWindow.refresh();
    That should get you sorted out. If not, please provide your whole plugin list (a screenshot is preferred).
     
    #4
    Kike likes this.
  5. beibs

    beibs Warper Member

    Messages:
    2
    Likes Received:
    0
    First Language:
    Portugues
    Hi,

    I'm having some problems with your plugin.

    If I add items to the storage using the mouse, I can add them and remove them without problems.
    Now, if I go by the keyboard by adding one at a time, it hangs at 10 and does not add any more. Items not added are removed.
     
    #5

Share This Page