Zippy-Egoboo Home EgoWiki > Documentation > DamageRules EgoWiki webs:
Main | TWiki | Know | Sandbox
Documentation . { Changes | Index | Search | Go }
This is a discussion topic. The best way to use it is to add your ideas (relevant to the topic!) in an appropriate spot. As we arrive at a consensus, this topic should morph into a documentation of our agreement.

Damage Rules

We've got all the basic tools for damage in Zippy; Actions, skills, the "life" member of a character. What we don't have is a good idea of how to decide exactly how much damage gets done. In this topic I'd like to develop a procedure that factors in the competency and performance of each element in the system to produce a single, easily applicable result.

Deciding Factors

In this system, we have the following deciding factors, assuming a simple attack with a weapon that actually connects with something:

The Action system establishes that these factors will form a chain, each modifying the results of the factors preceding them. The question is, how does each factor modify the results of the preceding factors, and which objects should be responsible for deciding the influence of each factor. One particular question to illustrate our dilemma deals with random chance. Does chance happen in the polling stage, or the application stage? Is is resolved by the target? The origin? Is there some random chance involved in potentially every decision along the chain?

Further, how does the competency of the attacker come to affect the details of the result? For example, if a player skilled in the use of clubs is using a blunt sword, it might be desirable for the sword to do crushing damage in addition to slicing damage. Obviously the sword has more potential for crushing damage than a sharper one, but who decides that more crushing damage is needed? The character or his weapon? At some point a skill check is needed, but at what point?

Elmin's Thoughts on This

It seems to me that every item has a certain level of potential for various effects; a blunt sword has the potential to do slicing damage at a low level, and also some potential to do crushing damage. A sheild has the potential to lessen slicing damage to a great degree and to lessen crushing damage to a lesser degree. So the skill checks should be initiated by the weapons and sheilds and so forth, because they know what skills are required to acheive their potential. So for the blunt sword example, the sword might do the following:

A sheild might do the following:

In this way, we avoid having to poll the attacker at all; the weapon sets the initial result based on the attacker's stats and its own potential. If the attacker has some special effect on the weapons it uses, it can apply a watch to its own attacks.

What are the potential problems with this approach?

Arakon's Ideas

For the most part, I think Elmin's process is the way to go. The goal is to design the system in such a way to make it easy to add a weapon that does a different amount of damage, and still make use of all of the skill checks.

How the skill level is expressed makes a big difference. Also, the way in which the weapon damage is expressed needs to be considered as well.

Possible Options:

ArakoN - 14 Oct 2004

SpyroVII's Ideas on This

The dynamics as outlined above sounds pretty good, but here I would just like to make a suggestion.

In addition to the usual base weapon properties (i.e. we all can agree that swords slice, maces crush), I would like to serve up the food for thought that maybe we could look more in depth into having a little bit more of a flexible system. I suppose what I'm trying to say is that the influence of the base damage types should also be combined with others when that's important. For example, let's say that you have an "Air Sword" and it's really big but it's also very very very light. When you hit someone with it, they should recieve no crush damage because the weapon is so light. Admittedly this is a bit of a fringe example, but on the opposite end of the spectrum iron swords would do a nice bit of crushing damage. I know that this sounds like a recipe for a very painful balancing session, but I think that alot of the problems with this system can be completely eliminated by just limited the weight that characters can carry based on their strength.


I'm not sure where the problem is with the Air sword... it seems like you should be able to use the same polling procedures as the blunt sword above, only changing the baseline crush damage to zero. Maybe the skill check result for maces shouldn't be added to the crush damage, but multiplied.

-- ElminI - 15 Oct 2004


I suppose this is the wrong discussion to talk about skills, but it maybe a good idea to make certain skills adjust the types of attacks. I am not really a swordsman or anything like that (though I know a few people that are) but based on ones skill with the weapon perhaps it's possible to adjust the type of the blow so that one delivers more blunt force relative to cutting power. This is especially true with heavier blades methinks. Or I could be flat out wrong and the type of the blow is entirely relaitve to the type of blade that's being weilded. Just so that I'm not pulling any more sword ideas out of a magic hat though, I think that I'll silence myself until I've asked around.

