Need to remove entire inventory on death

Discussion in 'RPG Maker MV' started by Sacrifyx, Nov 18, 2019.

Thread Status:
Not open for further replies.
  1. Sacrifyx

    Sacrifyx Veteran Veteran

    Messages:
    53
    Likes Received:
    3
    First Language:
    english
    Hey all,
    I'm looking for a way to remove my character's inventory on death. Just take it and throw it into the void. I've got the gold part handled, but I'm not seeing a way to remove everything else. Conditional branches aren't ideal as the game is heavily loot dependent, I'd have 20 million branches to get everything off. Anyone know of a way to simply strip everything either through eventing or a plugin? There's only one player character in this project if that helps at all.
     
    #1
  2. M.I.A.

    M.I.A. Goofball Extraordinaire Veteran

    Messages:
    825
    Likes Received:
    624
    Location:
    Seattle
    First Language:
    English
    Set a conditional branched common event that's parallel to trigger upon character death..
    Then remove equipment from actor. Then you can remove all the items (one at a time) from the inventory.
    If you have hundreds of items, then this will take a while.. but if you have 30 or so, it's easily accomplished.
    [​IMG]
    Your list would carry so on and so on, for every obtainable item and every equipable slot, but hopefully you catch the drift.
    :)
    -MIA
     

    Attached Files:

    #2
    Sacrifyx likes this.
  3. MDZ

    MDZ Villager Member

    Messages:
    14
    Likes Received:
    9
    First Language:
    English
    Primarily Uses:
    RMMV
    I was getting ready to say that.
    A simple common even with change items for all items -x
    Would do the trick
     
    #3
    Sacrifyx likes this.
  4. ShadowDragon

    ShadowDragon Veteran Veteran

    Messages:
    972
    Likes Received:
    306
    Location:
    Netherlands
    First Language:
    Dutch
    Primarily Uses:
    RMMV
    you can wipe all items in the inventory by using this scriptcall

    $gameParty._items = {};
     
    #4
    Sacrifyx, ct_bolt and Eliaquim like this.
  5. Sacrifyx

    Sacrifyx Veteran Veteran

    Messages:
    53
    Likes Received:
    3
    First Language:
    english
    THAT is what I was looking for! Thanks so much!


    Edit: Doesn't seem to work, though...
     
    Last edited: Nov 19, 2019
    #5
  6. ShadowDragon

    ShadowDragon Veteran Veteran

    Messages:
    972
    Likes Received:
    306
    Location:
    Netherlands
    First Language:
    Dutch
    Primarily Uses:
    RMMV
    if { } dont work, try [ ], its one of those. but it will clear ALL items, items, equips, keyitems etc
     
    #6
  7. BK-tdm

    BK-tdm Manga Maker Veteran

    Messages:
    100
    Likes Received:
    82
    First Language:
    English
    Primarily Uses:
    RMMV
    You can also try Hime's multiple inventories, just set a common event that on death switches your inventory to a blank one.
    http://himeworks.com/2015/11/multiple-inventories/

    I dont remember if gold is removed but thats a simple 2 step process where variable= current gold, then current gold - variable
     
    #7
  8. Sacrifyx

    Sacrifyx Veteran Veteran

    Messages:
    53
    Likes Received:
    3
    First Language:
    english
    Neither { } nor [ ] are working. I'll look into Hime's plugin. I just need the inventory bit, the script call to remove gold is working just fine.

    Edit: Not really understanding Hime's plugin, a lot is left unexplained in the help section. I posted a question in the plugin thread about it, but considering it was last replied to like 2 years ago I'm not holding out much hope. I guess line by line it is.
     
    Last edited: Nov 20, 2019
    #8
  9. Sacrifyx

    Sacrifyx Veteran Veteran

    Messages:
    53
    Likes Received:
    3
    First Language:
    english
    Problem solved - took some additional searching, but I came across these two script calls:

    $gameActors.actor(1).clearEquipments();
    $gameParty.initAllItems();

    And those do the job.
     
    #9
  10. slimmmeiske2

    slimmmeiske2 Little Red Riding Hood Moderator

    Messages:
    5,749
    Likes Received:
    4,181
    Location:
    Belgium
    First Language:
    Dutch
    Primarily Uses:
    RMXP

    This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

     
    #10
Thread Status:
Not open for further replies.

Share This Page