Multiplayer Interactive-Fiction Game-Design Blog



Download 8.87 Mb.
Page120/151
Date02.02.2017
Size8.87 Mb.
#15199
1   ...   116   117   118   119   120   121   122   123   ...   151

03 Damage model


Goes over what kinds of damage (wounds, etc.) characters can take.


Damage model

Most role-playing games use the concept of "hit points" to

indicate how much damage a character can take, either in combat

or from other mishaps (such as falling). Circumreality does NOT use

hit points, but instead uses a more realistic damage model

with bleeding, flesh wounds, and broken bones. As a result,

combat is more dangerous, and not something a player will

enter into lightly.


There are two basic types of damage: Damage which is systemic,

like fatigue or bleeding, and damage which is localized to

a body part (such as a flesh wound or broken bone). I'll

being by discussing systemic damage since localized damage

can cause systemic damage.




Systemic damage

A character's body can take several different forms of systemic

damage:





  • Bloodloss - Weapons create wounds in body parts,

    and wounds cause the character's blood to leak away slowly

    (or quickly). If enough blood is lost the character will fall

    uncsoncsious, and then die.







  • Dazed - The character still standing, but not

    thinking clearly enough to do anything.







  • Death - Of course. Player characters will be

    resurrected after a few minutes of death (during which time

    their bodies may be looted). NPCs will be deleted.





  • Disease - Disease in Circumreality is treated more realistically

    than standard RPGs. Diseases take time to appear, and then

    bedrest (or magic) before they disappear.





  • Drop held items - This isn't exactly damage, but

    it's an effect of taking damage.







  • Fatigue - Every action the character undertakes

    tires him/her slightly. Do enough strenuous actions close

    enough together and the character will become fatigued.





  • Knocked down - Again, it's not damage, but it

    a consequence of damage.







  • Magic effect - Some sort of spell affects the

    character.







  • Mana - The about of magical energy that the

    character can muster to case spells. It's very similar to

    fatigue.





  • Unconscious - Of course, the character can

    become unconscious.







  • Venom - Venom is treated more realistically

    in Circumreality than other RPGs. Instead of doing damage, venoms slowly

    (or quickly) seep into the character's bloodstream and

    cause mayham, potentially even killing the character.








Bloodloss

Characters have blood, and if they lose it through damage they

will fall unconscious or die. The amount of blood that a

character has lost is stored in pDamageBloodLoss.

It ranges from 0.0 to 1.0. At 0.0 the character has all his/her

blood, at 0.5 the character falls unconscious, and at 1.0 the

character dies.

Furthermore, the character's fatigue and mana

can not be recovered to less than twice the bloodloss. Therefore,

if the character has lost 0.25 of their blood (25%) then their

fatigue can never get better than 0.5 (50%).

To cause bloodloss in a character (and potentially unconsciousness

or death), call DamageBloodLoss().



Dazed

Blows to the head or chest, or perhaps even magic, can cause

the character to become dazed. A dazed character is unable

to act for a few seconds. To daze a character,

call DamageDazed().


Death

Characters can be killed outright by

calling DamageDeath(). Usually death will

result from some other sort of damage, such as bloodloss.


A dead character falls to the ground and their body can

be looted. After a few minutes, set by a global that you can

modified, they're resurrected and moved to the last safe

room they visited. If the character is a NPC the NPC and all

contents it still holds are deleted.


If you wish more severe penalties for death, such as permadeath

or skill loss, you can modify the code for DamageDeath().


Disease

Diseases are more complex than the other systemic damages I've

described so far. A Circumreality disease acts much more like a real diseases

than other RPGs (which usually decrease the diseased character's

strength for a few minutes and then the disease vanishes).

A character catches a disease when DamageDisease() is

called. If the character already has the disease then nothing

happens. (I haven't implimented disease immunity though, so

diseases can be caught more than once.)

The disease begins with 0 "disease units", an intentionally

vague value. Every second, the number of disease units is

increased by an amount specified by the disease, multiplied

by the virulence of the strain. Furthermore, if the character

does any activity (that causes fatigue) then the disease will

spread more rapidly.

After a time (specified by the disease), the character's body

will identify the diseas and then decrease the number of

active disease units. When the number of disease units is

knocked down to 0, the disease is eradicated.

To create your own disease, you need to:







  1. Create a new object for your disease, called

    oDiseaseXXX, where XXX is the disease name.





  2. Set the disease's superclass to cDisease.





  3. Check the option to automatically create the

    disease object, although it will never be contained within

    a character.





  4. Fill in pNLPNounName and pNLPParseName to

    name the disease.



  5. Fill in pExamineGeneral with a line describing the

    disease's effects, that will be shown when the character

    asks for his/her status. If you don't wish to show anything,

    set this to NULL.



  6. Set pDiseaseRelease to the number of disease

    units created per second the disease is active.





  7. pDiseaseFatigue affects how much faster the

    disease reproduces when the character is active.







  8. pDiseaseStartResist is the number of seconds

    (on average) that it will take the character's body to

    begin resisting the disease.





  9. pDiseaseRecover is the number of disease

    units reduced per second once the character's body fights

    the disease.



  10. You should provide a VenomTimer() method.

    It is called when the disease is first introduced, and

    every few seconds thereafter until the disease is

    eradicated. The code in this function will control the

    effects of the disease; you can have the disease do

    any sort of damage by calling DamageXXX(), or even

    non-damage effects.








