Log in

View Full Version : Unit Cost Equation


The_Tauren13
March 19th, 2005, 09:01 PM
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/images/smilies/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?

The_Tauren13
March 19th, 2005, 09:40 PM
Heres a quick graph of the data in the chart.

Saber Cherry
March 19th, 2005, 09:56 PM
The_Tauren13 said:
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?



Just starving units http://forum.shrapnelgames.com/images/smilies/happy.gif

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.

The_Tauren13
March 19th, 2005, 10:18 PM
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...

Saber Cherry
March 19th, 2005, 10:23 PM
Hmmm.......

Yeah, it has better endpoints. Is it possible to increase the slope around 10 while keeping the endpoints and the smoother line?

The_Tauren13
March 19th, 2005, 10:29 PM
Saber Cherry said:Is it possible to increase the slope around 10 while keeping the endpoints and the smoother line?


Probably. Lemme give it a go...

And why is the spacing all wacked out in the 2nd chart?

Saber Cherry
March 19th, 2005, 10:31 PM
The_Tauren13 said:

Saber Cherry said:Is it possible to increase the slope around 10 while keeping the endpoints and the smoother line?


Probably. Lemme give it a go...

And why is the spacing all wacked out in the 2nd chart?



Editing always messes up (code)(/code) sections. Forum bug.

The_Tauren13
March 19th, 2005, 10:57 PM
<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 />

Saber Cherry
March 20th, 2005, 01:11 AM
Perfect!

sushiboat
March 20th, 2005, 05:29 AM
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)

Saber Cherry
March 20th, 2005, 08:13 AM
How on Earth did you come up with these? I assume you were using data compiled in Excel spreadsheets and some automated technique, but...

OK, I admit it, I'm
not familiar with multiple regression

http://forum.shrapnelgames.com/images/smilies/happy.gif

I have to wonder how well a forumla with negative coefficients for strength, encumbrance, and precision will predict the value of future units... but since you out-math me, I'll gracefully bow before you http://forum.shrapnelgames.com/images/smilies/happy.gif

The_Tauren13
March 20th, 2005, 01:46 PM
50 morale is symbolic, but I think 30 morale is real...

As for your equation, while it may be perfect for all units already in the game, it doesnt do much for modding, which is what I was interested in; I ran the Size 1, 5 HP, 3 Prot, 10 Mor, 5 MR, 2 Enc, 5 Str, 11 Att, 10 Def unit Im including in my mod through your equations and he came out costing -133 from your combined euation, and 20 from the unit only one. So, it isnt really a global equation that can be applied to any unit a modder might come up with, which is what I was hoping to eventually get. Not that Im claiming any equation can fully encompass this complicated game http://forum.shrapnelgames.com/images/smilies/happy.gif I just want to make a stab at it...



Now, I have a couple questions: Can the same 'diminishing returns' idea be applied to attack and defence? That is, is the difference between 10 and 13 attack greater than between 20 and 23? How much attack or defense skill would be required to double the effectiveness of a 'normal' unit (that is, 10 HP, 0 Prot, 10 Att, 10 Def, etc.)? Is defense really worth more than attack? For some reason I have gotten that into my head, but then, Im a n00b at Dominions...

In my initial equation, should the magic resistance be pulled out of the square root? Should it be wieghted more? Does low magic resistance make an otherwise powerful unit worthless?

new equation: (thanks Saber Cherry http://forum.shrapnelgames.com/images/smilies/happy.gif)
sqrt( ( ( HP * ( 10 + Prot ) * Def * MR ) / 1000 ) * ( ( Str * Att ) / 10 ) ) * ( ( 3 + Move ) / 5 ) * ( ( 40 + AP ) / 50 ) * ( 9 / ( 6 + Enc ) ) * f( Mor )
f( x ) = 0.5 + ( ( 0.75 ) ^ ( 10 - x ) ) / 2 | x &lt; 10
f( x ) = 2 - ( ( 0.75 ) ^ ( x - 10 ) ) | x &gt;= 10


Heres another (crazy) idea:
sqrt( HP * ( 10 + Prot ) * f( Def ) * f( Str ) * f( Att ) ) * ( ( 3 + Move ) / 5 ) * ( ( 40 + AP ) / 50 ) * ( 9 / ( 6 + Enc ) ) * f( Mor ) * f( MR )
f( x ) = -sqrt( 10 - x ) / 3 + 1 | x &lt; 10
f( x ) = sqrt( x - 10 ) / 3 + 1 | x &gt;= 10

This is assuming that morale, magic resistance, attack, strength, and defense all follow the same cost distribution...
Attatched is a graph of this f(x).

sushiboat
March 20th, 2005, 04:47 PM
How did I do it? Many statistics programs exist that can do a multiple
regression in a few seconds. The tricky part is recognizing problems and
interpreting the output.

What use is it to a modder? Use it as you will. It is an imperfect description of
the way that the unit stats are related to unit costs in the original game.

Below are some new formulae. I added some stats, and I removed stats post
hoc that didn't make a significant unique contribution. Something I might do
in the future is separate mages from non-mages.

Non-commander (adjusted R-squared = .81)

Cost = -51.7 + (11.2 * Size) + (3.1 * HP) + (.9 * Prot) + (5.9 * Morale) +
(4.5 * MagicRes) + (-1.6 * Encumb) + (-8.6 * Str) + (-1.8 * Prec) +
(.5 * TacMove)

Commander (adjusted R-squared = .82)

Cost = -269.6 + (1.6 * HP) + (-1.7 * Prot) + (8.9 * Morale) +
(12.4 * MagicRes) + (3.6 * Def) + (2.2 * TacMove) + (.6 * Ldr_Norm) +
(1.5 * Ldr_Undead) + (3.3 * Ldr_Magic)



Edit: OK, here are separate formulae for non-mage and mage commanders.

Non-mage Commander (adjusted R-squared = .77)

Cost = -125.6 + (9.2 * Size) + (1.4 * Prot) + (10.9 * Morale) +
(7.6 * MagicRes) + (-6.6 * Encumb) + (-3.5 * Str) + (-2.0 * Def) +
(2.3 * TacMove)

Mage Commander (adjusted R-squared = .79)

Cost = -233.0 + (7.7 * Morale) + (16.0 * MagicRes) + (4.1 * Str) +
(-10.7 * Att) + (11.5 * Def) + (-5.7 * Prec) + (.9 * Ldr_Norm) +
(1.1 * Ldr_Undead) + (3.5 * Ldr_Magic)

PDF
March 21st, 2005, 11:43 AM
Sorry, but I'm pretty sure these regressions are mostly useless (and I've some stat background..). Namely because they do work *only* if the relationships between attributes and the attributes scales themselves are in the range of the sample studied.
So if I make yet another jav totting Lt Inf it will be ok, but if I make something unusual, for example a 1-hp Ethereal elephant, a 100-hp rock-hard militia or some nasty B3W3?3 mage (called "Ice Devils Factory" :lol ), they would be totally out.
Thay also don't take at all into account the equipment of the unit (the values are averaged, difference going to the error margin) : yet these are pretty important...

