Players, Mobs, and ActionFigures, Oh my!

Started by Vitoc, June 23, 2006, 10:55:51 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Right now, in the code I've got an object type called ActionFigure that represents the similarities between players and mobs (ie. they both have HP, AC, DR, etc.).? Anything that players have (that mobs don't have) goes in the Player class which derives from the ActionFigure class, so a player inherits HP, AC, DR, etc. from the ActionFigure class but they also have their own properties such as Str, Agi, Hea, etc. which mobs don't have (yet).? Unfortunately, this is a less than ideal situation for coding abilities.? If I keep things this way, I have to code 3 different scenarios for applying abilities; one for players, one for mobs, and one for abilities that can be applied to either.? It would be more practical if I could just apply the abilities in the same manner across the board, treating abilities on mobs and players in exactly the same way.? To make things more clear, think about mobs with Str, Agi, Hea, Stealth, Spellcasting, mana, and every other ability that players have.? That being said, we don't have to USE those abilities just yet, but it will make it much easier to code.? As an example, right now in Major MUD, if a bard sings song of foolishness or song of clumsiness to a mob, it doesn't have any effect (correct me if I'm wrong on this) because the mob doesn't have the attributes those spells effect.? This is the root of why black wind caused the crashes this week.? This change would clean up the code everywhere immensely, since now I can just loop through a list of ActionFigures as targets for every ability rather than worrying about which targets are players and which are mobs and which objects have which abilities.? This also lays the groundwork for some really cool features later.? Think NPC party members or pets with stealth, spellcasting, str, agi, and all the same stats as players.? They could perform just like a character would with those same stats.? Hell, they could even gain experience and levels and wear items.? I'm getting ahead of myself here, but I'm excited about this change.

Now all that's left is to see what everyone else thinks.? So what do you think?


TGS v1.0 (coming soon)

I should mention that to the end user things won't look any different.  It also doesn't necessarily mean it will impact any gameplay functionality unless we decide to start creating content that uses these new abilities (ie. pets, hired party members, smart NPCs, etc.)


TGS v1.0 (coming soon)


I say go for it, its about time NPCs got created right. However theres alot to this change over if we go this direction that needs to be worked out. To start maybe we need to really dig into how and where the legacy functionality would needs extra attention to be maintained and what would need to be put in to make the stats effects work as well.

1. Dynamicly calculated stats/Staticly set stats.? Such as MR, HP, HP regen, and Energy:
1.1? With a static MR things like a -wisdom spell will have no effect on that static MR field.
1.2? No Race/Class/Health/level no way to dynamicly calculate for HP/HP Regen

2. Dynamicly calculated attack variables/staticly set attack variables.
2.1. NPC attacks are currently static variables so things like -str spells have no effect on their static attack variables.
2.2. NPC's do get a weapon but the Attacks with that weapon do not actively translate to more damage per swing or effect energy usage in those attacks.
2.3. Since NPC energy is directly linked to their attacks and has no bearing on the weapon they are using or stats like agility or level. -Agil spells have no effect on their attacks or the accuracy of the attacks.

3. NPC's have no real set level.
3.1 with no real level there is also no interface with MANA or HP/level or Energy Use/level.
3.2 With no real level each individual spell for a npc must be set for each spell the npc uses.

4. NPC's have no encumbrance, no items
4.1 so things like -enc spells would have no effect on them.
4.2 if they get an ecumbrance field and an NPC doesn't carry any items then the used encumbrance of the NPC would always be 0.
4.2.1 If they don't have items and have an encubrance of 0 then were back to no effect from -enc spells

If we make changes like this, this will effect the effort to maintain legacy functionality. I'm thinking that the classic NPC fields such as AC, DR, MR, HP, HPregen, Energy could be treated as fields that alter the value of dynamicly calculated stats instead of the static fields that they use to be. This might solve some of it the legacy issues. However If we have fields that do stuff that the legacy data does not have we end up with a second legacy issue. To fix that we need some way to give those data fields some type of default data that will allow them to work as they should have if we didn't make any changes in the first place or provide some type of switch to turn new functionality on in off at the data level.

Quote from: DeathCow on June 23, 2006, 11:24:37 AM
ugh, im still drunk
I smite thee!

(whatever that means)


TGS v1.0 (coming soon)

Great points TCA.  I'll have to see exactly how it pans out in the code.  I believe since all mobs are still using the legacy structures, we should be in the clear.  The only noticable difference at this point will be to me since now I can just apply abilities to an ActionFigure regardless of whether it's a mob or a player.  Whether or not those abilities are actually effecting stats that have any effect in game right now doesn't matter; if it didn't have an effect previously, it still won't have an effect, nothing lost.


TGS v1.0 (coming soon)

Yes, very well thought out TCA.  That's earnt an "applaud" (whatever that means ;))

But off the bat, I'd definitely agree with Vitoc.  It makes more sense to code in the extra stats to apply to all Characters (or ActionFigures... go go power-rangers!) and worry about compatibility afterwards.  And this makes it possible to do a lot of the NPC ideas that have been talked about.
If we can hit that bulls-eye, the rest of the dominoes will fall like a house of cards.? Check-mate!

makes sense to me. stats arent something that will change the look and feel of greatermud compared to majormud, but it would pave the way to adding new spells and abilities.
Free MajorMUD. No Playing Sysops - Quicksilver BBS
Quicksilver BBS
Quicksilver Forums