That's all related to specific weapones though (errr... ok, A specific weapon), but I just guess that balancing these things out will be a time consuming affair. More thoughts on this (without being so much of a rant) after I've thought some more about it.

-- SpyroVII - 15 Oct 2004


Me thinks: Magical effects and Character Skills should have much more importance for weapon effectivity than the weapon itself. Quality, size and type should just have minor additional adjustments.

-- ZefZ - 16 Oct 2004


What about the Air sword, though? It seems to me that no matter how skilled a character is at clubs, he won't be able to do much with it unless he knows about slicing. Because characters have skills, it's easy to check what they know how to do. Only the weapon knows, though, what kind of damage it can do -- we don't have a design for a capabilities check on weapons.

-- ElminI - 16 Oct 2004


Another question this then raises: How many weapon types do we really want? Lots, Little? I like variety. Too much is bad of course, but having new weapons to achieve, either by purchase or exploring, help add to the game a lot.

How would a cheap rusty short sword work for someone with high skill in swords? It should work better then in the hands of an amatuer, but I would think it should have a limit. The balance of the blade, the sharpness, etc. I'm not saying model all this of course - but rating the weapons on there possible damage ranges is the same basic idea.

What of the other way around though? Should a Blade of Masters perform better then a rusty short sword in the hands of an amatuer?

From a mailing list discussion, I was considering the following style of format for weapon damages:

The above example is intended mostly for a sword. A low level sword, with a few benifits. In english, the sword does mostly slice damage (like a sword should) with a little bit of crush damage. It has a 20% chance of doing between 2 and 4 pts of puncture damage, and a 10% chance of doing some stun damage.

If we use some of the previously mentioned designs, we can use the Sword skill to scale all of the values, and get rid of most of the randomness. So a beginer with swords would do 4 points with this sword, while an expert would top out at 8 points with the sword. Room to grow.

Same with the "random" aspects of the weapon - if we base this on the skill system, a beginer could hardly ever get the stun/puncture damage, but the expert would get it at 20% and 10%.

Perhaps we could have a scaling variable as well, to make it possible to scale how skillful the user had to be to get the higher/lower variables. Done properly it would allow an expert-level weapon the ability to penaltize a begining swordsman without effecting the expert-level.

The actual differences between the damage types is important as well. Each could be protected with different armour types. Plate would provide protection against most types of damage, but be heavier, and reduce mobility. Leather would protect good against slicing, but provide little against crush and pierce. Crushing damage could also allow for the chance of breaking something in a person's pack - a potion or other delicate item.

-- ArakoN - 20 Oct 2004


Here we have to make a distinction between "mundane" weapons and "magic" ones; the sword of masters maybe is just a regular sword that is made extremely well -- this kind of weapon wouldn't help a beginner very much (but enough to be worthwhile, maybe), but a master would be able to do much better than with a dull rusty lawnmower blade. On the other hand, I think a master should be able to do something good even with a dull rusty lawnmower blade -- so instead of a limit, lesser weapons just don't scale nearly as well as master weapons do. Magic weapons, on the other hand, could be a totally different story. The Club of Anvil-dropping should do a lot of extra damage whether the weilder is a pro or a novice. And on yet another plane, some weapons could depend more on stats (strength especially) than on skill -- at least at the lower to intermediate skill levels.

With regards to variety, I think the key is to have lots of variety in existence in the game world -- really as much variety as we can dream up; but we should also make sure that only the most mundane weapons (perhaps with small stats adjustments) are normally found. On the one hand, finding unique weapons shouldn't happen so often as to be tiresome -- and at the same time, the player should get the sense that he can't predict what sort of cool piece of weaponry he'll end up with next, and it should take an insane amount of replay to find all of the unique weapons in the game world.

-- ElminI - 21 Oct 2004


I'm just concerned that if we make the majority of the effects for mundane/non-magic weapons based primarilly on stats and skills, that we will end up with most of the weapons being the same, and there being no point in changing them.

In order to make scaling a usable solution, I think we'll need monsters with very inflated HP - but I suppose armour types would help stop over-inflation.