Verjigorm
March 21st, 2005, 12:57 PM
Equipment is generally accounted for in the resource cost whereas skill is accounted for by the unit cost. The value of units such as mages is extraordinarily difficult to determine because their spells and combinations of spells (even if you leave out item bonuses and communion) is subjective and certain combinations of spells have greater "value" that the sum of the "values" of the spells alone (e.g. Body Ethereal combined with Bone Grinding &gt; Body Ethereal + Bone Grinding).

Unit cost should be a measure of their statistical efficacy versus the "average" unit whose cost could be arbitrarily assigned. The "average" unit's stats are not all 10's and his cost is not 10gp... Once you have a sample space of units, you can determine the most effective ones. The combat simulator is a good tool for this, but it doesn't produce excel-like results. Any unit whose effectiveness against "Average" is 50% should cost the same as the "Average" unit. I'm not sure how you'd scale up the value as the percentages vary....How much more should a unit with 95% effectiveness cost?

BigDaddy
March 21st, 2005, 01:54 PM
PDF said:
Sorry, but I'm pretty sure these regressions are mostly useless (and I've some stat background..). Namely because they do work *only* if the relationships between attributes and the attributes scales themselves are in the range of the sample studied. . .




With all due respect, in my profesional coursework, I was taught that linear regression could be used for forecasting. With a time constraint values will go beyond the range studied (ideally, your model should be updated with each new point). So, the model is a good one, HOWEVER, I'm pretty sure the nice linear lines aren't appropriate for exquisetly powerful or unusual units. Mainly, because A)I doubt that that is how the devs did it and B) power increases dramatically for higher skill values.

A better model for these powerful units might be to do a similar study of summonable units and convert from gems to gold (using ermor, 10-15 gems us ~equal to 200 gold). Unfortunately you can't use the same equation for commanders and regulars, but seperate units would be available.

An even better model would be to use best fit nonlinear equations for the summonable units, then convert to gold. Cheap regression software can only check your guesses for nonlinear equations.

Probably the best method would be to use an expert system (engineering term - artificial intelligence for programmers) to compute costs. Using this method, you could convert summonable unit cost to gold first (or use the system to do it accurately), then input ALL of the units. Then, by pumping your unit through the system you would get an accurate price. The system itself would be somewhat complex, with nodes for each aspect (sacred, etheareal, etc) of the unit. You can get a good quality student expert system program for "free," with the purchase of a US$100-150 expert system text. It MAY allow enough nodes for this system. You may be able to download one for free, but I haven't looked. It could take you a while to learn how to use it. . .

SUMMARY:
Use the linear model or 1gold per point model for units within normal "human" unit ranges (maybe up to 14 skill) with typical aspects (not ethereal). This is how devs appear to have done it. . .

For powerful units, make a model using summonable units and convert to gold, using ermor income to gold (10-15 gems per 200 gold). Use of linear lines here will cause barely powerful units to be too expensive and truly powerful units to be too cheap, but mid range guys should be right on. Models for extreme units should use a nonlinear or expert system model.

OR you could "just" shake the info out of the devs. . .

sushiboat
March 21st, 2005, 03:56 PM
Prediction is not what you might think. Of course, I can't predict what a
modder is going to do. A modder could change Militia to be 10,000 gold. The
regression equations describe how stats are related to price for existing
units. To the extent that you generally like what Illwinter has done with
pricing units, the equations might give you a good starting point. If you want
to make drastic changes, you may be less interested.

My guess is that the Illwinter guys don't use equations. One of them probably
makes a unit and assigns a price based on an intuitive understanding of its
usefulness. After playtesting, the price is modified.

I can put things like magic paths and special abilities (e.g., ethereal) into the
mix. I already did so with flying, which turned out not to be uniquely
important enough to keep in. Keep in mind, however, that the equations
above are already explaining about 80% of the variance. That is the equivalent
of a correlation of .90. Whatever gains come in the future will be very modest
at best.

As for using nonlinear equations, I have looked at polynomial regressions for
some of the predictor variables. Morale, for example, is pretty much linear.
The squared term adds a little, and the cubed term is negligible. In other
contexts, I have played around with log, square root, and reciprocal
transformations. My experience has been that they are most useful when the
vanilla linear regression isn't working well. Here, vanilla works like
gangbusters, so the room for improvement is small.

Scott Hebert
March 21st, 2005, 04:01 PM
sushiboat said:
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)

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.



Er, um, I don't doubt this, but may I ask why Size is a positive value? With the sole exception of Trampling, Size is almost invariably a negative in Dominions, isn't it?


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)



Do you mind if I use this to calculate values for the commanders? Also, is this ignoring other factors (magic, etc.)?

sushiboat
March 21st, 2005, 04:33 PM
Why is size a positive value? I guess the ultimate answer would have to come
from Illwinter. If I remember correctly, size, HP, and strength are highly
correlated with each other, so having more than one in the equation makes
interpretation tricky.

You are welcome to use the equations in any way you like. At the moment,
they cover only national units, not independents. (Maybe next weekend I'll
add the indies.) I have not included magic paths for mages yet. The only
special ability I have looked at is flying. I would like to add other special
abilities and magic paths later. The three equations below are the ones to use
for now.

