SP Native Mini Mod: BattleWounds

Users who are viewing this thread

Rongar

Master Knight
BattleWounds v 0.2

Download link
Mod:
http://rapidshare.com/files/108221187/BattleWounds.v0.2.zip
To install
unzip in <M&Bdir>/Modules/

Sources:
http://rapidshare.com/files/108220467/BattleWounds.Source.v0.2.zip
Feel free to use in your mods.

Changelog
since 0.1
- Riders receive damage if he loses horse while riding. Amout of damage depends on speed.

Description

The goal of this mod is to demonstrate the wound scheme that makes the main hero receive instant penalties if he gets damage in combat.

In default variant (the mod provide menu to adjust some setting of wound scheme) the main hero receives light wound each time he looses more 10% of health and serious one if he looses more 30% of health. Hero can recieve several wounds in one combat.

BattleWounds is alternative approach to wound scheme introduced by Chel (http://forums.taleworlds.com/index.php/topic,8652.msg797950.html#msg797950), which modified variant is now used in several mods.
Also BattleWounds was written in way that avoids raising stats after recovering if they were zero then hero received wound.

The reason of creating new scheme is wish to slight reduce stochastic in deciding outcome. In BattleWounds
  • If the hero is knocked out by hundred fist strikes he will receive no wounds and will be only knocked out.
  • But if he is caught on enemy spear and received huge amount of damage he will get serious wound even if he is not knocked out.
  • Randomization only activates then deciding in which place wound is received (the variety of wounds is same that was introduced by Chel).

Wounds that was got in combat persist after combat.
They heal with time. The speed of healing depends on wound treatment, first aid and resting. Normally wounds never become permanent. But this behavior can be changed in mod settings. 
The information about wounds is displayed in Report-> Medical inspection.


Credits:
Chel: for wound script and wound types
Winter:  for modded operations
 
Rongar said:
The reason of creating new scheme is wish to slight reduce stochastic in deciding outcome. In BattleWounds
  • If the hero is knocked out by hundred fist strikes he will receive no wounds and will be only knocked out.
  • But if he is caught on enemy spear and received huge amount of damage he will get serious wound even if he is not knocked out.
  • Randomization only activates then deciding which type of wound hero is received (the variety of wounds is same that was introduced by Chel).

Did you actually get that to work (the wound depending on what knocked the player out)?
 
Rongar said:
In default variant (the mod provide menu to adjust some setting of wound scheme) the main hero receives light wound each time he looses more 10% of health and serious one if he looses more 30% of health.

That's a pretty good idea!

although I would raise the 10%/30% to something like 30%/60%. and I think there still needs to be a small (no more than 5%) chance to get a wound when you're knocked out, so that wearing heavy armor that makes almost all hits do little damage does not make you immune to wounds, and falling in battle can still cause you to break something.
 
grailknighthero said:
Did you actually get that to work (the wound depending on what knocked the player out)?
No, I think it is meanwhile impossible to do that only by the means of module system. Wound depend on amount of damage that was received from strike, actually not from strike but between  two consequence activation of trigger with zero checked interval. A fist and a spear was examples of things that most likely cann't and can drain a lot of health

Chel said:
although I would raise the 10%/30% to something like 30%/60%.
The mod has set of menus that appears before character  creation  menus and allows  slightly tune scheme. It allows to set thresholds to 30%/50% :smile:

Chel said:
and I think there still needs to be a small (no more than 5%) chance to get a wound when you're knocked out, so that wearing heavy armor that makes almost all hits do little damage does not make you immune to wounds, and falling in battle can still cause you to break something.
Maybe, yes. But there is question what actually loosing health means.
If strike breaks hero's  hand that means it drains many of hp, doesn't it? 
Then if there is no strikes that drains a lot of health there is no broken hand.

Anyway there is another reason to add probability of be wound when hero is knocked out. The way  catch damage I can't exactly count amount of damage  that is inflicted by knockout blow.  I.e. if hero has 1 hp and receives 143 damage it is considered as 1 point damage and don't cause wound .
 
v0.2 has been uploaded.
Now riders recieve damage  if they lose thier horses while riding.
Amout of damage depends on speed. This damage cann't knockout or kill rider. I.e if suddenly after recieving this damage rider health become zero, he still is able to fight until receives any other strike.
 
I really like this mod, and I have added it (0.1)  to The Eagle & The Radiant Cross.
Horewer, a bug has been reported, I haven't checked if its a bug of yours, or a result of a lousy porting:
Xuuluk said:
During the course of my game, I had no points in tactics. I suffered a head injury (-2 intel, -1 tactics, -1 leadership). After I recovered I got my stats back, but I also gained 1 to my tactics skill even though I had no points in it before.

This might affect other injury's, which could lead to the player accidentally receiving free stats.

This seems like an exploit that should be fixed, unless it's meant to be like this; e.g. your head clears and you gain new insight, or I'm just going crazy. :oops:
 
D'Sparil, I tried to avoid this problem and it seemed to me that I succeeded. I will check it again.
 
I have re-checked and didn't found any suspicious. Hero didn't get points in skills after recovering if he didn't have they before wounding.

The flowing information may be helpful to locate bug.
In BattleWounds each time hero receives wound  (i.e. serious head injury) for each penalty type  (int, tactics, leadership) script_apply_penalty is called. The script checks whether hero actually can receive penalty  and saves amount of penally in  slot_wounds_type_*_penalty_*.
Then hero recoveries script_remove_penalty is called for each penalty type to check how many points actually need to be restored.
 
There is no plan to release 1.0 :smile:
But there is some planed features.
I am going to extend wounds to all heroes and then to lords.
 
From looking at the module files, it looks like Brytenwalda uses a truncated version of Chels' wound script that drops the death option.  I checked around for a mod that had Rongar's Battle Wounds, but sadly found none yet.  Thanks for the thought. 
 
Sanctus Ferri said:
From looking at the module files, it looks like Brytenwalda uses a truncated version of Chels' wound script that drops the death option.  I checked around for a mod that had Rongar's Battle Wounds, but sadly found none yet.  Thanks for the thought.

Maybe get a hold in this-

D'Sparil said:
I really like this mod, and I have added it (0.1)  to The Eagle & The Radiant Cross.
Horewer, a bug has been reported, I haven't checked if its a bug of yours, or a result of a lousy porting:
Xuuluk said:
During the course of my game, I had no points in tactics. I suffered a head injury (-2 intel, -1 tactics, -1 leadership). After I recovered I got my stats back, but I also gained 1 to my tactics skill even though I had no points in it before.

This might affect other injury's, which could lead to the player accidentally receiving free stats.

This seems like an exploit that should be fixed, unless it's meant to be like this; e.g. your head clears and you gain new insight, or I'm just going crazy. :oops:

Maybe there is a source somewhere?
 
Well, I may as well try both, thanks. 

Actually, the part of the script I am most interested in is the idea of having effects come from individual wounds.  I'm trying to write a script that takes each individual hit, assesses it by severity, location and type, and applies an immediate series of penalties for shock and pain, long term penalties while healing (with individual healing rates), and possibility of permanent penalties, while also having a rate/chance of blood loss and possibility of infection.  I have the basic mechanics of the system worked out, but I'm still trying to get a feel for writing the actual script.  In particular, I am trying to wrap my head around how to keep track of effects from each wound separately, and I am hoping this script will be a learning tool to get me started on my own. 
 
The thing is individual wound tracking is difficult - the only information you have within ti_on_agent_hit (without using WSE to get bone position) is the position of the hit, which can be generalized to head/torso/foot areas via the z-axis. Severity can probably be evaluated with the item id (and to a lesser extent, the wielder), but how the penalties are implemented are up to you - the thing is it is difficult to be realistic while maintaining playability - a notification in the message log is very likely to be ignored during battle, and playing a wounded animation is likely to frustrate the player, making him/her wonder what's going on and why am I randomly bleeding. One wound will very likely need to lead to another, and tracking that is probably going to be complicated. You'll probably need to do something like tracking health per body part (or area) within the agent slot and replicate a portion of that damage (depending on the wound treatment/other skills) for after-battle wounds within the player troop's slots as well.
 
I was planning on using the numerical position method to estimate head/torso/left arm/right arm/left leg/right leg- I had no idea WSE could help me tell bone position...and sadly WSE is doesn't totally work with the latest Warband, correct?

Ah yes, at the point ti_on_agent_hit happens I can only find damage dealt before armour is taken out, right?  I was hoping Battle Wounds might have a workaround for that, since it seems to calculate effects off damage taken.  If only there was a trigger to the effect of on_agent_hp_change or something.  That seems to be the main difficulty.  The rest seemed (relatively) simple, granted that given my level of experience with scripting nothing is simple.  :smile:  Once I have the damage value, (and location and type from methods mentioned), I think I just have to store the damage value, damage type and location of each hit, allocate any immediate penalties, have a script to monitor stored wounds on the agent and assess blood loss from each every time increment x, and at the end of the battle check the stored wounds and 'roll' for chance of death to be implemented at time y (a formula based on the wound, medical skills, and if I can figure out how, battle result,) infection (which, aside from influencing chance of death, would really work just like blood loss, but with a different time increment) possibility of permanent injury, and implementation of temporary penalties; basically very much like Chel's wound script but on a per wound basis, and regardless of state of consciousness.  I suppose I'd only bother tracking bleeding and infection out of battle on heroes.  For other troops it would just affect chance of death.  Eventually I was going to try and work in a "Perform First Aid' action in battle to try and mitigate bloodloss, but given how often you get the time to do that, it wasn't a high priority.  The only thing currently troubling me about all that is whether storing that data for every wound on every agent in the battle will use up more free slots than I have to store stuff, and/or cause the game to become unmanageably slow.

Currently, I wasn't much concerned with any graphical representations of anything.  Just having someone run slower and have poorer balance and such from taking an arrow to the leg would make me happy.  I'm similarly not too concerned with how aware the player is of specific injury effects during battle.  I might have a message display some info, but then again maybe not.  If I did, and they missed it, well, people often remain unaware of injuries while preoccupied with fighting, and otherwise, it's not like people have damage readouts flash across their eyes in real life.  I rather like the idea of the effects only subtly presenting themselves as ability degradation.  At the end of the battle, when there was actually time to assess such things, would seem like a good enough time to list the specific information. 
 
Back
Top Bottom