Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Individualising items (on VX, shouldn't be too different to XP)

I'd like to convert this hash to an array or something. So rather than having Potion x5, I'd like to have it so it's Potion, Potion, Potion, Potion, Potion.

Then, if possible, I'd like to have it so two of the same item could have slightly different properties (for example, if I have two potions, I'd like to be able to increase the recovery of one of them, but leave the other normal with a call script event).

I can get around #2, but I'd like to see if it's possible to make individualised item slots. Many thanks.
 
I was thinking on making the exact same thing. But i can't figure out how to manipulate the item database via RGSS.
I'm with you dude, wanna know if someone knows how to do it.
 
In Window_Item, it only puts one RPG::Item/Weapon/Armor data in for each thing you have.  With simple Ruby, you can make it put in an entry for each thing you have.

(VX code)
Code:
class Game_Party
  def items
    result = []
    for i in @items.keys.sort
      @items[i].times do
        result.push($data_items[i])
      end
    end
    for i in @weapons.keys.sort
      @weapons[i].times do
        result.push($data_weapons[i])
      end
    end
    for i in @armors.keys.sort
      @armors[i].times do
        result.push($data_armors[i])
      end
    end
    return result
  end
end
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top