I need formula of which i know the results...

5 replies to this topic

#1 psycho666

psycho666

GMC Member

• GMC Member
• 849 posts
• Version:GM8

Posted 31 May 2012 - 07:42 PM

Hi to all. First ever topic here... So as any noob i'll start from... the middle...
OK here i go... I have 3 variables: A, B and C, that i know their exact values. I also have variable D that i need to be calculated by the formula i don't know... It's fairly simple in the ideal case:
if A=B then C=D... Plain and simple... However in 99,9% of the cases A>B or A<B... So here are 4 guidelines...
if A=B/3 then D=0,6C
if A=B/2 then D=0,8C
if A=B then C=D as above,
if A=2B then D=1,2C
if A=3B then D=1,4C

And i played 2 days with this thing in my mind and all i could reach as a formula is... well... let's just say i need help
I suck at non linear thing and this is what i need here...
Any help will be greatly appreciated...

Edited by psycho666, 31 May 2012 - 07:46 PM.

• 0

#2 Jack Indie Box

Jack Indie Box

GMC Member

• GMC Member
• 1489 posts
• Version:GM:Studio

Posted 31 May 2012 - 08:09 PM

before anyone attempts to help you can you please say WHY you need this and what you will use it for alot of the time if you havent dones something before someone way have done it a different way which might be easier infact.

Also how you get A B and C would help us alot!

Edited by Jack Indie Box, 31 May 2012 - 08:18 PM.

• 0

#3 torigara

torigara

GMC Member

• GMC Member
• 6483 posts

Posted 01 June 2012 - 05:03 AM

if A = B/1 then D = C * 1.0
if A = B/2 then D = C * 0.8
if A = B/3 then D = C * 0.6

if A = B*1 then D = C * 1.0
if A = B*2 then D = C * 1.2
if A = B*3 then D = C * 1.4
You may see some pattern. Continue on:
if A = B/1 then D = C * (1.0 - 0.2 * 0)
if A = B/2 then D = C * (1.0 - 0.2 * 1)
if A = B/3 then D = C * (1.0 - 0.2 * 2)

if A = B*1 then D = C * (1.0 + 0.2 * 0)
if A = B*2 then D = C * (1.0 + 0.2 * 1)
if A = B*3 then D = C * (1.0 + 0.2 * 2)
Now the pattern is more apparent. Generalize it:
if A = B / (Z+1) then D = C * (1 - 0.2 * Z) [when A < B]
if A = B * (Z+1) then D = C * (1 + 0.2 * Z) [otherwise]
Solve the condition part for Z and we finally get:
if (A < B) Z = -B/A - 1 else Z = A/B - 1;
D = C * (1 + 0.2 * Z);

• 1

#4 psycho666

psycho666

GMC Member

• GMC Member
• 849 posts
• Version:GM8

Posted 01 June 2012 - 08:01 AM

Solve the condition part for Z and we finally get:

if (A < B) Z = -B/A - 1 else Z = A/B - 1;
D = C * (1 + 0.2 * Z);

This is actually all i needed... Thank you a lot
Jack Indie Box, this will be damage determining system according to the attack (A), defense ( and base damage ©... I have seen some topics exactly about damage determining, but god forgive my stupidity, 90% of what i read i couldn't understand... So i made this thing in my mind... If you can give me better idea - i'm still open minded on this, cause i'm still working on the statistics, and in a few days i'll start the battles, so i have time to change my mind...

Again, thank you for your time and help

Edited by psycho666, 01 June 2012 - 08:02 AM.

• 0

#5 Jack Indie Box

Jack Indie Box

GMC Member

• GMC Member
• 1489 posts
• Version:GM:Studio

Posted 01 June 2012 - 08:55 AM

If you can use that nicely made equation use it and youll be fine.

i would have just tryed a few things out till they felt right. eg. either (A*C)-B=D or A+C-B=C. tottally depends what sort of values you have for each of them what the outcome will be
• 0

#6 psycho666

psycho666

GMC Member

• GMC Member
• 849 posts
• Version:GM8

Posted 01 June 2012 - 10:25 AM

A and B will never reach value close to 2000 for the character... 1500, 1600 is something normal... Now for the enemies they varey according to the level, type etc... But they will never go over 8 000... The damage will be maxed out at around 200, so 1,4 is around 280...
I need this mainly for boss battles, cause they have fixed stats, while common enemies will have similar to the character's values...

Now i don't want all players to increase attack only, so they will deal massive damage, this is why i use small bonuses, like 20% for double stats, but i want the stats to matter, so when you see 160dmg you will know that your attack sux, cause you should deal 200...

You can still try a few things I'm still open for ideas, cause i haven't started the battles yet... Working on atribute stats at the moment...
• 0

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users