![]() |
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:
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 |
Re: Unit Cost Equation
1 Attachment(s)
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 < 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). |
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) |
Re: Unit Cost Equation
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... |
Re: Unit Cost Equation
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 > 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? |
Re: Unit Cost Equation
Quote:
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. . . |
Re: Unit Cost Equation
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. |
Re: Unit Cost Equation
Quote:
Quote:
|
Re: Unit Cost Equation
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) |
Re: Unit Cost Equation
Quote:
Quote:
If I could give you values for commanders without any 'specials', could you calculate a regression formula based on that? |
All times are GMT -4. The time now is 04:30 AM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.