AGS: Can I Make an RPG with AGS?

Started by TerranRich, Mon 03/05/2004 05:56:47

Previous topic - Next topic

Kinoko

A lot of them just have big rooms and you go from room to room.. er, if you know what I mean. As opposed to a "grid" system. Just a normal transition.

I wouldn't use it in mine because of aesthetics, I guess. I'm basing my game on games like Secret of Mana and Terranigma... they just have rooms, you leave them, go to another room.

RickJ

Thanks for your reply.  I am looking forward to playing your RPG when it's finished. 

X-Hunter Blackzero

I'm trying to make a turn-based system of combat.  Could someone help with the scripting?  I sort of have some figured out but not much...

Kinoko

Well, what have you got figured out so far? Also, could you give some detail on how you want it to work?

Akumayo

I think you could do a room transition with an object, no?  You could change the default transition to "instant".  Then you make an object that is 320x200 or whatever your resolution is, then animate it starting with room1 graphics and scrolling into a room2.  You put said object in room1, then when player walks onto region that moves to room2, you animate the object using blocking, so when the animation is finished, the player is transported to room2.

Since the transition is instant, the only thing noticable is that the player character stays stationary.  (I'm assuming you've already made said object's baseline so character could be seen  ;D )  You could fix this by...well...I dunno maybe the character shouldn't be visable during the transition, either way you get my point.
"Power is not a means - it is an end."

Kinoko

It's one waym but it would mean you would have to be sure nothing in either room could change. It wouldn't work in say a Zelda game with bushes you could chop down, or any scene with enemies that move or could be killed.

Akumayo

nonsense, if you set the object's baseline to the top of the sceen, and it is set as object 0, then everything will appear atop it, or if that wouldn't work (dunno I haven't actually tried it) you could have the objects default graphic set to 0 so it was transparent, then change it to the scrolling graphic when character stepped on region (again this would probably make everything dissapear during transition).  I think with CJ's next update he should add a transition function...
"Power is not a means - it is an end."

X-Hunter Blackzero

Well i have how the proagram will keep track of each monster, done with global variables so i could have the same monster in multiple rooms.  And i have how the program will keep track of stats and such..... i just have trouble with how turns will work....


I guess my question is "How would i make the combat system itself turn-based"  I have most everything else for a good combat script.   My system will be similar to Final Fantasy X sorta.....

Akumayo

I'd suggest either comparing a speed stat for for determining the first player or always letting player go first, then using either a GUI or run-scipt X in dialogue commands so the player can choose his/her attack, then randomely choosing an attack for the monster (depending on which monster is out), and if all this is located in the room's repeatedly excetue,you could go ahead and put your "dead check's" after each monster/player turn and since it repeats it would go on until someone died!!!

can't breathe.....all one sentence!
"Power is not a means - it is an end."

theswitch

Quote from: Def on Fri 15/04/2005 10:21:57
Quote from: Wabbit on Sat 12/02/2005 00:06:28
Quote from: Def on Mon 12/07/2004 18:43:59
http://home.quicknet.nl/qn/prive/jjj.dekker/rpg.rar Something me and Chrille made a long time ago. It's an rpg (just a start though) and it's a bit like those old console RPGs. You can walk around, and encounter random monsters and fight them. It just shows it is possible to make it in ags :)
Played your game. It was addicting. Will you release the source code? Thanks for the cool RPG game.

I don't think I have the source code anymore :( Chrille might still have it somewhere though.

WOW, this is THE RPG demo for AGS, I got really pumped when I tryed the demo, it seems even better than RPG Maker stuff, I'm not interested in the retro console look but who cares, it actually works and it works well, I'm interested in if there could be any notes on how you made it, any pointers I mean. not a tutorial, this is very cool, it kinda makes you go "man AGS is the way to go" with rpgs. I guess the reason I say that is with 2.7 the coding seems much easyer (I'm a newb but experenced with other easy languages, java etc)

I am also very interested in making a game with random stuff, a space trading game actually, you know elite, freelancer etc but 2D and not flashy 2D, somthing similar to this. . . if your interested http://www.nielsbauergames.com/smugglers3.html

LawAmunRa

#110
I think that the BEST advice is to learn for yourself. What I mean is come up with an idea, try it out, find out why it doesn't work, correct it, try again, and so forth until it does work, go on with the next idea...

Then you will have learned everything so that when you get an error you'll know exactly what & where the error is...
Besides you'll will have learned for yourself that you can do it.
It is the best way.
P.S. If you get stuck, then ask someone for some help, but you will get more out of it if you do it yourself.

A�rendyll (formerly Yurina)

This is merely a question, but did someone already think of making (a few) tutorial(s) about making an RPG? I know about the tutorial from the guy who made Asporia, but I'd like to see more RPG tutorials around. I'm just a beginner, so I can't do that myself...
Yuna: Give me a Y!
Rikku: Give me an R!
Paine: Give me a break...
~Final Fantasy X-2

I've been

Kinoko

As I've said before, the problem is that there's no one kind of RPG. It would be a heck of a task to write a tute on RPGs in general. Realistically, you have to write about a specific kind of RPG, or even just the mechanics of one aspect of an RPG. Much like how different a 90's Lucasarts adventure game is from an old text adventure.

I just want to say that Law's advice was spot on. Think of what you want in your RPG, try to work out how you could script it, try it, and if it doesn't work, try to fix your mistakes etc. In the end, ask for help/advice.

A�rendyll (formerly Yurina)

I'm currently searching for a turnbased scripting tutorial. I'm also searching for GUI's with character display (Portrait, HP, MP, XP) for about 4 or 5 characters, or at least for codes which I can easily add in one.

See, I'm already setting up plans for a second (RPG) Elestian Tale, but I'm not the best coder... Don't worry, I'll finish Bittersweet Sanity first.
Yuna: Give me a Y!
Rikku: Give me an R!
Paine: Give me a break...
~Final Fantasy X-2

I've been

Akumayo

I believe I have a pretty simple code for your turn based GUI's.Ã, 

-Make A GUI called...um...YOU
-Two buttons, button 0 is simply the image of your character's portrait.
-Button 1 is just going to sit there for the moment.
-Make a label and place it over button 1.
-Okay, here comes the code...

In repeatedly_execute:

Code: ags

string health;
string maxhealth;
string magic;
string buffer;
StrFormat (health, "Health: %dÃ,  /", GetGlobalInt (?));Ã,  //replace "?" with your health globalint
StrFormat (magic, " Magic: %d", GetGlobalInt (?));Ã,  //replace "?" with your magic globalint
StrFormat (maxhealth, " Max Health: %d", GetGlobalInt(?));Ã,  //replace "?" with your maxhealth globalinlt
StrCopy (buffer, health);
StrCat (buffer, maxhealth);
StrCat (buffer, magic);
SetLabelText (YOU , 2, buffer);



Also, if you don't want to mess with globalints, I believe you can also use 32-bit strings like this (but I'm not used to these)

At game start:

Code: ags

int health;
int maxhealth;
int magic;


In repeatedly_execute:

Code: ags

string guihealth;
string guimaxhealth;
string guimagic;
string buffer;
StrFormat (guihealth, "Health: %dÃ,  /", health);
StrFormat (guimagic, " Magic: %d", magic);
StrFormat (guimaxhealth, " Max Health: %d", maxhealth);
StrCopy (buffer, guihealth);
StrCat (buffer, guimaxhealth);
StrCat (buffer, guimagic);
SetLabelText (YOU , 2, buffer);


Either way, GUI YOU should come out something like this:

PORTRAIT HEREÃ,  Ã,  Ã,  Health: 20 / Max Health: 40 Magic: 33

Hope that helpsÃ,  :)

-Regards, Akumayo
"Power is not a means - it is an end."

A�rendyll (formerly Yurina)

#115
Thank you so much! I'm going to test it right away!

EDIT: Oh, before I forget, how can I get experience done?
Yuna: Give me a Y!
Rikku: Give me an R!
Paine: Give me a break...
~Final Fantasy X-2

I've been

Akumayo

Hrm...Ã,  Experience is pretty easy, but depending on how you do the fighting system, the code changes.Ã,  Create Globaints for Current Exp and Target Exp.

Ex:

LetÃ,  MPC=MP Current Exp globalint
Ã,  Ã,  Ã,  Ã, MPT=MP Target Exp globalint
Ã,  Ã,  Ã,  Ã, MPL=Current MP Level globalint
Ã,  Ã,  Ã,  Ã, DAMAGE=The damage you just did to enemy globalint

GameStart:
Code: ags

SetGlobalInt((MPC), 0);


Repeatedly_Execute:
Code: ags

SetGlobalInt((MPT), (GetGlobalInt(MPL)*5);
if (GetGlobalInt(MPC)==GetGlobalInt(MPT)) {
 //code for leveling up
}


Then when you do damage:
Code: ags

SetGlobalInt(MPC, GetGlobalInt(MPC)+(GetGlobalInt(DAMAGE));


This is just an example, it would make a system where you had to collect 5 times your current level in experience, and got experience every time you did damage, Runescape uses a system similar to this.Ã,  I hope you get the idea, I know my coding was pretty sloppy this time.

-Regards, Akumayo
"Power is not a means - it is an end."

A�rendyll (formerly Yurina)

Thanks!

By the way, is this code up to date with AGS2.7? I'm using that version, and the StatusGUI code I received didn't work fully because it was a bit outdated.
Yuna: Give me a Y!
Rikku: Give me an R!
Paine: Give me a break...
~Final Fantasy X-2

I've been

Akumayo

No, that code wasn't up to date, sorry...Ã,  Here's the best way to do it in 2.7:

Beginning of Global Script:
Code: ags

int health;
int maxhealth;
int magic;
export health, maxhealth, magic;


In script header:
Code: ags

import int health;
import int maxhealth;
import int magic;


Now create a label over your status GUI called Lstats.

In reapeatedly_execute:
Code: ags

string guihealth;
string guimaxhealth;
string guimagic;
string buffer;
StrFormat (guihealth, "Health: %dÃ,  /", health);
StrFormat (guimagic, " Magic: %d", magic);
StrFormat (guimaxhealth, " Max Health: %d /", maxhealth);
StrCopy (buffer, guihealth);
StrCat (buffer, guimaxhealth);
StrCat (buffer, guimagic);
Lstatus.SetText(YOU , 2, buffer);


I am almost positive that this script is up to date with 2.7, sorry for the earlier inconvinienceÃ,  :-[

This should again display something similar too:
Health: 20 / Max Health: 40 / Magic: 33

-Regards, Akumayo
"Power is not a means - it is an end."

strazer

The last part which of course can be shortened to:

Code: ags

string buffer;
StrFormat(buffer, "Health: %d  / Max Health: %d / Magic: %d", health, maxhealth, magic);
Lstatus.SetText(YOU, 2, buffer);

SMF spam blocked by CleanTalk