Drop held items

Calling DamageDropHeld() will cause the character

to drop any held items in the given body part. This can be called

as part of the damage. It is automatically called if the

character receives significant damage to an arm, or is stunned

in the arm.




Fatigue

Character's get tired, stored in a property

called pDamageFatigue, which ranges from 0.0 to

1.0. 0.0 means the character is fully rested, while 1.0

is dead tired.

You can cause fatigue damage by

calling DamageFatigue(), although very few

attacks will cause fatigue. (Some diseases might.) Furthermore,

if too much blood is lost, fatigue will also be redurced.

A small amount of fatigue is lost whenever the character

performs an action. Fatigue is quickly regained, so

the loss is seldom notieced However, if a character tries

to perform too many high-fatigue actions in too short

of a time, the character's fatigue will drop, performance

will degrade, and eventually the character will be too tired

to even move. (This frequently happens in combat.)


To fatigue a character through an action,

call ActionFatigue().


Knock down

To knock a character to its feet, call DamageKnockDown().

Some attacks (such as shoves) will cause one character to

fall down. If the character sustains enough damage to a leg

it may also be knocked down.


Magic effect

Magic effect "damage" acts a lot like diseases. A magic effect

is an object derived from cMagicEffect, although the exact

mechanics of disease are not duplicated.


To cause a magic effect, call DamageMagicEffect().


To create your own magic effect, you need to:







  1. Create a new object for your magic effect, called

    oMagicEffectXXX, where XXX is the magic effect name.





  2. Set the magic effect's superclass to cMagicEffect.





  3. Check the option to automatically create the

    magic effect object, although it will never be contained within

    a character.





  4. Fill in pNLPNounName and pNLPParseName to

    name the magic effect.



  5. Fill in pExamineGeneral with a line describing the

    magic effect's effects, that will be shown when the character

    asks for his/her status. If you don't wish to show anything,

    set this to NULL.



  6. Set pMagicEffectDuration to the average number

    of seconds that the character will be affected by the magic.

    Characters with higher oSkillMana will be affected less.





  7. You should provide a VenomTimer() method.

    It is called when the magic effect is first introduced, and

    every few seconds thereafter until the magic effect

    times out. The code in this function will control the

    effects of the magic effect; you can have the magic effect do

    any sort of damage by calling DamageXXX(), or even

    non-damage effects.








Mana

Mana works a lot like fatigue, except instead of it being

physical damage, it's mental/magical. To decrease a character's

mana, call DamageMana().





Unconscious

To knock a character out, call DamageUnconscious().


Characters will automatically be knocked out if they lose too

much blood or receive a severe blow to the head or chest.


Venom

Venoms (and poisons), like disease, are more complex in Circumreality than

other RPGs. In Circumreality, a venom is somehow injected into the body (or

in the case of alchohol, imbibed). A quantity of the venom

sits in a "reserve" and slowly seeps into the character's

bloodstream or lymph nodes. Doing physical activity increases

the amount seeping in. At the same time, the character's live

removes a fixed amount of venom from the bloodstream every

second.

To "inject" a venom into a character,

call DamageVenom().

To create your own venom (or poison), you need to:







  1. Create a new object for your venom, called

    oVenomXXX, where XXX is the venom name.





  2. Set the venom's superclass to cVenom.





  3. Check the option to automatically create the

    venom object, although it will never be contained within

    a character.





  4. Fill in pNLPNounName and pNLPParseName to

    name the venom.



  5. Fill in pExamineGeneral with a line describing the

    venom's effects, that will be shown when the character

    asks for his/her status. If you don't wish to show anything,

    set this to NULL.



  6. Set pVenomDose to the number of liters of venom

    in one dose. (In the case of beer, this is 1.0 liter.)





  7. pVenomRelease is the percent of venom that seeps

    from the reserve into the character's bloodstream every second.







  8. pVenomFatigue lets you control how quickly the

    venom spreads if the character undertakes activity. (In real

    life, you have a much better chance of surviving a venemous

    snake bite if you remain calm than if you run around and

    quickly spread the venom through your system.)





  9. pVenomRecover is the number of liters of

    venom removed from the character's system every second.

    Characters with a higher oSkillEndurance will have venom

    removed more quickly.







  10. pVenomNonLethal controls whether NPCs with

    !pDamageCanBeAttacked are allowed to ingest the venom.





  11. You should provide a VenomTimer() method.

    It is called when the venom is first introduced, and

    every few seconds thereafter until the venom is

    eradicated. The code in this function will control the

    effects of the venom; you can have the venom do

    any sort of damage by calling DamageXXX(), or even

    non-damage effects.