I'm also concerned that if we make weapons able to set all these variables, the format will be so complicated we may as well code each weapon by hand.

At moment it sounds like we have a base number for a weapon, and possibly two scaling values. One for Skill addition (weapon-type specific) and one for stat scaling (again, weapon-type specific?). We could put each of these into a separate table though, so that individual skills and scaling could be listed. The base of weapon-types could define the basic skills/stats scaling for that weapon-type.

for the sword:

skillScales={ {"swords", 0.5}, {"clubs", 0.1} }

statScales={ {"str", 0.2}, {"dex", 0.01} }

I still think there should be a limit to the amount of damage specific weapons can do - no matter how skilled, something can only be so-sharp. Strength may be another matter, but that has a more fixed-value, since skills are supposed to improve. If we also take out the limits, I don't see how we can make other weapons different enough to be useful. There is the magic effects - but I think mundane weapons should have a lot of variety too.

-- ArakoN - 21 Oct 2004


I think you have a good point about usefulness. Another idea: for each weapon, the maximum damage scales to a certain point and stops (or approaches its limit indefinitely), but the minimum damage scales as well, and faster than the maximum damage, again limited so that the damage range gets smaller and smaller. That way, a good weapon is useful to the beginner becuase it allows a higher potential damage, but skill is the only way to make a mundane weapon reliable.

As far as specifying this in weapon types, I think we could do something like the following:

SliceEffect = {base = Range{1, 12}, limit = 1.75, variance = 2.5}

Where base specifies the starting damage range along the Slice axis, limit is to what degree the maximum can grow, and variance is the how narrow the range can get. So this weapon can do up to 12 points of slice damage initially, which can increase to a maximum of 21 (12 * 1.75) over time, and the biggest the minimum damage will ever get is 18.5 (21 - 2.5). The base type will decide what skill bring about this increase. In addition, the base type might allow stats to further increase the damage -- so 21 is the maximum based on skill, but extra strength might boost it further to 24.5 or something. We could also add a limit_level parameter to say how high the skill level needs to get before the weapon maxes out. Or all skills can max out at the same point, and the speed of skill advancement is different. We should make the maximums really high, though, so that it's nearly impossible to get a perfect character in any discipline.

-- ElminI - 21 Oct 2004


That sounds good - the individual weapon types handle the skill/stat controls, and each weapon can express it's damage in this shorthand. With the level-limit for the weapon, we can have low-level weapons where a player can see his skill points and stats have shortterm benifits, and then have higher level weapons where it may not be the best weapon to start with, but later at higher skill points it could do more damage.

This meets what I expected rather well. Anyone have any other thoughts? Objections?

-- ArakoN - 21 Oct 2004


Objections? Yes (mebbe) and then no.

For the scaling of weapon damage by skill, I agree.

But on the effects of different weapons, I'm not entirely too sure. My primary position is that differences in weapon types should be very very important, but before I say anything about that I'd just like for someone to cover what the current solution allows for. It looks like a "bash + slice"-style damage system, unless I'm mistaken?

-- SpyroVII - 23 Oct 2004 <- A little confused :)


At moment, I was condering more: Crush(blunt weapons), Slice(swords), Pierce(spears/arrows), and Stun(a little varience for all)

We could add more, but I think that's a good amount of variety, and allows for armour of different types nicely. A good rock-paper-sissors. This should allow each weapon to be fairly different, atleast in the type of damage it delivers.

Different weapon types can still have special behaviors - for example we can make some weapon types do more damaged based on an attribute (strength or dexterity). Some weapons can still have special effects as well - causing them to send out fire particles once in awhile, etc.

Basically when making a weapon, with the currently proposed system, a designer would select the weapon type (Axe, Sword, Spear, Bow), and make a new type with that as a base class. They would then set all of the attributes (models, skins, etc), and put in a BaseDamage variable, which would look something like this (with different values of course):

SliceEffect = {base = Range{1, 12}, limit = 1.75, variance = 2.5}
CrushEffect = {base = Range{1, 3}, limit = 1.75, variance = 2.5}
PunctureEffect = {base = Range{0, 0} }
StunEffect = {base = Range{1, 5}, limit = 4, variance = 8}

