RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Grid Inventory 1.0f

0 Members and 1 Guest are viewing this topic.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Grid Inventory
Version: 1.0f
Author: modern algebra
Date: August 22, 2010

Version History


  • <Version 1.0f> 08.22.2010 - A bug fix with regard to non-consumable items becoming unusable after one use
  • <Version 1.0e> 06.16.2010 - A bug fix with regard to selling items within a non-lead actor's inventory
  • <Version 1.0d> 05.22.2010 - Several bug fixes, including the bug when opening loot after battle
  • <Version 1.0b> 08.03.2009 - Several Bug Fixes including disappearing items when unequipping, and a false disabling of the Unequip option occasionally. Also, a game crashing bug would occur when trying to draw the capacity stats of an inventory. If that problem occurs to you, redownload the script.
  • <Version 1.0> 07.31.2009 - Original Release

Description


  This script does multiple things. First: it gives each actor their own inventory. Second: that inventory is displayed through a grid, with each item taking up a specific amount of squares. How many squares is completely customizable for each and every item.

  You are also able to set a maximum number of instances of that item each slot can hold. This means that for each item, say for instance, arrows, you can define how many arrows could fit into one displayed slot of arrows. See the demo for clarification.

  You can also set a picture graphic for each item, though if you do not it will default to using the item's icon. Beyond that, you can easily set up permanent storage events, each of which are easy to set up and save what items are stored in them at any given time. When received, items will be automatically distributed amongst the party in order, meaning that they will be given to the first party member, then the second once the first party member's inventory is full, and so on. If, upon gaining an item, you cannot fit that item or items into the party member's inventories, it will call up a loot inventory and the player can decide which items to discard and which to keep. As well, you can customize the size of each actor's inventory and you can modify that at any time with a simple script call.

  A good system to compare this to is the system from Betrayal at Krondor, as that is what it was based on, but as that is not very well known, this system is similar to the item system of the Diablo series.

Features

  • Actors have individual inventories that are based on a grid system, much like Betrayal at Krondor
  • Items can be assigned a width and height, as well as a maximum stack size
  • You can use Item Graphics created by grafikal or create your own, and you can also set the hue so that the same graphic can be used for multiple items
  • Has a full Information screen that allows the player to see the actual stats of an item
  • You can Use, Equip, Unequip, Transfer, Discard, and Move items around all from the Inventory. The player has full control over his inventories.
  • You can create permanent storage items to hold the party's items and give them new ones
  • If the party gains too many items, it will automatically open a loot inventory as a temporary inventory until all the items can be arranged

Screenshots


The options when selecting an item in an actor's inventory


The options when selecting an item in Loot


The options when selecting a blank space in an actor's inventory


The Information Screen

Instructions
All of the item setup is done in the Notes box of the item you are setting up. There are six commands you can use:
     \width[integer]
       integer : any positive integer. This represents how many squares the item requires horizontally

     \height[integer]
       integer : any positive integer. This represents how many squares the item requires vertically

     \maxstack[integer]
       integer : any positive integer. This represents how many of the same item can occupy the same space before a new slot for the item has to be created.

     \picture[filename]
       filename : a name of a picture file in the Inventory folder. This will be the picture of the item in the inventory. if you don't set a picture, it will use the icon of the item instead.

     \picture_hue[integer]
       integer : any positive or negative integer. This allows you to change the hue of the picture used.

      \nondiscard
        this option sets the item as undiscardable through the inventory scene. Bear in mind that it does not prevent the player from storing the item, and if the item is in Loot, then it can still be destroyed.

     \colour[red, green, blue, alpha]
       this option allows you to give any item a unique colour, and not just the default colour for its type. The arguments to pass are self-explanatory. alpha for the default colours is 160.

    To open a storage unit, you can simply use this code in a call script:

      open_storage (storage_id[, items[, name[, icon[, size]]]])
        storage_id : the ID of the storage box to open
        items      : the items array, each entry: [type, id, amount]     
        name       : the name of the storage box being opened 
        icon       : the name of the bitmap associated with this storage item
        size       : the size array for this item => [width, height]

   items, name, icon, and size can be excluded when opening the storage and the storage will start with default settings. Further, they are only valid the very first time the storage is accessed. Thus, if you set up items to have three items in it, the only time those will be added is the first time the storage has been opened. If you wish to add items to the storage after having opened it, then you must use the command:

      add_to_storage (storage_id, items)
        storage_id : the ID of the storage box to open
        items      : the items array, each entry: [type, id, amount] 

    You can also resize inventories with the commands:

      resize_actor_inventory (actor_id, width, height)
        actor_id      : the actor whose inventory is to be resized 
        width, height : the new size parameters for the inventory
     
      resize_storage_inventory (storage_id, width, height)
        storage_id    : the actor whose inventory is to be resized
        width, height : the new size parameters for the inventory

      resize_loot_inventory (width, height)
        width, height : the new size parameters for the inventory

If you want a specific actor to receive an item, you can use this code in a call script:

  actor_gain_item (actor_id, item_type, item_id, amount)
    actor_id : ID of actor to receive item
    item_type : 0 => Item, 1 => Weapon, 2 => Armor
    item_id     : Id of item
    amount : the amount of that item to receive.

For the system and vocabulary settings, please see the editable regions at lines 107, 167, and 904

Script


See the Attached Text Document

It is recommended, however, that you retrieve the script from the demo as that way you can see how it works.

Note that this script REQUIRES the Paragraph Formatter and the Bitmap Addons script is RECOMMENDED. Both can be retrieved from the demo.

Credit


  • modern algebra
  • grafikal, if you use the item graphics included with this script

Thanks

  • Zeriab, for his table-debuggging script and for his help with the paragraph formatter

Support


Please post here in this topic if you encounter any bugs at all

Known Compatibility Issues

Spoiler for Tankentai ATB + Grid Inventory Compatibility:
Thanks to Mr. Bubble for making these scripts compatible. Just follow the directions he gives here:
[T]his script can be made compatible with the Tankentai ATB with technically one change.

On line 3215, find this line:

Code: [Select]
@item_window.ma_inventory = @active_battler.inventory

Replace that line with this:

Code: [Select]
if $imported != nil && $imported["TankentaiATB"]
  @item_window.ma_inventory = @commander.inventory
else
  @item_window.ma_inventory = @active_battler.inventory
end

It'll work with the latest version of the ATB. This is not needed without ATB.


Spoiler for Composite Characters + Grid Inventory Compatibility Patch:
Equipment does not refresh upon exiting the Inventory, so this patch fixes that. Place it in its own section below the Grid Inventory script, but still above Main.

Code: [Select]
#==============================================================================
#  Composite Characters + Grid Inventory Compatibility Patch
#  Author: modern algebra
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Instructions:
#    Place this in its own slot beneath the Grid Inventory script
#==============================================================================
# ** Scene GridInventory
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased method - return_scene
#==============================================================================

class Scene_GridInventory
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Return Scene
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias monalg_compchar_gridinry_ptch_rtrnscn_2jj3 return_scene
  def return_scene (*args)
    # Run Original Method
    monalg_compchar_gridinry_ptch_rtrnscn_2jj3 (*args)
    $game_player.refresh
  end
end

Spoiler for ziifee's WGB + Grid Inventory Patch:

An error will popup in battle if you are using the Wait-Guage battle. The code below fixes that error. Just place the Grid Inventory script into a slot BELOW ziifee's scripts and then put the following code in its own slot BELOW Grid Inventory.

Code: [Select]
#==============================================================================
#    Grid Inventory + ziifee's WGB Compatibility Patch
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Instructions:
#
#    Place Grid Inventory below ziifee's scripts and this patch beneath the
#   Grid Inventory
#==============================================================================

#==============================================================================
# ** Scene Battle
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    overwritten method - start_item_selection
#==============================================================================

class Scene_Battle
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Start Item Selection
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def start_item_selection (*args)
    # Run Original Method
    modalr_invgrid_slctitm_windo_4h21 (*args)
    return unless  ModernAlgebra::GI_PERSONAL_ITEM_USE
    # Setup inventory
    @item_window.ma_inventory = @select_battler.inventory
    @item_window.refresh
  end
end

I imagine it would have some problems with exotic CMSes and scripts that alter Equip and Item significantly. Note that it is possible to not hide the Item and Equip scenes, if that is something you require.

It ought to work with Scene Menu REDUX as long as it is UNDER the Scene Menu Redux Script and all other scripts that utilize the Scene Menu REDUX. It should not need to be setup - it should work as soon as it is plugged in.

Though I have not tested them, it should work with KGC Custom Commands as long as you follow the same directions as for Scene Menu REDUX

I imagine it will have menu problems with my Quest Journal and my Integrated Reserve Party if you choose to hide Item and Equip, so I will be writing compatibility patches for both those scripts eventually.

Please put it Above Main but below any other custom scripts you have.

Demo


Grid Inventory System Attached

Author's Notes


I wrote this script for RMXP a long long time ago and it was riddled with bugs. I then decided to rewrite it, but VX came out and it slipped away from me, so I was left with a half-finished version of this script for XP. When I tried to go back to it, I found it hard to figure out what I was doing, and so I thought it might be a good idea to convert what I had to VX and that way I would figure out what I had done and do something productive in the process. So that is where we are now - I don't expect it to be bug-free, but I am committed to resolving any bugs you might find, so please please please report them to me! I am not taking another two years before this script finally comes out.


Creative Commons License
This script by modern algebra is licensed under a Creative Commons Attribution-Non-Commercial-Share Alike 2.5 Canada License.
« Last Edit: May 08, 2011, 01:56:12 AM by modern algebra »

********
Resource Artist
Rep:
Level 94
\\\\\
Project of the Month winner for June 2009
Hah! this is so awesome. I totally expected this in XP first, but this is great :)

**
Rep:
Level 84
DUDE! Thank you SO MUCH!
Although i am a bit confused about the grid stuff, i love the in individual inventory thing!
THANK YOU!
now my EarthBound game is complete!

You my good friend will get a special Thank You spot in the credits!

********
Resource Artist
Rep:
Level 94
\\\\\
Project of the Month winner for June 2009
Lol, dude he has another Inventory script without the grid here as well.

**
Rep:
Level 83
Apprentice Mapper
  is it possible to use this without knowing any scripting? it looks perfect for almost every game!
Im a RPG Maker Vetren, ive used 2K, 2K3, RMXP, and RMVX, I have my likes and dislikes with them all.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Yeah, it's possible to use it without knowing how to script. Just put it in the game and it's practically plug & play. Items are set up through notes boxes.

@grafikal - I have another Inventory script, but it doesn't have individual inventories for actors :(

**
Rep:
Level 83
Apprentice Mapper
i hate to be the newb of the conversation but how do i do that exactly?
Im a RPG Maker Vetren, ive used 2K, 2K3, RMXP, and RMVX, I have my likes and dislikes with them all.

********
Resource Artist
Rep:
Level 94
\\\\\
Project of the Month winner for June 2009
@grafikal - I have another Inventory script, but it doesn't have individual inventories for actors :(

THIS CAN DO INDIVIDUAL ACTORS? O_o

Edit: Oh well, duh, I guess it should since it does make more sense the way the inventory is set up lol

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Quote from: Instructions
All of the item setup is done in the Notes box of the item you are setting up. There are six commands you can use:
     \width[integer]
       integer : any positive integer. This represents how many squares the item requires horizontally

     \height[integer]
       integer : any positive integer. This represents how many squares the item requires vertically

     \maxstack[integer]
       integer : any positive integer. This represents how many of the same item can occupy the same space before a new slot for the item has to be created.

     \picture[filename]
       filename : a name of a picture file in the Inventory folder. This will be the picture of the item in the inventory. if you don't set a picture, it will use the icon of the item instead.

     \picture_hue[integer]
       integer : any positive or negative integer. This allows you to change the hue of the picture used.

      \nondiscard
        this option sets the item as undiscardable through the inventory scene. Bear in mind that it does not prevent the player from storing the item, and if the item is in Loot, then it can still be destroyed.


*
Rep: +0/-0Level 83
Reckon u could add Gemming into the script, for example in item description show a box 2x2 aquares and when u buy a gem it adds benefits,
First gem for example could be a green 1 , appears in the first box and adds 5% bonus to all stats , and a red one as the seocund with a further 15% stat bonus? and the cost goes up after each gem as well, just something to work on if u want i reckon it would be a handy idea :)

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Yeah, a socketing system like in Diablo is nice; I might add one in the future, but not right now. I am also thinking of adding inventoried items (so like, you could buy a quiver which takes up 1x3, but then you can open it up and it has 2x3 slots, but the only thing that can be added to it are arrow items).

However, I am taking a break from this script for a while and only fixing bugs that people discover. In a bit, I will consider adding those extra features.

**
Rep:
Level 83
Apprentice Mapper
you are a genius!
Im a RPG Maker Vetren, ive used 2K, 2K3, RMXP, and RMVX, I have my likes and dislikes with them all.

**
Rep: +0/-0Level 83
greetings i love your scripts! been checking out a few lately, i just tried to paste the two required scripts into my game and got this error:

Script 'Grid Inventory 1.0' Line 954: NoMethodError occurred. undefined method 'lose_item for nil:NillClass

--------------

im trying to read through your post to make sure i didnt miss anything, line 954 is:

        n = @inventory.lose_item (type, id, 1)

--------------

so far i see no instructions detailing if i need to adjust anything inside the script, they look optional.. *goes to look again*