Localized damage

In addition to systemic damage, each body part (based on

oBodyPartXXX) can receive damage. The types of damage are:





  • Bloodloss - Wounds within the body part can cause

    bloodloss, either external or internal.







  • Bone breakage - Some weapons will break bones.





  • Paralysis - Magic items and electrical damage

    will cause body paralysis.







  • Severed - A body part can be severed.





  • Tissue damage - Cuts into the flesh and blunt-weapon

    damage.







Bloodloss

To cause a wound that results in bloodloss,

call BodyPartBloodLoss() in the body part object.

Keep the bloodloss amount small; a number like 0.01 is a fairly

large wound since it means that the character loses 1% of his

blood every second, resulting in unconsiousness in 50 seconds,

and death in 100 seoconds.

There are two types of bloodloss, external and internal. Both

result in calls to DamageBloodLoss() every few

seconds. However, external bloodloss can be seen and can be

bandaged. Internal bloodloss is invisible and cannot be

healed by normal means; a character won't know he has internal

bleeding until he falls unconscious.

NOTE: The BodyPartXXX() functions for bloodloss, etc. are

not usually called directly. They're most often a result of

weapon damage, which is covered in the next tutorial.




Bone breakage

Calling BodyPartBoneBreak() will break the major

bone in the body part, rendering it useless.

Bones will not heal until they're set by someone skilled in

setting bones. Then, they'll heal very slowly.


Paralysis

Calling BodyPartParalysis() temporarily paralyzes

the body part. There are three types of paralysis: quick-recovery,

medium-recovery, and slow-recovery. An electrical shock

would cause quick-recovery paralysis, which disappears within

a few seconds. A sting from a jellyfish might cause slow-recovery

paralysis, taking a few minutes to completely recover.

If a character's head or chest is paralyzed, the character

may fall unconscious or even die.



Severed

Calling BodyPartSevered() severs the body part.

Slashing weapons can cause a limb to be severed. If the head

or torso of a character is severed, the character dies.



Tissue damage

The BodyPartTissueDamage() causes the body part's

muscles to be damaged. (Or in the case of the head, the character's

brain.) Enough damage and the body part will be useless until

it heals. Significant tissue damage to the character's head or

chest will knock it unconscious or kill it.



Extensions to the cBodyPart class

The cBodyPart class includes some extra properties and methods

to handle body part damage. These are:





  • pArmorXXX is a collection of armor values indicating

    how well the body part is self-armored against various sorts

    of damage. Humans have armor in their head (the skull) and torso

    (the rib cage). Some creatures, such as armadillos, have armor

    all around.





  • pBodyPartDamgeImpaleCriticalHit is the chance,

    from 0.0 to 1.0, that a signficantly deep impaling hit will

    instantly kill the character. In humans, both the head and

    chest suffer this weakness, from hits to the brain or heart.





  • Damage to a character is affected by the character's size (weight).

    However, some body parts are relatively smaller or larger

    than other body parts, and take more or less

    damage. pBodyPartDamageScale controls this; for

    a human, all the limbs are 1.0, while the head is 1.5 (since it's

    smaller), and the torso is 0.5 (since it's larger).





  • pBodyPartDamageSlashCriticalHit is the chance that

    a sufficiently deep slash will cause a critical hit and kill

    the character instantly. In humans, the head and torso have

    a slight chance of instant death from a slash.







  • pBodyPartIsHand should be set to true if the

    body part includes a hand or other gripping mechanism.







  • pBodyPartIsLeg should be set to true if the body

    part acts like a leg. Significant damage to a leg could cause

    the character to be knocked to the ground.



  • A value of true for pBodyPartIsLifeCritical will

    cause the character to fall unconscious or die if enough

    damage is done to the body part.






Each body part object also suppots

the BodyPartDamage() method. This interprets

how damage from different types of weapons (such as slashing or

impaling) affect the body part. The default code should work

well enough for most creatures, but you may wish to rewrite

this for particularly unusual creatures.

As a general rule, you won't call BodyPartDamage() directly

either. It is called, however, by existing methods when a

character receives a hit from a weapon. This will be

described in the next tutorial.


Extensions to the cCharacter class

The cCharacter class includes many properties and methods

to handle the damage model. Many of them have already

been described above. There are a few others of note:







  • pBodyPartsInjuries is where the body-part specific

    injury lists are stored.





  • If pDamageCanBeAttacked is set to TRUE, the character

    can be attacked. If it's FALSE, it can't be; you may wish

    to set this to FALSE for NPCs whose purpose is conversation or

    some other non-combative role.






Download 8.87 Mb.

Share with your friends:
1   ...   116   117   118   119   120   121   122   123   ...   151




The database is protected by copyright ©ininet.org 2024
send message

    Main page