View Full Version : Battle Algorithm

Chompy

11-30-2006, 05:36 PM

Well, I am making a battle system, but I am not necessary good at algorithms,

I'm trying to find an algorithm to control the damage, the only algorithm I made, which I thought was good, was this. Well, I hate math, but I know its useful :)

speed = 0.42;

weight = 5;

damage = 3;

(speed ^ 0.05) + weight * damage + (speed * 4)

/* its suppose to be weaker if the speed is low, since you don't got power,

also its suppose to control if the weight is lower-> lower damage

(higher speed and weight = higher damage)

but I wanted to make it, if the speed is too high,

its suppose to make it lower, if its too slow,

well I am not good at algorithms

*/

Also, if you would like to help me with my battle system, someone could post algorithms, ideas, suggestions on a good algorithm etc..?

Btw, I am interested to get someone to help me make good algorithms (or learn me how to make better ones), if anyone is interested in teaching me, pm me or leave a post here :)

Andy0687

11-30-2006, 09:04 PM

Well, I am making a battle system, but I am not necessary good at algorithms,

I'm trying to find an algorithm to control the damage, the only algorithm I made, which I thought was good, was this. Well, I hate math, but I know its useful :)

speed = 0.42;

weight = 5;

damage = 3;

(speed ^ 0.05) + weight * damage + (speed * 4)

/* its suppose to be weaker if the speed is low, since you don't got power,

also its suppose to control if the weight is lower-> lower damage

(higher speed and weight = higher damage)

but I wanted to make it, if the speed is too high,

its suppose to make it lower, if its too slow,

well I am not good at algorithms

*/

Also, if you would like to help me with my battle system, someone could post algorithms, ideas, suggestions on a good algorithm etc..?

Btw, I am interested to get someone to help me make good algorithms (or learn me how to make better ones), if anyone is interested in teaching me, pm me or leave a post here :)

Is this an active system like Maloria or Zodiac?

Just do what I did: pull some formulas out of your ass and let people play with them. If they don't work, try changing some things around to reflect what you want changed.

Zodiac's started off with a formula for damage and damage reduction, but I've changed it so much that the actual damage/reduction goes through three or four formulas before it reaches the final result.

temp.dmg = somecalculationdmg + int(random(0, 10));

coolio =D

_Z3phyr_

11-30-2006, 10:53 PM

of course! an algorithim!

....wait what's an algorithym?

Chompy

11-30-2006, 11:38 PM

Is this an active system like Maloria or Zodiac?

What you mean? :)

Just do what I did: pull some formulas out of your ass and let people play with them. If they don't work, try changing some things around to reflect what you want changed.

Zodiac's started off with a formula for damage and damage reduction, but I've changed it so much that the actual damage/reduction goes through three or four formulas before it reaches the final result.

I'll try that :)

many formulas there :O the most easiest damage calculation I have made is:

int((power / 3) * 8)

Well, for the battle system I am making, I am trying to make the damage depending

on speed, weight and normal damage, also I am planning to having buffs,

resistance etc.. (Mudlib :) ) I've been wondering, like where should I store player's buffs,

armor addition etc.. like in a clientr. string? anyone have suggestions? ideas?

I was wondering if I should use clientr. strings, so players can't reconnect to lost bad buffs etc..

or a database, I dunno, any ideas?

coreys

12-01-2006, 01:23 AM

Yeah, that's what I do Yen. xP

Eventually you do come across a pretty good one.

Chompy

12-01-2006, 01:32 AM

Yeah, that's what I do Yen. xP

Eventually you do come across a pretty good one.

Hmm, I gotta try that :p

smirt362

12-01-2006, 02:18 AM

Just do what I did: pull some formulas out of your ass and let people play with them. If they don't work, try changing some things around to reflect what you want changed.

Zodiac's started off with a formula for damage and damage reduction, but I've changed it so much that the actual damage/reduction goes through three or four formulas before it reaches the final result.

Pfft...it was my formula from Maloria when you worked there. Tee hee...JOKE TIME

jake13jake

12-01-2006, 02:42 AM

Just do what I did: pull some formulas out of your ass and let people play with them. If they don't work, try changing some things around to reflect what you want changed.

Zodiac's started off with a formula for damage and damage reduction, but I've changed it so much that the actual damage/reduction goes through three or four formulas before it reaches the final result.

Wow, that's pretty inefficient.

Idrox0

12-03-2006, 07:49 AM

I like this one.

Attack = Power + Random(int(Power/8));

M = int(Strength * Level / 128) + 2;

Defense = OpponentsDefenseFactor;

Damage = (Attack - Defense) * M;

Such is the 'Swords' damage formula of Final Fantasy V. You could also use this one (which would only really be accurate for blunt weapons):

Damage = int(WeaponWeight^2 / Strength);

Wow, that's pretty inefficient.

I second that.

Well, it's an action RPG.. You have to take things like the area things hit in, how fast they hit, comparison to other things, ect. into consideration.

You can put down formulas that look good on paper, but it's unlikely they'll be that great in-game.

Andy0687

12-04-2006, 06:50 PM

I second that.

As inneficient as it is may read to you guys its probably the best bet.

Come up with something, and time test it, and revise, until it works. No one makes anything perfect the first time they try, it can always be improved or changed later. Eventually it will work well and youll go from there, if you had any doubt about that, i do notice Zodiac is actually on the classic list, so its got to work somehow.

Chompy

12-04-2006, 08:48 PM

I think I found a good algorithm :D

Damage = int(WeaponWeight^.75 + ((Strength * Power) /2));

jake13jake

12-06-2006, 12:58 AM

Well, it's an action RPG.. You have to take things like the area things hit in, how fast they hit, comparison to other things, ect. into consideration.

You can put down formulas that look good on paper, but it's unlikely they'll be that great in-game.

You could make something good, or you could use an already proven algorithm if you've really researched your topic. If you're experimenting you'll end up making something better over time, but you'd need to take into account the ups and downs of it.

vBulletin® v3.8.11, Copyright ©2000-2019, vBulletin Solutions Inc.