and no i dont want to know how that roguelikesque game by pixelthief was doen because its not a dibalo like inventory
checked the articles and crap but cant find anything
yeah for applying the actual item stats, like +10 to heroes damage, what you can do is this:
First, have a bunch of values like "+hero damage, +armor" etc, maybe in some objects value A/B/C.
Second, have an always event that sets all these values to zero. Thats very important.
Third, immediately following the always event, have events for every single equipped object, which ADDS to the "+hero damage, +armor" values for each stat. So it runs down the weapon object, with like:
"If weapon value A = 1, add 10 to +hero damage" & "If weapon value A = 2, add 20 to +hero damage".
Do that for every prefix/suffic that you use.
and then you simply set your heroes damage/armor to the base values + the inventory ones. Every frame of gameplay, the game will reset all the values, but set them to the right ones. Because we're adding instead of setting the values, you can have multiple +damage or whatever items, and it will all stack perfectly.
This is how I did it with Gridquest and it worked like a charm.
Im using MMF2 and when changing character stats i just use a data storage object (usually the named value object).
every frame has this object which contains all player data at all times. i can just add/subtract from it as i see fit
Wow, that is a nice inventory system. Not exactly Tetris-like, but it'd be cool to see a klik game using that one day. I demand a Gridquest 2 made in MMF2
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.
lol muz I made that inventory system almost 7-8 years ago >.< I *am* however porting Gridquest into MMF2, so that I can re-release it as a stable app. Won't be releasing it until my related sideprojects are done, however (strategy guide, maps for all levels, and such!).
The problem with adding to player data just *once* when equipping an item is you gotta subtract it again when u remove it, and that gets really complicated. What I recommend is you keep two data storage objects; one records the characters "Stats", and one records the inventory bonuses. Then, when you have an equation that uses the characters stats, like calculating the damage for a weapon, you add *both* the objects' values. So you're recording both the base HP & the +HP from items and then displaying your HP as the sum of the two, for example.
it actually winds up a lot simpler than trying to change your base stats every time u equip something or whatever
Tetris-like meaning you have to arrange your inventory as it gets added? Do the bags bottom out of you fill a line, and drop the items? Or having say a 4x4 inventory grid and having to arrange 2x2, 1x3, etc shaped items? I'm quite confused.
uhm... the latter
thats what alot of people call it. tetris because its a 2d grid and items have different shapes and can be arranged. kinda like arranging tetris blocks.
pixelthiefs example is pretty close if not exactly what i mean
Everyone I know has called it a grid-based or spacial inventory system. Or spacial-grid, from those "appease everyone" types. Tetris just sounds silly... Tetris is about falling blocks and clearing lines, why would you want to have to manage how to get rid of your items!?
The diablo 3 team calls it "Tetris Inventory"! The Diablo 3 team also likes to copy/paste everything from World of Warcraft into diablo 3 and forget everything that made D1 & D2 famous, like a bunch of plagiarists pissing on the last generations collective graves. Yup had to get that out of my system. Can't believe they won't be using this inventory anymore.
I never played Diablo. I'm more into StarCraft. Have grown up on console, RPGs on a computer didn't make sense, until I played Dungeon Siege which uses a similar inventory system.
Blizzard also takes things that worked in the past so that they have a more uniform business model, or some sort of cover-up. WoW's talents come from some system in Diablo, WC3 has multiple campaigns because it worked for SC, D3's art is similar to WoW's because it's "become their style." The Lost Vikings was still their best game ever though, with SC in a very close second.
I can't honestly tell how Diablo 3 isn't just WoW wrapped around a gothic setting. Its the same inventory, same skill system, same graphics, same user interface. Heck, its being programmed by the same people, the Diablo 1/2 staff all left blizzard a long time ago. I'd feel a lot better if they actually WERE reusing some of the classic design models that made Diablo so genre-defining, instead of just copypastaing stuff from WoW.
well i just would never touch WoW with a 10 foot stick, so i'd be a little concernicus over it
I've never touched WoW because I know how damn good Blizzard are.
Honestly I don't really care if they take old concepts, because if Blizzard releases something, it IS good. They know by now that they can't risk their reputation of releasing nothing but good stuff, and if something isn't good enough they simply won't release it.
I'm not blindly defending Blizzard here, but it is simply logic really. They have people testing their games, and if they don't like it, Blizzard WILL do something about it. Also for the record, I personally think Starcraft and Warcraft 3 are the best games they've made, after all, Blizzard has been into RTS for a very long time.
Second, have an always event that sets all these values to zero. Thats very important.
Curious, would this be to always have the equipment mods current? If so, it's an interesting way of doing it. In the past I've done it so that equipping gear added set values to the player's stats, and unequipping an item subtracted those same set values from the player's stats. Cool to see a different slant on the same idea.
--
"Del Duio has received 0 trophies. Click here to see them all."
"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"
DXF Games, coming next: Hasslevania 2- This Space for Rent!
Originally Posted by Pixelthief The problem with adding to player data just *once* when equipping an item is you gotta subtract it again when u remove it, and that gets really complicated.
Oh god yes, extremely. Especially using MMF where you can't have variable arrays like Weapon(X,1) or Item(X,5). I mean I know you have your array object and all (which I use, it's cool) but it's just not as helpful as the ways I was used to before. Object arrays were my #1 programming friend for a lot of my older RPG games.
For Equin 3 (project was unfinished, basically after I made the inventory system- took about a month) I used a lot of spare string objects to temporarily store data, which had to be saved / loaded everytime the player went into the inventory screen. It then took the names of all this and put them into an off-screen list object (for the auto sort feature), and then filled in all the display texts that way. When the player clicked on an item's name, another check was made to display the correct icon of that item, along with what the mods were. The adding to stat / subtracting from stat was done for the equip and remove, and some other stuff to finish it off. REALLY complicated, and I'm sure it wasn't the "best" way, but the thing is it 100% works. It supported carrying 14 items in your backpack (list format) and space for 6 types of equipped gear (helm, armor, shield, weapon, gloves, boots). It had checks so you couldn't equip a shield if you had a 2-handed weapon on and etc too. Maybe one day I'll release the source since I doubt I'll ever finish it. The thing is, it kind of has the little tricks I learned from my VB days which I'm kind of protective of since it took me so long to figure out from years of trial and error with other games.
EDIT: Here we go, an old screenshot of what I'm talking about
Edited by the Author.
--
"Del Duio has received 0 trophies. Click here to see them all."
"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"
DXF Games, coming next: Hasslevania 2- This Space for Rent!
The "Tetris-like inventory" is pretty much pointless IMHO. It doesn't make the game any better. It's like the "feature" where you get limited ammo. You'll have more trouble sorting out your inventory and it's harder to code and you'll have a bunch of blank spaces where you don't have anything to put stuff in.
It's only good if you're purposely trying to limit them from picking up stuff, like keeping them from looting armor from corpses. It looks cool, but doesn't go much more beyond that.
Might want to think about it before you spend a few days on it. I've spent too much of my noob years creating engines that never got used
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.
I v made a diablo style inventory bout a year ago, but i abandoned that project, only thing i did right was that inventory.
Best bet use array and fast loop.