brians200 51 Posted February 11, 2014 Do you think you can look into the squad leader losing his squad leader position when he goes unconscious? It makes having ai in a squad a pain. Share this post Link to post Share on other sites
oktyabr 12 Posted February 11, 2014 -Psycho-;2617932']Hi' date='@Oktyabr, i dont know how VAS works (cause i never used it before) but i think something goes wrong in your implementation. (did VAS use CfgFunctions too?) regards[/quote'] Hey, thanks for the reply. VAS uses a ton of custom functions and a stringtable too. I don't use it but included it in a mission for a dedicated to host that likes VAS. The server admin said something was wrong with the stringtable I included (default, latest version) and replaced it with a different one he had. I don't know how, what or why really, but it seems to work now. Not a problem with your script! :) Share this post Link to post Share on other sites
jcae2798 132 Posted February 11, 2014 (edited) Have any of you been looking for a Addon version of Psycho's A3 Wounding scripts? Look no further! As Psycho mentioned, he did not want to convert his scripts into an add-on based on how it could break and affect other mission makers scripts, but I just couldn't help it since i think he has the best wounding scripts out right now. With his approval, i have converted his scripts into a working add-on. Some info about this; - Addon could affect other implemented revive systems. Should a mission have for example the BTC Revive, the menus and actions could seem a bit funny or not work correctly. - For the add-on to work correctly, I had to make all units of BLUFOR switchable/playable using a specific script. This means if you are playing as OPFOR, this will not work and your enemy team will have the revive system (luck them :) ) - Team Switch should be disabled and not used as Psycho mentions in his original work. I've gotten it to work when i've totally died, but its not 100% so should be disabled. - There is a userconfig folder that needs to be copied to its location. In there you can find the setup file to modify the settings to your liking. Anyways big thanks to Psycho for his awesome work which this add-on gets full credit. Also credit to my group mates who helped me put it together. Have fun all. Link: https://www.dropbox.com/s/htdsc38bvkl2u7g/%40A3wounding1.0.zip Edited February 11, 2014 by JCae2798 1 Share this post Link to post Share on other sites
Psychobastard 136 Posted February 11, 2014 Hi JCae2798, thx for sharing it in this thread. If you like i put your link in the first post too? regards Share this post Link to post Share on other sites
SavageCDN 231 Posted February 11, 2014 Great news thanks for keeping this updated! Share this post Link to post Share on other sites
jcae2798 132 Posted February 11, 2014 -Psycho-;2620068']Hi JCae2798' date='thx for sharing it in this thread. If you like i put your link in the first post too? regards[/quote'] Sure, thanks. my thread updated. Link = https://www.dropbox.com/s/htdsc38bvkl2u7g/%40A3wounding1.0.zip Share this post Link to post Share on other sites
oktyabr 12 Posted February 11, 2014 Nice work! I'm personally allergic to userconfigs but I can see how others might prefer the ease of an addon. Added it to Play With Six yet? :) Share this post Link to post Share on other sites
Psychobastard 136 Posted February 11, 2014 Link added in first post! :) Share this post Link to post Share on other sites
jcae2798 132 Posted February 12, 2014 Nice work! I'm personally allergic to userconfigs but I can see how others might prefer the ease of an addon. Added it to Play With Six yet? :) Haha, well without the userconfig file, people would be stuck with my personal settings. This way they can set it up as they like. I have not looked into it and might not either since its not my actual scripts. Thanks for the suggestion though. Share this post Link to post Share on other sites
oktyabr 12 Posted February 12, 2014 Psycho, given any thought to getting the drag action to work while prone? My guys keep getting shot when they stand up before dragging someone to safety ;) Share this post Link to post Share on other sites
meatball 25 Posted February 12, 2014 Script looks great and I've just started working with it. Trying to understand tcb_ais_revive_guaranty. If that's set to true, that appears to mean that 99% of the time, the player will 'go down' but be revivable. It possible to make that 100%? I basically don't want the players to ever truly 'die', but only go into agony. Then if all players are in agony and down, I'll then end the mission. As a related note, if folks want to set up a mission trigger to end a mission if all players are 'in agony', just set up a trigger with this as the condition: {_x getVariable "tcb_ais_agony"} count units playergroup == count units playergroup; Just swap 'playergroup' for whatever group you have all the players in. Share this post Link to post Share on other sites
chessmaster42 11 Posted February 12, 2014 (edited) Hey guys, I have my own fork+overhaul of the wounding system (still a WIP) that we use for our clan's version of MCC that I maintain. Feel free to dive into my changes let me know what you think. I've put quite a bit of time into it so hopefully others can use it (especially TcB Psycho). GitHub Link: https://github.com/chessmaster42/mcc_sandbox/tree/master/mcc_sandbox.altis/ais_injury ---------- Post added at 22:22 ---------- Previous post was at 22:10 ---------- ... Trying to understand tcb_ais_revive_guaranty. If that's set to true, that appears to mean that 99% of the time, the player will 'go down' but be revivable. It possible to make that 100%? I basically don't want the players to ever truly 'die', but only go into agony ... This wounding system works in tandom with the BIS damage, not in place of it, strictly speaking. So in order to totally prevent death and still put them into the agony state you will need to update the main finite state machine (ais.fsm) so that the condition on the 'die___clean_up' state link checks for more than just _unit getVariable ""tcb_ais_unit_died"" || not alive _unit . Also, this may be just my opinion, if a player takes a critical amount of damage there should be no guarantee they can be brought back. This is usually along the lines of a large explosion nearby or a 12.7mm round to the face. ---------- Post added at 22:28 ---------- Previous post was at 22:22 ---------- Do you think you can look into the squad leader losing his squad leader position when he goes unconscious? It makes having ai in a squad a pain. The following lines in the main finite state machine (ais.fsm) are what pick a random AI to take over squad leadership but only if it can't put a player into the leadership position: _pLeader = objNull; {if (isPlayer _x) exitWith {_pLeader = _x}} forEach _grp; if (!isNull _pLeader) then { (group _unit) selectLeader _pLeader; } else { _ranAI = _grp select (floor (random (count _grp))); (group _unit) selectLeader _ranAI; }; So if you have other players in the group and an AI takes leadership then something is broken. ---------- Post added at 22:46 ---------- Previous post was at 22:28 ---------- I've found that this script, as much as I like it, seems to derail VAS if the two are used together. Anyone else seen this, and/or got the combination working? We're using VAS 2.4 with a number of other scripts (in addition to wounding) and it works great. In what way is VAS being derailed for you and what version are you using? Edited February 12, 2014 by chessmaster42 Fixed link Share this post Link to post Share on other sites
oktyabr 12 Posted February 12, 2014 We're using VAS 2.4 with a number of other scripts (in addition to wounding) and it works great. In what way is VAS being derailed for you and what version are you using? No, as I thought I clarified it turned out to be a problem with the VAS installation I was using, not this script :) Share this post Link to post Share on other sites
chessmaster42 11 Posted February 12, 2014 -Psycho-;2608620']At the moment this isnt possible and it isnt easy to implement this feature in the exitsting structure.Maybee i add this as a option in the future. But how i sayd before' date=' it is not easy, take a lot of time and performance too. Only a option. ;)[/quote'] I have the AI wounding working in my fork of AIS Wounding where they will come help out players. You just need [_this] spawn TCB_Load; in their init. Share this post Link to post Share on other sites
meatball 25 Posted February 13, 2014 (edited) Also, this may be just my opinion, if a player takes a critical amount of damage there should be no guarantee they can be brought back. This is usually along the lines of a large explosion nearby or a 12.7mm round to the face. Depends on the mission in my mind. Certain missions types/styles really are just better if players can't die, but can still lose if everyone is knocked out. Every Escape mission for example. Would suck to die from an explosion and have to wait two hours for your friends to finish up. All that does is lead to people restarting the mission if someone dies or some people not being able to play for long stretches. Edited February 13, 2014 by Meatball Share this post Link to post Share on other sites
chessmaster42 11 Posted February 13, 2014 Depends on the mission in my mind. Certain missions types/styles really are just better if players can't die, but can still lose if everyone is knocked out. Every Escape mission for example. Would suck to die from an explosion and have to wait two hours for your friends to finish up. All that does is lead to people restarting the mission if someone dies or some people not being able to play for long stretches. 'Tis true. I'm just used to using MCC so players respawning back at home base isn't an issue. The mission continues on and the player who was formerly dead must now find a way to get themselves back up to the front lines. As for the problem at hand I think it would be possible to prevent any outright death prior to going into agony. There just needs to be a new check done in the damage handler in fn_handleDamage.sqf to see if the unit's current damage plus the new damage is >=1 and if so set it to something like 0.95 to prevent death. Damage event handlers tend to be really finicky due to some bugs but it's definitely possible. Share this post Link to post Share on other sites
brians200 51 Posted February 13, 2014 (edited) The following lines in the main finite state machine (ais.fsm) are what pick a random AI to take over squad leadership but only if it can't put a player into the leadership position: _pLeader = objNull; {if (isPlayer _x) exitWith {_pLeader = _x}} forEach _grp; if (!isNull _pLeader) then { (group _unit) selectLeader _pLeader; } else { _ranAI = _grp select (floor (random (count _grp))); (group _unit) selectLeader _ranAI; }; So if you have other players in the group and an AI takes leadership then something is broken. I mean that other players who don't want to control groups of AI suddenly become the squad leader when the real squad leader goes unconscious . Is there a way to prevent this? I would like to keep the squad leader the same the entire duration of the mission. Edited February 13, 2014 by brians200 Share this post Link to post Share on other sites
chessmaster42 11 Posted February 13, 2014 I mean that other players who don't want to control groups of AI suddenly become the squad leader when the real squad leader goes unconscious . Is there a way to prevent this? I would like to keep the squad leader the same the entire duration of the mission. Just comment out the '{if (isPlayer _x) exitWith {_pLeader = _x}} forEach _grp;' line in the FSM and it will never switch the group leader to a player. If you just don't want the leader to ever change then comment out that whole block in the FSM. This is in the agony state init code. Share this post Link to post Share on other sites
Psychobastard 136 Posted February 13, 2014 Hi chessmaster42, nice to see that you work with the code and found your own ways. If i found the time i will take a look into your changements. And you have found (nearly) the problem of the 99% chance. ;) There are some realy strange things in the damgage EH. A simplier script works under A2 with a 100% change... btw: There just needs to be a new check done in the damage handler in fn_handleDamage.sqf to see if the unit's current damage plus the new damage is >=1 and if so set it to something like 0.95 to prevent death That didnt work. Try again a look into the fn_handedamage. ;) regards Share this post Link to post Share on other sites
chessmaster42 11 Posted February 13, 2014 -Psycho-;2621673']That didnt work. Try again a look into the fn_handedamage. ;) Okay, well, the two main problems are the null source for the damage (which I built a solution for) and the multiple damage EVH (which you had a workaround for when setting up the EVH). Those two solve most of it. The other side to it is that the damage EVH must NEVER be assigned server-side. As long as the damage EVH is only assigned to units on the client-side then the fn_handleDamage will work properly. This is my code that I added to the top of the damage handler: //Stop any damage that doesn't have a source defined //This is a known bug with HandleDamage EVH - http://feedback.arma3.com/view.php?id=13648 if(isNull _source) exitwith {0}; //Make unconscious/agony players take no damage while in the captive state //This state is intentionally lost via the FSM if the unit fires a weapon if((_unit getVariable "tcb_ais_agony") && (captive _unit) && (isPlayer _unit)) exitwith { 0 }; And so far, this works perfectly once the FSM can move the unit into the Agony state from Healthy state. The invulnerability is more of a temporary measure but it at least proves a method to stop all incoming damage to the unit for the time that they're neutral. Share this post Link to post Share on other sites
Psychobastard 136 Posted February 14, 2014 Hi, the first bug and your work around is a new thing for me. Thx! The second one i dont like so. Cause i did not want that the unit is invulnerable while he is unconcious. Thats the reason i add this short delay (5s) after the "dead". (maybee you have see it) Try this: if (isPlayer _unit && {time < (_unit getVariable "tcb_ais_fall_in_agony_time_delay")} && {captive _unit}) exitwith { 0 }; If this work well in combination with your other solution i will release a hotfix and you become a big place in the credits. :) regards Share this post Link to post Share on other sites
gloveflared 10 Posted February 16, 2014 For some reason this mod isn't working and I think it is because I installed wrong or something. I am a noob at this scripting stuff right now so I am going to tell you what I did. Okay, I have the file downloaded and unzipped, inside there is the test mission (tcb_ais_26012014.altis) and the readme. So I copy the test mission folder in put it in Documents>Arma 3- Other Profiles> (my profile)>missions Then I open demo mission in the editor(only place I can find it) and none of the stuff works, only I go into the wounded animation when I die and the AI doesn't help. I really don't know how I messed this up but help would be appreciated. Share this post Link to post Share on other sites
Psychobastard 136 Posted February 16, 2014 Put the folder in mpmissions, start ingame mp browser, select new mission and start the example mission. But your way have to work too. Maybee some mods or you did something other as your description. regards! Share this post Link to post Share on other sites
Rektavu 10 Posted February 16, 2014 Sick! but what was the animations you used called? Share this post Link to post Share on other sites
gloveflared 10 Posted February 16, 2014 (edited) -Psycho-;2623665']Put the folder in mpmissions' date=' start ingame mp browser, select new mission and start the example mission. But your way have to work too. Maybee some mods or you did something other as your description.regards![/quote'] Okay, I'll try that real quick and see what happens. The only other mod I have is CBA, unless some part of a mod is hidden inside the folders. EDIT: Now the wounding system works, in the demo at least, but the AI doesn't heal or drag. I have to command them to heal someone and when they do they just use a first aid kit to heal them and leave them on the ground. When I go down the new leader orders the medic to help me but he just uses a first aid kit and I am still "wounded". The only way i can get them to heal someone is to use the command action order. Edited February 16, 2014 by gloveflared Share this post Link to post Share on other sites