---------------------- edit!! ---------------

i have another script called Item/Equipment/Skill Conditions which i believe is also by you, Modern Algebra, and when i removed it, the grid thing works , so im guessing thats why =) cant really see how they are interfering with each other, i'll have to sit here and scan through the scripts

========== edit #2- ==============

unequip bug:

when inventory is empty and you unequip, lets say, longsword appears in a blank space on the upper left, but the menu that says "unequip" and "optimize" is still open. if you select unequip again, the second item you choose to unequip replaces the first (the sword that was there, was overwritten by the shield i selected, making my sword disappear). i hope that made sense. basically the unequip menu needs to be terminated after one action to avoid destroying items?
« Last Edit: August 02, 2009, 10:05:11 PM by Eruvis »

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
For the first one - I can see why they would interfere. Try placing the Grid Inventory BELOW the Item/Equipment/Skill Conditions script and see if it works. Keep it above Main though.

For the second - yeah, that was an oversight on my part. Version 1.0b will fix that problem and be released momentarily.

**
Rep: +0/-0Level 83
hmm i tried my best, put the other script above, below, both crash. i also tried putting it in your demo for the grid inventory just to make sure i had nothing else interfering with it and no dice. once again above and below. and ideas? if u have the time to toss the script in your demo of the grid and figure out how to get it to work just by placement that would be cool. its your equipment constraints script =) both very good

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
First things first, 1.0b has been up for a while, and so you can get rid of the error you reported by downloading that. Please do.

OK, I haven't tested it any further, but you can get rid of the error in this way:

You can initialize the inventory before calling setup in Game_Actor;

so, at about line 936 of the Grid Inventory, you'll see:

Code: [Select]
   modalg_grid_invtry_init_inventory_w0275 (actor_id)
    icon = ModernAlgebra::GI_DEFAULT_INVENTORY_ICON
    case actor_id
    #\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    #  EDITABLE REGION
    #``````````````````````````````````````````````````````````````````````
    #    Here you can set individual icons for the inventories of actors,
    #   if desired. Just set it up as follows:
    #
    #       when <actor_id>
    #         icon = <integer>
    #
    #    EXAMPLE:
    #
    #       when 1
    #         icon = 50
    #
    #   would mean that actor 1's inventory (Ralph, by default), would show
    #  icon 50 next to the name of the inventory.
    #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
    when 1
      icon = 50
    #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
    #  END EDITABLE REGION
    #//////////////////////////////////////////////////////////////////////
    end
    @inventory = Game_InventoryGrid.new (actor_id, icon)

Make it:

Code: [Select]

    icon = ModernAlgebra::GI_DEFAULT_INVENTORY_ICON
    case actor_id
    #\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    #  EDITABLE REGION
    #``````````````````````````````````````````````````````````````````````
    #    Here you can set individual icons for the inventories of actors,
    #   if desired. Just set it up as follows:
    #
    #       when <actor_id>
    #         icon = <integer>
    #
    #    EXAMPLE:
    #
    #       when 1
    #         icon = 50
    #
    #   would mean that actor 1's inventory (Ralph, by default), would show
    #  icon 50 next to the name of the inventory.
    #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
    when 1
      icon = 50
    #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
    #  END EDITABLE REGION
    #//////////////////////////////////////////////////////////////////////
    end
    @inventory = Game_InventoryGrid.new (actor_id, icon)
    modalg_grid_invtry_init_inventory_w0275 (actor_id)


Also, it was brought to my attention that the Composite Characters script would not refresh the actor graphic after changing equipment in the Inventory Scene. I have added a patch under Known Compatibility Issues that fixes that problem.
« Last Edit: August 03, 2009, 11:46:23 PM by modern algebra »

**
Rep: +0/-0Level 83
woot! you are awesome it works , both scripts now love each other. by just moving that one line so that you initialise inventory before calling Game_Actor? wow... i'll be trying to learn these things with time. by the way, have you ever payed ultima underworld? on PC? very old game, has similar inventory system. besides having backpacks inside of one another and arrow quivers etc that have been mentioned as possible updates, the npc's also have inventories and you can trade with them. im pretty sure its possible starting from what you have made. there is some A.I involved in terms of :

each npc has a race and each race has certain likes and dislikes, for example, if you trade a viking, you can barter almost anything they have for gold, but lizardmen like gems, so you might be able to trade 1 coin for 1 gem on a viking, but not possible for the same trade on a lizardman. it would involve making an interface and all that but, from what i see, the two chests in your demo have their own inventory, which you can remove and place items into (placing possible? i have to check again) so each npc would likewise have an inventory that acts as the chest, plus A.I and an interface.

try the game if you have not yet and keep up the great work.

**
Rep:
Level 84
hey i finally got around to implementing the script into the game.
But i have got an error screen. You see im using Woranata's Neo Menu script and the Grid Inventory script and the other have compatibility issues. Could you please make a patch for that? I really need this menu script...

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
To be honest, I've never heard of the Neo Menu System. Is it the same as Lite Menu?

Whatever the case, try putting the Grid Inventory script in a slot BELOW the Menu System in the script editor, but keep it above Main. If they still don't work together, then please link me to the menu script you are using and I will see what I can do.

**
Rep:
Level 84
LOL woops yeah i ment the Lite Menu system!

Well i did what u said and it work except now the menu is at the Top left and the menu options are lined from top to bottom..

How do i put them in the original position and order? which is the window is in the center and the menu items are 3 on each side...

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Yeah, I can see where that might become a problem.

Go to about line 3323 and you should see this:

Code: [Select]
    @magi_equip_index = c.index (Vocab::equip) if ModernAlgebra::GI_MENU_HIDE_EQUIP && c.include? (Vocab::equip)
    @magi_item_index = c.index (Vocab::item) if ModernAlgebra::GI_MENU_HIDE_ITEM && c.include? (Vocab::item)
    c.delete (Vocab::equip) if ModernAlgebra::GI_MENU_HIDE_EQUIP
    c.delete (Vocab::item) if ModernAlgebra::GI_MENU_HIDE_ITEM
    # Add Grid Inventory Command
    c.insert (ModernAlgebra::GI_MENU_INDEX, Vocab::GI_INVENTORY_LABEL)
    @command_window = @command_window.class.new(width, c)
    if @ma_correct_index
      @command_window.index = @menu_index
    else
      @command_window.ma_temp_index = @menu_index
    end

Change it so that it looks like this:

Code: [Select]
    @magi_equip_index = c.index (Vocab::equip) if ModernAlgebra::GI_MENU_HIDE_EQUIP && c.include? (Vocab::equip)
    @magi_item_index = c.index (Vocab::item) if ModernAlgebra::GI_MENU_HIDE_ITEM && c.include? (Vocab::item)
    c.delete (Vocab::equip) if ModernAlgebra::GI_MENU_HIDE_EQUIP
    c.delete (Vocab::item) if ModernAlgebra::GI_MENU_HIDE_ITEM
    # Add Grid Inventory Command
    c.insert (ModernAlgebra::GI_MENU_INDEX, Vocab::GI_INVENTORY_LABEL)
    @command_window = @command_window.class.new(width, c, 2, 3)
    @command_window.x = (554 /2) - (@command_window.width/2) #167
    @command_window.y = Wor_Litemenu::MENU_WINDOW_Y
    if @ma_correct_index
      @command_window.index = @menu_index
    else
      @command_window.ma_temp_index = @menu_index
    end

**
Rep:
Level 84
Um... u sure dude?
cuz there isn't even a line 3323 on my script...


Edit:
I found it! it works great Thanks man!
the Line is 3223.
« Last Edit: August 05, 2009, 11:02:01 PM by Zero2008 »

*
Rep:
Level 94
2012 Most Attractive Male MemberSecret Santa 2012 ParticipantProject of the Month winner for June 20092010 Best Counsel
I think MA is secretly working on Diablo 3, and not telling anyone about it. This is a really cool script.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
haha, thanks Holk. I'm pretty sure I'd have to be a damn good con artist though, to get a job at Blizzard :P

**
Rep:
Level 84
LOL anyways I found an error in ur script MA
When i tried giving a weapon to another person i would get an error window.
The window said:

 Line 1879: No Method Error Occurred
 Undefined method 'each' for nil: NilClass.

Here is the Line:

@placements.each { |slot| count -= (slot.rect.width*slot.rect.height) }

I hope i gave you everything you need to fix it!



*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Ugh, yeah. Thanks for reporting that. I hate it when I leave errors like that.

Replace @placements with @inventory.placements and it should be fine. It should look like this:

Code: [Select]
@inventory.placements.each { |slot| count -= (slot.rect.width*slot.rect.height) }

Though, are you still using 1.0 and not 1.0b? That line should be around 1987, not 1879.

Unless you deleted the header, which you absolutely should not do.


EDIT::

Script is now updated. It still says 1.0b but it shouldn't - it should be 1.0c since I updated the above line in the script. But I'm too lazy to release another version just to change the letter. Point is, if you got this script before I made this post, you will need to redownload the script.
« Last Edit: August 06, 2009, 04:00:40 AM by modern algebra »

**
Rep:
Level 84
Does that include me?
Did u make a change so big that it's worth changing or did u just fix it up and post the fixed script?
just wanna be safe LOL!

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
The only change I made is the one in my previous post. I changed @placements to @inventory.placements. If you do that manually then there is no reason to redownload the script.

**
Rep:
Level 84
Cool then. Okay now i have just one last suggestion for your script.
When you go and buy items the item just goes to the person that has a slot open.
What it should let you do is choose the person that u want to hold the newly bought item. And if the person has a full inventory then it should give u either a sound effect or give you a message telling you that the inventory is full.

What do you think?

i think it would be good cuz then you wont have to  sort through the items one by one deciding who will have what because they will have it from the start cuz u bought it for them.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
It's not a bad idea, but I'd have to add things to Scene Shop, which would make it incompatible with a lot more scripts. It's not really worth the effort I don't think.

Maybe I will do it in the future, but not for a long long time if ever.

**
Rep:
Level 84
LOL! fair enough!
Still a great script though!
Again thanks i really needed it!

**
Rep:
Level 84
Um I have a question, i tried opening the storage box but i keep getting syntax errors.
Could i maybe get an example of how to do it?

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Do you get errors opening the storage box in the demo? The red and green chests are both examples of a storage box.

 You can look at those events for examples on how to setup storage boxes.

In text, it's something like this:

Code: [Select]
potion = [0, 1, 4]
spear = [1, 3, 1]
shield = [2, 1, 1]
items = [potion, spear, shield]
open_storage (0, items, "Red Chest", 79)

But you have to make sure that none of the lines go over the limit and onto a new line.

The best way to do it is to not use such long names like potion, spear, etc... and instead use something like this:

Code: [Select]
a = [0, 1, 4]
b = [1, 3, 1]
c = [2, 1, 1]
items = [a,b,c]
name = "Red Chest"
open_storage (0, items, name, 79)
« Last Edit: August 15, 2009, 06:52:01 PM by modern algebra »

**
Rep:
Level 84
Umm...
Yeah im still a little confused.

I just want to make a big storage box where I can store or withdraw any item that was previously stored.
Could i get a code for that? i can't seem to figure out how to do that... ???

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Code: [Select]
open_storage (0, [], "Chest", 79)


That's it. If you have other storage units, then you need to change the 0 to whatever index you want this storage chest to have.


**
Rep:
Level 84
Awesome now i can open it. Thanks, but i want the actor to be able to take his or her own items and add them to the storage unit. I tried the add to storage Script tage but it won't work for some reason, what code or codes do i need to do that.
Also is there a code that is able to increase the size of the storage unit?

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
You just scroll to an actor by pressing Q or W and once in those inventories, you can add to the inventory by clicking on an item and going down to store.

*
Rep: +0/-0Level 83
Alright I just downloaded this, and pasted the script Into a blank map of my own (along with the other two scripts you said were needed/recommended). I created my own item, made an inventory folder just like on your game and put my item in there and had everything set up exactly as in your game as far as my item.

Now when I first start the game, If I open my inventory, everything is fine. If I try to open my inventory after I have placed my item in it, It gives me this error:

Script 'Grid Inventory' line 1837: RGSSError Occured
disposed bitmap

I checked line 1837 and it says  "contents.font.size = default_font_size"

What am I doing wrong?

**
Rep:
Level 84
Oh... i did not see that anywhere dude. Thanks!
But the Storage inventory is a tad bit too small. I tried the resize script call but its not working...
here is what i used:

resize_storage_inventory (0, 10, 10)

I don't understand why it doesn't work...
What did i do wrong?

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Is 0 the correct index for that storage unit?

NM, there was a mistake in the code. Go to about line 1053 and change:

Code: [Select]
   $game_system.open_storage (id).resize_grid (width, height)

to:

Code: [Select]
   $game_system.open_storage (storage_id).resize_grid (width, height)

Also, note that you could set the size directly when first opening a storage inventory by adding that to the call when the chest is first opened. SO:

Code: [Select]
open_storage (0, [], "Chest", 79, [10, 10])

Would make the storage unit 10x10

Also note that the number 79 is the icon for the chest. Chances are you don't want that icon though, so you should change it.
« Last Edit: August 16, 2009, 03:04:56 PM by modern algebra »

**
Rep:
Level 84
Wow thanks dude!
Also for me the line was 945 for those who can't find the line exactly!

thanks again man!

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Did you delete the header of the script? It's 108 lines, which might explain why it's different. In any case, you really shouldn't do that. Put the header back in the script. It has all the instructions.

