Jump to content
chessmaster42

Chessmaster's Wounding System

Recommended Posts

Chessmaster's Wounding System

I am happy to announce the release of Chessmaster's Wounding System for Arma 3!

This post will be kept relatively brief as the main details are all visible in the readme but here are the highlights:

General Feature Summmary

  • fully AI compatible
  • fully MP and JIP compatible
  • configure the damage tolerance of your units
  • units are never killed outright and are instead put into an unconscious/wounded state Note: units can be killed while in this state
  • injured or unconscious units will be healed different amounts based on who healed (medic vs non-medic) and whether they used a medikit or first aid kit

Player Feature Summary

  • unconscious units are able to move around and fire their primary weapon
  • unconscious units are ignored by AI until they fire their weapon
  • unconscious medics are able to use first aid on themselves (can be disabled in config)
  • 3D icons show bleeding percentage to medics and the icon and text are bigger so that the medic can more easily check on the wounded
  • progress of healing is visualized (progress bar)

AI Feature Summary

  • when a nearby group member goes down a first aid call is put out to all AI in the group with a preference for medics
  • when no AI in the group can help, a first aid call is put out to all friendlies within 500 meters
  • if the AI goes down while doing first aid and is brought back they will go back to the unit they were helping and continue if they can
  • when an AI is brought back up they will search for any nearby friendlies that are down and do first aid

The setup is very simple and straightforward and the readme has all of the instructions that you will need.

Download

Current Version: 1.1.4

Source Repository: source

Mirrors

Credits

  • Psychobastard for the A3 Wounding system upon which this is based Source
  • BonInf* for the first multiplayer compatible version (Arma 2)
  • EightSix for his PatrolOps and the included status bar
  • BI for the design idea (Wounding module Arma 2)

Changelog

  • v1.1.4 - Bug fixes
    • Changed most calls to ccl_fnc_GlobalExec to be NOT persistent (fixed many lag and performance issues)
    • Added start of version broadcast mechanism
    • Added some safety checks to see if player is a curator
    • Removed the use of the 'name' function in some places where the unit is possibly not alive
    • Added some general error handling
    • Restructured cws_fnc_setupUnitVariables to (hopefully) synchronize better
    • Fixed a few minor bugs in the main FSM

    [*]v1.1.3 - Bug fixes

    • Added Damage Unit module that is the antithesis of the Revive Unit module
    • Changed config settings to execute globally
    • Updated CCL to 1.0.2 (Fixed missing unit chat function in CCL)
    • Reorganized a few functions
    • Added curator icons (moved in from CPM)
    • Fixed error handling in canHeal
    • Changed syntax of isMedic to match the general syntax of all other function parameters
    • Fixed bug with showMessage in cws_fnc_carry
    • Fixed bug with showMessage in cws_fnc_drag
    • Turned off death dialog by default
    • Added extra error check in loadCWS
    • Fixed bug with showMessage in loadCWS
    • Fixed wording in moduleCWSLoad
    • Removed unnecessary global 'cws_injury_Config_Debugging'
    • Fixed bug with curator icons (maybe)
    • Started work on damage handler revamp
    • Improved performance and error handling for drawing 3D icons (both curator and wounded unit icons)
    • Improved reliability of canHeal function
    • Improved performance and error handling for lookingForWoundedMates
    • Improved performance and error handling for sendAIHealer
    • Cleaned up debugging output
    • Added mutex flag to indicated if a unit is actively healing another unit (used to improve canHeal function)
    • Improved readability and reliability of isHealable function

    [*]v1.1.2 - Bug fixes

    • Fixed bug with Revive Unit module

    [*]v1.1.0 - Mod Release

    • Mod version of CWS released!
    • Reworked the AI mechanisms when calling for help and looking for wounded
    • Reworked the bleeding mechanism to pause better when being healed
    • Added Zeus modules (mod version only)
    • Tons of bug fixes

    [*]v1.0.1 - Minor bug fixes

    • Fixed persistent "You are dead." message
    • Fixed death after respawn
    • Fixed possible bleeding bug
    • Fixed side chat message setting check

    [*]v1.0.0 - Initial release

Edited by chessmaster42
Added withSix mirror link

Share this post


Link to post
Share on other sites

Nice to see you release! Downloading for a try now :)

Does this system still include drag/carry?

units are never killed outright and are instead put into an unconscious/wounded state

This I think should be optional? Or with a slight chance of instant death? "Never" is too definite. Things like large explosions should *definitely* kill a unit, in fact I'm looking at a way to instantly remove a corpse in the case of large IED explosions, suicide bombers, etc.

Share this post


Link to post
Share on other sites