Non-commander

Cost = -51.7 + (11.2 * Size) + (3.1 * HP) + (.9 * Prot) + (5.9 * Morale) +
(4.5 * MagicRes) + (-1.6 * Encumb) + (-8.6 * Str) + (-1.8 * Prec) +
(.5 * TacMove)

Non-mage Commander

Cost = -125.6 + (9.2 * Size) + (1.4 * Prot) + (10.9 * Morale) +
(7.6 * MagicRes) + (-6.6 * Encumb) + (-3.5 * Str) + (-2.0 * Def) +
(2.3 * TacMove)

Mage Commander

Cost = -233.0 + (7.7 * Morale) + (16.0 * MagicRes) + (4.1 * Str) +
(-10.7 * Att) + (11.5 * Def) + (-5.7 * Prec) + (.9 * Ldr_Norm) +
(1.1 * Ldr_Undead) + (3.5 * Ldr_Magic)

Scott Hebert
March 21st, 2005, 04:48 PM
sushiboat said:
Why is size a positive value? I guess the ultimate answer would have to come
from Illwinter. If I remember correctly, size, HP, and strength are highly
correlated with each other, so having more than one in the equation makes
interpretation tricky.



Ah, that would answer it. Sort of like my idea to 'prorate' Strength and HP gains by the size of the unit?


You are welcome to use the equations in any way you like. At the moment,
they cover only national units, not independents. (Maybe next weekend I'll
add the indies.) I have not included magic paths for mages yet. The only
special ability I have looked at is flying. I would like to add other special
abilities and magic paths later. The three equations below are the ones to use
for now.



Oh, well, that's good, since I don't have the independents in there either.

If I could give you values for commanders without any 'specials', could you calculate a regression formula based on that?

Scott Hebert
March 21st, 2005, 04:54 PM
Also, why is the mage commander different from the non-mage commander?

BigDaddy
March 21st, 2005, 05:00 PM
Sushiboat's equations don't answer "why" questions, they answer only "what" questions. Such as, what is the price correlation between this and that for mage commanders. . . The fact that mixing the commander types together decreased his significance showed him that he needed to seperate them.

In this case, he's reverse engineering the pricing method.

BigDaddy
March 21st, 2005, 05:13 PM
Its quite nice to see regression analysis used this way. As I stated, I believed it would work quite well for "normal" units. I still have my doubts about its usefulness for powerful units, so in these cases, your use should be more reserved (higher prices).

Sushiboat, I think you'll see a significant changes to the pricing of mages when you add magic paths. I'm curious as to whether or not after testing all the magic paths really turned out "even" in terms of pricing. Don't worry, I appreciate the difficulty of your working in figuring that particular question out (are their combinations that are more expensive, do you need to put a variable in for lvl2 earth path, or just lvl2 path?). Happy hunting!

sushiboat
March 21st, 2005, 05:34 PM
BigDaddy, I am toying with the idea of converting cost to percentile scores
and then giving a table for converting back from percentiles to gold cost for
someone who uses the formula. I think that would address nonlinearity more
efficiently than various curve fitting schemes. I bet that math professors
everywhere are feeling mysteriously uneasy that someone somewhere is
using linear modeling with percentile data, but I think that it should work
alright from a practical perspective. Of course, it's extra work, so who know
whether I will get around to it.

Saber Cherry
March 21st, 2005, 07:35 PM
sushiboat said:
Prediction is not what you might think.



... that is an absoultely awesome quote http://forum.shrapnelgames.com/images/smilies/happy.gif

BigDaddy
March 21st, 2005, 07:42 PM
Nah, normalizing the data is a straightforward method of "tabling" it. I'm sure the practice is commonplace. It will also give people an idea of what the "upper-bound" of your study is; They would then know when they can no longer use your numbers to determine cost.

I think it might be just as easy though, to just type out a cumulative cost chart for each stat. Then you don't need to normalize, just plug and chug. Just dump the equation parts in a spread sheet and...

Oh, and by the way, you may want to remove outliers from the unit lists. Any units which break the mold by being too cheap (likely for nation balance purposes by the devs) where never meant to meet your "entrance criterea."

BigDaddy
March 21st, 2005, 07:56 PM
Well, here's the ugly beta version for you to mess with sushi. Anyone else, use the higher numbers at your own risk!

See next post. . .

Scott Hebert
March 21st, 2005, 08:24 PM
BigDaddy said:
Sushiboat's equations don't answer "why" questions, they answer only "what" questions. Such as, what is the price correlation between this and that for mage commanders. . . The fact that mixing the commander types together decreased his significance showed him that he needed to seperate them.

In this case, he's reverse engineering the pricing method.



I understand. My question is if I can remove the specials and magic paths from the equation, so that only the stats matter.

Presumably, a stat is a stat, right?

BigDaddy
March 21st, 2005, 08:26 PM
OK, so I felt guilty about dropping that crappy spreadsheet on you guys, so heres a more useful and straightforward version. . .

SushiUnitPriceCalcV02.xls

Hope you have Excel.

BigDaddy
March 21st, 2005, 08:30 PM
Well. . .
I'd say that different stats make a mage commander better, like Defense and HP. So, the "a unit is a unit" priciple probably isn't the way it is. Anyway, without the path prices included the cost method is sketchy for mages at best. . .

Scott Hebert
March 21st, 2005, 08:35 PM
@BigDaddy: Theoretically, since the path costs have been given by Illwinter, they really shouldn't be that hard to remove from the equation, right? Would you say that Sushiboat's split-off of Mage Commanders would mean that Mage Commanders have different priorities?

BigDaddy
March 21st, 2005, 09:03 PM
Exactly.

Scott Hebert
March 21st, 2005, 09:04 PM
What would happen if you subtracted the path cost for each mage, and then recalculated? Do you think you would find the same occurrence?

Also, were the calculations made with equipment/path bonuses, or with just the base stats?