**
Rep: +0/-0Level 83
Hi there,
I decided to try you grid script since you told me (about limited inventory script) that this grod script was a bit like what I sought.
I tried it, loved it as suspected until I tested a fight.
I get an error wich maybe you could help me for.
Know that I use ziifee's wait gauge script, but oddly it never made any error occur with your limited inventory script.
The error message was Script 'Grid inventory 1.0' line 3201:noMethodError occured
undefined method 'inventory' for nil:nil Class

I know nothing in scripting at all, but I feel it might be easily repaired. Otherwise it seems I'll have to stick with the basic default inventory system (unless anyone manage to figure what's happenning or you repair the bug I mentioned earlier about your limited inventory script).


Yeah, I cannot discard ziifee's battle system it is quite nice indeed.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Hmm, well try putting the Grid Inventory Script below all other custom scripts you have (but still above Main) and see if that works.

**
Rep: +0/-0Level 83
Hmm, well try putting the Grid Inventory Script below all other custom scripts you have (but still above Main) and see if that works.

Hmmm, same type of error. Unlike my previous test, I tried an actual ingame fight rather than a test from database. Error message is still linked to line 3202, but is related to ennemies it seems:

undefined method 'inventory' for #<game_ennemy:0x12b7070>

Maybe it helps to discover the origin of the error and a way to help me repair it?

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Does ziifee's battle system allow enemies to use items? I think that is where the problem is originating from.

Around where the error is, you should see:
Code: [Select]

  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Start Item Selection
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalr_invgrid_slctitm_windo_4h21 start_item_selection
  def start_item_selection (*args)
    # Run Original Method
    modalr_invgrid_slctitm_windo_4h21 (*args)
    return unless  ModernAlgebra::GI_PERSONAL_ITEM_USE
    # Setup inventory
    @item_window.ma_inventory = @active_battler.inventory
    @item_window.refresh
  end

Replace it with:

Code: [Select]

  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Start Item Selection
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalr_invgrid_slctitm_windo_4h21 start_item_selection
  def start_item_selection (*args)
    # Run Original Method
    modalr_invgrid_slctitm_windo_4h21 (*args)
    return unless  ModernAlgebra::GI_PERSONAL_ITEM_USE || !@active_battler.actor?
    # Setup inventory
    @item_window.ma_inventory = @active_battler.inventory
    @item_window.refresh
  end

The only difference is that it checks if the active battler is an enemy or not and doesn't proceed if it isn't an actor.

Hopefully, that will resolve the issue. Tell me if it doesn't

**
Rep: +0/-0Level 83
Man I really hoped it would clear everything, but the same error occurs... ...well, strangely, sometimes it is about the same error message I last showed you and sometimes the first one (with the 'nil' word instead)

Dunno if Ziifee's script allows ennemies using items.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Can you give me the complete error messages. Like the last one and include the line number. Copy it completely.

**
Rep: +0/-0Level 83
There you go (battle test from database VS succubus):

message 1:
Script 'Grid inventory 1.0' line 3202: NoMethod error occured
undefined method 'inventory' for #<Game_ennemy: 0x1327780>

message 2:
Script 'Grid inventory 1.0' line 3202: NoMethod error occured
undefined method 'inventory' for nil:NilClass

I am not too sure what affects what message is shown, but according to my tests, it seems it depends if the ennemy is attacking/acting or not before I select the inventory command. Not sure tho...



« Last Edit: September 03, 2009, 04:55:47 PM by adamass »

**
Rep: +0/-0Level 83
Why, you know I'd send you ziifee's demo so that you could check upon it if you desire so, but I ain't sure it's a good Idea to post it here. Maybe that would help you in your search for a solution  :-\

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Alright, try replacing that same section of the script with:

Code: [Select]
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Start Item Selection
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalr_invgrid_slctitm_windo_4h21 start_item_selection
  def start_item_selection (*args)
    # Run Original Method
    modalr_invgrid_slctitm_windo_4h21 (*args)
    return unless  ModernAlgebra::GI_PERSONAL_ITEM_USE ||
        @active_battler.nil? || @active_battler.actor?
    # Setup inventory
    @item_window.ma_inventory = @active_battler.inventory
    @item_window.refresh
  end

If that doesn't work, I would like to see ziifee's battle system. A link would be fine. It probably alters the way @active_battler operates in Scene_Battle, which is why these errors are occuring.

**
Rep: +0/-0Level 83
Alright, try replacing that same section of the script with:

Code: [Select]
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Start Item Selection
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias modalr_invgrid_slctitm_windo_4h21 start_item_selection
  def start_item_selection (*args)
    # Run Original Method
    modalr_invgrid_slctitm_windo_4h21 (*args)
    return unless  ModernAlgebra::GI_PERSONAL_ITEM_USE ||
        @active_battler.nil? || @active_battler.actor?
    # Setup inventory
    @item_window.ma_inventory = @active_battler.inventory
    @item_window.refresh
  end

If that doesn't work, I would like to see ziifee's battle system. A link would be fine. It probably alters the way @active_battler operates in Scene_Battle, which is why these errors are occuring.

Nope, it doesn't help either, but know that your efforts are very much appreciated MA.

ziifee's Wait Gauge Battle;Scripts by ziifee LINK: http://www.rpgmakervx.net/index.php?showtopic=11555


I hope it will help because I can tell this script is quite a work of art and you wanna make it compatible eh.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Alright, well I did some testing and this appears to work. Place the Grid Inventory below the WGB and place this little code in its own slot below the Grid Inventory

Code: [Select]
#==============================================================================
#    Grid Inventory + ziifee's WGB Compatibility Patch
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Instructions:
#
#    Place Grid Inventory below ziifee's scripts and this patch beneath the
#   Grid Inventory
#==============================================================================

#==============================================================================
# ** Scene Battle
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    overwritten method - start_item_selection
#==============================================================================

class Scene_Battle
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Start Item Selection
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def start_item_selection (*args)
    # Run Original Method
    modalr_invgrid_slctitm_windo_4h21 (*args)
    return unless  ModernAlgebra::GI_PERSONAL_ITEM_USE
    # Setup inventory
    @item_window.ma_inventory = @select_battler.inventory
    @item_window.refresh
  end
end

**
Rep: +0/-0Level 83
 :tpg:AT LAST! :tpg:
thanx Man, I'll continue and finish my game now. You must be a god or something
 ;8YEAH! ;8

 :blizj:

On a more serious note, I wondered what you thought about ziifee's battle system?

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
It's a very pretty system. I liked the graphical aspects of it a lot. I didn't really examine the coding, but I thought it was a really nice script at least in terms of graphics and utility.

**
Rep: +0/-0Level 83
Oh no maybe I yelled victory a bit too fast.

It's pretty weird because when I try with ziifee's demo and place it all like you told me to do, it works fine, but in my project it just doesnt do the same, even tho I place every scripts the same manner...

Must be my system data, I really don't get it. Thanx anyway.
« Last Edit: September 03, 2009, 10:28:58 PM by adamass »

**
Rep: +0/-0Level 83
Ok I found out that the patch you sent today was not compatible with Moghunter's Basic Menu Plus V 1.0. Not that a sadness for me, since a menu is not that important compared to your script.

That said, thanx and all again ::)

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Well, it's important enough. I can't imagine the patch I sent caused the incompatibility though; it probably existed before the patch. I can try to fix it, but it depends on how different Mog's menu makes it.

It might be a matter of just configuring it through that menu.

**
Rep: +0/-0Level 83
Hmmm, you might be right. The patch may not be the problem indeed. In fact, as soon as I applied it, the item tag was just not replaced by ''inventory''. So it might be just as you say; it must be about the config of mog's script. Then again,I am a complete klutz when it comes to scripting and could search for like hours just to find what to change.

If you ever get osme time to spare, I might send you a link for it. However, I am not that sure to keep this menu script and am still looking for one before I make my final decision. Maybe you got one to suggest however that may be compatible and all?

Thanx again for your efforts.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Well, you could try putting the Grid Inventory under the menu if it isn't already.

But most CMSes kind of act funny if all scripts aren't configured from there. I really suggest you just learn the configuration. If not for MOG's, then for Yanfly's Scene Menu Redux
or my Full Status Menu or for any other Menu system. There are lots out there.

**
Rep:
Level 84
Hey dude, i found an error in your script.
When I optimized the inventory and then tried to quip a weapon I got an error window telling me

"Line 2939:
Wrong number of arguments 4 to 3" Or something like that.

Here is the line:
$game_actors[@inventory.actor_id].change_equip (equip_type, item, false, indx)

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
It sounds like a compatibility error, though the condition of optimizing first is rather strange. Does the error not occur if you don't optimize first?

Anyway, I suspect a compatibility error because the error suggest it is passing four arguments to a method that only expects three. But, that method in the Grid Inventory expects 2-4. So my suspicion is that you are using some script that aliases or overwrites change_equip without allowing for additional arguments.

So, my first suggestion to you is to place the Grid Inventory below any other custom scripts you have.

**
Rep:
Level 84
Yeah, I kinda figured that out right now. Thanks anyways dude!

**
Rep:
Level 84
Hey nice name change.

Umm I found one more bug in your Grid Inventory.
When I change the name of one or all of the Actors in my party, when I go to look at their inventory it displays their original name instead of the names I chose for them...
Think you can fix that up real quick?

Thanks in advance!

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Alright, try adding this below the Grid Inventory, but still above Main:

Code: [Select]
#==============================================================================
# ** Game Actor
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased method - name=
#==============================================================================

class Game_Actor
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Change Name
  #     name : new name
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias ma_zro_grdinvtory_chngname_7jj2 name=
  def name= (*args)
    ma_zro_grdinvtory_chngname_7jj2 (*args)
    @inventory.name = @name unless @inventory.nil?
  end
end

and the name change isn't permanent.

**
Rep:
Level 84
Thanks man, Although i needed to start a new games IT WORKS!!!
LOL
but now it doesn't say *"Person name" Items* It just says the name...
I'm cool with that though, I'm just letting you know.

**
Rep: +0/-0Level 82
I have an error when my party gets items after a battle while already having a full inventory.
The error I get is:
      Script 'Grid Inventory 1.0' line 3190: NameError occurred.
      uninitialized constant Scene_Battle::Scene_Inventory

I'm using version 1.0b with no other scripts. I copied the script directly from the
demo.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Shoot, that's a bad error. Go into your script, press CTRL+H. In the Find field, put Scene_Inventory. In the Replace field, put Scene_GridInventory. Replace all.

**
Rep: +0/-0Level 82
Thanks for the help.
It's working great now.

**
Rep:
Level 81
RMRK Junior
t'would be freaking awesome if this was for XP. anyone want to transfer it? xD
Feed my dragons your clicks! Please...? Or they'll die, and I'll be really sad... I already named them and everything.




*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Originally, I had made it for XP but it was full of bugs, so now it's only for VX. Anyway, I updated it to 1.0d to fix a few minor bugs people have mentioned. Hopefully everything will be dandy now.

*
Rep: +0/-0Level 78
Hi, first off i wanted to say that i am really enjoying the script so far but there is a bug i think i have found. In my game when someone other than the main actor sells something it seems to be duplicated in their inventory screen. You cant sell it but there is a copy in their inventory. I also tried this in the demo and the same thing happened. I would really appreciate if you could tell me if i am doing something wrong. Also this isn't as important but i was wondering if it would be possible to make it so certain actors cant have their equipment unequipped.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Updated to 1.0e. Should fix that problem.

*
Rep: +0/-0Level 78
Thank you so much! Works perfectly

********
Hungry
Rep:
Level 96
Mawbeast
2013 Best ArtistParticipant - GIAW 11Secret Santa 2013 ParticipantFor the great victory in the Breakfast War.2012 Best Game Creator (Non-RM Programs)~Bronze - GIAW 9Project of the Month winner for August 2008Project of the Month winner for December 20092011 Best Game Creator (Non RM)Gold - GIAW Halloween
You know what I'm thinking Modern?
Perhaps a switch option that makes it so that when you equip something, it doesn't remove it from your inventory.

FCF3a A+ C- D H- M P+ R T W- Z- Sf RLCT a cmn+++ d++ e++ f h+++ iw+++ j+ p sf+
Follow my project: MBlok | Find me on: Bandcamp | Twitter | Patreon

**
Rep: +0/-0Level 82
Hiya, I've been trying your script out, and I'm loving it so far, but I've run into a few problems in my game.

1.) When I view the information for an item, it shows an icon in the top right of the information window that's seemingly randomly selected from my icon sheet. Not a gigantic problem, just an eyesore.

2.) When I view some of the items, the game crashes and I get this error:


It's probably some stupid mistake on my part, but I've tried everything I could think of to fix the problem(I'm no scripter, by the way ;_;) and nothing has worked so far.

If you could point me in the right direction I would be eternally grateful! ^_^

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Both of those are related. The icon(s) at the top right aren't randomly selected - they represent the elements that that item has. The error you are receiving is likely because you haven't setup which icons you want to use to represent each element you have in the database. If you go to line 154, you will see this:

Code: [Select]
  # Icons to represent elements of items in the Information screen. Every
  #  element MUST have an icon.
  GI_ELEMENT_ICONS = [132, 2, 4, 14, 16, 12, 138, 137, 104]

You must give every element an icon.

Alternatively, if you don't want to show the elements at all, you would need to go to line 2084 and comment out the following four lines:

Code: [Select]
    item.element_set.each { |i|
      x -= 28
      draw_icon (ModernAlgebra::GI_ELEMENT_ICONS[i - 1], x, 4)
    }

**
Rep: +0/-0Level 82
Aargh! I knew it was something I missed.

Thanks a lot! It works perfectly now.
Very cool script 8)

