Previous Blog Next Blog
Prev/Next Blog
by date

TGB RPGness Part 1 (Inventory)

TGB RPGness Part 1 (Inventory)
Name:Matt Huston
Date Posted:Jul 31, 2006
Rating:4.0 out of 5
Public:YES
Comments:YES
RSS Feed:GarageGames Blog feedor Subscribe with .
Profile Page:View profile page for Matt Huston

Blog post
A few months ago I was working on implementing some RPG features to TGE. I implemented a character generator, character sheets, and a new branching dialog system (the resources out there just weren't working for me).

So now that I am spending most of my programming time over in the realm of 2D. Being an RPG lover, I decided I'd implement some RPG features in my free time. Fallout is by far my favorite game and favorite RPG of all time obviously. I enjoyed Knights of the Old Republic, Baldur's Gate, Arcanum, and Temple of Elemental Evil, but I've always had a interest in post-apocalyptic settings. The first game I ever bought with my own money (that being - I had other games but parental units had purchased them) was a post-apocalyptic RPG, back in 1991 called Twilight 2000. It was suprisingly an isometric RPG, way ahead of its time, and supposedly the last game by Paragon Software. I was young but I played the heck out of that game. It was definately aimed at adults in terms of difficulty but I always enjoyed games that were like that way more.

So I wanted to duplicate what I liked about those types of games and I decided I'd start with an inventory. Although I liked Fallout, I never liked its inventory system so I took some liberties and designed my own. I wanted to seperated the weapons, armor, and items into seperate tabs for easier selection. I did also want to have some of the character's stats displayed on the inventory so I did create the character stats system with a predefined character (more on that in a moment).

So here is what I have come up with. Note: I designed the GUI, the items are from Fallout, and the portrait is obviously of Mad Max :)



You can also see a video of the inventory in action @ www.matt3d.com/example/rpgSystem_Inventory1.wmv

As I stated above, I had a predefined character, with main attributes (Strength, Agility, etc) but I also created all the derived statistics (Armor Class, Carry Weight etc) from his main attributes. He has inventory slots that mirror the objects in the GUI and are saved. I have four slot groups: weapon, armor, item, and equip. The items can't be moved into each others group, other than the equip group. Each item has weight as the character has a maximum carry ewight.

Ammunition is stackable, I will probably go ahead and make items stackable as well, but not all items, I'll create some sort of isStackable variable for all the items and also a maxStack.

So where am I going, I'd like to probably create a character creation system instead of always using the pre-defined character always. As I said above, I've already created one in TGE so should just require some minor changes for the system to bring it on over. I still haven't added skills so I'll have to define what skills I want the player to have when making the creation system.

Recent Blog Posts
List:04/19/08 - Back to the future
07/06/07 - Resource Dump - GuiAnimatedCrosshairHud, guiObjectSelectionHud
04/30/07 - ModMaker, TGB, TorqueX and More
11/19/06 - Dev-Diary #4 - Action RPG :: Talking Heads
10/31/06 - Persistent Items and Mission Objects
10/28/06 - Dev-Diary #3 - A single player action-RPG
07/31/06 - TGB RPGness Part 1 (Inventory)
07/06/06 - TGB Gaming Goodness

Submit ResourceSubmit your own resources!

Alexander "taualex" Gaevoy   (Jul 31, 2006 at 21:40 GMT)   Resource Rating: 5
It looks even better then in MMORPG kit ;)

Gavin Bunney   (Jul 31, 2006 at 23:07 GMT)
very impressive; love the video ;)
Edited on Jul 31, 2006 23:08 GMT

Unk   (Aug 01, 2006 at 01:26 GMT)
Oh mighty stimpacks... how I do miss thee.

Looks great man! You are most likely on top of it but I would also recommend implementing double-clicking on items in your inventory to equip them. Dragging onto the paper doll is great for newbs but gets old quick. =)

-Unk

