I have been a clickin' for nearish 6 years or so now but still suck. Mainly because I just don't explore all the features of TGF/MMF and I only recently aquired MMF2. Anyhoo I want to make an RPG! Hooray! What a challenege! I have some idea of how to get it functioning but... At the same time have no idea.
Basically what I'd like to know is whats the best way of storing/keeping track of the games/characters stats? HP, EXP, Items, location, game settings etc etc etc...
Any advice on this would be very greatly loved in massive, big heaps. Thank you.
An array, eh? That does sounds rather juicy! So juicy that I decided to look into it but unfortunatly for me, I can't seem to understand how to assign values to rows and columns. All this "write to XYZ" stuff just goes way over my head.
Use an array. They are encrypted by default, which helps a lot. If you use an ini people will find it and cheat, which will ruin their fun overall.
Try to think of an array like a big box with a bunch of little boxes in it:
Array(X,Y,Z)
The first dimension of the array I call the "rows" of the box, going down. If your array has a maximum value of 10 in the "X" place, then there are going to be 10 rows going down (barring zero, but you know what I mean).
The second dimension of the array I call "collumns" of the same box. If your array has a maximum value of 8 in the "Y" place, then each of these 10 rows is going to have 8 little boxes in them going across.
I've only ever done a triple dimensional array once before, and it was complex only in that I had to keep it all straight in my head. Think of the "Z" value as how many of these big boxes you have. If you have a "Z" value of 3, then you'll have 3 big boxes with 80 little boxes in each.
I guess you could use a double dimensional array for your team's inventory like I did for Equin Village. For their equipped items, I used an array that was 6 x 6. This was six guys with a maximum of 6 equipped items at any one time. It's a little more to it than that, but that's the main idea.
If your game has a solo hero, it's a lot easier. You can just assign values to your single-dimensional array like this:
Place: Description: Value:
------ ------------ ------
1 HP 16
2 HP MAX 16
3 LEVEL 1
4 EXP 0
5 NEXT LVL 100
I hope some of this helps, it's been awhile but I find arrays very useful for RPGs.
EDIT: Sorry, I never really answered your question about HOW to do it! If you use numerical arrays (I recommend doing this). Then you'll want to do this event under the array object-
Write Numerical value to X (or Y or Z or whichever you're doing)
Then it'll ask you what value you want to put into that little box. Use globals, constants, an equation (like if you're damaged you can write HP - enemy damage).
Then when you want to load any info, just do Read Numerical value from the same place.
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!
I'll admit I'm still a lil confused but you have cleared up everything I needed to be able to get started, I should be able to figure out any other problems I come across myself now. Thanks for the help man!
Tell 'em Babs is 'ere...
DaVince This fool just HAD to have a custom rating
Registered 04/09/2004
Points 7998
4th September, 2007 at 11:06:36 -
Funny how I'm the only one who uses MMF's object orientness and leave the stats inside the characters instead of something like an array. But if you do it like that you'd have to handle saving/loading differently.