*
Rep: +0/-0Level 76
RMRK Junior
I am unsure on how to download the script and no one will tell me. Please reply.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Who's the no one to tell you? Who did you ask?

In any case, just scroll down to the bottom of the first post and click the like that says: "Grid Inventory Demo." Alternatively, click this link: Grid Inventory Demo
« Last Edit: August 23, 2010, 03:28:06 AM by modern algebra »

*
Rep: +0/-0Level 75
RMRK Junior
I downloaded your script and it worked great but I made an item and once I use it once the use option turns faded and it won't let me use the item anymore. i've checked and the item is not consumable.
 
I've found a way around the problem by using the item them putting it in my loot them taking the item again, but them i still only have one time use until it fades again!

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Thanks for catching that error. You can fix it by going to line 3121 and changing the following:

Code: [Select]
    $game_party.modalg_gd_nventry_item_gain_7ye4 (placement.item, -1)

to:

Code: [Select]
    $game_party.modalg_gd_nventry_item_gain_7ye4 (placement.item, -1) if placement.item.consumable

Alternatively, you can redownload the script as I have updated it to version 1.0f.
« Last Edit: August 23, 2010, 03:57:21 AM by modern algebra »

********
Licks
Rep:
Level 91
Sexual Deviant
Hey modern, I was using your script when I got this error
Code: [Select]
Script 'Grid Inventory 1.0f line 3299: Argument Error occurred
comparison of String with 0 failed

I got this when I exited from your quest journal menu which I am also using.
It was in version 1.0e as well. I think it may have to do with compatibility of scripts so this is what I'm using.
I'm using your quest journal and grid inventory scripts, Thomas Edison, and Day/Night cycle by Jet.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Yeah, it's a compatibility error. At line 3299, try replacing:

Code: [Select]
    elsif menu_index >= ModernAlgebra::GI_MENU_INDEX

with:

Code: [Select]
    elsif !menu_index.is_a? (String) && menu_index >= ModernAlgebra::GI_MENU_INDEX

*
Rep: +0/-0Level 75
RMRK Junior
I've been using you script to make my game and i works well. I made a Event that makes a variable=Item in inventory. I get the error message:

Script 'Game-Interpreter' line 750: NoMethodError occurred.

undefined method '[]' for nil: NilClass

I was wondering if this was because of your Script or my eventing? If you could tell my what this means and how to fix it I would be very thankful.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
It's not my script or your eventing; it's a mistake that enterbrain made in scripting when they released VX. The fix is located in this topic: http://rmrk.net/index.php/topic,25243.0.html

Make sure to also fix the multiplication error. They are in separate posts.

**
Rep:
Level 75
Likes the survival horror
Hey man...
when i trie to equip a shield type item on my character, i got that error....
Script "Grid inventory" line 2934: Argument Error Ocurred.
wrong number of arguments(4 for 3)

This is the line:
$game_actors[@inventory.actor_id].change_equip (equip_type, item, false, indx)
 Please tell me how can i fix it!!!!!

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
It's an incompatibility with another script. One of your other custom scripts redefines the change_equip method and does not take into account the possibility of another argument being added.

Identify which script is causing the error and try placing this script below it.

**
Rep:
Level 75
Likes the survival horror
Ok..thanks..i actually know the problem....
this script is not compatible with the "Learn skills by equipment"...
Thanks for the support......
Your script is great for my survival horror game..lol... ^-^

***
Rep:
Level 75
I am having a problem it is not working with your full status CMS it makes the commands open scenes they are not set to and the none of them open the inventory

Edit: I Fixed it by placing the gird inventory above the FSM but it still does to open the grid only normal item screen
« Last Edit: October 07, 2010, 11:18:02 PM by CodeMaster »

Spoiler for:



Spoiler for:
John 3:16: For God loved the world so much that he gave his one and only Son, so that everyone who believes in him will not perish but have eternal life

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Yeah, well you have to change it. It needs to call Scene_GridInventory, not Scene_Item. So basically, you need to set it up in the FSCMS. Something like the following:

Code: [Select]
    0 => ["Vocab::item", 144, "$game_party.members.empty?", true, Scene_GridInventory],

***
Rep:
Level 75
thank you sorry to keep asking for script help but i could not script to save my life.

Spoiler for:



Spoiler for:
John 3:16: For God loved the world so much that he gave his one and only Son, so that everyone who believes in him will not perish but have eternal life

**
Rep:
Level 75
RMRK Junior
This is an awsome script. However, is there anyway to get this to work with KGC Equipment extension? It doesnt seem to work with it. It won't equip or uniquip any of the extended armors.

***
Rep:
Level 74
I'm baaack!
 :tpg: JUST LIKE DIABLO 2!!!! I wanted to make a game with features like Diablo 2!

***
Rep:
Level 75
I have gotten it to work with KGC Equipment Extentions as long as the grid inventory is below KGC's script it works the only slight problem is that it is equiping things to the wrong place

Spoiler for:



Spoiler for:
John 3:16: For God loved the world so much that he gave his one and only Son, so that everyone who believes in him will not perish but have eternal life

**
Rep: +0/-0Level 73
RMRK Junior
i got a problem, when i equip an item an error occours on line 2934
        $game_actors[@inventory.actor_id].change_equip (equip_type, item, false, indx)
it says argument error wroung number of arguments (4 of 3)

