How do i utilize 5 var's Att/Def/Spd/Mp/Hp??

You must understand the Game Editor concepts, before post here.

How do i utilize 5 var's Att/Def/Spd/Mp/Hp??

Postby Lexcondran » Sat Nov 15, 2008 3:00 am

Att/Def/Spd/MP/Hp
Dm will equal negative hp as a result of a calulator meaning. Your Att - His Def = Dm as 5-3=2/ -2hp to thing
Speed/Spd will decide your turn in a battle or position. i really need to figure this out as its my main goal besides
Leveling up with xp to then add points to stats. Im thinking of making face down rpg like game but need help.
i can make inventories/time/hp/$$$/Monster hp/Talking/and some other things but what i really want is knowledge on
how to use and create these 5 basic stats for any Base Rpg game with the info anyone in G-E will be able to make RPG's
[wow i figured dm out/Very easy:: hp-=Enemyname.att-Yourname.def;=Att/def are actor vars]
[erase(255,255,255,1);/draw_from("BARACTOR", (float)Yourname.hp*.4/Yourname.maxhp*100-108, 10, 1);--->
<---Hp/MAxhp actor vars:: You need to put this in canvas actor draw actor, and need a bar image/Displays hp as bar graph]
(Mp stat should be easy as i have made it for Cavemage which has like 7 spells)
ITs easy to make use of mp/spells/-/as you use the if>= thing to use the spell if you have enough mp
then add effects to the spell when it collides/-mp to you when you use the spell/mp is actor var
http://www.mediafire.com/?e4zzycilztdm1qm =My RPG APP FILE V. 3.0 {7/15/2010}
http://www.mediafire.com/?tjjmmmkzyga =My editable demo of my Rpg for people V2.3
viewtopic.php?f=6&t=10247 =Link to my RPG's (4.0) Topic =]
User avatar
Lexcondran
 
Posts: 230
Joined: Thu Jul 31, 2008 6:09 pm
Location: Tucson, Arizona, USA
Score: 8 Give a positive score

Re: How do i utilize 5 var's Att/Def/Spd/Mp/Hp??

Postby Bee-Ant » Fri Nov 21, 2008 12:30 am

Whats your main question anyway?you make me confused...!!!
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: How do i utilize 5 var's Att/Def/Spd/Mp/Hp??

Postby 4erv' » Sat May 23, 2009 9:48 pm

Hm.. I think he's not asking any question, he's just telling how he utilize 5 var's Att/Def/Spd/Mp/Hp
Gold Basketball 2008 - the first basketball game made with game editor.

User avatar
4erv'
 
Posts: 188
Joined: Sat Jul 07, 2007 10:52 am
Location: in Recycle Bin
Score: 10 Give a positive score

Re: How do i utilize 5 var's Att/Def/Spd/Mp/Hp??

Postby Bee-Ant » Sun May 24, 2009 1:52 am

Oh yes,ur right.

Umm,for the damage,dont use "-" to calculate between atk and def.it will cause troble when the atk is lower than def. Also add some more variable like level,move power,etc to calculate damage.

Maybe something like:
damage=(attacker_level/5+1)*attacker_atk*attacker_movepower/attacked_def/10+1;

So there're 3 factors determine your damage: your level,your atk, and your move.

Thats the basic i think.
Oh,for more spesific formula,you can adopt pokemon damage formula on
www.serebii.net

I work on RPG also :D
Let's share stuff :D
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: How do i utilize 5 var's Att/Def/Spd/Mp/Hp??

Postby DST » Sun May 24, 2009 12:57 pm

Bee-Ant wrote:
Maybe something like:
damage=(attacker_level/5+1)*attacker_atk*attacker_movepower/attacked_def/10+1;



Its a good habit to get into to designate the order of calculations with ();

damage=((attacker_level/5)+1)*((attacker_atk*attacker_movepower)/((attacked_def/10)+1));

Equations contained inside () will be calculated as a whole before moving onto the next piece;

so that 5*5+1=26;
and (5*5)+1=26;
while 5*(5+1)=30;

Not sure what order you want them to calculate it, but it should be kept under control. I know its just a forum post and you were making a quick example. But we don't wanna get the new guys into bad habits, do we?

ALso try to precalculate everything you can; when you draw health bars for multiple enemies with the same stats, you can simplify like this: Instead of lineto(x+(health*20)/maxhealth, y);

Try this: On enemy create actor: varx=(20/maxhealth);

Then on draw actor: lineto(x+health*varx);

Where varx is a real.

And you've eliminated a division equation from the draw actor. Of course it doesn't really matter in 1v1 rpg battles, but it makes a HUGE difference for RTS battles.
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: How do i utilize 5 var's Att/Def/Spd/Mp/Hp??

Postby Bee-Ant » Sun May 24, 2009 2:33 pm

For those formula, by adding or not the extra () wont change anything...
The result would be the same value...
Computer will prefer to calculate * or / first then + or -
So, you dont need any extra ()
The order is from the very front to the very end...
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: How do i utilize 5 var's Att/Def/Spd/Mp/Hp??

Postby DST » Mon May 25, 2009 5:06 pm

That's true, if you already know exactly how you want it to calculate. Mose users here are in an exploratory phase, so they are testing and adjusting the equations as they go.

When you are rewriting the equation, having the brackets gives you better control.

The more a person programs, the more they come to understand things that they didn't see a reason for before. It's not so much question of it working or not working, it's a question of doing things in a proper and expandable way.

Good habits are important.
It's easier to be clever than it is to be kind.
http://www.lostsynapse.com
http://www.dstgames.com
User avatar
DST
 
Posts: 1117
Joined: Sun Apr 15, 2007 5:36 pm
Location: 20 minutes into the future
Score: 151 Give a positive score

Re: How do i utilize 5 var's Att/Def/Spd/Mp/Hp??

Postby Bee-Ant » Tue May 26, 2009 1:36 am

Well, here's my RPG damage formula...
Code: Select all
my_damage=0.5*(2*ATTACKER_LEVEL/5+1)*ATTACKER_ATK*((attacker_move_power+100)/10)*((attacker_anger+150)/10)/MY_DEF/40+1;

I use ANGER to my RPG beside ATK and Move.
I will add another thing next :D
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score


Return to Advanced Topics

Who is online

Users browsing this forum: No registered users and 1 guest