Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-30-2006, 05:36 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Battle Algorithm

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

PHP Code:
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
__________________
Reply With Quote
  #2  
Old 11-30-2006, 09:04 PM
Andy0687 Andy0687 is offline
Enigma
Join Date: Feb 2002
Posts: 1,072
Andy0687 is on a distinguished road
Quote:
Originally Posted by Chompy View Post
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

PHP Code:
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?
Reply With Quote
  #3  
Old 11-30-2006, 09:59 PM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
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.
Reply With Quote
  #4  
Old 11-30-2006, 10:01 PM
KuJi KuJi is offline
Banned
Join Date: Apr 2004
Location: Staten Island, New York
Posts: 2,202
KuJi will become famous soon enough
Send a message via ICQ to KuJi Send a message via AIM to KuJi Send a message via MSN to KuJi Send a message via Yahoo to KuJi
temp.dmg = somecalculationdmg + int(random(0, 10));

coolio =D
Reply With Quote
  #5  
Old 11-30-2006, 10:53 PM
_Z3phyr_ _Z3phyr_ is offline
Banned
Join Date: Sep 2003
Location: Louisiane
Posts: 390
_Z3phyr_ is an unknown quantity at this point
of course! an algorithim!


....wait what's an algorithym?
Reply With Quote
  #6  
Old 11-30-2006, 11:38 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by Andy0687 View Post
Is this an active system like Maloria or Zodiac?
What you mean?

Quote:
Originally Posted by Yen View Post
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:

PHP Code:
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?
__________________

Last edited by Chompy; 12-01-2006 at 12:33 AM..
Reply With Quote
  #7  
Old 12-01-2006, 01:23 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Yeah, that's what I do Yen. xP

Eventually you do come across a pretty good one.
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #8  
Old 12-01-2006, 01:32 AM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by coreys View Post
Yeah, that's what I do Yen. xP

Eventually you do come across a pretty good one.
Hmm, I gotta try that
__________________
Reply With Quote
  #9  
Old 12-01-2006, 02:18 AM
smirt362 smirt362 is offline
Tee Hee
smirt362's Avatar
Join Date: Feb 2005
Location: Texas
Posts: 2,101
smirt362 has a brilliant futuresmirt362 has a brilliant futuresmirt362 has a brilliant futuresmirt362 has a brilliant futuresmirt362 has a brilliant futuresmirt362 has a brilliant futuresmirt362 has a brilliant future
Send a message via AIM to smirt362 Send a message via MSN to smirt362
Quote:
Originally Posted by Yen View Post
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
__________________

Don Hertzfeldt <3
Reply With Quote
  #10  
Old 12-01-2006, 02:42 AM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Quote:
Originally Posted by Yen View Post
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.
Reply With Quote
  #11  
Old 12-03-2006, 07:49 AM
Idrox0 Idrox0 is offline
Registered User
Join Date: Oct 2003
Posts: 66
Idrox0 is on a distinguished road
I like this one.

NPC Code:
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):

NPC Code:
Damage = int(WeaponWeight^2 / Strength);



Quote:
Originally Posted by jake13jake View Post
Wow, that's pretty inefficient.
I second that.
__________________
Reply With Quote
  #12  
Old 12-04-2006, 12:14 AM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
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.
Reply With Quote
  #13  
Old 12-04-2006, 06:50 PM
Andy0687 Andy0687 is offline
Enigma
Join Date: Feb 2002
Posts: 1,072
Andy0687 is on a distinguished road
Quote:
Originally Posted by Idrox0 View Post
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.
Reply With Quote
  #14  
Old 12-04-2006, 08:48 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
I think I found a good algorithm

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

Last edited by Chompy; 12-04-2006 at 09:07 PM..
Reply With Quote
  #15  
Old 12-06-2006, 12:58 AM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Quote:
Originally Posted by Yen View Post
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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 02:54 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.