*Never Mind, I figured it out, thius script iis incompatable with 'Tales of' Titles*
« Last Edit: January 06, 2011, 05:48:53 PM by Watfordj »

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Yeah, that is probably all it is. But, before deleting one or the other, try them in a different order (IE. try putting the Grid Inventory below the Titles script - you currently have it above if I'm not mistaken).

*
Rep: +0/-0Level 73
RMRK Junior
Is there a way to make this work with Simple Mouse System? I mean they don't interfere or something, only the mouse can't be used to move the selection, just to click the selected item.

********
Licks
Rep:
Level 91
Sexual Deviant
I just noticed something I found quite peculiar...
I can't put anything into the storage boxes. I found this to be very strange.

***
Rep:
Level 75
It works fine for me ??? I wonder if there are any other scripts that might be interfering.

Spoiler for:



Spoiler for:
John 3:16: For God loved the world so much that he gave his one and only Son, so that everyone who believes in him will not perish but have eternal life

*
Rep: +0/-0Level 70
RMRK Junior
Hello sorry for necroposting but I want to suggest something..

I was wondering if you could make the Grid Item Inventory script you made for only 1 character only just like Diablo 2 and other MMORPGs that feature only controlling 1 man. Meaning disabling the "Transfer" option when in the menu and when I go into the Loot Menu and I take it, it will automatically be given to the 1st character or the character that I am controlling when in travelling a map. Im using Yggdrasil ABS. and the Lost Menu by Soja Bird.

*
Rep: +0/-0Level 70
RMRK Junior
Is there a way to make this compatable with RPG Tankentai Sideview Battle System?

**
Rep: +0/-0Level 84
@modern algebra: In case anyone bothers you with this question again, this script can be made compatible with the Tankentai ATB with technically one change.

On line 3215, find this line:

Code: [Select]
@item_window.ma_inventory = @active_battler.inventory

Replace that line with this:

Code: [Select]
if $imported != nil && $imported["TankentaiATB"]
  @item_window.ma_inventory = @commander.inventory
else
  @item_window.ma_inventory = @active_battler.inventory
end

It'll work with the latest version of the ATB. This is not needed without ATB.

If you want to make a patch for this, go ahead.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Cool, thanks for the help Mr. Bubble! I will add that to the first post.

**
Rep:
Level 66
Haven't been on for ages -.-
I'm having a problemo,

When I chose a image, I then let the main player recieve that item. THen it says that it could not find the image. Help Please!

P.S. sorry for my bad spelling

**
Rep: +0/-0Level 74
RMRK Junior
Hi Modernalgebra and thanks for this great script. I would need a patch to make it compatible with YEM Main Menu Melody and with the FFXIII Layout.
I will put the codes of both scripts here so maybe you or anyone else can check them out.
Code: [Select]
#===============================================================================
#
# Yanfly Engine Melody - Main Menu Melody
# Last Date Updated: 2010.06.13
# Level: Normal, Hard, Lunatic
#
# This script allows for menu item reordering along with importing in custom
# script scenes with ease so that there becomes little need to change the base
# menu script in order to add in a few items. This is a YEM version of the
# popular KGC Custom Menu Command. No credits will be taken on part of my own
# behalf for the work KGC did. All I merely did was use it to extend the
# capabilities of adding in common events, imported commands, and beefed up
# engine efficiency.
#
#===============================================================================
# Updates
# -----------------------------------------------------------------------------
# o 2010.06.13 - Bugfix regarding imported commands and common events.
# o 2010.05.15 - Conversion to Yanfly Engine Melody.
#===============================================================================
# Instructions
# -----------------------------------------------------------------------------
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ? Materials but above ? Main. Considering the special
# nature of this script, it is highly recommended that you place this script
# above all non-core scripts. Remember to save.
#
# Scroll down and edit the module as you see fitting for your game.
#
# -----------------------------------------------------------------------------
# Debug Shortcuts - Only during $TEST and $BTEST mode
# -----------------------------------------------------------------------------
# During testplay mode, pressing F5 while the main menu is active will fill
# all party members' HP and MP to full.
#===============================================================================

$imported = {} if $imported == nil
$imported["MainMenuMelody"] = true

module YEM
  module MENU
   
    #===========================================================================
    # Section I. Menu Commands
    # -------------------------------------------------------------------------
    # Adjust the following hash to modify which commands will appear where. Use
    # the following table to input in the commands as you see fit.
    #
    #   :items ............Default Item Menu
    #   :skill ............Default Skill Menu
    #   :equip ............Default Equip menu
    #   :status ...........Default Status Menu
    #   :save .............Default Save Menu
    #   :system ...........Default Game End Menu
    #
    # For those that have imported KGC scripts.
    #
    #   :kgc_largeparty ...Requires KGC's Large Party
    #   :kgc_apviewer .....Requires KGC's Equip Learn Skill
    #   :kgc_skillcp ......Requires KGC's Skill CP System
    #   :kgc_difficulty ...Requires KGC's Battle Difficulty
    #   :kgc_distribute ...Requires KGC's Distribute Parameter
    #   :kgc_enemyguide ...Requires KGC's Enemy Guide
    #   :kgc_outline ......Requires KGC's Outline
    #
    # For those who are still attached to the YERD scripts.
    #
    #   :yerd_classchange .Requires YERD Subclass Selection System
    #   :yerd_learnskill ..Requires YERD Subclass Selection System
    #   :yerd_equipslots ..Requires YERD Equip Skill Slots
    #   :yerd_bestiary ....Requires YERD Bestiary + Scanned Enemy
    #===========================================================================
    MENU_COMMANDS =[ # Follow the instructions above.
      :items,          # Default Item Menu
      :status,         # Default Status Menu
      :skill,          # Default Skill Menu
      :equip,          # Default Equip menu
      :row,         # Common Event
      :kgc_largeparty ,
      #:party,         # Common Event
      :save,           # Default Save Menu
      :system,         # Default Game End Menu
    ] # Do not remove this.
   
    # This will determine whether or not your menu uses icons.
    USE_ICONS = false
   
    # If you're using icons, adjust the following hash to bind the right icons
    # to the right command.
    MENU_ICONS ={ # If an icon is not present, it will use the unused icon.
      :unused => 176,
      :items  => 144,
      :skill  => 159,
      :equip  =>  44,
      :status => 137,
      :save   => 149,
      :system => 134,
    } # Do not remove this.
   
    # This is the maximum number of rows to be displayed before the command
    # box will be cut off.
    MAX_ROWS = 10
   
    # Set the alignment for the text in your menu. By default, alignment is 0.
    #   0..Left Align, 1..Center Align, 2..Right Align
    ALIGN = 0
   
    # Setting this to true will cause the menu to shift to the right side of
    # the screen while moving the party status window over to the left side.
    MENU_RIGHT_SIDE = false
   
    # If this is set to true, the menu will not obscure the map until actor
    # selection is required. Events on the map will be frozen in place.
    ON_SCREEN_MENU = false
   
    #===========================================================================
    # Section II.A. Custom Menu Command - Lunatic Mode - Common Events
    # -------------------------------------------------------------------------
    # For those who would like to launch command events from the main menu,
    # modify this hash here to fit your liking. Then, add in the newly added
    # method to the MENU_COMMANDS array above.
    #
    #   HideSw - This is the hide switch. Set to nil to not use a switch.
    #   DisbSw - This is the disable switch. Set to nil to not use a switch.
    #   Debug? - This item will only appear if it's $TEST mode.
    #   CEvent - This is the common event that will launch.
    #   Icon   - This is the icon used if the option is given.
    #   Title  - This is the text that will appear.
    #===========================================================================
    COMMON_EVENTS ={ # Follow the instructions above.
      # Method => [HideSw, DisbSw, Debug?, CEvent, Icon, Title Name]
      :event1  => [   nil,    nil,   true,     11,  101, "Debug"],
      :event2  => [   nil,    nil,  false,     12,  117, "Camp"],
    } # Do not remove this.
     
    #===========================================================================
    # Section II.B. Custom Menu Command - Lunatic Mode - Imported Commands
    # -------------------------------------------------------------------------
    # The following is what KGC originally was going to have in his script but
    # was actually missing it in his publicized script. This will regain
    # functionality and also lift the "limit" of only 100 extra commands. The
    # following will explain how to set up the individual options.
    #
    #   HideSw - Switch used to hide the command. Set to nil if not used.
    #   DisbSw - Switch used to disable the command. Set to nil if not used.
    #   Actor? - Does this select an actor. Set to true if it does.
    #     Icon - Determines what icon will be used for this item.
    #    Title - The title text that appears for the event.
    #    Scene - The scene used to launch the respective scene.
    #
    # Note that this does not automatically detect what will and will not
    # disable the command ingame. You must understand and create a work
    # around with them (if they do disable the commands) with switches.
    # After binding your imported commands, go back to MENU_COMMANDS and
    # insert the proper command ID at the proper location.
    #===========================================================================
    IMPORTED_COMMANDS ={ # Follow the instructions above.
    # Method  => [HideSw, DisbSw, Actor?, Icon, Title Name, Scene Name.new]
     :party  => [     nil,      nil,  false,   102,   "Party", "Scene_Party"],
     :faction => [    10,     11,  false,  100, "Factions", "Scene_Factions"],
     :row     => [   nil,    nil,  false,  101,     "Rows", "Scene_Row"],
     :record  => [   nil,    nil,  false,  102,  "Records", "Scene_Record"],
     :craft   => [   nil,    nil,  false,  103, "Crafting", "Scene_Crafting"],
    } # Do not remove this.
   
    #===========================================================================
    # Section III.A. Multi Variable Window
    # -------------------------------------------------------------------------
    # Imported straight from Scene Menu ReDux, this alters the gold window at
    # the bottom to display variables, time, steps, etc. This window appears
    # at the bottom of the screen.
    #===========================================================================
    USE_MULTI_VARIABLE_WINDOW = true
   
    # Variables will be shown in this order. Use 0 to show gold. Adjust the
    # following information as seen necessary.
    VARIABLES_SHOWN = [-5, 1, 0]
    VARIABLES_ICONS = false
    VARIABLES_HASH  ={ # Note that value zero must exist.
    # VarID => [Icon, Text]
          -5 => [ 153, "Map"],
          -2 => [  48, "Steps"],
          -1 => [ 188, "Time"],
           0 => [ 205, "Cr."],
           1 => [ 188, "A.E."],
    }# Do not remove this.
   
  end # MENU
end # YEM

#===============================================================================
# Editting anything past this point may potentially result in causing computer
# damage, incontinence, explosion of user's head, coma, death, and/or halitosis.
# Therefore, edit at your own risk.
#===============================================================================

#===============================================================================
# Scene_Menu
#===============================================================================

class Scene_Menu < Scene_Base
 
  #--------------------------------------------------------------------------
  # new method: create_command_list
  #--------------------------------------------------------------------------
  def create_command_list
    vocab = []
    commands = []
    icons = []
    index_list = {}
    YEM::MENU::MENU_COMMANDS.each_with_index { |c,i|
      case c
      when :items
        index_list[:items] = commands.size
        vocab.push(Vocab.item)
       
      when :skill # Skills
        index_list[:skill] = commands.size
        vocab.push(Vocab.skill)
       
      when :equip # Equip
        index_list[:equip] = commands.size
        vocab.push(Vocab.equip)
       
      when :status # Status
        index_list[:status] = commands.size
        vocab.push(Vocab.status)
       
      when :save # Save
        index_list[:save] = commands.size
        vocab.push(Vocab.save)
       
      when :system # System
        index_list[:system] = commands.size
        vocab.push(Vocab.game_end)
       
      #----- KGC Imported Scripts -----
       
      when :kgc_largeparty # KGC's Large Party
        next unless $imported["LargeParty"]
        index_list[:partyform] = commands.size
        @__command_partyform_index = commands.size
        vocab.push(Vocab.partyform)
       
      when :kgc_apviewer # KGC's AP Viewer
        next unless $imported["EquipLearnSkill"]
        index_list[:ap_viewer] = commands.size
        @__command_ap_viewer_index = commands.size
        vocab.push(Vocab.ap_viewer)
       
      when :kgc_skillcp # KGC's CP Skill System
        next unless $imported["SkillCPSystem"]
        index_list[:set_battle_skill] = commands.size
        @__command_set_battle_skill_index = commands.size
        vocab.push(Vocab.set_battle_skill)
       
      when :kgc_difficulty # KGC's Battle Difficulty
        next unless $imported["BattleDifficulty"]
        index_list[:set_difficulty] = commands.size
        @__command_set_difficulty_index = commands.size
        vocab.push(KGC::BattleDifficulty.get[:name])
       
      when :kgc_distribute # KGC's Distribute Parameter
        next unless $imported["DistributeParameter"]
        index_list[:distribute_parameter] = commands.size
        @__command_distribute_parameter_index = commands.size
        vocab.push(Vocab.distribute_parameter)
       
      when :kgc_enemyguide # KGC's Enemy Guide
        next unless $imported["EnemyGuide"]
        index_list[:enemy_guide] = commands.size
        @__command_enemy_guide_index = commands.size
        vocab.push(Vocab.enemy_guide)
       
      when :kgc_outline # KGC's Outline
        next unless $imported["Outline"]
        index_list[:outline] = commands.size
        @__command_outline_index = commands.size
        vocab.push(Vocab.outline)
       
      #----- YERD Imported Scripts -----
       
      when :yerd_classchange # Yanfly Subclass Class Change
        next unless $imported["SubclassSelectionSystem"]
        next unless YE::SUBCLASS::MENU_CLASS_CHANGE_OPTION
        next unless $game_switches[YE::SUBCLASS::ENABLE_CLASS_CHANGE_SWITCH]
        index_list[:classchange] = commands.size
        @command_class_change = commands.size
        vocab.push(YE::SUBCLASS::MENU_CLASS_CHANGE_TITLE)

      when :yerd_learnskill # Yanfly Subclass Learn Skill
        next unless $imported["SubclassSelectionSystem"]
        next unless YE::SUBCLASS::USE_JP_SYSTEM and
        YE::SUBCLASS::LEARN_SKILL_OPTION
        next unless $game_switches[YE::SUBCLASS::ENABLE_LEARN_SKILLS_SWITCH]
        index_list[:learnskill] = commands.size
        @command_learn_skill = commands.size
        vocab.push(YE::SUBCLASS::LEARN_SKILL_TITLE)
       
      when :yerd_equipslots # Yanfly Equip Skill System
        next unless $imported["EquipSkillSlots"]
        next unless $game_switches[YE::EQUIPSKILL::ENABLE_SLOTS_SWITCH]
        index_list[:equipskill] = commands.size
        @command_equip_skill = commands.size
        vocab.push(YE::EQUIPSKILL::MENU_TITLE)
       
      when :yerd_bestiary  # Yanfly Bestiary
        next unless $imported["DisplayScannedEnemy"]
        next unless $game_switches[YE::MENU::MONSTER::BESTIARY_SWITCH]
        index_list[:bestiary] = commands.size
        @command_bestiary = commands.size
        vocab.push(YE::MENU::MONSTER::BESTIARY_TITLE)
       
      else # ---- Custom Commands ----
        if YEM::MENU::COMMON_EVENTS.include?(c)
          common_event = YEM::MENU::COMMON_EVENTS[c]
          next if !$TEST and common_event[2]
          next if common_event[0] != nil and $game_switches[common_event[0]]
          index_list[c] = commands.size
          vocab.push(common_event[5])
        elsif YEM::MENU::IMPORTED_COMMANDS.include?(c)
          command_array = YEM::MENU::IMPORTED_COMMANDS[c]
          next if command_array[0] != nil and $game_switches[command_array[0]]
          index_list[c] = commands.size
          vocab.push(command_array[4])
        else; next
        end
       
      end
      commands.push(c)
      icons.push(menu_icon(c))
    } # YEM::MENU::MENU_COMMANDS.each_with_index
    $game_temp.menu_command_index = index_list
    @menu_array = [vocab, commands, icons]
  end
 
  #--------------------------------------------------------------------------
  # new method: menu_icon
  #--------------------------------------------------------------------------
  def menu_icon(command)
    if YEM::MENU::MENU_ICONS.include?(command)
      return YEM::MENU::MENU_ICONS[command]
    elsif YEM::MENU::COMMON_EVENTS.include?(command)
      return YEM::MENU::COMMON_EVENTS[command][4]
    elsif YEM::MENU::IMPORTED_COMMANDS.include?(command)
      return YEM::MENU::IMPORTED_COMMANDS[command][3]
    else
      return YEM::MENU::MENU_ICONS[:unused]
    end
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: create_command_window
  #--------------------------------------------------------------------------
  def create_command_window
    create_command_list
    @command_window = Window_MenuCommand.new(@menu_array)
    @command_window.height = [@command_window.height,
      YEM::MENU::MAX_ROWS * 24 + 32].min
    @command_window.index = [@menu_index, @menu_array[0].size - 1].min
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: update_command_selection
  #--------------------------------------------------------------------------
  def update_command_selection
    if Input.trigger?(Input::B)
      check_debug_enable
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif $TEST and Input.trigger?(Input::F5) # Debug Refresh Party
      Sound.play_recovery
      for member in $game_party.members
        member.hp += member.maxhp
        member.mp += member.maxmp
      end
      @status_window.refresh
    elsif Input.trigger?(Input::C)
      command = @command_window.method
      case command
      when :items # Item Command
        Sound.play_decision
        $scene = Scene_Item.new
      when :skill, :equip, :status # Skill, Equip, and Status Commands
        Sound.play_decision
        start_actor_selection
      when :save # Save Command
        if $game_system.save_disabled
          Sound.play_buzzer
        else
          Sound.play_decision
          $game_temp.menu_command_index[:save]
          $scene = Scene_File.new(true, false, false)
        end
      when :system # System Command
        Sound.play_decision
        $scene = Scene_End.new
      else # Custom Commands
        if YEM::MENU::COMMON_EVENTS.include?(command)
          array = YEM::MENU::COMMON_EVENTS[command]
          if array[1] != nil and $game_switches[array[1]]
            Sound.play_buzzer
          else
            Sound.play_decision
            $game_temp.common_event_id = array[3]
            $scene = Scene_Map.new
          end
        elsif YEM::MENU::IMPORTED_COMMANDS.include?(command)
          array = YEM::MENU::IMPORTED_COMMANDS[command]
          if array[1] != nil and $game_switches[array[1]]
            Sound.play_buzzer
          else
            Sound.play_decision
            if array[2]
              start_actor_selection
            else
              $scene = eval(array[5] + ".new")
            end
          end
        end
       
      end # if case check
    end # end if
  end # end update_command_selection
 
  #--------------------------------------------------------------------------
  # overwrite method: update_actor_selection
  #--------------------------------------------------------------------------
  def update_actor_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      end_actor_selection
      @status_window.close if YEM::MENU::ON_SCREEN_MENU
    elsif $TEST and Input.trigger?(Input::F5) # Debug Refresh Party
      Sound.play_recovery
      for member in $game_party.members
        member.hp += member.maxhp
        member.mp += member.maxmp
      end
      @status_window.refresh
    elsif Input.trigger?(Input::C)
      $game_party.last_actor_index = @status_window.index
      Sound.play_decision
      command = @command_window.method
      case command
      when :skill # Skill Command
        $scene = Scene_Skill.new(@status_window.index)
      when :equip # Equip Command
        $scene = Scene_Equip.new(@status_window.index)
      when :status # Status Command
        $scene = Scene_Status.new(@status_window.index)
      else # Custom Commands
        if YEM::MENU::IMPORTED_COMMANDS.include?(command)
          array = YEM::MENU::IMPORTED_COMMANDS[command]
          $scene = eval(array[5] + ".new(@status_window.index)")
        end
      end
     
    end
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: start
  #--------------------------------------------------------------------------
  def start
    super
    create_menu_background
    create_command_window
    if YEM::MENU::USE_MULTI_VARIABLE_WINDOW
      @gold_window = Window_MultiVariableWindow.new
    else
      @gold_window = Window_Gold.new(0, 360)
    end
    @status_window = Window_MenuStatus.new(160, 0)
    @right_side = YEM::MENU::MENU_RIGHT_SIDE
    if YEM::MENU::ON_SCREEN_MENU
      @gold_window.y = @command_window.height
      @status_window.openness = 0
      @right_side = true if $game_player.screen_x <= 176
      @right_side = false if $game_player.screen_x >= 368
      $game_temp.on_screen_menu = false
    end
    if @right_side
      @status_window.x = 0
      @command_window.x = 384
      @gold_window.x = 384
    end
  end
 
  #--------------------------------------------------------------------------
  # alias method: start_actor_selection
  #--------------------------------------------------------------------------
  alias start_actor_selection_mmz start_actor_selection unless $@
  def start_actor_selection
    if YEM::MENU::ON_SCREEN_MENU
      @status_window.open
    end
    start_actor_selection_mmz
  end
 
  #--------------------------------------------------------------------------
  # new method: create_menu_background
  #--------------------------------------------------------------------------
  if YEM::MENU::ON_SCREEN_MENU
  def create_menu_background
    @menuback_sprite = Spriteset_Map.new
  end
  end
 
end # Scene_Menu

#==============================================================================
# Imported from KGC's Custom Menu Command
# to improve compatibility amongst KGC scripts
#==============================================================================
$imported["CustomMenuCommand"] = true
class Game_Temp
  attr_accessor :menu_command_index
  attr_accessor :next_scene_actor_index
  attr_accessor :on_screen_menu
 
  alias initialize_KGC_CustomMenuCommand initialize unless $@
  def initialize
    initialize_KGC_CustomMenuCommand
    @menu_command_index = {}
    @next_scene_actor_index = 0
  end
end

module KGC
module Commands
  module_function
  def call_item
    return if $game_temp.in_battle
    $game_temp.next_scene = :menu_item
    $game_temp.next_scene_actor_index = 0
    $game_temp.menu_command_index = {}
  end
  def call_skill(actor_index = 0)
    return if $game_temp.in_battle
    $game_temp.next_scene = :menu_skill
    $game_temp.next_scene_actor_index = actor_index
    $game_temp.menu_command_index = {}
  end
  def call_equip(actor_index = 0)
    return if $game_temp.in_battle
    $game_temp.next_scene = :menu_equip
    $game_temp.next_scene_actor_index = actor_index
    $game_temp.menu_command_index = {}
  end
  def call_status(actor_index = 0)
    return if $game_temp.in_battle
    $game_temp.next_scene = :menu_status
    $game_temp.next_scene_actor_index = actor_index
    $game_temp.menu_command_index = {}
  end
end
end

class Game_Interpreter
  include KGC::Commands
end

class Scene_Map < Scene_Base
  alias update_scene_change_KGC_CustomMenuCommand update_scene_change unless $@
  def update_scene_change
    return if $game_player.moving?
    case $game_temp.next_scene
    when :menu_item
      call_menu_item
    when :menu_skill
      call_menu_skill
    when :menu_equip
      call_menu_equip
    when :menu_status
      call_menu_status
    else
      update_scene_change_KGC_CustomMenuCommand
    end
  end
  alias call_menu_mmz call_menu unless $@
  def call_menu
    $game_temp.on_screen_menu = true if YEM::MENU::ON_SCREEN_MENU
    call_menu_mmz
  end
  def call_menu_item
    $game_temp.next_scene = nil
    $scene = Scene_Item.new
  end
  def call_menu_skill
    $game_temp.next_scene = nil
    $scene = Scene_Skill.new($game_temp.next_scene_actor_index)
    $game_temp.next_scene_actor_index = 0
  end
  def call_menu_equip
    $game_temp.next_scene = nil
    $scene = Scene_Equip.new($game_temp.next_scene_actor_index)
    $game_temp.next_scene_actor_index = 0
  end
  def call_menu_status
    $game_temp.next_scene = nil
    $scene = Scene_Status.new($game_temp.next_scene_actor_index)
    $game_temp.next_scene_actor_index = 0
  end
end

class Scene_Menu < Scene_Base
  def check_debug_enable
    return unless Input.press?(Input::F5)
    return unless Input.press?(Input::F9)
    $TEST = true
  end
end

class Scene_Item < Scene_Base
  def return_scene
    if $game_temp.menu_command_index.has_key?(:items)
      $scene = Scene_Menu.new($game_temp.menu_command_index[:items])
    else
      $scene = Scene_Map.new
    end
  end
end

class Scene_Skill < Scene_Base
  def return_scene
    if $game_temp.menu_command_index.has_key?(:skill)
      $scene = Scene_Menu.new($game_temp.menu_command_index[:skill])
    else
      $scene = Scene_Map.new
    end
  end
end

class Scene_Equip < Scene_Base
  def return_scene
    if $game_temp.menu_command_index.has_key?(:equip)
      $scene = Scene_Menu.new($game_temp.menu_command_index[:equip])
    else
      $scene = Scene_Map.new
    end
  end
end

class Scene_Status < Scene_Base
  def return_scene
    if $game_temp.menu_command_index.has_key?(:status)
      $scene = Scene_Menu.new($game_temp.menu_command_index[:status])
    else
      $scene = Scene_Map.new
    end
  end
end

class Scene_File < Scene_Base
  alias return_scene_KGC_CustomMenuCommand return_scene unless $@
  def return_scene
    if @from_title || @from_event
      return_scene_KGC_CustomMenuCommand
    elsif $game_temp.menu_command_index.has_key?(:save)
      $scene = Scene_Menu.new($game_temp.menu_command_index[:save])
    else
      $scene = Scene_Map.new
    end
  end
end

class Scene_End < Scene_Base
  def return_scene
    if $game_temp.menu_command_index.has_key?(:system)
      $scene = Scene_Menu.new($game_temp.menu_command_index[:system])
    else
      $scene = Scene_Map.new
    end
  end
end

#===============================================================================
# Game_Map
#===============================================================================

class Game_Map
 
  #--------------------------------------------------------------------------
  # map name
  #--------------------------------------------------------------------------
  unless method_defined?(:map_name)
  def map_name
    data = load_data("Data/MapInfos.rvdata")
    text = data[@map_id].name.gsub(/\[.*\]/) { "" }
    return text
  end
  end
 
end # Game_Map

#===============================================================================
# Game_Actor
#===============================================================================

class Game_Actor < Game_Battler
 
  #--------------------------------------------------------------------------
  # new method: now_exp
  #--------------------------------------------------------------------------
  def now_exp
    return @exp - @exp_list[@level]
  end
 
  #--------------------------------------------------------------------------
  # new method: next_exp
  #--------------------------------------------------------------------------
  def next_exp
    return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
  end
 
end # Game_Actor

#===============================================================================
# Window_MultiVariableWindow
#===============================================================================

class Window_MultiVariableWindow < Window_Selectable
 
  #--------------------------------------------------------------------------
  # initialize
  #--------------------------------------------------------------------------
  def initialize
    dh = 32 + 24 * YEM::MENU::VARIABLES_SHOWN.size
    dy = Graphics.height - dh
    super(0, dy, 160, dh)
    refresh
  end
 
  #--------------------------------------------------------------------------
  # refresh
  #--------------------------------------------------------------------------
  def refresh
    @data = []
    for i in YEM::MENU::VARIABLES_SHOWN
      next unless YEM::MENU::VARIABLES_HASH.include?(i)
      @time_index = @data.size if i == -1
      @data.push(i)
    end
    @item_max = @data.size
    create_contents
    for i in 0...@item_max
      draw_item(i)
    end
  end
 
  #--------------------------------------------------------------------------
  # draw_item
  #--------------------------------------------------------------------------
  def draw_item(index)
    rect = item_rect(index)
    sw = self.width - 32
    dy = WLH * index
    self.contents.clear_rect(rect)
    i = @data[index]
    case i
    when -5 # Draw Map Name
      self.contents.draw_text(0, dy, sw, WLH, $game_map.map_name, 1)
     
    when -2 # Draw Steps
      if YEM::MENU::VARIABLES_ICONS
        text = $game_party.steps
        self.contents.draw_text(0, dy, sw-24, WLH, text, 2)
        draw_icon(YEM::MENU::VARIABLES_HASH[-2][0], sw-24, dy)
      else
        text = YEM::MENU::VARIABLES_HASH[-2][1]
        value = $game_party.steps
        cx = contents.text_size(text).width
        self.contents.font.color = normal_color
        self.contents.draw_text(0, dy, sw-cx-2, WLH, value, 2)
        self.contents.font.color = system_color
        self.contents.draw_text(0, dy, sw, WLH, text, 2)
      end
     
    when -1 # Draw Time
      if YEM::MENU::VARIABLES_ICONS
        text = game_time
        self.contents.draw_text(0, dy, sw-24, WLH, text, 2)
        draw_icon(YEM::MENU::VARIABLES_HASH[-1][0], sw-24, dy)
      else
        self.contents.font.color = normal_color
        text = game_time
        self.contents.draw_text(0, dy, sw, WLH, text, 1)
      end
     
    when 0 # Draw Gold
      if YEM::MENU::VARIABLES_ICONS
        text = $game_party.gold
        self.contents.draw_text(0, dy, sw-24, WLH, text, 2)
        draw_icon(YEM::MENU::VARIABLES_HASH[0][0], sw-24, dy)
      else
        draw_currency_value($game_party.gold, 4, dy, 120)
      end
     
    else # Draw Variables
      if YEM::MENU::VARIABLES_ICONS
        text = $game_variables[i]
        self.contents.draw_text(0, dy, sw-24, WLH, text, 2)
        draw_icon(YEM::MENU::VARIABLES_HASH[i][0], sw-24, dy)
      else
        text = YEM::MENU::VARIABLES_HASH[i][1]
        value = $game_variables[i]
        cx = contents.text_size(text).width
        self.contents.font.color = normal_color
        self.contents.draw_text(0, dy, sw-cx-2, WLH, value, 2)
        self.contents.font.color = system_color
        self.contents.draw_text(0, dy, sw, WLH, text, 2)
      end
    end
  end
 
  #--------------------------------------------------------------------------
  # game_time
  #--------------------------------------------------------------------------
  def game_time
    gametime = Graphics.frame_count / Graphics.frame_rate
    hours = gametime / 3600
    minutes = gametime / 60 % 60
    seconds = gametime % 60
    result = sprintf("%d:%02d:%02d", hours, minutes, seconds)
    return result
  end
 
  #--------------------------------------------------------------------------
  # update
  #--------------------------------------------------------------------------
  if YEM::MENU::VARIABLES_SHOWN.include?(-1)
  def update
    if game_time != (Graphics.frame_count / Graphics.frame_rate)
      draw_item(@time_index)
    end
    super
  end
  end
 
end # Window_MultiVariableWindow

#===============================================================================
# Window_MenuCommand
#===============================================================================

class Window_MenuCommand < Window_Command
 
  #--------------------------------------------------------------------------
  # initialize
  #--------------------------------------------------------------------------
  def initialize(array)
    @data = array[1]
    @icons = array[2]
    super(160, array[0])
  end
 
  #--------------------------------------------------------------------------
  # refresh
  #--------------------------------------------------------------------------
  def refresh
    create_contents
    for i in 0...@item_max
      draw_item(i)
    end
  end
 
  #--------------------------------------------------------------------------
  # method
  #--------------------------------------------------------------------------
  def method; return @data[self.index]; end
   
  #--------------------------------------------------------------------------
  # draw_item
  #--------------------------------------------------------------------------
  def draw_item(index, enabled = true)
    rect = item_rect(index)
    rect.x += 4
    rect.width -= 8
    self.contents.clear_rect(rect)
    self.contents.font.color = normal_color
    #---
    text = @commands[index]
    icon = @icons[index]
    case @data[index]
    when :items, :skill, :equip, :status, :kgc_apviewer, :kgc_skillcp,
      :kgc_distribute, :yerd_classchange, :yerd_learnskill, :yerd_equipslots
      enabled = ($game_party.members.size == 0 ? false : true)
    when :save
      enabled = !$game_system.save_disabled
    when :kgc_largeparty
      enabled = ($game_party.members.size == 0 ? false : true)
      enabled = false if !$game_party.partyform_enable?
    else
      if YEM::MENU::COMMON_EVENTS.include?(@data[index])
        if YEM::MENU::COMMON_EVENTS[@data[index]][1] != nil
          switch_id = YEM::MENU::COMMON_EVENTS[@data[index]][1]
          enabled = !$game_switches[switch_id]
        end
      elsif YEM::MENU::IMPORTED_COMMANDS.include?(@data[index])
        if YEM::MENU::IMPORTED_COMMANDS[@data[index]][1] != nil
          switch_id = YEM::MENU::IMPORTED_COMMANDS[@data[index]][1]
          enabled = !$game_switches[switch_id]
        end
      end
    end
    #---
    self.contents.font.color.alpha = enabled ? 255 : 128
    dx = rect.x; dy = rect.y; dw = rect.width
    if YEM::MENU::USE_ICONS and icon.is_a?(Integer)
      draw_icon(icon, 0, dy, enabled)
      dx += 20; dw -= 20
    end
    self.contents.draw_text(dx, dy, dw, WLH, text, YEM::MENU::ALIGN)
  end
 
end # Window_MenuCommand

#===============================================================================
#
# END OF FILE
#
#===============================================================================
This is the Main Menu Melody script.

I Need to doublepost, else it won't let me post both scripts here  :(

**
Rep: +0/-0Level 74
RMRK Junior
This is the FFXIII layout script

Code: [Select]
# 127- 4 max colummnns
#===============================================================================
#
# Shanghai Simple Script - Final Fantasy 13 Main Menu
# Last Date Updated: 2010.06.02
# Level: Normal
#
# NOTE! This requires Yanfly Engine Melody's Main Menu Melody script to be
# installed and located above this script to work. This makes your main menu
# ordered like Final Fantasy 13's.
#===============================================================================
# Instructions
# -----------------------------------------------------------------------------
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ? Materials but above ? Main. Remember to save.
#
#===============================================================================
 
$imported = {} if $imported == nil
$imported["FinalFantasy13Menu"] = true
 
module SSS
  # This is the image file for the menu background. Place this inside of the
  # Graphics\System folder.
  MENU_BACK_IMAGE = "MenuBack"
 
  # This is the image file used for the back of each of the menu items. This
  # image must be 160x24 pixels and placed inside of the Graphics\System folder.
  MENU_BACK_ITEM_IMAGE = "MenuBackItem"
 
  # This sets the menu help window's text color.
  MENU_HELP_TEXT_COLOR = Color.new(0, 0, 0)
 
  # This is the text format used to write out the current map.
  MENU_LOCATION = "Location: %s"
 
  # This hash sets the image files for your actors. These images must be placed
  # inside of the Graphics\System folder and they have to be 104x288 pixels.
  MENU_ACTOR_IMAGES ={
    1 => "menu_yoshi",
    2 => "menu_kenta",
    3 => "menu_eiko",
    4 => "menu_kazumi",
    5 => "menu_nekomi",
    6 => "menu_kage",
  } # Remove this and perish.
 
  # This hash sets what colors belong to which class when drawn.
  MENU_CLASS_COLORS ={
    1 => 2,
    2 => 6,
    3 => 18,
    4 => 4,
    5 => 13,
    6 => 8,
    7 => 18,
    8 => 25,
  } # Remove this and perish.
 
  # This sets the help window descripts for the menu commands.
  MENU_HELP_WINDOW ={
    "Oggetti"     => "",
    "Status"   => "",
    "Skill"    => "",
    "Equip"    => "",
    "Formazione"     => "",
    "Party"    => "",
    "Salva"     => "",
    "Esci"      => "",
    "Sistema"   => "",
  } # Remove this and perish.
end
 
#==============================================================================
# ** Window_Base
#==============================================================================
 
class Window_Base < Window
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  alias initialize_sss_ff13_menu_window_base initialize unless $@
  def initialize(x, y, width, height)
    initialize_sss_ff13_menu_window_base(x, y, width, height)
    self.opacity = 0 if $scene.is_a?(Scene_Menu)
  end
end
 
#==============================================================================
# ** Window_MenuHelp
#==============================================================================
 
class Window_MenuHelp < Window_Help
  #--------------------------------------------------------------------------
  # * Set Text
  #--------------------------------------------------------------------------
  def set_text(text, align = 0)
    if text != @text or align != @align
      self.contents.clear
      self.contents.font.shadow = false
      self.contents.font.color = SSS::MENU_HELP_TEXT_COLOR
      self.contents.draw_text(4, 0, self.width - 40, WLH, text, align)
      @text = text
      @align = align
    end
  end
end
 
#==============================================================================
# ** Window_MainMenuParty
#==============================================================================
 
class Window_MainMenuParty < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(x, y)
    super(x-24, y, Graphics.width-x+32, Graphics.height-y)
    self.active = false
    #@column_max = [4, $game_party.members.size].max
    @column_max = [4, 4].max
    @spacing = 0
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    $game_temp.in_battle = true # ADDED
    @data = $game_party.members
    @item_max = @data.size
    create_contents
    for i in 0...@item_max
      draw_item(i)
    end
    $game_temp.in_battle = false # ADDED
  end
  #--------------------------------------------------------------------------
  # * Draw Item
  #--------------------------------------------------------------------------
  def draw_item(index)
    rect = item_rect(index)
    self.contents.clear_rect(rect)
    actor = @data[index]
    unless actor.nil?
      draw_actor_image(actor, rect)
      draw_actor_name(actor, rect)
      draw_actor_state(actor, rect.x+65, 292 - WLH*7/2 - 8, 96)
      draw_actor_class(actor, rect)
      draw_actor_level(actor, rect)
      draw_actor_hp(actor, rect)
      if actor.class_id.to_i != 6
      draw_actor_mp(actor, rect)
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Draw Actor Image
  #--------------------------------------------------------------------------
  def draw_actor_image(actor, rect)
    filename = SSS::MENU_ACTOR_IMAGES[actor.id]
    return if filename.nil?
    bitmap = Cache.system(filename)
    image_rect = Rect.new(2, 2, rect.width-4, 284)
    self.contents.blt(rect.x+2, rect.y+2, bitmap, image_rect)
  end
  #--------------------------------------------------------------------------
  # * Draw Actor Name
  #--------------------------------------------------------------------------
  def draw_actor_name(actor, rect)
    name = actor.name
    self.contents.font.size = Font.default_size
    self.contents.font.color = normal_color
    self.contents.draw_text(rect.x+4, WLH*3/2-20, rect.width-8, WLH, name, 2)
  end
  #--------------------------------------------------------------------------
  # * Draw Actor Class
  #--------------------------------------------------------------------------
  def draw_actor_class(actor, rect)
    name = actor.class.name
    self.contents.font.size = Font.default_size - 4
    color_id = SSS::MENU_CLASS_COLORS[actor.class.id].to_i
    self.contents.font.color = text_color(color_id)
    self.contents.draw_text(rect.x+4, WLH*0, rect.width-8, WLH, name, 2)
  end
  #--------------------------------------------------------------------------
  # * Draw Actor Level
  #--------------------------------------------------------------------------
  def draw_actor_level(actor, rect)
    self.contents.font.size = Font.default_size - 4
    self.contents.font.color = power_up_color
    yy = 292 - WLH*7/2 - 8
    #self.contents.draw_text(rect.x+4, yy, rect.width-8, WLH, Vocab.level_a, 0)
    draw_icon(274, rect.x+4, yy)
    self.contents.font.color = normal_color
    self.contents.font.size += 2
    self.contents.draw_text(rect.x+4+26, yy-1, rect.width-8, WLH, actor.level, 0)
  end
  #--------------------------------------------------------------------------
  # * Draw Actor HP
  #--------------------------------------------------------------------------
    def draw_actor_hp(actor, rect)
    self.contents.font.color = system_color
    yy = 288 - WLH*5/2 - 4
    #draw_actor_hp_gauge(actor, rect.x+4, yy, rect.width-8)   
      draw_slant_bar(rect.x+4,yy+12,actor.hp,actor.maxhp,rect.width-8,8,
        SLANT_BARS::DEFAULT_HP_BAR_COLOR,SLANT_BARS::DEFAULT_HP_END_COLOR)
       
    self.contents.font.size = Font.default_size - 4
    #self.contents.draw_text(rect.x+4, yy, rect.width-8, WLH, Vocab::hp_a)
    #draw_icon(272, rect.x+4, yy)
   
    self.contents.font.size -= 4
    self.contents.font.color = normal_color
    self.contents.draw_text(rect.x+4, yy+2, 30, WLH, "HP")
    self.contents.font.size += 4
   
    self.contents.font.color = hp_color(actor)
    last_font_size = self.contents.font.size
    xr = rect.x+4 + 94
      self.contents.font.size = 16
      self.contents.draw_text(xr - 70, yy, 26, WLH, actor.hp, 2)
      self.contents.font.color = normal_color
      self.contents.draw_text(xr - 44, yy, 12, WLH, "/", 1)
      self.contents.draw_text(xr - 32, yy, 26, WLH, actor.maxhp, 2)
  end
  #--------------------------------------------------------------------------
  def draw_actor_hp_gauge(actor, x, y, width)
    gw = width * actor.hp / actor.maxhp
    gc1 = hp_gauge_color1
    gc2 = hp_gauge_color2
    self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color)
    self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2)
  end
  #--------------------------------------------------------------------------
  # * Draw Actor MP
  #--------------------------------------------------------------------------
  def draw_actor_mp(actor, rect)
    self.contents.font.color = system_color
    yy = 300 - WLH*4/2 - 4
    #draw_actor_mp_gauge(actor, rect.x+4, yy, rect.width-8)
      draw_slant_bar(rect.x+4,yy+12,actor.mp,actor.maxmp,rect.width-8,8,
        mp_gauge_color1(actor),mp_gauge_color2(actor))
    #self.contents.draw_text(rect.x+4, yy, rect.width-67, WLH, MP_Types[actor.class.id - 1])
    #self.contents.draw_icon(MP_Types[actor.class.id - 1], rect.x+4, yy)
   
    self.contents.font.size -= 3
    self.contents.font.color = normal_color
    case actor.class.id
    when 1, 3
      self.contents.draw_text(rect.x+4, yy+1, 26, WLH, "Ammo")
    when 2
      self.contents.draw_text(rect.x+4, yy+1, 26, WLH, "Bat")
    when 4..5, 7
      self.contents.draw_text(rect.x+4, yy+1, 26, WLH, "Psi")
    end
   
    self.contents.font.color = mp_color(actor)
    last_font_size = self.contents.font.size
    xr = rect.x+4 + 94
      self.contents.font.size = 16
      self.contents.draw_text(xr - 70, yy, 26, WLH, actor.mp, 2)
      self.contents.font.color = normal_color
      self.contents.draw_text(xr - 44, yy, 12, WLH, "/", 1)
      self.contents.draw_text(xr - 32, yy, 26, WLH, actor.maxmp, 2)
  end
  #--------------------------------------------------------------------------
