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.
Wednesday, August 27, 2008
Progress
Just a quick progress update (wow I hope someone is actually reading this)
- Most (perhaps not all) new stats added to the DB, and coded the server to load them from the DB and pass them on to the player(s) when a user logs in, etc. and pass them to the client(s) along with all other stats.
- Had to basically temporarly get rid of (read, temporarly comment out) a lot of the spells codes that relied on stats that no longer exist (will have to re-write them to work with current stats).
- Set up the new Stats window GUI for the most part. Took some time because I set it up so adjustments can be made to the layout by changing the skin's config file so we don't have to touch the code more than we need to while developing the UI of the Stats Window (which will probably see some additional changes in the days to come). I'm hoping its one of those situations where a little extra effort in the short term will make life easier down the road.
Subscribe to:
Posts (Atom)