BigDaddy
March 21st, 2005, 09:11 PM
I assume he already took out the path cost, but I don't know. In any case, because the path costs may have differed from the standards of illwinter due to balancing the path cost need to be run in a model. I ASSUME he didn't count equipment (it costs resources). We need him to tell us.

On the spreadsheet... if you make an unusually strong or weak unit the cost will definetely be off. It's for "typical" units.

Sushiboat, can you use Absolute value on Str and HP to force Size to be negative(with your software)?

When you update I'll change the spreadsheet that bears your screen name.

sushiboat
March 21st, 2005, 09:13 PM
I look forward to adding magic paths. However, it would not surprise me if they turn out to be correlated with the stats already in -- especially precision, magic resistance, and magic leadership. The number of total path levels should be highly correlated with magic leadership. Levels in death and blood paths will be highly correlated with undead leadership. Fire magic adds to attack skill, and so on. What may happen is that the path levels stay in the final equation, other stats come out, and overall variance explained is bumped up only a little. Chipping away at the last 20% of the variance will be tough, I bet.

BigDaddy
March 21st, 2005, 09:27 PM
To repeat myself for your convenience:

-Remove outlier units that are artificially extra efficient to hire.

-Add magic paths to mage units.

These two will greatly increase your accuracy.

-I've updated the speadsheet to be NONCRAPPY.

-Look at your program options, and see if you can for HP and Str to be positive

sushiboat
March 21st, 2005, 09:33 PM
BigDaddy said:
I assume he already took out the path cost, but I don't know. In any case, because the path costs may have differed from the standards of illwinter due to balancing the path cost need to be run in a model. I ASSUME he didn't count equipment (it costs resources). We need him to tell us.


I didn't include equipment. I am not sure what you mean about path cost. I have not analyzed path levels (e.g., level 3 in death magic) yet. The spreadsheet info on magic paths still needs to be parsed and separated into different columns.



Sushiboat, can you use Absolute value on Str and HP to force Size to be negative(with your software)?


I don't understand what you are requesting. I think that all units already have non-negative Strength and HP values, so running them through an absolute value function wouldn't change those numbers. Are you talking about the coefficients?

Evil Dave
March 21st, 2005, 11:31 PM
sushiboat said:
If I remember correctly, size, HP, and strength are highly correlated with each other, so having more than one in the equation makes interpretation tricky.



Highly-correlated inputs do bad things to regression models. You might try dropping one or two of them to see if it gives more sensible coefficients on the one or two left. Dropping them might even improve the R-squared, tho there's not much room to grow. http://forum.shrapnelgames.com/images/smilies/happy.gif

Out of curiosity, what do the p-values for the individual regressors look like?

Scott Hebert
March 22nd, 2005, 12:00 AM
sushiboat said:
I look forward to adding magic paths. However, it would not surprise me if they turn out to be correlated with the stats already in -- especially precision, magic resistance, and magic leadership. The number of total path levels should be highly correlated with magic leadership. Levels in death and blood paths will be highly correlated with undead leadership. Fire magic adds to attack skill, and so on. What may happen is that the path levels stay in the final equation, other stats come out, and overall variance explained is bumped up only a little. Chipping away at the last 20% of the variance will be tough, I bet.



Hmm. Well, here's the thing. If you look at total Magic leadership (including magic path additions), wouldn't that tend to overvalue Astral magic? Similar with Undead Leadership, etc.

I would think that, since we ostensibly have what the path costs should be for a given configuration (I've worked these all out, including full randoms, if you'd like it), shouldn't you remove that from consideration before running your analysis?

That done, wouldn't you gain a clearer picture of how to value the stats?

What I'm getting at is perhaps by working together (using my guesses and your regression analysis), we might be able to come up with a value for any given stat configuration, and then just 'plug in' the rest of the information.

Unfortunately, I don't very much at all about regression testing, so it's hard for me to grasp much of the jargon.

BigDaddy
March 22nd, 2005, 12:32 AM
Sushiboat, can you use Absolute value on Str and HP to force Size to be negative(with your software)?


I don't understand what you are requesting. I think that all units already have non-negative Strength and HP values, so running them through an absolute value function wouldn't change those numbers. Are you talking about the coefficients?

[/quote]

Yes, I'm talking about the coefficients. They really would do better as positives. I thought if you could force absolute value on them, then it would force Size to be negative. You also may get this result by changing the order. To some extent I agree with Evil Dave, except that we are talking about a correlation issue, even though Size and HP are very different. I would recommend making a model for human sized units IF you where going to cut size out. Otherwise, it is important enough to leave in. Besides, I assume it makes your model more accurate.

sushiboat
March 22nd, 2005, 01:31 AM
The coefficients are derived from the data, so you can't just change the
positive/negative sign without hurting the equation's performance. I could
take out all but one of a set of highly correlated predictors. However, all
predictors in the equation are making a highly significant contribution.
Perhaps a better solution would be to create a composite variable. A new
variable called Bigness could be the sum of the standardized scores of Size,
HP, and Strength. A little information would be lost by not keeping them
separate, but not much.

Edit: EvilDave, I don't have the output in front of me. (It's a Mac Classic app,
and I don't want to fire up the Classic environment just now.) I do remember
the predictors I kept having p-values that were very low, less than .0001. I
removed the predictors with p-values of .10 and higher from the three most
recent regressions. It just happened that there was a huge gap between the
predictors that weren't statistically significant and the ones that were.

BigDaddy
March 22nd, 2005, 01:45 AM
I DO realize that forcing the numbers will affect performance. But, building small strong units is trouble right now. . . SO, I would see if a Str and size composite (excluding HP) would be effective, it is a very good idea. I'd like to see HP remain alone, if possible. Then, little information would be lost.

Note to modders (who like this sort of thing), YES you can easily use this equation to min/max like never before and claim fairness. . .

Scott Hebert
March 22nd, 2005, 01:55 AM
Claim, yes. Hide behind for long, probably not. http://forum.shrapnelgames.com/images/smilies/wink.gif

Evil Dave
March 22nd, 2005, 01:55 AM
Scott Hebert said:

Unfortunately, I don't very much at all about regression testing, so it's hard for me to grasp much of the jargon.