I may use this in my mission, since it seems like an upgraded version of A3 Wounding System. Did you fix the positioning of units being carried or dragged? A3 Wounding System had weird offset issues or something.

Share this post


Link to post
Share on other sites

Hi chessmaster,I just go around to downloading psychos version of this system.Can you tell me what are the differences between the two?I love the system,want to keep it up to date and have it work always reliably.

Share this post


Link to post
Share on other sites
Does this system still include drag/carry?

Yes

This I think should be optional? Or with a slight chance of instant death? "Never" is too definite. Things like large explosions should *definitely* kill a unit, in fact I'm looking at a way to instantly remove a corpse in the case of large IED explosions, suicide bombers, etc.

There is a config option to do that so that large damage can kill units outright. You just set cws_ais_revive_guaranty to false in cws_config.sqf.

---------- Post added at 16:34 ---------- Previous post was at 16:32 ----------

Did you fix the positioning of units being carried or dragged? A3 Wounding System had weird offset issues or something.

I haven't touched that yet because it's more of an aesthetic things than a functional problem but it's on my TODO list to get it to work better.

---------- Post added at 16:51 ---------- Previous post was at 16:34 ----------

Can you tell me what are the differences between the two?

Mine works better with AI and has a few more features (like optional medic self-revive). I also have the damage handler working much better. The healing is also improved as it is integrated with the vanilla Treat option as well as the First Aid from the script. There are quite a few other minor things but those are some of the differences.

Edited by chessmaster42

Share this post


Link to post
Share on other sites
Yes

There is a config option to do that so that large damage can kill units outright. You just set cws_ais_revive_guaranty to false in cws_config.sqf.

---------- Post added at 16:34 ---------- Previous post was at 16:32 ----------

I haven't touched that yet because it's more of an aesthetic things than a functional problem but it's on my TODO list to get it to work better.

---------- Post added at 16:51 ---------- Previous post was at 16:34 ----------

Mine works better with AI and has a few more features (like optional medic self-revive). I also have the damage handler working much better. The healing is also improved as it is integrated with the vanilla Treat option as well as the First Aid from the script. There are quite a few other minor things but those are some of the differences.

I see.Well works better with AI is what im looking for.I would like to try your version of the system,but when i did i got an error.In the bottom of the screen,it said in orannge writing,fx no element 0,0,0, or something like that(sorry couldnt read it rite) and the script didnt work for me.do you know what that is and why it wont work?

EDIT- ignore the fx error i mentioned,unrelated.However,whn i follow the instructions for setting the script up,it doesnt work.Iv made my group of AI playable,and even named them p1 p2 etc.But they just fall and die when i shoot them. iv added the line in a init sqf as you stated.Also done what your instructions said with the decription.ext. Still dosent work.Could you explain exactly what im meant to put in the ext? iv copy pasted the line,and also copie pasted the whole hpp and dialogue files.Not exactly sure im doing it rite but anything i try dosent work.

Thanks

Edited by redarmy

Share this post


Link to post
Share on other sites

cws_injury\fsm\cws.fsm still refers to folder ais_injury in some places, causing errors.

I guess cws_ais_debugging should also be a setting in cws_config.sqf? Edit: Oh, it is there, just alone at the end unlike the other settings.

Another question. At the end of cws_init.sqf you have this:

//Load CWS on all playable units
CWS_Load_Players =
{
{
	[_x] spawn CWS_Load;
} forEach playableUnits;
};

//Globally loads CWS Wounding on all playable units
CWS_Load_Global_Players =
{
[b][[], "CWS_Load_Players", true, [i]true[/i]] spawn BIS_fnc_MP;[/b]
};

The isPersistent part (last TRUE) of this BIS_fnc_MP probably doesn't do a thing, as JIP setup is executed before cws_init.sqf, and CWS_Load_Players isn't defined at that time. Currently it likely just wastes resources with broadcasting stuff which does nothing, yet would get run correctly anyway when the new player gets to cws_init.sqf.

Edited by Magirot

Share this post


Link to post
Share on other sites

Not having much success on DEV version here. With no mods (and running alongside VTS) getting the following error ...

Error in expression <[_unit] call cws_fnc_setupUnitVariables;

_black_in =>

Error position: <cws_fnc_setupUnitVariables;

_black_in =>

Error Undefined variable in expression: cws_fnc_setupunitvariables

"user1 (Local) - CWS Wounding Loaded!"

Any ideas waht is going wrong ?

Share this post


Link to post
Share on other sites
cws_injury\fsm\cws.fsm still refers to folder ais_injury in some places, causing errors.

D'oh! No idea how I missed that. Must have been more tired than I thought when getting the new repository setup. It's fixed now in this commit.

Another question. At the end of cws_init.sqf you have this:

