import/export character stats

Started by esper, Sun 16/10/2005 11:04:16

Previous topic - Next topic

esper

I did a search for several things, including ".dat," which is how I figured this would work. I found several similar topics, but none that helped me at all, or were about exactly what I want to do.

I want to make an AGS game where you can make your character (think QFG, only more in-depth) and use him in the game, then, at the end of the game, you could export his stats, possessions, etc. for use in another game. I can't find out how to do this. I'm sure it's possible, because I could program that to happen in QBasic (and once did, actually)...

This is the closest I could find to what I'm talking about: http://www.adventuregamestudio.co.uk/yabb/index.php?topic=12409.0

It still isn't exactly what I want, plus Migs never explains exactly how to do it...
This Space Left Blank Intentionally.

RickJ

I recently wrote a module to read/write/etc inifile that may be of use to you.  It's here .  Just download the module and read the documentation.  What's an inifile?  They are those windows configuration files ending with ".ini" such as win.ini, system.ini.

esper

Maybe you are the right person to ask then, but instead of cluttering up your inbox I'll post it for anyone to answer.

If I could conceivably write a character creation program in VB6, is there any way I could make it part of my AGS file, so it runs the program when you select "New Game" and then takes the stored variables from the external program and runs them through AGS? I guess what I'm asking is, if I have the know-how to make a character creation program, how do I turn it into an AGS character creation module?
This Space Left Blank Intentionally.

Gilbert

An AGS game cannot run a non-AGS programme itself (unless you do it via a plugin of course). If there aren't many reasons you must make the character creation programme with VB, you can always script it with AGS.

esper

Quote from: esper on Thu 20/10/2005 10:01:36
I guess what I'm asking is, if I have the know-how to make a character creation program, how do I turn it into an AGS character creation module?

That's what I mean. I'm not sure how to make a VB program into a plugin that is compatible with AGS. The manual is of little help. I taught myself everything I know about computers, programming, and AGS, and so I don't necessarily understand everything the manual is trying to say on the matter of plugins.
This Space Left Blank Intentionally.

Gilbert

Actually what I was saying is, I don't recommend making a plugin, if you can really make it directly with AGS scripting, in my opinion, making a plugin would probably mean more work, unless there're reasons you must make that programme with VB.

esper

Ah, I see. I'm just not that great with AGS scripting, and I don't know how "clean" I could get it to look, whereas I already know exactly how it would look with VB (since I already made it for another game before I ever found AGS). But if you don't suggest making a plugin, and I already said I'm not that good with AGS scripting, I should probably listen to you.
This Space Left Blank Intentionally.

Gilbert

If you don't really need the two programmes linked together, you can always make the VB programme a separate programe, which creates binary character stat files, then from within your AGS game you can use the File functions to read the data back byte by byte.

Elliott Hird

Well, there's an encryptedfile module so people don't edit it, and just write it like this:

4
2
3
Name

and read it as first line strength (etc.)

with the file functions.

Can't be too hard.

Janik

Quote from: esper on Thu 20/10/2005 10:41:17
Ah, I see. I'm just not that great with AGS scripting, and I don't know how "clean" I could get it to look, whereas I already know exactly how it would look with VB (since I already made it for another game before I ever found AGS). But if you don't suggest making a plugin, and I already said I'm not that good with AGS scripting, I should probably listen to you.
If you know Visual C++ reasonably well, then you can make a plugin. If you start with the template, plugins aren't that hard to make. You should probably forget about making the plugin in VB, though; as much as I like VB, it can't handle something like that.

Conceivably, though, you could make a small "wrapper" plugin in VC++, and all it does is launch your separate executable (made in VB or whatever). I haven't tried it, but I can't see why it wouldn't work.

Play pen and paper D&D? Then try DM Genie - software for Dungeons and Dragons!

esper

argh, nay.... I only know just enough C++ to do a couple mathmatical equations and print to the screen. I can program in every incarnation of BASIC, from the original to VB6, but you're right, it isn't very powerful...
This Space Left Blank Intentionally.

Elliott Hird

None of this is needed with the file functions and encryptedfile module. I'll step-by-step guide you through by pm if you want, then I'll post the result here.

SMF spam blocked by CleanTalk