No problem. Say you wanted to model the damage the units do in Dom2. You'd probably guess it was some function of strength and weapon damage.

So, you'd make a model like:

damage = A * strength + B * weapon damage

"strength" and "weapon damage" are the regressors (or contributors). A and B are their coefficients. The regressors also each have p-values, which is the likelihood they're due to chance -- 1%, 5%, and 10% are typical cut-offs for scientific work. The whole model has an R-squared, which is the fraction of the variation of the data it explains. R-squareds range from 0 to 1.

So, in this toy example, strength and weapon damage would probably have very small p-values (probably less than 0.01), but the R-squared would probably be pretty low, because the 2d6oe tends to swamp out the effects of the regressors.

Hope that helps. http://forum.shrapnelgames.com/images/smilies/happy.gif

sushiboat
March 22nd, 2005, 02:08 AM
Scott, I would be interested in seeing your figures for magic paths and cost.
Unless you are using the Unit Database spreadsheet and have numerical
entries for all mage units, I wouldn't be able to plug your numbers in directly
to my approach. As I said, I do plan to add magic paths to the analysis, but
no time for that today.

Scott Hebert
March 22nd, 2005, 10:55 AM
Dave: So... the p-values are like that 95% value for confidence testing, and the R-squared value is how much of the sample that the equation explains.

It sounds like math modeling and differential equations to me. http://forum.shrapnelgames.com/images/smilies/wink.gif

Sushi: If I had the Unit Database, I could supply that for you. It would be easiest if it were in Excel. It uses the Illwinter cost method.

BigDaddy
March 22nd, 2005, 12:12 PM
Scott,

Its here (and in Excel Format)

http://www.dominions-2.org/files.htm#docs

Under "Unit DB - by Edi"

Scott Hebert
March 22nd, 2005, 01:00 PM
Downloaded. I hope to have the magic path costs entered sometime today... if my New Era Pangaea game doesn't suck any more time away...

mmmm... Dryad Hoplites....

Scott Hebert
March 22nd, 2005, 01:20 PM
Oh, question. Where do you want me to put the Magic path cost, Sushi?

BigDaddy
March 22nd, 2005, 02:30 PM
Hmmm. . . I think Ill work on a raw data Unit spreadsheet. . .

sushiboat
March 22nd, 2005, 02:45 PM
Scott, I can't use magic path cost. (I am interested anyway, if you have a
formula for it.) What I need is the path levels in different columns -- 13
different columns if you have columns for elemental random, sorcery
random, and full random and you include holy and unholy. For example, a
F2E1 mage would have 2,0,0,1,0,0,0,0,0,0,0,0,0. If you don't have
information in that format already, please don't enter it by hand. When I have
time, I will use search and replace in a text editor to reformat the Magic
column into something I can use.

Scott Hebert
March 22nd, 2005, 03:22 PM
Ah. Mm, okay. I can probably do that.

BigDaddy
March 22nd, 2005, 07:05 PM
OK, here's an "update" to Edi's Unit_DB (its actually a spreadsheet). Another tab has been added to include a column for almost everything. If anyone feels like parsing all 198 special abilities!!! Go for it!

Dom2_Unit_DB_Sorttable.xls

Sushi, this should give you more to work with than you need.

sushiboat
March 23rd, 2005, 05:27 AM
EvilDave, here is the output with p-values for the mage commander equation.
As I have alluded to before, I am using a stepwise procedure. I first include all
the predictors I have available at the moment. Then I remove one predictor at
a time, starting from the highest p-values, until all remaining predictors have
p-values less than .10.

<font class="small">Code:</font><hr /><pre>
Coeff. Std. Error Std. Coeff. t-Value P-Value
Intercept -232.976 63.326 -232.976 -3.679 .0004
Morale 7.680 3.028 .155 2.537 .0127
MagicRes 16.015 3.847 .281 4.163 &lt;.0001
Defense 11.466 2.624 .397 4.369 &lt;.0001
ldr_norm .882 .314 .181 2.805 .0060
ldr_undead 1.142 .313 .178 3.643 .0004
ldr_mag 3.476 .466 .440 7.463 &lt;.0001
Strength 4.118 1.608 .137 2.561 .0119
Attack -10.712 3.643 -.225 -2.940 .0041
Precision -5.653 3.108 -.112 -1.819 .0719</pre><hr />

Scott Hebert
March 23rd, 2005, 12:27 PM
Sushi: From this,I assume that a mage's HPs do not correlate well (or they are not well-predicted) by the gold cost of that mage?

This seems... weird. Very weird.

Oversway
March 23rd, 2005, 12:53 PM
That makes sense to me. Most national mages have about the same hp: between 10 and 20. It is the increased magic that bumps the price up. I think only jotun and pan have really high hps mages. I may have missed some, but the majority do not. So the difference in hp is a wash compared to other attributes.

Scott Hebert
March 23rd, 2005, 01:12 PM
Perhaps, but the main reason that the Pan (to take an example) costs so much is not his magic, but his other abilities (HPs, Str, etc.).

I mean, if I tried to use this to make a mage, I could conceivably give them 1000 HPs, and have it cost no more than a mage with 10.

It's an interesting piece of math, but as a way to cost things, I'm not sure how useful it is.

Is there any way to get simple correlative data?

Oversway
March 23rd, 2005, 01:31 PM
Another explanation is that hp and strength (or some other attribute) are not independant: every high hp mage also has high strength, and the so the curve happens to fit well enough by just using one of the attributes.

Hence the dangers of using interpolation for extrapolation http://forum.shrapnelgames.com/images/smilies/happy.gif

Then again, one could argue that your 1000hp mage with 5str doesn't fit well with dominions.


p.s. I'm not a math genius. I might have it all wrong.

Scott Hebert
March 23rd, 2005, 01:39 PM
Oh, I think I have a decent enough grasp of the math to agree with you that high-HPs and high-Str correlate to the point that one might overshadow the other in this equation.

However, for the purposes of uncovering a unit cost equation, the correlations need to be explicit.