//Load CWS on all playable units
CWS_Load_Players =
{
{
	[_x] spawn CWS_Load;
} forEach playableUnits;
};

//Globally loads CWS Wounding on all playable units
CWS_Load_Global_Players =
{
[b][[], "CWS_Load_Players", true, [i]true[/i]] spawn BIS_fnc_MP;[/b]
};

The isPersistent part (last TRUE) of this BIS_fnc_MP probably doesn't do a thing, as JIP setup is executed before cws_init.sqf, and CWS_Load_Players isn't defined at that time. Currently it likely just wastes resources with broadcasting stuff which does nothing, yet would get run correctly anyway when the new player gets to cws_init.sqf.

It depends on whether you have this loaded in with other JIP scripts or whether your mission is barebones. For example, if your base mission is MCC (which the one I work with is) then you have to have the persistent flag set because MCC does some black magic here and there around JIP. I can definitely look into it more to see if there's a better way.

---------- Post added at 19:46 ---------- Previous post was at 19:45 ----------

... However,whn i follow the instructions for setting the script up,it doesnt work.Iv made my group of AI playable,and even named them p1 p2 etc.But they just fall and die when i shoot them. iv added the line in a init sqf as you stated.Also done what your instructions said with the decription.ext. Still dosent work.Could you explain exactly what im meant to put in the ext? iv copy pasted the line,and also copie pasted the whole hpp and dialogue files.Not exactly sure im doing it rite but anything i try dosent work.

Thanks

In order to load the system on an AI unit you must run the following in the units init:

[_this] spawn CWS_Load;

---------- Post added at 19:53 ---------- Previous post was at 19:46 ----------

Not having much success on DEV version here. With no mods (and running alongside VTS) getting the following error ...

Any ideas waht is going wrong ?

Can you stick a log out on pastebin so that I can get a better picture of what is going on? Just looking at that I would guess that maybe you didn't get everything into description.ext but not sure.

Edited by chessmaster42
fixed code example

Share this post


Link to post
Share on other sites

sorry chessmaster for the noobness but, [_this] spawn CWS_Load; does not work when i enter it into AI init field.I get a variable error.Im meant to change "this" to something else?

Iv tried messing around with it cant find a working state for it.My ai just die when i reenter that line to something the init field accepts.

Share this post


Link to post
Share on other sites

Can you stick a log out on pastebin so that I can get a better picture of what is going on? Just looking at that I would guess that maybe you didn't get everything into description.ext but not sure.

My turn for DOH ! I didn't sort the description.ext ! Will do that this evening. Thanks mate.

Now it WOULD be fantastic to have this as an addon as well (has been done previously for the original wounding system :) )

Share this post


Link to post
Share on other sites
It depends on whether you have this loaded in with other JIP scripts or whether your mission is barebones. For example, if your base mission is MCC (which the one I work with is) then you have to have the persistent flag set because MCC does some black magic here and there around JIP.

I'm not sure if that's true. Unless MCC modifies BIS_fnc_MP itself and makes it distribute the function as well, which it doesn't seem to do at a quick glance. I don't think you have to have the isPersistent flag in either case, since that specific BIS_fnc_MP will get run as part of the normal cws init.

Share this post


Link to post
Share on other sites
Guest

Release frontpaged on the Armaholic homepage.

==================================================

You are not registered on Armaholic, or at least not that we are aware of. In the future we offer the possibility to authors to maintain their own pages.

If you wish to be able to do this as well please register on Armaholic and let me know about it.

This is not mandatory at all! Only if you wish to control your own content you are welcome to join, otherwise we will continue to follow your work like we have always done ;)

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

I created the addon for the A3 system...pita but possible. I'm sure it can be done here as well but I'd wait for further updates first.

Did you ask pyscho if he was cool with coping his scripts? I'm sure you did. I did like the fact that you can die from direct headshots and so on with theA3, so I'll look at how your settings work. Keep up the great work it's a great script

Share this post


Link to post
Share on other sites

I have now fixed the description.ext problem, and even modified the ais to cws change, but on DEV version, even though it tells me that CWS wounding is loaded ... noone is seeing any effects.

Any ideas ? Problems with DEV ?

What MAY be useful is to provide a simple mission too ... just in case I _AM_ being an idiot.

Edited by Kremator

Share this post


Link to post
Share on other sites
I created the addon for the A3 system...pita but possible. I'm sure it can be done here as well but I'd wait for further updates first.

If you're willing I'd certainly appreciate the help. Packing it up as a mod isn't difficult but I definitely agree that it's a pain in the rear.

