[Resolved 'coz Azi's dumb]Item Database Save/Load

Started by Azuriyuu, June 21, 2009, 07:07:08 pm

Previous topic - Next topic

Azuriyuu

June 21, 2009, 07:07:08 pm Last Edit: June 22, 2009, 04:52:38 pm by Azuriyuu
Hey, I'm asking for a tutorial for RPG Maker XP as to how to save/load an item database from a seperate file which is attached to the save file(Or even embedded in the save file).

The reasons for this would primarily to be mixed with the Item Creation System that Blizzard designed.  The uses I imagine are to allow one to do a New Game + retaining the existance of created items, be able to trade created items to another player, or to create bones files if one wanted to create a Roguelike in RPG Maker XP.

EDIT: Pay no attention, folks, move along, nothing to see here, no dead bodies behind the curtain.

Ryex

I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Azuriyuu

June 21, 2009, 08:08:00 pm #2 Last Edit: June 21, 2009, 08:11:35 pm by Azuriyuu
Well, while New Game +ing is one of the reasons why I want to be able to save and load the item database, that's not the main reason.  :P

The main reason is actually so I can add additional properties to the items, particularly because in the game I'm making I don't want to work with Str, Dex, Agi, and Int(I want to change Dex to Con for defense and add in a Spirit for Magic-Defense), and I want to be able to make equips capable of adding or subtracting from the fifth actor/battler stat.

Additionally, I want to add a few more, 'hidden' properties which would have other effects.  If I could load the item portion of the database from a seperate file, then I could just type in all the items in the game into that seperate file and have it behave as if they were saved into the database.  Then the saving an item database would come from if I did both item crafting and a New Game+, or something like Golden Sun, or again, it'd be handy if I wanted to make a Roguelike style bones file.

EDIT: Also, I thought of another use; if one extended it to actors and classes, and used the RMX-OS, one could also use it as sort of a DLC-type function, allowing a creator to add bonus-characters or weapons in later if he so felt like it.  :P

G_G

Not needed at all. All you need to do is this


module RPG
  class Item
    def hidden_stat_here
      case id
      when item_id then return stat_amount
      end
      return 0
    end
  end
end
[code]

Example
[code]
module RPG
  class Item
    def magic_defense
      case id
      when 5 then return 80
      when 8 then return 100
      end
      return 0
    end
  end
end
[code]

You can do it with weapons and armors too. Just replace Item with Armor or Weapon
[/code][/code][/code]

Azuriyuu

That still doesn't quite have all the functionality that I'm looking for, but thank you, game_guy.  It'll be a good place to start.

G_G

exactly what do you need then? I really dont get it.

Starrodkirby86

QuoteHey, I'm asking for a tutorial for RPG Maker XP as to how to save/load an item database from a seperate file which is attached to the save file(Or even embedded in the save file).


Can you elaborate on this more? It might help in the end.

What's osu!? It's a rhythm game. Thought I should have a signature with a working rank. ;P It's now clickable!
Still Aqua's biggest fan (Or am I?).




Calintz

He wants the ability to pull the Items Data(located in the projects Data folder) from a previous save file, and integrate it directly into the current gameplay.

Azuriyuu

Exactly.  I can see that as being a very useful and multi-faceted function and I think it could be used for quite a bit.

Blizzard

In case you didn't notice, Creation System DOES save newly created items into the savefile. -_-
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Azuriyuu

Huh, does it, now?  Well, don't mind me, I'm just gonna put my foot in my mouth and chew on it for a while...

Blizzard

Lol! The script saves created stuff into variables of Game_System which gets saved in the save file. That's how it works.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.