What I mean is, if you tell me 'HP base is 2/3 Str, with a direct proportion after that', that is a lot more helpful as a gauge of making units. If that is what is necessary to make the equation truly useful, then I'd really like to have that. http://forum.shrapnelgames.com/images/smilies/happy.gif

BigDaddy
March 23rd, 2005, 01:42 PM
This equation is meant to give you a guideline for developing or repricing units. If you want to min/max your units you CAN, but it doesn't follow the spirit of the game. For instance, any size 2 unit with more than 17 hps better have a good explanation (like the fact that its a lich).

BigDaddy
March 23rd, 2005, 02:07 PM
Scott Hebert said:
Oh, I think I have a decent enough grasp of the math to agree with you that high-HPs and high-Str correlate to the point that one might overshadow the other in this equation.

However, for the purposes of uncovering a unit cost equation, the correlations need to be explicit.

What I mean is, if you tell me 'HP base is 2/3 Str, with a direct proportion after that', that is a lot more helpful as a gauge of making units. If that is what is necessary to make the equation truly useful, then I'd really like to have that. http://forum.shrapnelgames.com/images/smilies/happy.gif



All you really need to have is the ranges the equation came from, OR just make units that look similar to already existing ones. This equation was never meant to make units significantly more powerful than those that exist. Only to explain the price of the units that DO exist. So, the more your units look like those the more likely they are to be well priced.

To find out how much huge HP amounts are worth, you need to study powerful summoned monsters. . .

Scott Hebert
March 23rd, 2005, 02:33 PM
However, if I wanted to make oddball units (and, really, modders generally want to make those, not 'more of the same'), this won't help as much.

BigDaddy
March 23rd, 2005, 02:51 PM
Thats why I reccomend doing a similar study of the summonables. With their higher skill levels, natural protection, hp, etc. they would show a clearer picture of what these very desiravle characteristics cost. ALSO, we know the approximate gold value of 3 types of gems (death, fire, and earth). Sushi is skilled enough to make non-linear guesses, as is likely important to describe the costs of some units like the iron dragon and tarasque. He probably does not have the time to do everything at once though.

Besides, most modders make new normal units, and as long as their units aren't significantly BETTER than say Vans, there shouldn't be a problem. Vans are pretty tough, if you want to make a unit significantly more powerful you will need another method. But consider the balance of such a race. The race would probably have crappy priests and expensive mages, with no research mage, or something like that. Typical power nerfs appear to be:

-weak priests
-slow "best" national research mage
-crappy national mages
-extra expensive mages
-crappy sacred units
-"capitol only" good units and other units that suck or are extra expensive
-crappy stealth units (no spy, assasin, or stealth commander)
-lack of random path mages
etc.

Anyone else have a good nerfing rule?

sushiboat
March 27th, 2005, 04:42 AM
OK, here is a new mage formula, with magic paths added. I also made some
procedural changes with modders in mind. Below the main formula are the
composite formulae I created in order to deal with the problem of coefficients
that should not be negative in the context of utility in the game.

Mage Commander (Adjusted R-squared = .95)

Cost = (4.2 * MagicRes) + (.3 * TacMove) + (34.3 * FullRand) +
(34.7 * ElemRand) + (27.1 * SorcRand) + (37.3 * Blood) + (27.5 * Death) +
(28.0 * Earth) + (29.5 * Fire) + (35.1 * Nature) + (32.7 * Astral) +
(34.5 * Water) + (15.2 * Holy) + (25.6 * Unholy) + (11.6 * Air_Prec) +
(2.9 * Att_Def) + (8.5 * Mor_RegLdr) + (6.6 * HP_Str_Prot)

Air_Prec = ((Air - .3) / .8) + ((Prec - 10.6) / 1.9)

Att_Def = ((Att - 9.4) / 2.1) + ((Def - 9.6) / 3.1)

Mor_RegLdr = ((Morale - 11.8) / 1.9) + ((RegLdr - 22.0) / 18.8)

HP_Str_Prot = ((HP - 12.7) / 8.1) + ((Str - 10.5) / 3.2) + ((Prot - 2.9) / 4.9)


Attached is some statistical output for math jocks.

sushiboat
March 27th, 2005, 05:20 AM
The most recent formula above provides an excellent fit to the data. However,
it may be interesting to see where the formula and the real price in the game
are very different. According to the formula, below are the top ten bargains
and ten worst buys for mages. What do you think?

<font class="small">Code:</font><hr /><pre>
Mage Real_Price Formula

Asmeg Jarl 160 249
Troll King 150 225
Centaur Hierophant 80 153
Sidhe Champion 140 210
Theurg 150 218
Sidhe Lord 280 348
Circle Master 100 164
Master 5 Elem. 190 252
Grand Master 270 330
Garnet Priestess 100 158

Pan 350 283
Arch Theurg 380 300
Niefel Jarl 500 419
Navigator 180 86
Capricorn 350 255
Lizard King 280 183
Hangadrott 400 282
High Priest of Sun 390 264
Anathemant Dragon 360 230
Alchemist 300 106</pre><hr />

Endoperez
March 27th, 2005, 07:36 AM
Alchemist, Anathemant Dragon, Hangadrott and Navigator have special abilities that are not counted in: alchemy bonus, fire immunity and heat, glamour, and sailing. And as Pan, Niefel Jarl, Carpicorn and Hangadrott are all physically powerful and undercosted, it seems this new formula doesn't take physical stats into account to the same extent than Illwinter does.
Also, is seems that priestly magic should rise exponentially (or at least in a rising curve, if that makes sense) so that Holy 4 is much better than twice Holy 2.

For the cheap ones, it seems part of the problem is that capital-onlyness does not reduce the price. Circle Master is the most cost-effective mage in the game before your modifications, so that might not be as bad as it looks.

Also, quite a many of them have priestly magic. I think 13 of these 20 units have priestly magic. Asmeg Jarl might have some, but Troll King, Circle Master, Pan, Navigator, Capricorn and Alchemist do not. Others do have atleast some, IIRC. You might want to check out holy magic again.

