Author Topic: [Resolved 'coz Azi's dumb]Item Database Save/Load  (Read 1967 times)

Offline Azuriyuu

  • Trained Member
  • *
  • Posts: 20
  • LV: 2
    • View Profile
[Resolved 'coz Azi's dumb]Item Database Save/Load
« on: June 22, 2009, 01:07:08 AM »
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.
« Last Edit: June 22, 2009, 10:52:38 PM by Azuriyuu »

Offline Ryex

  • Arctic Bird of Programming
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 5135
  • LV: 198
  • Gender: Female
  • Wants to write a compiler for fun
    • View Profile
Re: Item Database Save/Load
« Reply #1 on: June 22, 2009, 01:10:12 AM »
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.

DropBox, the best free file syncing service there is.
(click to show/hide)

Offline Azuriyuu

  • Trained Member
  • *
  • Posts: 20
  • LV: 2
    • View Profile
Re: Item Database Save/Load
« Reply #2 on: June 22, 2009, 02:08:00 AM »
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
« Last Edit: June 22, 2009, 02:11:35 AM by Azuriyuu »

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6591
  • LV: 407
  • Gender: Male
    • View Profile
Re: Item Database Save/Load
« Reply #3 on: June 22, 2009, 06:30:51 AM »
Not needed at all. All you need to do is this

Code: [Select]
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]

Offline Azuriyuu

  • Trained Member
  • *
  • Posts: 20
  • LV: 2
    • View Profile
Re: Item Database Save/Load
« Reply #4 on: June 22, 2009, 06:46:53 AM »
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.

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6591
  • LV: 407
  • Gender: Male
    • View Profile
Re: Item Database Save/Load
« Reply #5 on: June 22, 2009, 07:48:51 AM »
exactly what do you need then? I really dont get it.

Offline Starrodkirby86

  • Kirby de Varita Estelar
  • Guardian of Chaos
  • ********
  • Posts: 3281
  • LV: 194
  • Gender: Male
  • ~!
    • View Profile
    • The Archive of Starrodkirby86
Re: Item Database Save/Load
« Reply #6 on: June 22, 2009, 08:04:25 AM »
Quote
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).

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?).



Offline Calintz

  • Guardian of Chaos
  • ********
  • Posts: 3803
  • LV: 108
  • Gender: Male
  • A Pixel's Worst Nightmare
    • View Profile
Re: Item Database Save/Load
« Reply #7 on: June 22, 2009, 08:08:19 AM »
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.

Offline Azuriyuu

  • Trained Member
  • *
  • Posts: 20
  • LV: 2
    • View Profile
Re: Item Database Save/Load
« Reply #8 on: June 22, 2009, 08:40:00 AM »
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.

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20016
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: Item Database Save/Load
« Reply #9 on: June 22, 2009, 04:31:48 PM »
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      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


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

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

Offline Azuriyuu

  • Trained Member
  • *
  • Posts: 20
  • LV: 2
    • View Profile
Re: Item Database Save/Load
« Reply #10 on: June 22, 2009, 10:48:50 PM »
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...

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20016
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [Resolved 'coz Azi's dumb]Item Database Save/Load
« Reply #11 on: June 23, 2009, 11:34:23 AM »
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      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


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

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