I've come to a resting point for valuation. Some abilities, specials, and traits are all that is left, and I would mostly just be throwing random values at the algorithm for each one.
Instead, I'm focusing on how to make the item move to and from the players and the environment. I'll have to scrap a lot of the old way of doing things, but I can replace most of that with the NPC valuation now.
I got PCs giving shields to NPCs working. It was great to simply create a second copy of a unit, give it the new shield and see if the valuation algorithm thinks it is overall better or worse than the original. And, it's working good. A Thief is worse off with a shield while a Thug is better off, so the thief refused.
The difficult part is going to come when I try to give a unit a weapon when it already has 3 equipped.
I've also given most weapons negative evade adjustments, and most armors' negative evade adjustments have been lessened. A weapon, simply depending on its type, will have either 0, -1, -2, or -3 evade adjust. I'm a little unsure about this, mainly because you would expect a heavy club to have more of a penalty than a light one, but it's not like strength has ever found itself into the evade equation from the start.
Showing posts with label npc value. Show all posts
Showing posts with label npc value. Show all posts
Thursday, April 29, 2010
Friday, March 26, 2010
Second attack of a range
I have the value of a second attack of a range down, but I'm rather unsure of the result. There are parts that can be tweaked, but I'm having trouble deciding their values. At I can say this much: having an extra attack of a range, no matter how small, will be valued higher than not having it, given everything else as constant. In the process of making this, I even got to use a little knowledge about sorting from a really simple coding course I'm taking.
As soon as the abilities are in, and they shouldn't be too hard, I'll be provisionally done with the valuation algorithm. Non-mainline specials.abilities can wait for later.
Next will be the hard part (again?): advancement path finding. I guess the best way to go about it is to make logical trees to try, give the unit maybe 3 chances to try them and look for the highest value.
Ugh, and then there is Exasperation's code that I need to replace, which lets a unit decide for itself whether or not to pick up/equip weapon/armor. I need to make sure if a unit that doesn't have evade and has cheap armor will still wear the armor rather than going naked. Let me add that to the to-do right now.
As soon as the abilities are in, and they shouldn't be too hard, I'll be provisionally done with the valuation algorithm. Non-mainline specials.abilities can wait for later.
Next will be the hard part (again?): advancement path finding. I guess the best way to go about it is to make logical trees to try, give the unit maybe 3 chances to try them and look for the highest value.
Ugh, and then there is Exasperation's code that I need to replace, which lets a unit decide for itself whether or not to pick up/equip weapon/armor. I need to make sure if a unit that doesn't have evade and has cheap armor will still wear the armor rather than going naked. Let me add that to the to-do right now.
Tuesday, March 16, 2010
Valuation Again
This value algorithm isn't nearly as grind-y as I thought it would be. It's actually going down really, really easily. Part of the reason for that is I can usually just assume a unit's usefulness goes up with each aspect of it. For example, a unit with 6 moves is going to be well enough better than one with 5 moves, given everything else is the same. There are no "tits on a bull" aspects to units. Movement, terrain defense, resistance, hitpoints, attack power. Having one low aspect is going to seriously hurt the unit, but there doesn't seem like there is one combination that is hugely better than another.
There are a few exceptions to this. Skirmisher gets a ton better the more the unit can move around. But, even at 1 movement, Skirm is going to have some value. Steadfast is good only if the unit has some positive resistance. It actually is at its best at 25% resistance and then gets less and less valuable as the resistance nears 50%. These exceptions are few and pretty easily managed.
Managing terrain defense and movement cost has been a bit of a trial. For some reason, Elvish Archer is being valued less than Elvish Fighter. That probably has more to do with the Archer having one less movement point than it does with the terrain issues.
There are a few exceptions to this. Skirmisher gets a ton better the more the unit can move around. But, even at 1 movement, Skirm is going to have some value. Steadfast is good only if the unit has some positive resistance. It actually is at its best at 25% resistance and then gets less and less valuable as the resistance nears 50%. These exceptions are few and pretty easily managed.
Managing terrain defense and movement cost has been a bit of a trial. For some reason, Elvish Archer is being valued less than Elvish Fighter. That probably has more to do with the Archer having one less movement point than it does with the terrain issues.
Wednesday, December 9, 2009
The Crunch Begins
I've started with the Ruffian/Thug line to compare the simplest units that I can. All of the relevant aspects of these units are the same, except hitpoints and melee attack.
What's interesting is that wearing the light armor that these units do, they have a resistance rating of 47% (quick and dirty: take each resistance, convert to scale of 200, subtract 50, divide by a modifier that takes in account usefulness, add them all and divide by 6, you get a rough scale of 1-100), however, their terrain defense on flat is also 47%. Weird.
What I plan to do is see what exactly makes a the Ruffian jump from 6 gold cost to 13, when it becomes a Thug. Then, I'll see if that cost formula roughly holds true in the jump from Thug to Bandit, and so on. After I have something that works for them, I'll use it for Spearmen, make some tweaks and then make sure those tweaks still work for the Ruffian/Thug line. Then do the same with the Footpad line, and so on. Going to take a ton of testing and tweaking.
What's interesting is that wearing the light armor that these units do, they have a resistance rating of 47% (quick and dirty: take each resistance, convert to scale of 200, subtract 50, divide by a modifier that takes in account usefulness, add them all and divide by 6, you get a rough scale of 1-100), however, their terrain defense on flat is also 47%. Weird.
What I plan to do is see what exactly makes a the Ruffian jump from 6 gold cost to 13, when it becomes a Thug. Then, I'll see if that cost formula roughly holds true in the jump from Thug to Bandit, and so on. After I have something that works for them, I'll use it for Spearmen, make some tweaks and then make sure those tweaks still work for the Ruffian/Thug line. Then do the same with the Footpad line, and so on. Going to take a ton of testing and tweaking.
Tuesday, December 8, 2009
No way out but through
First, I finished the markup changes (for now). I'm going to want to deal with macro-ization of spell/usables descriptions later.
I fixed a bug where NPCs weren't getting their ranged attack. I'm beginning to think there's a WML goblin messing with my code, because that's honestly the third or fourth time I've fixed this.
Finally, I dabbled a little with the npc value system.
Questions:
-What is the value of a secondary melee attack? Having one melee attack valued at an arbitrary 10 and another one, with a different damage type, valued at a similarly arbitrary 10 certainly wouldn't double the value to 20. Would it be more like 12? What is the value of diversity in attack types? If a Dwarvish Fighter is valued at 16 gold what would be the value of one that doesn't have his hammer? To think about it another way, if a unit has two 5-5 melee attacks of different damage types but has one 7-5 ranged attack, which is worth more, the ranged or the melee attack? If I keep reducing the stats for the ranged attack, at which point will they be valued as equal?
Breakthroughs:
-Whichever attack range isn't the strongest, that range becomes more important for defense than offense. Think about it. Your Elvish Archer is usually always going to attack with his bow and will most likely be attacked in melee range. So, I'm thinking about making the attack value of the weaker range do some math with a unit's defense values rather than its attack value, and vice-versa.
Anyway, I don't think I can work on anything else until I solve the NPC valuation system. It's going to take a lot of math, guessing and testing.
I fixed a bug where NPCs weren't getting their ranged attack. I'm beginning to think there's a WML goblin messing with my code, because that's honestly the third or fourth time I've fixed this.
Finally, I dabbled a little with the npc value system.
Questions:
-What is the value of a secondary melee attack? Having one melee attack valued at an arbitrary 10 and another one, with a different damage type, valued at a similarly arbitrary 10 certainly wouldn't double the value to 20. Would it be more like 12? What is the value of diversity in attack types? If a Dwarvish Fighter is valued at 16 gold what would be the value of one that doesn't have his hammer? To think about it another way, if a unit has two 5-5 melee attacks of different damage types but has one 7-5 ranged attack, which is worth more, the ranged or the melee attack? If I keep reducing the stats for the ranged attack, at which point will they be valued as equal?
Breakthroughs:
-Whichever attack range isn't the strongest, that range becomes more important for defense than offense. Think about it. Your Elvish Archer is usually always going to attack with his bow and will most likely be attacked in melee range. So, I'm thinking about making the attack value of the weaker range do some math with a unit's defense values rather than its attack value, and vice-versa.
Anyway, I don't think I can work on anything else until I solve the NPC valuation system. It's going to take a lot of math, guessing and testing.
Subscribe to:
Posts (Atom)