Tracking wounds

by Cwin

Back to Mechanic's Corner.

Cwin2005-11-29 19:11:29
Well, after years of being happy using Jaba Mud Client (didn't have alot of features, but was VERY easy to code, since everything was in a simple text file) I'm giving it up and converted to Zmud. I don't have to start from scratch, thanks to Import, but EVERYTHING has to be altered either because of different syntax, mistakes in translation, or because there's a better way of doing it in Zmud. Blah.. but it'll get done.

In any case, I'll soon be able to turn to my next phase in my system: tracking wound damage/recovery. My problem: I'm not sure how to go about doing it.

Having the system see when an ailment hits is no problem: watch for an artery cut, system remembers and uses yarrow. Even demon/angel attacks aren't so bad once you know what message can give what ailments.

The problem is wounds. Currently, my system can check a wound ailment and see how wounded a limb is, help to cure the limb, and even parry if it gets bad. However, that's it. It can't tell when a body part is being healed and I don't want to use just ailments, or WOUNDS, to see how wounded I am.

As such, any pointers to how my system should handle a basic hit, health applications and puer? This is especialy an issue for health apply for limbs and when I just "APPLY HEALTH" which I do sometimes when I know they only hit one body part. I don't need anything that pinpoints things exactly or the flat out coding to do the job: just the overall concept that'll give me a good enough estimate at how wounded I am.

Also, if you have any hints on how to track how my attacks are getting wounded and healing off the wounds I'd love that too: It'd be nice to know if they've bothered to cure those heavy head wounds I gave them earlier.
Daganev2005-11-29 19:14:09
Get all wounded up and see how much you heal when you apply health, then just subtract the wounds when you see yourself applying.

That would be a single step but might get you thinking of other ideas.
Morik2005-11-30 00:38:35
Here's how I'm doing it, and it seems to work reasonably well.

I went into the arena and sparred a lot of knights. I grabbed all of their knight affliction lines, looked at how weapons hit you and stuff like that. I did all of the above, and then tried writing triggers for each of the lines I saw to track wounds.

Then I found something in common with all of them!

I have a variable, wounds_{bodypart}, which is incremented once every time I see a limb hit, and twice when I see a lunge/assault/crush. I'll probably have to double these on axelord/pureblades when I spar those, but thats for later.

Then I have a set of triggers which identify when a weapon is attacking me. When a weapon IS attacking me I note it (using a variable, but in Zmud you might pull a Thorgal and just turn on the weapon tracking folder with #t+). When I see the next prompt I disable caring.

Then, I have a series of triggers which look exactly like this:

# Now, the wounding attacks
/def -p200 -F -mregexp -t"right (arm|shoulder)" trig_wounding_rarm_1 = /if (weapon_attack == 1) /wound_state rarm light %; /endif
/def -p200 -F -mregexp -t"left (arm|shoulder)" trig_wounding_larm_1 = /if (weapon_attack == 1) /wound_state larm light %; /endif
/def -p200 -F -mregexp -t"(the|your) (ribs|chest|sternum)" trig_wounding_chest_1 = /if (weapon_attack == 1) /wound_state chest light %; /endif
/def -p200 -F -mregexp -t"(the|your|nasty) (stomach|gut|belly)" trig_wounding_gut_1 = /if (weapon_attack == 1) /wound_state gut light %; /endif
/def -p200 -F -mregexp -t"left (leg|foot|thigh)" trig_wounding_lleg_1 = /if (weapon_attack == 1) /wound_state lleg light %; /endif
/def -p200 -F -mregexp -t"right (leg|foot|thigh)" trig_wounding_rleg_1 = /if (weapon_attack == 1) /wound_state rleg light %; /endif
/def -p200 -F -mregexp -t"(the|your) (face|skull|head|chin|cheek)" trig_wounding_head_2 = /if (weapon_attack == 1) /wound_state head light %; /endif


/wound_state just increments the wound_{bodypart} variable. The minimum wound level stuff I've ignored now.

Now, the important thing: these triggers are ONLY paid attention to when I know someone is hitting me, and ONLY ME with a weapon attack. Some of the weapon attacks and the way they wrap are ambiguous (you don't get "your" on the right line, for example, so you don't know whether it was your arm or your cohorts arm that was attacked.)

This tracks which limb is healed fine, as I said. What it messes up on is pureblade/axelord, but I'll sit back with Deangelo soon and sort through that. tongue.gif

Next! Knowing whats cured!

Puer looks like "Your {bodypart} is fully healed" when you completely heal a limb - so I trigger that to just set the wound_{bodypart} to 0.

Health is a bit stranger - when you apply health, you'll be told if it fully heals the head, chest and gut - again, set wound_{bodypart} to 0. But the legs and arms are slightly different and annoying. When you APPLY HEALTH TO LEGS (or ARMS), one side is cured first and always first. So my trigger for legs/arms sees if the left side is wounded and sets that to 0 first. If the left side is cured it cures the right side.

In both instances there's a partially cured message: I just divide the current wound amount in half. That way I don't end up thinking a limb is cured when its not.

Finally! How to cure. Well, you now know which limbs have the most damage and so you can just write an alias which checks which is more important to you and cures that. I, and I'm not that great a knight fighter yet so I'm sure i'm doing THIS bit wrong, try curing critical wounds before sipping and I try curing negligible/light wounds after I've thought about sipping. I need to wind puer, parry and stance into all of this too.

I hope this helped.
Cwin2005-12-01 20:18:55
mmm, it did actualy. Thank you so much.

It's left me with just one more question; does the damage message on an attack when NOT doing an ailment have any real meaning? For example:

Alger pricks him in the gut causing him to bleed slightly
Alger thrusts the blade into his gut for a nasty belly wound.

Both, unless I'm REALY off, are just damage messages for a sword strike to the gut. However, what do the different messages represent? Did the blow do more damage the second time? Is the gut more wounded (Light first time, Moderate the second?)? Is the blasted thing just a random way to annoy coded systems? WHAT!?
Unknown2005-12-01 20:21:41
There are different messages for the different types of attacks (swing, jab, hack, slash, pound, lunge, pulp, etc) and for each there is a word or two that will be chosen at random from a picklist of similar verbs (slices, slashes, hacks, etc).
Cwin2005-12-01 20:31:21
Hmm, well, they are the same attack (Strike Gut), though. Also it's more than the verb changing, the whole message alters. It's also not realy random: I've never seen a chest strike expose ribs before bouncing off the sternum (and if they heal the chest, it's back to sternum bouncing).

It's something.. not sure what, but it's something.
Xenthos2005-12-01 21:03:33
QUOTE(Cwin @ Dec 1 2005, 04:18 PM)
mmm, it did actualy.  Thank you so much.

It's left me with just one more question; does the damage message on an attack when NOT doing an ailment have any real meaning?  For example:

Alger pricks him in the gut causing him to bleed slightly
Alger thrusts the blade into his gut for a nasty belly wound.

231215



That tends to be a sign of how damaged they are health-wise. One message for each health state- fully healed, middle health range, critically damaged. Nothing to do with wounding, just health / maxhealth.
Cwin2005-12-02 00:03:02
QUOTE(Xenthos @ Dec 1 2005, 05:03 PM)
That tends to be a sign of how damaged they are health-wise.  One message for each health state- fully healed, middle health range, critically damaged.  Nothing to do with wounding, just health / maxhealth.
231227



OOOH! That's still useful! It also helps calm my nerves immensly. So there's three messages per attackstyle/bodypart (i.e. a hackdown to the head, a strike to the gut), corresponding to their health.

With that, I now know how to dang well organize it all. Now I can finaly get to sorting all the blasted messages.