johan osterman
March 27th, 2005, 08:23 AM
Some of the units that your formula report as overpriced are intentionally overpriced for thematic reasons, such as the Lizard King. I imagine people still buy him occasionally just for the fanaticism. Others, as Endoperez pointed out have special abilitites, Pan has autosummon, Niefel Jarl Cold Aura etc. Among the underpriced some are cheaper because they are rare independents, such as the circle master.

If one were to put any stock into your formula the most conspicous offender is probably the Sidhe champion, since he besides being underpriced has a few extra abilities. On the other hand he is home site only.

Kristoffer O
March 27th, 2005, 08:30 AM
Sacred troops and priests have 1/2 upkeep and are generally given costs 25-50% higher. This might explain some of the worst buys.

Sidhe Lord and Sidhe Champ seems to be way overpriced with your formula. Why is the sidhe lord more expensive than the hangadrott? The hangadrott is better in every way except that he can't wear shoes IIRC.

Saber Cherry
March 27th, 2005, 09:19 AM
I don't think a mage formula is any more relevant to Niefel Jarls as to Ice Devils. They aren't mages so much as supercombattants with free magic paths... that can go underwater...

Jarls and Ice Devils are similar, but nobody thinks of Ice Devils as mages.

sushiboat
March 27th, 2005, 12:06 PM
There are some database errors in the magic paths. Oops! http://forum.shrapnelgames.com/images/smilies/redface.gif The errors are
sporadic, so I doubt that the formula will change much. I will repost after I
correct the problem.

sushiboat
March 27th, 2005, 02:20 PM
Here is the corrected version.

Cost = (2.7 * MagicRes) + (.6 * TacMove) + (.7 * RegLdr) +
(29.4 * FullRand) + (37.2 * ElemRand) + (26.9 * SorcRand) + (37.5 * Blood) +
(30.6 * Death) + (32.8 * Earth) + (33.2 * Fire) + (37.8 * Nature) +
(31.8 * Astral) + (33.2 * Water) + (16.3 * Holy) + (30.8 * Unholy) +
(2.5 * Att_Def) + (12.9 * Air_Prec) + (11.0 * HP_Str)

Att_Def = ((Att - 9.4) / 2.1) + ((Def - 9.5) / 3.2)

Air_Prec = ((Air - .3) / .7) + ((Prec - 10.6) / 1.9)

HP_Str = ((HP - 12.8) / 8.1) + ((Str - 10.5) / 3.2)


Here are the mismatch lists. The lists changed a little, so I also include the
ones that dropped off.

<font class="small">Code:</font><hr /><pre>Mage Real_Price Formula

Starspawn 150 294
Sorceress 110 200
Centaur Hierophant 80 166
Asmeg Jarl 160 241
Troll King 150 229
Master 5 Elem 190 269
Witch Doctor 80 144
Sidhe Champion 140 203
Amber Clan Mage 160 220
Circle Master 100 160

Garnet Priestess 100 153
Theurg 150 210
*Sidhe Lord 280 274
Grand Master 270 317


Warrior Mage 200 142
Pan 350 290
Hydromancer 180 117
Starspawn 280 216
Navigator 180 102
High Priest of Sun 390 306
Lizard King 280 179
Capricorn 350 247
Anathemant Dragon 360 232
Alchemist 300 122

*Arch Theurg 380 339
Niefel Jarl 500 443
*Hangadrott 400 361


* These had database errors earlier.</pre><hr />

Endoperez
March 27th, 2005, 02:40 PM
Since there is a Starspawn in both lists, maybe it would be better for you to make sure which one is which... I haven't played R'lyeh in a long time, and can't remember which one is cheaper. Also, which Sorceress is that on the upper list?

sushiboat
March 27th, 2005, 07:01 PM
Endoperez, your hunch was right. The starspawns got switched somehow, so
the more expensive one matches well. Same problem with the sorceresses. http://forum.shrapnelgames.com/images/smilies/frown.gif
Oh, well, maybe next weekend.

Endoperez
March 27th, 2005, 07:34 PM
Wow, I hadn't thought of THAT! I just didn't know which one was which. Well, it's nice to be of help, even when I don't realize I'm helping... http://forum.shrapnelgames.com/images/smilies/laugh.gif