def draw_actor_mp_gauge(actor, x, y, width)
    gw = width * actor.mp / actor.maxmp
    gc1 = mp_gauge_color1(actor)
    gc2 = mp_gauge_color2(actor)
    self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color)
    self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2)
  end
  #--------------------------------------------------------------------------
  # * Item Rect
  #--------------------------------------------------------------------------
  def item_rect(index)
    rect = Rect.new(0, 0, 0, 0)
    rect.width = (contents.width + @spacing) / @column_max - @spacing
    rect.height = 288
    rect.x = index % @column_max * (rect.width + @spacing)
    rect.y = index / @column_max * WLH
    return rect
  end
end
 
#==============================================================================
# ** Window_MenuTimer
#==============================================================================
 
class Window_MenuTimer < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, Graphics.height - 60, 120, 56)
    self.contents.font.size = Font.default_size - 4
    self.contents.font.shadow = false
    self.contents.font.color = SSS::MENU_HELP_TEXT_COLOR
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    format = "%03d:%02d:%02d"
    @game_time = Graphics.frame_count / Graphics.frame_rate
    hours = @game_time / 3600
    minutes = @game_time / 60 % 60
    seconds = @game_time % 60
    text = sprintf(format, hours, minutes, seconds)
    self.contents.draw_text(0, 0, contents.width-4, WLH, text, 2)
  end
  #--------------------------------------------------------------------------
  # * Update
  #--------------------------------------------------------------------------
  def update
    super
    refresh if @game_time != (Graphics.frame_count / Graphics.frame_rate)
  end
