RPG wiki page

Started by Esmale, Sat 06/07/2013 14:46:26

Previous topic - Next topic

Esmale

I'm just getting started with AGS, and am primarily looking for information on creating an adventure/RPG style game.  (The Quest for Glory series remains one of my favorites to this day.) The wiki article (http://www.adventuregamestudio.co.uk/wiki/Making_an_RPG_with_AGS) has some good basic tips, but right at the top is a notice that "AGS 2.7 uses new, easier, Object-Oriented scripting and so this article needs updating to reflect the new style scripts."  I haven't yet been able to find additional information related to that.  Can anyone point me to where I can learn about the newer scripting features referenced there?

Khris

That tutorial is severely outdated (and imho, it was never that good to begin with, even back when it was written).
I suggest following the help file's tutorial to get a feel for the basics of AGS before delving into RPG related stuff.

However, adding a simple stats system, where a too low value prevents you from doing something, is really easy.

Esmale

Yeah, I'm naturally suspicious anytime something 'custom' is implemented through a global variable.  It's the programmer in me.  And I am working on getting more familiar with AGS in general at the moment, but since I know what my end-goal is, and am not finding much information on it at the moment, was hoping I would be able to find that information before I actually want to start using it.

Charity

I would make a struct for character stats and a struct array for enemy stats.  Or if you want to make something more flexible just make one struct array for all of the above.  All the stats you want will just be variables in the structs  Using stats to solve puzzles is pretty simple.  Just do what Khris said.  How to do stat progression and how to have character and monster stats interact in battle and so on are going to be a bit more complicated and will depend somewhat on the specifics of what you want the game to play like.    Though for something along the lines of Quest for Glory, you probably don'r need anything super complicated/well developed.

For battles basically what you need to do is have the game figure out whether the hit connects, and then how much damage it should do.  Take the damage off of the health, and then check to see if anyone is supposed to be dead yet.  Might be worth looking at some other game systems for stuff like that.  The biggest questions you'll have to decide are: Can characters and/or enemies move freely in battle?  Are battles real time or turn based (or some combo like Final Fantasy's ATB or whatever it is they do in KotOR, Dragon Age)?  Can there be more than one combatant on either side?  Do battles take place in a separate screen or in the normal gameplay world, and does battle constitute a different mode than normal gameplay?

1 on 1 turn based battles with no character movement that take place in a separate screen/game mode are going to probably be the easiest to program.  The way the first Quest for Glories do it which is basically that except real time shouldn't be that much harder--just need some timers thrown in.

For Quest for Glory style state progression you might want to give each of the stats separate variable (hidden or not) for "experience till next level."  Have certain actions/events in game or in battle take however many points off of that variable.  Then when it reaches a value equal to or less than zero make the stat go up by 1 and add some value to EXP till Next value like "(stat) * 100" or "100 + 2^(stat/2)" or whatever equation makes for the smoothest/most reasonable increase.  Keep running the check and repeating the process (via a while loop) until EXP Till Next is greater than 0 again.  The idea here is that each level for the stat becomes harder to attain than the last, but also some action which give a lot of experience with that stat/skill have a chance of making it go up more than once in one go.  This is just one way to do this.  You could do something with increasingly difficult probabilities, for instance, or you could employ a more standard level up system where all the stats have a chance to go up when the character  levels.  Or you could just hardcode stat increases like "climbing the tree ten times increases climbing by 1" or something like that.

These are just ideas and I haven't put anything in script form for you.  It sounds like you have some programming experience, so I would read up on how AGS handles structs and arrays in the manual and then kind of fiddle around from there until you figure out what you are doing.

SMF spam blocked by CleanTalk