The Daily Click ::. Forums ::. Klik Coding Help ::. RPG - Problems with Battle Engine ( using CnC )
 

Post Reply  Post Oekaki 
 

Posted By Message

Andreas J.



Registered
  25/12/2004
Points
  4
12th January, 2005 at 21:17:40 -

Hello everyone (new here but not new to click), I'm currently working on a rpg with a friend. However I ran into a problem (really?


Anyways, I made a battle engine, also made an inventory system and I'm currently trying to implement that the damage received by an enemy should be less if you wear a certain armor.

The enemy damage is a counter that is set to a random value (random 20), and there are 2 global counters for armor (armor & footwear), So I tried if global armor value is = 1 subtract 10 from the damage received counter.
But it doesn't want to subtract it, I also tried setting the enemy dmg counter to (random 20) - 10 (if you wear the armor) but that doesn't seem to work either. Also tried Always subtract 10 from counter if you wear the armor, but it never works. If it works the enemy should not be able to do more dmg than 10.
Does anyone have any ideas of which calculation might work or another way of doing it?
Haven't clicked for awhile, So I might be "narrowminded coding"

Some other questions while I'm here

(1)I use alot of global counters for the rpg (HP,MP, Found Armor,Found Sword, Save, Load, Indicators (have picked up objects and so on),
will alot of global objects more easily crash the program (that's the experience I had with TGF)
I guess there might be a better way than global counters for those values, maybe I can use the INI file for those too?


(2)This game might be quite massive, Lots of frames, original sprites etc, is MMF a better choice perhaps?

Any help greatly appreciated
Thanks In Advance

/m3to

 
n/a

Andreas J.



Registered
  25/12/2004
Points
  4
13th January, 2005 at 09:46:43 -

Never mind, I was tired, solved the above problem, however the lower questions would be nice getting some answers to

 
n/a

Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
13th January, 2005 at 10:06:52 -

get 1000 Global Values firstly (should be more than necessary for an RPG), if you had MMF you could get the Save Game object and such but INI should be fine.

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com

Andreas J.



Registered
  25/12/2004
Points
  4
14th January, 2005 at 10:58:07 -

Yeah, well I got the 1000 global values objects but I don't think it had all the events that I needed? Or maybe I'm wrong..

Image Edited by the Author.

 
n/a

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
14th January, 2005 at 14:29:04 -

the biggest problems ive come across whilst trying to make an rpg were getting the inventory into the battle frame properly.

basically ive saved EVERYTHING to ini including the command list, inventory, magic, party, stats. it gets too complicated for my tiny human brain after a while.

 
.

Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
15th January, 2005 at 07:20:49 -

yea ive dropped items for the moment on my RPG. key items are easy, like in a Zelda kind of inventory system but for lists and stuff no way.

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com

Andreas J.



Registered
  25/12/2004
Points
  4
19th January, 2005 at 17:15:17 -

Well, I successfully added an item command in my battle engine, it just uses a value (0 or 1) to determine if you jumped to the inventory frame or not. So when you return to the battle and value = 1, Load HP of enemy and stuff.
Don't know if that makes any sense, maybe you were doing something different. However, it seems that global values and INI files is the key to get it to work.

An inventory list might be a bit hard, we decided to limit the number of items in the game, like 5 different armors, sword and boots for example. And for items, only healing and mp restore items.

Key Items is a different story and doesn't really have to be in the inventory

Did any of you do a good armor,def,str values (to calculate damage dealt and damage received)

Also, anyone know if there's a good way to do Final Fantasy Style Damage display in Click & Create?

Image Edited by the Author.

 
n/a

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
20th January, 2005 at 04:40:58 -

You can set the counter object's value in an edit object then, so you can make it disappear.

 
Old member (~2004-2007).

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
20th January, 2005 at 09:25:10 -

my problem is that the item can be called anything since it is just a text file but the problem is parsing the words somewhere (like the menu screen or battle screen)
if there are loads of different usable items it eats away at the event limit quite massively.

 
.

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
22nd January, 2005 at 03:43:58 -

You know, I once created a very original RPG battle system, but it only invoked 2 items you could open with seperate buttons.

 
Old member (~2004-2007).

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
22nd January, 2005 at 07:24:21 -

If you have the dosh then an upgrade to MMF is more than worth it. It is invaluable to my aresnary of programming.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

DistantJ [FZ Games]



Registered
  02/08/2004
Points
  855
23rd January, 2005 at 12:28:21 -

Ahh RPGs. THE biggest MMF challenge, and the one which produces the most pleasing results!

I don't know if any of this will answer exactly what you want, but here are a few RPG creating tips(maybe I'll submit a whole page of them to the site sometime):

- Create one battle frame. Your game may be filled with a thousand areas and a thousand enemies, but create a single frame for battle and use some coding to create the enemies you need(set a value in the main game whilst entering the battle) and the appropriate backdrop(by remembering where in the game you are). This saves time, space, memory, and reduces clutter among frames. Not only that but it's much easier too, in the long run. You should program all you different enemies inside of the frame, and simply 'create' the one you want(you may need to have all the enemies existant outside of the playfield and then destroy them at the start of the frame so that you can create the events).

- Sub-applications are your best friend. They are by far the most efficient tool for creating text boxes, menu's, and even battles.

- Put the majority of your main game(battle not included) events into the global events, rather than the area/level frames, and group them so that you can deactivate them when they are in a frame where they are unwanted(i.e. cut scenes, screens and menus). This way, you can code something later on without having to go back and paste the coding into each and every frame.

- Use INI to it's maximum potential. An INI file can store much more specific data than any array can, and naming a value or string(i.e. "HP" or "Health") is far better for your memory than giving them all numbers. This is easier on saving, too, as with the right coding you can set it to copy the main INI file(the one which is storing everything as the game runs) to a separate file(the savegame file) when saving, and do vice versa when loading.

- Yes, MMF is a far better choice. Not only are sub-applications the best thing since sliced bread for us RPG creators, but it is also much more convenient in just about everything you need. If I was asked to go back to CnC/MMFE and ceate an RPG to my current standards now, I probably couldn't do it.

- Use values even when you think you might not need them. What I mean by this is, say you want the player's sword to always take 20 HP from the enemy. Rather than "subtract 20" use "subtract value 'sword'". You never know when you might get new ideas to make the sword more powerful or what have you, and you would have saved yourself a lot of time. This method can be used for your armour too. In fact, it can even be useful for enemies, as you can then create different level enemies and such.

- Don't be afraid to use windows based objects. The list object may not look too pretty, but it can be far easier to use for your inventory than creating your own out of active objects and such, and it can be easily made to react to the gamepad/keyboard rather than the mouse.

I hope these helped.

 
http://www.fzgames.com
   

Post Reply



 



Advertisement

Worth A Click