end
 
#==============================================================================
# ** Window_MenuGold
#==============================================================================
 
class Window_MenuGold < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(100, Graphics.height - 60, 120, 56)
    self.contents.font.size = Font.default_size - 4
    self.contents.font.shadow = false
    self.contents.font.color = SSS::MENU_HELP_TEXT_COLOR
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    text = sprintf("%d%s", $game_party.gold, Vocab.gold)
    self.contents.draw_text(0, 0, contents.width-4, WLH, text, 0)
  end
end
 
#==============================================================================
# ** Window_MenuLocation
#==============================================================================
 
class Window_MenuLocation < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(Graphics.width/2-16, Graphics.height - 60, Graphics.width/2+16, 56)
    self.contents.font.size = Font.default_size - 4
    self.contents.font.shadow = false
    self.contents.font.color = SSS::MENU_HELP_TEXT_COLOR
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    text = sprintf(SSS::MENU_LOCATION, $game_map.map_name)
    self.contents.draw_text(4, 0, contents.width, WLH, text, 0)
  end
end
 
#===============================================================================
# Override Main Menu Melody Settings
#===============================================================================
 
YEM::MENU::USE_ICONS = false
YEM::MENU::MENU_RIGHT_SIDE = false
YEM::MENU::ON_SCREEN_MENU = false
YEM::MENU::USE_MULTI_VARIABLE_WINDOW = false
 
#==============================================================================
# ** Scene_Menu
#==============================================================================
 
class Scene_Menu < Scene_Base
  #--------------------------------------------------------------------------
  # * Start processing
  #--------------------------------------------------------------------------
  alias start_sss_ff13_menu start unless $@
  def start
    start_sss_ff13_menu
    start_ff13_menu_style
  end
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  alias terminate_sss_ff13_menu terminate unless $@
  def terminate
    @help_window.dispose
    @location_window.dispose
    @menu_timer_window.dispose
    @menubackitem_sprite.bitmap.dispose
    @menubackitem_sprite.dispose
    terminate_sss_ff13_menu
  end
  #--------------------------------------------------------------------------
  # * Create Background for Menu Screen
  #--------------------------------------------------------------------------
  def create_menu_background
    @menuback_sprite = Sprite.new
    @menuback_sprite.bitmap = Cache.system("MenuBack_a")
    @menuback_sprite2 = Sprite.new
    @menuback_sprite2.bitmap = Cache.system("MenuBack_b")
    @menuback_sprite2.z -= 2
    update_menu_background
  end
  #--------------------------------------------------------------------------
  # * Update Background for Menu Screen
  #--------------------------------------------------------------------------
  def update_menu_background
    super
    @menubackitem_sprite.update unless @menubackitem_sprite.nil?
    @menu_timer_window.update unless @menu_timer_window.nil?
  end
  #--------------------------------------------------------------------------
  # * Create Menu Back Items
  #--------------------------------------------------------------------------
  def create_menu_back_items
    @menubackitem_sprite = Sprite.new
    width = 160
    height = @command_window.height-32
    @menubackitem_sprite.bitmap = Bitmap.new(width, height)
    bitmap = Cache.system(SSS::MENU_BACK_ITEM_IMAGE)
    rect = Rect.new(0, 0, 160, 24)
    y = 0
    loop do
      break if y >= height
      @menubackitem_sprite.bitmap.blt(0, y, bitmap, rect)
      y += 24
    end
    @menubackitem_sprite.y = @command_window.y+16
  end
  #--------------------------------------------------------------------------
  # * Start Final Fantasy 13 Menu Style
  #--------------------------------------------------------------------------
  def start_ff13_menu_style
    @gold_window.dispose
    @gold_window = Window_MenuGold.new
    @menu_timer_window = Window_MenuTimer.new
    @location_window = Window_MenuLocation.new
    @help_window = Window_MenuHelp.new
    @help_window.x += 48
    @help_window.width -= 48
    @help_window.create_contents
    @help_window.contents.font.size = Font.default_size - 4
    @command_window.y = @help_window.height - 9
    @status_window.dispose
    x = @command_window.width
    y = @help_window.height-9
    @status_window = Window_MainMenuParty.new(x, y)
    @command_window.x -= 4
    @help_window.y += 12
    update_help_window
    create_menu_back_items
  end
  #--------------------------------------------------------------------------
  # * Update Command Selection
  #--------------------------------------------------------------------------
  alias update_command_selection_sss_ff13_menu update_command_selection unless $@
  def update_command_selection
    update_help_window
    update_command_selection_sss_ff13_menu
  end
  #--------------------------------------------------------------------------
  # * Update Help Window
  #--------------------------------------------------------------------------
  def update_help_window
    return if @help_window_index == @command_window.index
    @help_window_index = @command_window.index
    commands = @command_window.commands
    text = SSS::MENU_HELP_WINDOW[commands[@help_window_index]].to_s
    @help_window.set_text(text)
  end