The changing the numbers is where most of the work will be. Then, optionally, it would be possible to override the poll_Impact alert for the new weapon. ApplyStandardDamage would be called at the begining, and then the values could be tweaked further for the customization. ApplyStandardDamage would find values for all of the effects by going through each one, and adjusting if needed based on the weapon type. Swords would range most of them on the Sword Skill and add more slice damage based on strength, and the Mace would range most of it on the Mace skill and add strength to crush damage.

For example, maybe the sword is a special Blood Sword, and it adds more damage the more hungry it is. So in the poll_Impact function, after ApplyStandardDamage it would check some internal variable (Hunger?) and add more to the slice damage if it is hungry (and remove some hunger).

-- ArakoN - 23 Oct 2004


OK then, that makes perfect sense and it sounds really good and extendable, so I like it. That's a very nice summary of how things will look/work.

-- SpyroVII - 25 Oct 2004


Note: I changed particle_bumped to poll_Impact in above example. It was a typo previously, and not working properly with Actions.

This sounds like the right system. I started prototyping it already, and we're going to need one more structure. Some kind of default immunity/defense table. If absent, this will mean that a creature takes the full hit. If present, it allows reduction or multiplication of any of the effect values (crush, slice, puncture, stun). It is important to note that this is not weapon-type aware. Most creatures should not care whether they are being hit with a sword, mace, etc, just what kind of damage they are recieving.

Some examples:

One problem I see remaining: How do we do we handle elemental damage? Fire, Ice, Electric, generic-magic?

The only suggestion I have is to suggest each Impact event has an elemental field, which is either physical, fire, ice, etc. This does not seem like the best solution though.

-- ArakoN - 25 Oct 2004


Elemental camage could get a new action class; if the elemental stuff is separate enough from the crush/slice/puncture stuff, this might make sense. On the other hand, I wonder if there's any compelling reason not to just put BurnEffect?, FreezeEffect?, ShockEffect?, and MagicDamageEffect? in with the rest under Impact. We might want to make sure the base Weapon sets all result axes to zero even if they're not explicitly provided in the base damage table, but otherwise it shouldn't make a whole lot of difference. It keeps everything pretty simple, too, so that magic uses routines pretty similar to weapons when the particles/whatever actually connect with the spell target.

-- ElminI - 25 Oct 2004


I was wondering the same thing, but wasn't sure if we want that big of an object since most will not be used. I don't see any reason why not though - it isn't very "heavy" as far as processing goes. The only problem I see with it is that a fire-damage for a sword may be a scale of some other value, like the slice amount (a fire blade?). So if an armour protects against slice damage, it should lessen the fire damage.

Possible solution:

This seems to have problems though - Both slice damage is applied, and fire, when an intended weapon may only want to do fire damage, though based on the actual slice damage. The actual slice damage now seems to be more of a percentage of the total damage applicable to NormalDamage, FireDamage, FreezeDamage, etc..

Do we want to have the option to scale elemental damage to the other parts?

Another option would be to tag some of the effect axis's. For instance, the fire-sword example would have an "Apply" field, that be assumed to be 1 (100%), but could be reduced to 0 for a weapon that only does fire damage. There could also be a "linked" field that specified the effect to base the effect upon, and a percentage?

This is sounding complicated, but I think this is still manageable in a reusable format.

-- ArakoN - 25 Oct 2004


I'm not sure I understand why armor designed to protect from slice damage would also protect from fire damage... seems like one advantage of having a fire sword is that it does extra damage in a different category that the target (or the target's armor) may not have a resistance for. And fire and slicing aren't really linked conceptually, so while the fire sword may base its base fire damage on the base slice result, it seems like the armor should use separate scales for it.

-- ElminI - 25 Oct 2004


Topic DamageRules . { Edit | Attach | Ref-By | Printable | Diffs | r1.18 | > | r1.17 | > | r1.16 | More }
Revision r1.18 - 25 Oct 2004 - 23:20 GMT - ElminI
Parents: WebHome
Copyright © 1999-2003 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding EgoWiki? Send feedback.