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 2 Guests are viewing this topic.

**
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 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best 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 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best 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 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best 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 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best 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 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best 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 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best 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 Zero to Hero2013 Biggest Drama WhoreParticipant - 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)