end
 
#===============================================================================
#
# END OF FILE
#
#===============================================================================

**
Rep: +0/-0Level 65
I think I found a little bug when I use this script and the Skill CP System - KGC_SkillCPSystem, and I was hoping for a little help to correct it.

What happens is that the equipment that you configure using the KGC script behaves in odd ways in the grid.

Example:
I have the "Fairy Shoes" classified as a "leg equipment" and when I equip them using the Grid inventory, the shoes don't get removed from the grid but they still get equipped by the actor. With this you can "clone" the equipment and equip it to another actor.

I tried changing the order of the scripts too. But when I do that, I get this error when I am about to equip the "Fairy Shoes":



Thanks in advance for your reply, and I hope that this is easily fixable.

(And I REALLY hope that it is not some stupid configuration mistake on my part, I
double checked, but you never know...)
« Last Edit: October 12, 2011, 02:53:11 PM by vision_bond »

**
Rep: +0/-0Level 65
Well, it seems that poor vision_bond won't have grid inventory for christmas...  :-\

POOR POOR vision_bond...  :(

**
Rep: +0/-0Level 73
RMRK Junior
can you use this script to make an item that changes the inventory size?

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Yes, it would just need to call a common event, and in that common event have the following code in a script call:

Code: [Select]
resize_actor_inventory (actor_id, width, height)

where actor ID is an integer representing the actor, width is the new width, and height is the new height.

EX:
Code: [Select]
resize_actor_inventory (2, 9, 8)

That would change actor 2's inventory to be 9x8.

If you wanted the item to be targetted in such a way that it only works on the actor you select, you would need another script which allows that. I think I wrote a script which did that. Just look in the Script Index for something like "Record Target Variable"

*
Rep: +0/-0Level 64
RMRK Junior
I'm using the other two scripts you said should be used along with you. Don't know if that means anything, but if you need it... anyway, here's my problem: I can't even play the ame because before it starts, the screen stays black and a window pops up.

Script 'GridInventory' line 1640: NameError occured.
undefined method 'include?' for class 'Window_Item'

Don't know what it means at all. I have 100% zero knowledge of scripting, so...
The only other script I use that didn't come with the software is Yanfly's battle face script (shows actor faces in battle). Any help would be much obliged.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Well, include? is a default method in Window_Item, so maybe the problem is script order? This script has to be below every default script slot except for Main. The only other thing I can think of off the top of my head is that you shouldn't replace any of the default scripts with this one either.

Other than that, test out the demo - see if it works there.

**
Rep: +0/-0Level 67
RPGVX Advanced (I Do Not Script Tough)
 ;8WOW ;8
NICE JOB DUDE
looks like naruto ninja chronicles ;D

*
Rep: +0/-0Level 63
RMRK Junior
I think this menu system is awesome sauce.  I only have 1 question.  Is there a way to prevent users from destroying
an item that should never be destroyed.  For example, I have an object, that calls a common event.  It is the only thing in the game that calls the common event, therefore should never be deleted.  Is that possible with this system?

**
Rep: +0/-0Level 73
RMRK Junior
When i use the mouse cursor script in the Wora script pack it doesn't work for grid inventory. is there a fix for that?

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
@Thearun - well, there is this:

Quote
#    \nondiscard
#      this option sets the item as undiscardable through the inventory scene.
#       Bear in mind that it does not prevent the player from storing the item,
#       and if the item is in Loot, then it can still be destroyed.

Ie, if you place \nondiscard in the notebox of an item, weapon, or armor, then the player cannot discard it. However, you would need to make sure it actually went into their inventory when they first got it.


@WatfordJ - I do not know. I do not plan to make a patch for that though, so maybe you could try posting a general request in the Scripts Board.

*
Rep: +0/-0Level 67
RMRK Junior
Let me start off by saying i am a very big fan of your work :D. I was taking a look at your grid inventory script to use for my game, but at the same time i am i incorporating XAS. The problem with this is XAS tends to use the SKILL list instead of ITEM list. is there a way to add code to skills? For example, in XAS there is a potion, i tried adding the maxstack command to the notes out of curiosity but no luck :(.


P.S I think you should work on an achievement script, a good idea would be to derive it from your Quest Journal script.

**
Rep: +0/-0Level 67
RMRK Junior
umm... i need a small hint thingy... Sorry for the necro-post... But im trying to add items to a chest... I tried to match it but it says there is a syntaxerror when i click on the chest.

I need help defining the item types.... What does it mean by that...? I looked in the script and alas.. no help there.... here is the code


potion = [0, 1, 5]
Phoenix Plume = [0, 22, 5]
Thread = [0, 23, 5]
Linen Cloth = [0, 24, 5]
items = [potion, Phoenix Plume, Thread,
Linen Cloth]
open_storage (0, items, "Red Chest", 95)

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Well, there are a bunch of problems with what you posted; you shouldn't use spaces in your variable names, you shouldn't use capital letters, and you shouldn't any line of code be on more than one line. Do this instead:

Code: [Select]
a = [0, 1, 5]
b = [0, 22, 5]
c = [0, 23, 5]
d = [0, 24, 5]
items = [a, b, c, d]
open_storage(0, items, "Red Chest", 95)

**
Rep: +0/-0Level 67
RMRK Junior
err really stupid question... what does the a b c d stand for?

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
They are just names of variables you create. It could just as easily be (excluding items 23 and 24 from the chest):

Code: [Select]
fragglemonster = [0, 1, 5]
iggles = [0, 22, 5]
womper = [fragglemonster, iggles]
open_storage(0, womper, "Red Chest", 95)

I used a, b, c, d, since they are short and it won't go over the space restrictions in the script event command.

**
Rep: +0/-0Level 67
RMRK Junior
oh okay! hahaha Thanks!

**
Rep: +0/-0Level 73
RMRK Junior
how do i make an empty storage?

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Should be OK if you just do: open_storage(id)

So, something like:

Code: [Select]
open_storage(1)

or
Code: [Select]
open_storage(34)

Whatever - you just have to use a unique ID.

**
Rep: +0/-0Level 74
Pretty much inactive here.
Apologies for the necro/ressurection, but is there any way to make this compatible with YEM? The only problem I've ran into is that I can't use the '  GI_PERSONAL_ITEM_USE' function which was what I was really wanting. Whenever I try to select items in battle I get an error on line 3215, with 'undefined method 'inventory''.

Apologies for the necro again.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Well, which script or scripts in YEM specifically conflict? I don't think I'm up for making it compatible with 60+ scripts.

Also, have you tried switching the order (ie. putting this script below the problematice YEM scripts in the Script Editor)?

Additionally, what is the specific error? Tell me verbatim.

**
Rep: +0/-0Level 74
Pretty much inactive here.
The error's coming from line 3215 in the inventory grid script. Whenever I try to go into the item menu, I get:

Script 'Grid Inventory 1.0e' line 3215: NoMethodError occurred.

Undefined method 'inventory' for nil:NilClass

This is with this script placed underneath the five main BEM scripts. When it's above that you can go into the item menu fine, so I assume it's those ones which are being problematic.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Well, I don't have time to learn BEM and figure out what it's up to, but on a very cursory look, try going to lines 3211-3216 and replace this:
Code: [Select]

    # Run Original Method
    modalr_invgrid_slctitm_windo_4h21 (*args)
    return unless  ModernAlgebra::GI_PERSONAL_ITEM_USE
    # Setup inventory
    @item_window.ma_inventory = @active_battler.inventory
    @item_window.refresh

with the following:

Code: [Select]

    # Run Original Method
    modalr_invgrid_slctitm_windo_4h21 (*args)
    return unless  ModernAlgebra::GI_PERSONAL_ITEM_USE
    # Setup inventory
    @item_window.ma_inventory = @selected_battler.inventory if @selected_battler
    @item_window.refresh

That might not fix the problem and it might not be the only problem between the scripts, but if the errors are more widespread then that then I am sorry, but I probably won't be able to write a compatibility patch at this time.

**
Rep: +0/-0Level 74
Pretty much inactive here.
That did it! Thank you :)

**
Rep: +0/-0Level 40
RMRK Junior
Sorry for necro-posting.

Hello, in first place, thanks you very much for this incredible script. :)

These days I've been working with this script.

I'm trying to pass it to RPG Maker VX Ace, and also make some changes. I want each grid is sixteen grids. That is, in your example a Ring is a imagen of 32x32 and this occupies a grid. I want that ring holding one of those mini grids and have a imagen of 8x8, so that I can get 16 rings in a grid, and while the selection and movement square is a grid (16 mini grids) and objects like a shield continue have 2x4 grids and imagen of 64x128. Something like this:



Could you guide me a little to know what parts of the script should be modified to make those changes?

I do not know if I have explained well, my English sucks.
« Last Edit: March 19, 2013, 12:56:21 AM by Duende »

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
The method that draws the grid is just the refresh method of Window_InventoryGrid:

Code: [Select]

  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Refresh
  #    width  : the width of the current inventory
  #    height : the height of the current inventory
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  def refresh (inventory)
    self.contents.clear
    width = inventory.grid.xsize
    height = inventory.grid.ysize
    colour = Color.new (*ModernAlgebra::GI_GRID_COLOUR)
    # Calculate the scaling factor:
    scaling_factor = [(contents.width - 2) / width.to_f, (contents.height - 2) / height.to_f].min / 32.0
    scaling_factor = 1 if scaling_factor > 1
    multiplier = (32*scaling_factor).to_i
    # Centre the grid
    x = ((contents.width - (width*multiplier)) / 2)
    y = ((contents.height - (height*multiplier)) / 2)
    # Draw vertical lines
    for i in 0...width + 1
      self.contents.fill_rect (x + i*multiplier, y, 2, height*multiplier, colour)
    end
    # Draw horizontal lines
    for i in 0...height + 1
      self.contents.fill_rect (x, y + i*multiplier, width*multiplier + 2, 2, colour)
    end
    return self.x + 16 + x, self.y + 16 + y, scaling_factor
  end

**
Rep: +0/-0Level 40
RMRK Junior
Thank you, I saw it after sending you PM.

I'm gradually translating script to VX Ace and also make the change I mentioned in the post above. I managed to draw the grid and add the cursor movement.



Where in the code become the cursor in a rectangle?

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
It's done in the update_cursor method of Window_InventoryCursor.

Maybe you should start with a script that's a little simpler. This is an old script with which I am no longer familiar. I will not be able to walk you through everything, and it might be better for you to get a little more experience before tackling this script.

**
Rep: +0/-0Level 40
RMRK Junior
Thanks for your help, modern algebra. I decided to start almost from zero, and use your inventory system like reference.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
That's a good idea. Good luck!

**
Rep: +0/-0Level 40
RMRK Junior
Hi again, modern algebra.

I'm having problems with the items. How did you create unique items?

Edit: Ok, I saw this: http://rmrk.net/index.php/topic,47427.0.html
« Last Edit: April 07, 2013, 11:47:53 AM by Duende »

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Best Member2012 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best RPG Maker User (Scripting)2011 Best Use of Avatar and Signature Space2010 Most Mature Member2010 Favourite Staff Member
Sorry I haven't been around to answer your questions. I've been lazy. Anyway, the unique items in this script aren't actually unique and don't rely on the Item Instances Base. It was just a graphical thing, where a new slot would be created whenever the items exceeded the maximum permitted in a group.

**
Rep: +0/-0Level 73
RMRK Junior
are you going to port this script to ace?

*
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Rep:
Level 96
&&&&&&&&&&&&&&&&&&&&&&&&&&&
GIAW 14: 2nd Place (Hard Mode)2013 Biggest Drama Whore2013 Zero to HeroParticipant - GIAW 11Secret Santa 2013 ParticipantFor taking arms in the name of your breakfast.
&&&&&&&&&&&&&&&&

*
Rep: +0/-0Level 23
RMRK Junior
I'm so sorry for necroposting, but the item description can't show variables as it used to after I put in your script.
Can you fix that, please?
(Sorry if my English isn't good)