Final Fantasy Battle System

Kon-Tiki Ok, I made the Final Fantasy Battle System just to see how my theories would work. Seems as if it worked out quite fine. You can get my battle system here. If you're going to use it, I suggest you still adapt a few things to your game, since there might come some minor flaws if you don't. For those who wonder: the source is included ;)

-Kon-Tiki-W.-T.-S.-C.-W.-A.-I.-I.-T.-S.-*-

*Wishing The Switch-Command Was Already Implemented In The Studio.
MagickPoultry That looks very good. But I don't see why you'd want to defend, unless you had multiple characters. I haven't looked at the code closely yet, but how easy would it be to add multiple characters and multiple enemies?

I found a couple bugs. My health went below 0, and the variable wrapped around and went up to 240-something instead of killing me. When someone defends, it displays the previous amount of damage, i.e. if I hit him for 16 damage, and the next turn I defend, it says I hit him for 16 damage again. And I might be wrong, but it doesn't seem like defending does anything. The damage seems to be about the same.

But that's enough negativity. It looks to have great potential. I especially like the menu. :)
smartguy240 OMG Raf!!! This Rocks!!!! You mind if i use the source?
Kon-Tiki Multiple characters is just a matter of using more variables. I can go figure that out if you want.

That bug of the HP wrapping around used to come in the Enemy's HP when it hit 0 as well. I just put a || HPE > 0) in the checking command at the end of the source.

The defence-thing is just used as an example. It could've been 'Magic', 'Item', 'Run' or anything else that fits in the game. I must admit that the defence itself still needs some fiddling before it is actually working.

The hit-message when defending doesn't do anything. It can be overcome by putting an extra if-statement in the end_player/enemy_turn flag that says not to print that when defending. Easy as eating pie.

I know of all these bugs, but was just too damn lazy to fix them ::) Anyway, if you can figure out the source, that means you know enough of the Logic programming to be able to take out the bugs yourself and manipulate the whole system to do what your game requires.

Tricke: That's why I made it. To test some theories and if it worked, to enable others to use the source. I'll make a detailed explanation of the whole system and put it in the tutorials-section of my site later. Anyways, feel free to use it.

-Kon-Tiki-
sonneveld well.. checking if the hitpoints are > 0 won't work.. since you don't have negative numbers.. it'll just wrap around (you'll be checking if numbers like 255 are > 0.. oh wait.. they are!).

Better way would be to compare how much you're going to subtract with the current hitpoints.

subtract = some algorithm;

if (subtract < hitpoints)
hitpoints -= subtract ;
else
hitpoints = 0;


- Nick
smartguy240 Yeah Raf, because my sword fight absoluteley SUCKS ;D

...that is if i choose not to abandon PQAGI and change the storyline and plot and stuff ::)
Corby That was fun! ;D
Joey pretty cool raf!
Andrew_Baker Hey, I'm running Linux over here! But when I try to download your game, it tries giving me an .exe file! What is this all about?!
Joey its in a winzip self extractor file, so it is supposed to be a .exe file. just open it and extract it to a directory.
Andrew_Baker Say it with me now... I run Linux... and that is a WinZip self-extracting file... Aw, hell, I'll give it a shot.

<edit> Yeah... see that's what I thought... could you post it as just a regular zip file... I can decompress that and run your game under NAGI, but that fscking Windows code won't work under Linux without Wine or dosemu or something too complicated for me to deal with right now.


Pretty please mirror it in normal zip format... nagi is getting lonely
Kon-Tiki Don't ask me what has gotten into me when I made it a Winzip self-extractor. Anyway, here's the zip-version.

-Kon-Tiki-
Andrew_Baker Thanks, that was fun.
Zero2003 Your battle system is very nice :)