PH - Warehouse/Storage

Discussion in 'JS Plugin Releases (RMMV)' started by PrimeHover, Nov 15, 2015.

  1. PrimeHover

    PrimeHover Veteran Veteran

    Messages:
    88
    Likes Received:
    143
    First Language:
    Portuguese

    [​IMG]


    Version 1.2.1


     


    Introduction

    • This plugin allows the creation of warehouses where you can store items in the game.
       

    License

    • This work is licensed under the Creative Commons Attribution 4.0 International License.
    •  To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/
    • However, if this plugin is very useful to your project, consider making a small donation using the link below:
      [​IMG]
       

    Configuration

    • Download the JS file and include it into the /plugins folder of your project.
    • Open the Plugin Manager, select the file PH_Warehouse.js, and turn it on.
    • Use plugin commands to create and manage any warehouse anywhere in the game.
       

    Full Documentation (How to Use, Examples, Configuration, Rule Commands...)


    Plugin Commands

    • PHWarehouse create <Title of the Warehouse>
      Creates a warehouse
       
    • PHWarehouse create <Title of the Warehouse:50>
      Creates a warehouse and sets its maximum capacity to 50
       
    • PHWarehouse create <Title of the Warehouse:50:rule_name>
      Creates a warehouse, sets its maximum capacity to 50 and sets a rule
       
    • PHWarehouse show <Title of the Warehouse>
      Shows a warehouse
       
    • PHWarehouse remove <Title of the Warehouse>
      Removes a warehouse
       
    • PHWarehouse loot item <Title of the Warehouse:id:quantity>
      Add an item for loot bonus inside a created warehouse
       
    • PHWarehouse loot weapon <Title of the Warehouse:id:quantity>
      Add a weapon for loot bonus inside a created warehouse
       
    • PHWarehouse loot armor <Title of the Warehouse:id:quantity>
      Add an armor for loot bonus inside a created warehouse
       
    • PHWarehouse loot keyItem <Title of the Warehouse:id:quantity>
      Add a key item for loot bonus inside a created warehouse
       
    • PHWarehouse add item <Title of the Warehouse:id:quantity>
      Add an item immediately inside a created warehouse
       
    • PHWarehouse add weapon <Title of the Warehouse:id:quantity>
      Add a weapon immediately inside a created warehouse
       
    • PHWarehouse add armor <Title of the Warehouse:id:quantity>
      Add an armor immediately inside a created warehouse
       
    • PHWarehouse add keyItem <Title of the Warehouse:id:quantity>
      Add a key item immediately inside a created warehouse
       
    • PHWarehouse capacity set <Title of the Warehouse:quantity>
      Set a new maximum capacity for a warehouse already created
       
    • PHWarehouse capacity increase <Title of the Warehouse:quantity>
      Increase the maximum capacity for a warehouse already created
       
    • PHWarehouse capacity decrease <Title of the Warehouse:quantity>
      Decrease the maximum capacity for a warehouse already created



    PS.: The difference between loot item and add item is that the loots are added to the warehouse and after the first show of that warehouse, loots cannot be inserted again and the commands will be ignored. If you use add item, it will add the item inside the warehouse anyway.
     
     
    Script Calls

    • PHPlugins.PHWarehouse.exist("Title of the Warehouse") 
      Verifies if a warehouse exists
       
    • PHPlugins.PHWarehouse.getMaxCapacity("Title of the Warehouse")
      Gets the maximum capacity of a warehouse
       
    • PHPlugins.PHWarehouse.getCurrentCapacity("Title of the Warehouse")
      Gets the current capacity of a warehouse
       
    • PHPlugins.PHWarehouse.hasItem("Title of the Warehouse", id)
      Verifies if a warehouse has a particular item and returns the quantity of this item inside the warehouse
       
    • PHPlugins.PHWarehouse.hasWeapon("Title of the Warehouse", id)
      Verifies if a warehouse has a particular weapon and returns the quantity of this item inside the warehouse
       
    • PHPlugins.PHWarehouse.hasArmor("Title of the Warehouse", id)
      Verifies if a warehouse has a particular armor and returns the quantity of this item inside the warehouse
       
    • PHPlugins.PHWarehouse.hasKeyItem("Title of the Warehouse", id)
      Verifies if a warehouse has a particular key item and returns the quantity of this item inside the warehouse



    Screenshots

    Spoiler




    [​IMG]
    [​IMG]
    [​IMG]


     Script


    Credits

    • PrimeHover
     
    Last edited by a moderator: Jun 17, 2016
    #1
  2. wrigty12

    wrigty12 Veteran Veteran

    Messages:
    533
    Likes Received:
    76
    First Language:
    English
    Awesome. However, I would love it if we could customize which Items listed in the ItemCategory list to display for storage, as I would not like the player to store key items, etc.
     
    #2
  3. PrimeHover

    PrimeHover Veteran Veteran

    Messages:
    88
    Likes Received:
    143
    First Language:
    Portuguese
    Got it!

    I can make those modifications, posting it in a next version!
     
    Last edited by a moderator: Nov 15, 2015
    #3
    RastaMan and wrigty12 like this.
  4. Joronjo

    Joronjo Veteran Veteran

    Messages:
    155
    Likes Received:
    29
    First Language:
    English Spanish
    I think you used the wrong description for your plugin
     
    #4
    PrimeHover likes this.
  5. PrimeHover

    PrimeHover Veteran Veteran

    Messages:
    88
    Likes Received:
    143
    First Language:
    Portuguese
    Sorry, I did not noticed. Corrected now!

    I used the same layout of the previous one and I ended up not changing the introduction.

    Thanks!
     
    #5
    RastaMan likes this.
  6. tsunetakaryu

    tsunetakaryu Veteran Veteran

    Messages:
    40
    Likes Received:
    28
    First Language:
    Chinese
    That's awesome. thanks for your plugin. 

    Edit:

    May I make some suggestion? You can use a note-tag to classify the mission items (or anything special) so that can't put into the chest. 

    And something like the TESV Skyrim, there are some loots already stored and can be found in the chest, so the player can loot by his/her want. 

    Thanks again. 
     
    Last edited by a moderator: Nov 15, 2015
    #6
    PrimeHover likes this.
  7. PrimeHover

    PrimeHover Veteran Veteran

    Messages:
    88
    Likes Received:
    143
    First Language:
    Portuguese
    Great ideas, I'll write this in my to-do list as well. Thanks!
     
    #7
    RastaMan likes this.
  8. estriole

    estriole Veteran Veteran

    Messages:
    1,030
    Likes Received:
    334
    First Language:
    indonesian
    how about notetags to specify what type of good can be stored...

    ex: fridge only can store food

    toolbox can only store tool

    weapon rack can only store weapon.
     
    #8
  9. Kuronokun

    Kuronokun Villager Member

    Messages:
    21
    Likes Received:
    2
    First Language:
    French
    Hello ! Thanks for your plugin. That's very usefull !

    What is the command to add directly an item in the chest ?

    Thanks.
     
    #9
  10. Ghost of Christmas Kloe

    Ghost of Christmas Kloe Ghost of a Princess Seagull Veteran

    Messages:
    1,504
    Likes Received:
    913
    Location:
    Somewhere...
    First Language:
    English
    Primarily Uses:
    N/A
    That would be AWESOME! Imagine hunting far and wide, across the lands, going on an epic quest, to find a fridge! (I should write that down, it'd make a good game)

    Anyway, jokes aside, I think this would be great! It'd be really useful and could help for customization. Also if we did get fridges and toolboxes etc, we could combine it with Estriole's [SIZE=11.7px]EST - BUILD AND DECOR EX  [/SIZE]to make the best thing ever! Imagine buying a fridge to put in your house to store food items!! It'd be magical!  :)   :)   :)   
     
    #10
  11. PrimeHover

    PrimeHover Veteran Veteran

    Messages:
    88
    Likes Received:
    143
    First Language:
    Portuguese
    I'm writing everything guys!

    It will be a major update this weekend! LOL.

    I have some tests in my college this week, but I'll launch a new version by Thursday or Friday.

    Thanks guys for helping the plugin to grow! You guys rock!
     
    #11
  12. Ghost of Christmas Kloe

    Ghost of Christmas Kloe Ghost of a Princess Seagull Veteran

    Messages:
    1,504
    Likes Received:
    913
    Location:
    Somewhere...
    First Language:
    English
    Primarily Uses:
    N/A
    No problem! You rock more!  :rock-left:   :rock-right:
     
    #12
    PrimeHover likes this.
  13. GetEquippedPsyko

    GetEquippedPsyko Villager Member

    Messages:
    8
    Likes Received:
    5
    Location:
    Canada
    First Language:
    English
    Just ran some quick tests with this, and I love it! However, I did notice something odd.

    Let's say you take an item, like a potion, and stick it in a specific chest (e.g. the name of the chest is "My Chest") If you then quit the game, start a new game, then that chest will still have those items in the chest, effectively allowing you to cheat/item duplicate/etc.

    Has anyone else run into this same issue? Maybe I'm just forgetting a step? Just trying to be helpful!

    Here's actually a video where you can see me do what I've described as above. I store 4 potions in the chest, and quit the game. I then start the game over again, store 5 potions this time, and when I access the chest, it has 9 potions in it instead of 5.

    https://www.youtube.com/watch?v=YDOuaswYgAE

     
     
    Last edited by a moderator: Nov 17, 2015
    #13
    PrimeHover likes this.
  14. PrimeHover

    PrimeHover Veteran Veteran

    Messages:
    88
    Likes Received:
    143
    First Language:
    Portuguese
    You got a major issue in the plugin!

    I just updated a new version of the plugin. Now, it is working correctly.

    Thanks for reporting, and enjoy the plugin!  ;)

    @edit

    This update just correct this minor bug fix, the other improvements will come in some days.

    Thank you all.
     
    Last edited by a moderator: Nov 17, 2015
    #14
  15. GetEquippedPsyko

    GetEquippedPsyko Villager Member

    Messages:
    8
    Likes Received:
    5
    Location:
    Canada
    First Language:
    English
    I can definitely confirm that the bug I reported is now patched and is working perfectly! Can't wait to see subsequent updates of this plugin, keep up the great work!
     
    #15
    Summer夏 and PrimeHover like this.
  16. tsunetakaryu

    tsunetakaryu Veteran Veteran

    Messages:
    40
    Likes Received:
    28
    First Language:
    Chinese
    But I strongly recommended that you keep this function as a optional.

    Since there are tons of game which allow us to play a new-game-plus (second round, third round, etc). The shared chest will make it possible to store the legendary armors and weapons across the saves, player can access the gears as soon as possible. 
     
    #16
    GreenDude and GetEquippedPsyko like this.
  17. GetEquippedPsyko

    GetEquippedPsyko Villager Member

    Messages:
    8
    Likes Received:
    5
    Location:
    Canada
    First Language:
    English
    I wholeheartedly agree with this. This would definitely be a popular feature if it could be implemented with a plugin command, or within the plugin controls or something.
     
    #17
  18. PrimeHover

    PrimeHover Veteran Veteran

    Messages:
    88
    Likes Received:
    143
    First Language:
    Portuguese
    Sure. Do you have an example of a plugin that makes it?

    Because it depends on which way the plugin is implemented.

    I say that because the process for loading a saved game in RMMV is separated from the process of creating a new game.

    So, if the plugin that allows a "new-game-plus" uses the same path for loading a saved game to generate the "new-game-plus", you will be safe, because my plugin will check that and retrieve the correct data. However, if the plugin creates a new way for loading the "new-game-plus", probably a little bit of work should be done in order to fix compatibility problems.
     
    Last edited by a moderator: Nov 17, 2015
    #18
    RastaMan likes this.
  19. tsunetakaryu

    tsunetakaryu Veteran Veteran

    Messages:
    40
    Likes Received:
    28
    First Language:
    Chinese
    Some plugin that allow to share some certain variable across the saves should be enough,

    or a plugin will write / read a new file (e.g. roundcount.ini *encrypted* ) to analysis the game's round number, so that it can be send to a certain variable. 

    I think it wouldn't be conflict with your plugin. It's a suggestion for something like the API. Leave a interface for further plugin to manger the round number. 

    And there is a way to prohibit the player try to copy items or gears.

    A new game will generate a unique code, while saving the game ( not matter if creating a new save file in different slot ), the code will be still a certain value, so that the chest can't share items or gears across those saves. 

    Then the game go to a new-game-plus, it should be two start: inherit the old save, or a very-new start. Both with a new-game-plus flag (NGP flag in short). Finally there's a table: 

    Same Unique Code + No NGP Flag -> disable share

    Same Unique Code + With NGP Flag -> enable share

    Different Unique Code + No NGP Flag -> enable share

    Different Unique Code + With NGP Flag -> enable share

    So the Unique Code (or something like that but more convenient) is the matter what you should do, NGP Flag, however, reserve this interface for other plugin to manager that, you can set a number as 0 by default since it seems there's no this plugin yet. 

    I hope my word could make sense, sorry for my troubles. 
     
    #19
  20. PrimeHover

    PrimeHover Veteran Veteran

    Messages:
    88
    Likes Received:
    143
    First Language:
    Portuguese
    @tsunetakaryu

    Ok! I Got your idea now! So that would be a path for sharing information among saves. That's interesting!

    In fact, there is an easy to do this, if a NGP plugin wants to implement that.

    When the old-game is retrieved, it will be an specific variable that has access to public methods in my plugin, allowing third-party libraries extends and overload methods; therefore, loading other warehouse saves.

    But to make sure this will be easy, I'll write some documentation about it in the next version.

    Thanks again!
     
    #20
    RastaMan likes this.

Share This Page