![]() |
Unit Cost Equation
Im moving this to a new thread so I quit hogging Scott Heberts excellent thread on Commander costs...
Heres my current formula for caulculating the cost of a unit based on (and only on) its physical stats: sqrt(((HP*(10.0+Prot)*Def*MR)/1000.0)*((Str*Att)/10.0))*((3.0+Move)/5.0)*((40.0+AP)/50.0)*(9.0/(6.0+Enc))*((Mor^log10(7))/7.0) Comments, anyone? Suggestions? Flames? Donations? http://forum.shrapnelgames.com/images/smilies/wink.gif So, back to the morale buisiness: Perhaps just a chart is the way to go, then. I hate making morale 0-5 cost exactly the same, because there is a change, however small and imperceptable http://forum.shrapnelgames.com/images/smilies/happy.gif Besides, there arent any troops with under 7 morale, are there? Theyd be useless, and Illwinter knows it http://forum.shrapnelgames.com/image...es/biggrin.gif <font class="small">Code:</font><hr /><pre> Morale Cost 0 0.38 1 0.39 2 0.40 3 0.41 4 0.43 5 0.46 6 0.50 7 0.55 8 0.65 9 0.80 10 1.00 11 1.40 12 1.70 13 1.90 14 2.00 15 2.09 16 2.17 17 2.24 18 2.30 19 2.35 20 2.39 21 2.42 22 2.44 23 2.45 24 2.46 25 2.47 26 2.48 27 2.49 28 2.50 29 2.51 30 2.52 </pre><hr /> Now, the question is, if I do get this chart accurate, should it stay as just a multiplier to what the cost would be otherwise? |
Re: Unit Cost Equation
1 Attachment(s)
Heres a quick graph of the data in the chart.
|
Re: Unit Cost Equation
Quote:
That looks pretty accurate. As far as multiplier-or-not goes... On commanders, morale is (AFAIK) unimportant except for repel attempts. So it should not be applied to commanders. On normal units, it sort of depends. High morale is worth more on cheap units than expensive units, because you get lots of them. Maybe it should have an additive AND multiplicative effect? In other words, if the unit's value (aside from morale) is "X", with morale ("MV", value of morale from the chart) it might be: (X+X*MV+K*X^2*MV) The first X considers units in huge groups, or boosted by a priest casting Sermon of Courage, or with "Berserkers" cast, or patrolling, or waiting as targets forn Fires from Afar, or as bodyguards where morale is not relevant, or as arrow targets / lance fodder where morale is meaningless. The second term considers normal groups with no morale support, in normal melee battles. The third term (with an unknown constant, K) is the usefulness of high-morale units in keeping low-morale groups from fleeing, preventing complete routs (so mages can do their business), when the enemy is using units with Fear or casting Terror and Panic, and other cases where high morale is crucial. ... then again, I never stop playing with a formula until it is so complex I can no longer understand it, so maybe you should ignore everything I just said. Probably, in fact. Actually, I order you to banish it from your mind http://forum.shrapnelgames.com/images/smilies/happy.gif. Your current formula seems fine; it looks good to me, anyway http://forum.shrapnelgames.com/images/smilies/happy.gif 2.5 seems a little high as an upper asymptote, though; 2.0 might be high enough for a purely multiplicative term. I wouldn't pay 2.5 times as much for units with infinite morale as for 10 morale - the max would be, maybe, 2.0 times, at which point I'd only buy a few of them. |
Re: Unit Cost Equation
1 Attachment(s)
Ok, new chart http://forum.shrapnelgames.com/images/smilies/happy.gif
(can you tell I dont have a life) <font class="small">Code:</font><hr /><pre> Morale Cost 0 0.450 1 0.460 2 0.480 3 0.510 4 0.550 5 0.600 6 0.660 7 0.730 8 0.810 9 0.900 10 1.000 11 1.100 12 1.195 13 1.285 14 1.370 15 1.450 16 1.525 17 1.595 18 1.660 19 1.720 20 1.775 21 1.825 22 1.870 23 1.910 24 1.945 25 1.975 26 2.000 27 2.020 28 2.035 29 2.045 30 2.050 </pre><hr /> Attatched is another graph of the data. Its a much smoother spread, too http://forum.shrapnelgames.com/images/smilies/happy.gif However, the change close to 10 is less severe... |
Re: Unit Cost Equation
Hmmm.......
Yeah, it has better endpoints. Is it possible to increase the slope around 10 while keeping the endpoints and the smoother line? |
Re: Unit Cost Equation
Quote:
And why is the spacing all wacked out in the 2nd chart? |
Re: Unit Cost Equation
Quote:
|
Re: Unit Cost Equation
1 Attachment(s)
<font class="small">Code:</font><hr /><pre>
Morale Cost 0 0.500 1 0.510 2 0.523 3 0.541 4 0.564 5 0.596 6 0.638 7 0.694 8 0.768 9 0.868 10 1.000 11 1.251 12 1.439 13 1.580 14 1.686 15 1.765 16 1.824 17 1.869 18 1.903 19 1.928 20 1.947 21 1.961 22 1.971 23 1.979 24 1.985 25 1.990 26 1.993 27 1.995 28 1.997 29 1.999 30 2.000 </pre><hr /> |
Re: Unit Cost Equation
Perfect!
|
Re: Unit Cost Equation
Here is a quick and dirty formula based on a multiple linear regression that
included only units with morale below 30. (AFAIK, the 30 and 50 morale numbers are only symbolic and represent a qualitatively different state.) I didn't include movement because the spreadsheet I have needs work to adjust those numbers into a useable format. (Plenty of other boring qualifiers omitted.) Cost = -386.0 + (11.9 * Size) + (2.3 * HP) + (-2.0 * Prot) + (11.0 * Morale) + (21.8 * MagicRes) + (1.4 * Enc) + (-4.8 * Str) + (2.8 * Att) + (.7 * Def) + (4.0 * Prec) The adjusted multiple R-squared is .70, so about 70% of the variance in cost is explained by the predictors. How does that compare to the formula in the first post? In case you are not familiar with multiple regression, don't be fooled by the size of the coefficients. There is some collinearity -- some of the stats used as predictors are correlated with each other, so their unique predictive contribution is affected. For example, strength has a zero-order correlation of .24 with cost, but in the multiple regression, its coefficient is negative. Edit: Commander vs. non-commander makes a difference, so here are the formulae after splitting the two groups. Non-commander formula (adjusted R-squared = .81): Cost = -60.1 + (12.3 * Size) + (2.9 * HP) + (.8 * Prot) + (5.3 * Morale) + (4.1 * MagicRes) + (-1.9 * Encumb) + (-8.0 * Str) + (1.5 * Att) + (.5 * Def) + (-1.9 * Prec) Commander formula (adjusted R-squared = .71): Cost = -459.7 + (16.8 * Size) + (.3 * HP) + (-2.5 * Prot) + (11.0 * Morale) + (25.4 * MagicRes) + (5.0 * Encumb) + (.8 * Str) + (-1.1 * Att) + (6.2 * Def) + (-.1 * Prec) |
All times are GMT -4. The time now is 07:49 PM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.