Did you ask pyscho if he was cool with coping his scripts? I'm sure you did. I did like the fact that you can die from direct headshots and so on with theA3, so I'll look at how your settings work. Keep up the great work it's a great script

Yes, I talked with Psycho quite a bit about this before releasing my version. We got the licensing all sorted out.

Share this post


Link to post
Share on other sites
Yes, I talked with Psycho quite a bit about this before releasing my version. We got the licensing all sorted out.

...and what about me? lol only kidding, always happy to share and thanks for the credit ;)

Congrats on the release. I hope I can use some of the improvements you've made?

Cheers

Share this post


Link to post
Share on other sites

Mod features sound great, i will try out the script version, and i d love to make it my regular wounding mod if it ever gets packed as addon :)

Share this post


Link to post
Share on other sites

OK, so I managed to sort of get it working inside VTS, but when you spawn a group you can't have [_this], so I had to name the group then put that into the []. A mod version would be greatly appreciated as it would avoid us having to name groups (which is not what we want to do for on-the-fly missions)

Share this post


Link to post
Share on other sites
...and what about me? lol only kidding, always happy to share and thanks for the credit ;)

Congrats on the release. I hope I can use some of the improvements you've made?

Cheers

Hi EightySix,

you are listed in the credits too. That was one of my conditions for the copy rights. ;)

Every other involved developer is listed there.

regards - and thanks for your nice status bar!

Psycho

Share this post


Link to post
Share on other sites

Imo, this is the coolest medic/wound system out there atm. I just tried it and I'm instantly going replace my current revive/medic scripts with this one in my missions. BIG cudoz to everyone that is and has been involved!

I was going to ask for a config value that you need to have a medkit on you (no matter what class you play) to be able to do a revive, but the more I tried it out (first as medic, then as rifleman etc) the more awesome I realized it was just as-is. :D

For everyone trying to spawn AI (like I did, for testing it out in local editor ;]) there's a small trick to get it working.

After opening up 3D editor, select faction, select infantry if it doesn't default to it. This is the crucial part; now paste the line chessmaster42 told u to paste ([_this] spawn CWS_Load; ). Then select the type of unit you want to place. Place it and test it. That's the only way I got it to work 100% :)

So, in my case when spawning Nato Riflemen to shoot and treat; MCC -> Alt-left click -> X -> Nato -> Infantry -> [_this] spawn CWS_Load; -> Rifleman -> esc/click close -> point@location+space -> pewpew

chessmaster42: I however found one bug, and that is when trying to carry. You start dragging and then select the option to carry. The animation starts and when guy is loaded and you start walking, the body stays in mid-air where you loaded him up. The body doesn't move no matter how far you move (tried 100+ meters) but you have the option to drop all the way. When you select drop the body drops ... still at that same postition where you picked him up :)

This happens in both editor and local MP, haven't tried it on dedi-MP.

There's also some funny stuff going on animation-wise (swan necking) when reviving but I guess that's more ArmA 3 related than your doing, right? :)

Share this post


Link to post
Share on other sites

If we were to loop [_this] spawn CWS_Load foreach Allunits .... how much of an FPS hit would there be ? Any downsides to having it loop over the same unit?

Share this post


Link to post
Share on other sites

chessmaster42, I'm getting the following error thrown in my rpt files. I haven't tested to see if I get it in a vanilla mission with no mods running yet, but wondered if you (or anyone else, for that matter) had seen this particular error before?

Error in expression <ide = _unit getVariable "cws_ais_side";
if(cws_ais_show_injury_message) then {
[>
 Error position: <if(cws_ais_show_injury_message) then {
[>
 Error if: Type Number, expected Bool

Otherwise, great script! Thanks for your hard work!

Share this post


Link to post
Share on other sites
chessmaster42, I'm getting the following error thrown in my rpt files. I haven't tested to see if I get it in a vanilla mission with no mods running yet, but wondered if you (or anyone else, for that matter) had seen this particular error before?

Error in expression <ide = _unit getVariable "cws_ais_side";
if(cws_ais_show_injury_message) then {
[>
 Error position: <if(cws_ais_show_injury_message) then {
[>
 Error if: Type Number, expected Bool

Otherwise, great script! Thanks for your hard work!

You probably have cws_ais_show_injury_message set to '1' in the config. Try setting it to 'true' instead.

---------- Post added at 21:16 ---------- Previous post was at 21:14 ----------

If we were to loop [_this] spawn CWS_Load foreach Allunits .... how much of an FPS hit would there be ? Any downsides to having it loop over the same unit?

There is a substantial performance hit because allUnits will pick up neutrals even and things quickly spiral out of control. Aside from players you should try to keep the loading on a per-unit basis. I may come up with some convenience functions for loading on all units of a particular faction. Depends on the need.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×