.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Air Assault Task Force- Save $8.00
Bronze- Save $10.00

   







Go Back   .com.unity Forums > Illwinter Game Design > Dominions 2: The Ascension Wars

Reply
 
Thread Tools Display Modes
  #1  
Old March 19th, 2005, 10:18 PM
The_Tauren13's Avatar

The_Tauren13 The_Tauren13 is offline
First Lieutenant
 
Join Date: Jul 2004
Location: Albuquerque, NM
Posts: 605
Thanks: 0
Thanked 0 Times in 0 Posts
The_Tauren13 is on a distinguished road
Default Re: Unit Cost Equation

Ok, new chart
(can you tell I dont have a life)

Code:

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



Attatched is another graph of the data.
Its a much smoother spread, too However, the change close to 10 is less severe...
Attached Images
File Type: bmp 341831-graph0.bmp (440.3 KB, 350 views)
__________________
Every time you download music, God kills a kitten.
Reply With Quote
  #2  
Old March 19th, 2005, 10:23 PM
Saber Cherry's Avatar

Saber Cherry Saber Cherry is offline
Major General
 
Join Date: Oct 2003
Location: Crystal Tokyo
Posts: 2,453
Thanks: 0
Thanked 0 Times in 0 Posts
Saber Cherry is on a distinguished road
Default 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?
__________________
Cherry
Reply With Quote
  #3  
Old March 19th, 2005, 10:29 PM
The_Tauren13's Avatar

The_Tauren13 The_Tauren13 is offline
First Lieutenant
 
Join Date: Jul 2004
Location: Albuquerque, NM
Posts: 605
Thanks: 0
Thanked 0 Times in 0 Posts
The_Tauren13 is on a distinguished road
Default Re: Unit Cost Equation

Quote:
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?
__________________
Every time you download music, God kills a kitten.
Reply With Quote
  #4  
Old March 19th, 2005, 10:31 PM
Saber Cherry's Avatar

Saber Cherry Saber Cherry is offline
Major General
 
Join Date: Oct 2003
Location: Crystal Tokyo
Posts: 2,453
Thanks: 0
Thanked 0 Times in 0 Posts
Saber Cherry is on a distinguished road
Default Re: Unit Cost Equation

Quote:
The_Tauren13 said:
Quote:
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.
__________________
Cherry
Reply With Quote
  #5  
Old March 19th, 2005, 10:57 PM
The_Tauren13's Avatar

The_Tauren13 The_Tauren13 is offline
First Lieutenant
 
Join Date: Jul 2004
Location: Albuquerque, NM
Posts: 605
Thanks: 0
Thanked 0 Times in 0 Posts
The_Tauren13 is on a distinguished road
Default Re: Unit Cost Equation

Code:

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

Attached Images
File Type: bmp 341840-graph1.bmp (440.3 KB, 351 views)
__________________
Every time you download music, God kills a kitten.
Reply With Quote
  #6  
Old March 20th, 2005, 01:11 AM
Saber Cherry's Avatar

Saber Cherry Saber Cherry is offline
Major General
 
Join Date: Oct 2003
Location: Crystal Tokyo
Posts: 2,453
Thanks: 0
Thanked 0 Times in 0 Posts
Saber Cherry is on a distinguished road
Default Re: Unit Cost Equation

Perfect!
__________________
Cherry
Reply With Quote
  #7  
Old March 20th, 2005, 05:29 AM
sushiboat's Avatar

sushiboat sushiboat is offline
Sergeant
 
Join Date: Dec 2004
Location: North Carolina, USA
Posts: 276
Thanks: 0
Thanked 0 Times in 0 Posts
sushiboat is on a distinguished road
Default 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)
Reply With Quote
  #8  
Old March 20th, 2005, 08:13 AM
Saber Cherry's Avatar

Saber Cherry Saber Cherry is offline
Major General
 
Join Date: Oct 2003
Location: Crystal Tokyo
Posts: 2,453
Thanks: 0
Thanked 0 Times in 0 Posts
Saber Cherry is on a distinguished road
Default Re: Unit Cost Equation

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
Quote:
not familiar with multiple regression


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
__________________
Cherry
Reply With Quote
  #9  
Old March 20th, 2005, 01:46 PM
The_Tauren13's Avatar

The_Tauren13 The_Tauren13 is offline
First Lieutenant
 
Join Date: Jul 2004
Location: Albuquerque, NM
Posts: 605
Thanks: 0
Thanked 0 Times in 0 Posts
The_Tauren13 is on a distinguished road
Default Re: Unit Cost Equation

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 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 )
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 < 10
f( x ) = 2 - ( ( 0.75 ) ^ ( x - 10 ) ) | x >= 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 < 10
f( x ) = sqrt( x - 10 ) / 3 + 1 | x >= 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).
Attached Images
File Type: bmp 341946-graph2.bmp (440.3 KB, 265 views)
__________________
Every time you download music, God kills a kitten.
Reply With Quote
  #10  
Old March 20th, 2005, 04:47 PM
sushiboat's Avatar

sushiboat sushiboat is offline
Sergeant
 
Join Date: Dec 2004
Location: North Carolina, USA
Posts: 276
Thanks: 0
Thanked 0 Times in 0 Posts
sushiboat is on a distinguished road
Default Re: Unit Cost Equation

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)
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 01:16 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.