Dylan Sale   (Aug 01, 2006 at 05:29 GMT)
One thing I like about some RPGs is when they have use right click to equip/unequip items. Maybe you could implement something like that. Looks cool though.

Jay Barnson   (Aug 01, 2006 at 22:55 GMT)
Wow. Someone else who played Twilight: 2000. Unfortunately, I was never able to finish it - it crashed at the final push to battle Baron Czerny EVERY time. On two different machines.

The game itself kinda sucked, really, but it had such an interesting tactical combat system (and SCADS of weaponry) that it stayed fun and interesting.

It also had 3D combat in vehicles, which sounded and looked really cool (but played like crap). But it was, at least, very different.

Matt Huston   (Aug 02, 2006 at 03:30 GMT)
Wow someone else who played Twilight 2000. :) Cool game, way ahead of its time, the role-playing system was to advanced so most of the skills ended up being pointless, but what a cool way to create a character. For those that haven't played it, when you created your character, you created a pre-apocalypse person. You picked what type of college you went to (if you went), if you joined a branch of military, what skills did you focus on, if you became a truck driver, you'd get driving skills, if you were a doctor, medical skills, etc. Characters would end up being different ages so you could then have been trained more if you were older or less when you were younger. You could actually create up to 20 PCs for your party. So a very unique system compared to other RPGs.

I never beat the game either, I got pretty far, several vehicles. Whats funny is, in the "overworld" PDA map. It never said ANYWHERE in the manual that to "fast move" you pressed M. I remember the first couple weeks I played, I ran everywhere!

I still have the box, manual, and 5 3.5" floppies. The manual was good reading and at a young age I was an expert on weaponry because of it. Oh, and the game had a video intro!

I really wish someone would remake it. I've been interested in getting a copy of the real Pen & Paper RPG sometime and see how it is, for reading sake.

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

Anyway, I have started testing out saving using XML instead of how I was before, which was trying to create me own little system. I've found the XML Parser code (http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=9031)and it works great except for one thing.

I am trying to read a string and I am having some trouble. In my XML I have...

Name="Matt H" <-- This will not read, it skips to the next attribute

It will however read and return this...

Name="1Matt H"

I am calling it like this

$player.Name = %pXml.attribute("Name");
Edited on Aug 02, 2006 03:33 GMT

BigPapa   (Aug 02, 2006 at 17:22 GMT)
Very nice. I too been looking at some old inventory resources and have been thinking about creating my own inventory manager. I realy like that you use weight as the limit for the inventory. Do you have plans of creating a new resource?

Matt Huston   (Aug 03, 2006 at 02:58 GMT)
Thanks Papa, I do not have any plans of releasing it at this time. I'd like to add a lot more to the project before I would do that, including a character creation system, dialog, skills, NPCs, and saving/loading. Saving/Loading is semi-implemented, I am reworking it to use the XML structure as I mentioned above. Character Creation I have created before as well for a TGE demo, so I have the basic idea of how it will go, just need to finalize my design doc in that respect, when I started on the inventory I hadn't really planned this to go any larger :)

I have fixed the XML problem btw, in the example script file, the author uses ...if(%pXml.attribute("Name")... this should be ...if(%pXml.attributeExists("Name")

Ingmar Gagen   (Aug 25, 2006 at 22:08 GMT)
You seem to be making excellent progress. I am part of an indie team working on a single-player RPG also and sent you an e-mail a little while back to make contact. Would love to get in touch with you and perhaps trade knowledge here and there if it makes sense? Thanks and good luck with your project either way...

Matt Huston   (Aug 28, 2006 at 22:45 GMT)
@Ingmar

I don't recall ever recieving your email, you can try sending again if you'd like.

Ingmar Gagen   (Sep 01, 2006 at 17:30 GMT)
Sent an e-mail to you at matthuston@gmail.com. Also, can be reached at katana1522@aol.com if you do not receive it. Thanks for the response...

You must be a member and be logged in to either append comments or rate this resource.