BigDaddy
March 28th, 2005, 01:54 AM
Sushi!
Sorry about the errors in the database (hope I didn't cost you more time than I saved). Great work!

johan osterman said:
Some of the units that your formula report as overpriced are intentionally overpriced for thematic reasons, such as the Lizard King. . .


I agree, after Sushi's equation contains all the variables he's prepared to list, the next step is to remove those units whos cost is thematically altered. They aren't representative of the truest cost equation, because they are altered.

Kristoffer O said:
Sacred troops and priests have 1/2 upkeep and are generally given costs 25-50% higher. This might explain some of the worst buys.



The cost should be accounted for by the fact that they have holy magic (for the mages only).

Anyway ATTACHMENT

Attached is the updated costing spreadsheet. I'll make it cleaner whenever I know the equation is as complete as its going to get. . .

Scott Hebert
March 28th, 2005, 01:52 PM
Kristoffer O said:
Sacred troops and priests have 1/2 upkeep and are generally given costs 25-50% higher. This might explain some of the worst buys.



As much as I hate to disagree with one of the game developers...

Using your own formulae, Sacred Commanders and Holy Priests have no extra gold cost.


Sidhe Lord and Sidhe Champ seems to be way overpriced with your formula. Why is the sidhe lord more expensive than the hangadrott? The hangadrott is better in every way except that he can't wear shoes IIRC.



At a guess, because the Sidhe Lord has Air and Nature magic. The IW formula assumes equal paths have equal costs. Sushi's doesn't.

As for my own thoughts, most of these have small path levels. If I read the formula correctly, the path costs do not follow IW's formula, which reduces multiple paths at low levels.

The Circle Master can be removed, as it is not an offender. He should cost about 160; in fact, at 100 he is the most under-costed mage in the game, on a percentage basis.

The Master of the 5 Elements is the most obvious mage that I base my comments on.

Scott Hebert
March 28th, 2005, 01:56 PM
Again, Sushi, the issue that I'm seeing with your cost analysis is that higher path levels aren't being given their properly higher costs. According to IW, magic paths have progressively increasing costs, and you have a simpler 'cost-per-level' scale.

If you go by IW costing, 2 in a single path is worth almost twice that of 1 in 2 paths.

About the only other concern I have is: where does the High Seraph fall?

BigDaddy
March 28th, 2005, 02:03 PM
The High Seraph comes out costing 210 with Sushi's equation. If you download the spreadsheet I posted you can check for yourself.

I agree, that ideally his equation would price the lvl 2 paths seperately from lvl 3 paths.

Scott Hebert
March 28th, 2005, 02:15 PM
210? Nah, too low. As far as d/ling stuff goes, I'm not on my own computer right now, so it's not possible.

johan osterman
March 28th, 2005, 04:10 PM
Scott Hebert said:
As much as I hate to disagree with one of the game developers...

Using your own formulae, Sacred Commanders and Holy Priests have no extra gold cost.

At a guess, because the Sidhe Lord has Air and Nature magic. The IW formula assumes equal paths have equal costs. Sushi's doesn't.

As for my own thoughts, most of these have small path levels. If I read the formula correctly, the path costs do not follow IW's formula, which reduces multiple paths at low levels. ...



There isn't an IW formula to speak of. If you are referring to the mod guidelines they are intended to be rough guidelines not a formula to follow slavishly. Kristoffer wrote both the guidelines and put the price tag on 90% of the units. Most units are priced according to 'what do comparable previously existing units cost' 'is there some specific thematic reason why their price should differ from X Y or Z' etc. Holy units are usually priced higher whether it is mentioned in the modding guidelines or not.

Scott Hebert
March 28th, 2005, 04:58 PM
Holy units, yes. I have never argued this point.

Holy commanders, no. You can show that, using the modding guidelines, Holy commanders don't cost any more than non-Holy commanders.

Now, Sacred commanders that are not priests (like the Shaman) generally do cost more.

As for there not being an IW formula, there are the modding guidelines. And if we are not to follow those in any more than the most general way, why have them? And to ask for a more-or-less accurate formula to follow when costing units is not 'slavish'. It's a way to ensure that units are equitable on a given scale.

Several of us are trying to establish a formula that will horizontally balance the commanders in the game. Are you saying that we should not?

I mean, if I followed the mod guidelines to the letter, a Holy-2 priest that are 50g come out to be 75g (50g, plus a 50% increase incost for being Sacred). A Daughter of Avalon, made using those mod guidelines, cost 180g (90g for magic + 30g for commander + 50% for being Sacred).

To finish, not a single commander that is a Priest, and several commanders that are sacred, has a cost that can be computed from the current mod guidelines. As such, if you insist that such a price increase is necessary, I hereby ask for better guidelines so that modding can be done better and more properly in the future.

johan osterman
March 28th, 2005, 09:07 PM
Scott Hebert said:
...

To finish, not a single commander that is a Priest, and several commanders that are sacred, has a cost that can be computed from the current mod guidelines. As such, if you insist that such a price increase is necessary, I hereby ask for better guidelines so that modding can be done better and more properly in the future.



Use common sense, extrapolate from other units etc. I am a little sceptical to if you are liable to arrive at better or more balanced costs by assigning them from a formula. In order for the formula to be 'shown' to be balanced you have do one of two things
1. compare the prices the formula gives to preexisting prices
2. scrap the previous prices and experiment with the formula until you think that it results in reasonable prices.

In the first case you are accepting previously made judgements based on rough estimate and a certain amount of arbitrariness, in the second case you are comparing the newly derived formula based values to your own rough estimate of the relative worth of the respective units. In either case you are making estimates based on your intuitions. You can't escape making judgement calls, either you do it in when you induvidually assign prices to units or you do it when you check your to see if you formula produces reasonable costs. Add to this that it is a tall order for any formula to take in account the very variable effects of the various abilities in dominions and the synergies that might or might not develop and I think you will have serious practical problems in defining a formula that even begins to approach what you seem to be aiming for.

My personal experience from board games PnPRPG and CRPG is that the kind of possibilities present when you mod a nation in dominions is very hard to manage according to a set formula. I think rough guidelines and common sense, while not perfect or infallible, are preferable, in part because they do not impart the false promise of impartiality.


Edited for clarity

BigDaddy
March 28th, 2005, 11:16 PM
Scott,

The method Sushi is using is pretty sophisiticated. His model is not as sophisticated as it could be. To help him make his model better, you could take his copy of my adapted edi's Unit_DB.xls, and parse out all of the special abilities. That would help a LOT.

I assure you that unless you make a unit that is more like a summonable (with crazy special powers) than a normal unit, you should get a pretty good result.

IF I where doing the model, and I'm not, I would use the columns in the database marked E1, E2, E3 to figure out magic path costs, because they would be more accurate. That would add some 20-30 equations to his model, however, and that would take time. Also, he needs to remove thematically prices units.

Finally, the ONLY way anyone will ever get an equation for the relative cost of very powerful units, is to somehow normalize the costs of the summonables. I can give you a few tips, Scott, if you'de like, but I'm not gonna teach you to use regression software (most people take a 3 hour college course to learn...).

I would say, that this is the best method currently available. Using it and the IW guidelines should give you some idea of how to price your units.

BigDaddy
March 29th, 2005, 05:37 PM
The_Tauren13,

What method did you use to get to your equation?

The_Tauren13
April 3rd, 2005, 02:58 PM
BigDaddy said:
The_Tauren13,

What method did you use to get to your equation?


The one at the beggining of this thread? Well, I just quicklky slapped it together in the format (offensiveness*defensiveness)^(1/2)*other because if there were only 2 stats in the game, HP and damage, a very good cost formula would be (HP*damage)^(1/2).
I had hoped to mold it into something that could take a unit with just about any stats and give a reasonable cost for it by asking a series of simple questions: 'what attack value is worth twice 10 attack?', 'what defense value is worth twice 10 defense?', etc. and then modifying the equation as nescesarry.
However, Anime Girl was the only one who seemed interested in it, and then scott hijacked the thread to talk about commander costs again, so I just dropped it.