I've been slowly plucking away at setting up all the new stats. I have been doing it in a way that I can test the code as I go along (as I erase an old stat that was included with the vbGore stock code, I also comment out any code that relied on that stat with a special marker so I can re-impliment the code with the new system after). I've now gotten around to making the NPCs play nice with the new stats system, but because the new stats system doesn't have direct values like Damage, Defence, Magic but rather in-direct values like Strength, Agility, Quickness, Intelligence, Wisdom which combine in different ways to affect different skills (most melee attack skills like Sword might be [Str+Agility / 3]), the NPC attack features which used to look to a 'damage' rating or 'defence' rating to calculate hits misses and damage, now have to either a) use the same calculations that are used for players (ie if they are using a blade, apply the blade calculation of [Str+Agility / 3]) but this requires more processing for the server to do as it would have to look at what weapon the npc is using, the weapon's rating, etc. For the time being, NPCs probably wont be changing weapons on the fly so much, so I was going to settle with a system that uses certain stat values to represent attack properties directly explicitly in the case of NPCs, for example:
.BaseStat(SID.Quickness) '// for npcs, this is melee defence/missle def
.BaseStat(SID.Wisdom) '// for npcs, this is magic def
.BaseStat(SID.Intel) '// for npcs, this is magic attack
.BaseStat(SID.Str) '// for npcs, this is melee/missle attack
This would avoid any extra server calculations regarding figuring out their range of damage, etc.
But then I thought about the mechanics of the game and how this type of system might limit some of the more advanced features we want to put in to the game down the road, aswell as keep our NPCs kind of dumbed down - and we don't want that, so I will probably have the NPCs attack/defence abilities rely on the stats and weapon ratings in the vary same way a player's does. I've put a lot of work into optimizing the server's CPU code even above the optimizations implimented in the stock code, so I figure we can afford a few CPU cycles to make the NPCs more realistic.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment