Accueil Crush your enemies... and create an EMPIRE!!! Space Empires V -- BUY NOW!!!

Connexion utilisateur

  • Créer un nouveau compte
  • Demander un nouveau mot de passe

Navigation

  • news
    • archive
    • blogs
    • books
    • forums
    • recent posts
    • groups
  • image galleries
  • projects & downloads
  • search
  • create content
  • agrégateur de nouvelles

Rechercher

Qui est en ligne

Il y a actuellement 4 utilisateurs et 197 invités en ligne.

Utilisateurs en ligne

  • Thy Reaper
  • Fyron
  • ForesterSOF
  • BlueTemplar

Languages

  • English English
  • French French

Parcourir les archives

« December 2008  
Mo Tu We Th Fr Sa Su
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
Accueil » news » forums » Support & Feedback » Scenarios & Mods » SE:V MODs

Curve math

Soumis par Gideon le Mar, 2006-12-19 13:00 SE:V MODs

Similar to my linear math post, but with damage reduction according to an exponential decay curve.

WARNING: If math angers/frustrates you, then this will REALLY piss you off...

This is the math for a weapon to reduce damage according to an exponential decay curve.

Definitions:

f(m) is damage modifier from levels.

f(p) is percentage of m which applies, as expressed by a number from 0.00 (for 0%) to 1.00 (for 100%).

f(r) is the percentage of the range of the weapon as it relates to its maximum possible range, as expressed by a number from 0.00 (for 0%)
to 1.00 (for 100%). Example: If the max range is 60, then 30 is 50% of 60 (or one half), so r = 0.5.

f(m) = damage by level * (p)

f(p) = a + b * (Power(c, (-1 * (r))))

f(r) = range formula

Notes:

a + b = 1 = 100% damage

b is the ammount of damage lost. b = 0.45 = 45% damage lost.

So, if you want the damage lost to be at 25%, b = 0.25. a + b = 1. a + 0.25 = 1. a = 1 - 0.25. Therefore, a = 0.75.

c is the steepness of the curve. c = 1 = totally flat curve at a + b. As c increases, curve becomes more steep (more like a 90 degree angle).
c = 100 seems to be just about right.

Script function definitions:

Power is the formula command for exponents. Power (A, B) means A to the power of B. Squareing something would be Power (A, 2).
Cubing would be Power (A, 3). Another text notation for this would be A^B.

iif is an if - then - else command. iif(A, B, C) = if A is true, do B, otherwise do C.

Min is take the minimum of two values. Min(A, B) = take the minimum of A or B, whichever is lower.

So, iif([%Range%] Min(90, (([%Level%] - 1) * 10) + 30), 10000, 0)
(23 + (([%Level%] - 1) * 5)) - (([%Range%] / 10) * 1.67) - iif([%Range%] > Min(90, (([%Level%] - 1) * 10) + 30), 10000, 0)

Simplified formulas:

iif([%Range%] <= Min(90, (([%Level%] - 1) * 10) + 30), (20 + (([%Level%] - 1) * 15)) - (([%Range%] / 10) * 1.67), 0)
iif([%Range%] <= Min(90, (([%Level%] - 1) * 10) + 30), (23 + (([%Level%] - 1) * 15)) - (([%Range%] / 10) * 1.67), 0)

Work:

iif([%Range%] <= Min(100, (([%Level%] - 1) * 10) + 30), (20 + (m)) , 0)

f(m) = (([%Level%] - 1) * 15) * (p)

f(p) = 0.5 + 0.5 * (Power(100, (-1 * (r))))

f(r) = [%Range%] / Min(100, (([%Level%] - 1) * 10) + 30)

Result:

iif([%Range%] <= Min(90, (([%Level%] - 1) * 10) + 30), (20 + (([%Level%] - 1) * 5) * (0.5 + 0.5 * (Power(100, (-1 * ([%Range%] / Min(90, (([%Level%] - 1) * 10) + 30))))))) , 0)
iif([%Range%] <= Min(90, (([%Level%] - 1) * 10) + 30), (23 + (([%Level%] - 1) * 5) * (0.5 + 0.5 * (Power(100, (-1 * ([%Range%] / Min(90, (([%Level%] - 1) * 10) + 30))))))) , 0)

This allows for a more organic and consistant damage dropoff accross all levels, but requires additional testing.

‹ map creation and balance mod GidMod 4.8.0b ›
» Vous devez vous identifier ou créer un compte pour écrire des commentaires

Options d'affichage des commentaires

Sélectionnez la méthode d'affichage des commentaires que vous préférez, puis cliquez sur "Sauvegarder les paramètres" pour activer vos changements.

Re: Curve math

Soumis par seeker le Ven, 2007-11-02 23:59

This is really good, you must like math! Its's good for people to like math

» Vous devez vous identifier ou créer un compte pour écrire des commentaires
Mod Designer

Re: Curve math

Soumis par Gideon le Sam, 2007-11-03 10:55

Whoa...back from the dead...

Yeah, I like math. Seem to have a knack for it. Spelling, not so much.

At any rate, I'll have to republish this information in the blogs area, so it can't be buried quite so easily. Thanks for the reminder!

"Only by being constantly at war with evil in all things, including yourself, can you truely know peace."
Download my mod here: GidMod

» Vous devez vous identifier ou créer un compte pour écrire des commentaires

Options d'affichage des commentaires

Sélectionnez la méthode d'affichage des commentaires que vous préférez, puis cliquez sur "Sauvegarder les paramètres" pour activer vos changements.

Now on STEAM

Now on STEAM!Space Empires V via STEAMSpace Empires IV via STEAMSTEAM online by Valve Corporation

Contenu populaire

Aujourd'hui :

  • Babylon 5 Wars SEV Mod Update
  • Known SE5 v1.74 Bugs
  • Research By Percentage SUCKS
  • Space Empires V and VI: Expansions and the Future: Tell the Company What's on Your Wish List
  • Bad Bookkeeping

Depuis toujours :

  • Space Empires V and VI: Expansions and the Future: Tell the Company What's on Your Wish List
  • Space Empires V
  • Gritty Galaxy Fleet Clash
  • Damn Dirty Bugs/Annoyances
  • Space Empires V: General Thoughts, Observations, and Suggestions

Dernier accès :

  • Nichtangriffspakt / Nonaggression treaty
  • Invalic Index Parsing error?
  • Tech Researched does not match Tech specified
  • How do you delete a waypoint?
  • Mines
(c) Strategy First, Inc. All rights reserved.