Jump to content
LSValmont

vDog Patrol and VDog Feral Multiplayer Scripts [v1.3b - updated 04/24/2019]

Recommended Posts

vDog Patrol and vDog Feral Scripts by Valmont are long time requested scripts that allows mission makers to easily add MULTIPLAYER COMPATIBLE patrol and feral Dogs to their missions in Arma 3.

 

vDog Scripts Main Features:

- Easily add patrolling ai Dogs to allied, enemy or even playable Arma 3 units.

- Easily add ai Feral Dogs who will roam a trigger area and viciously attack any unit who enters their territory.

- Lightweight Scripts. (Your FPSs will thank you!).

- Multiplayer Compatible!

- Fully featured script also comes with sound effects. (Dog barks, growls, cries etc).

- Since version 1.3 the scripts also support the ACE 3 damage model!

- Even thou the scripts were made with Multiplayer and Performance in mind they work in SINGLE PLAYER just as well.

 

Requirements:

- CBA Community Based addons. (Dependency removed in the latest version but CBA is still suggested just in case).

- Basic Mission Editing knowledge. (For adding the commands to the unit's init and/or the triggers).

 

DOWNLOAD:

Demo Mission version 1.3b DOWNLOAD Link (Google drive): https://drive.google.com/open?id=1AJ0NYIAVklLT1jBwq4x4d47EoKiiFaUs

Demo Mission version 1.3b DOWNLOAD Link (Armaholic): http://www.armaholic.com/page.php?id=35026

 

vDog Patrol Details:

 

Spoiler

 

vDog Patrol Script Usage: 

Step 1: Download the vDog Patrol Demo Mission and open it with 7zip.

Step 2: Move the scripts and sounds folders found inside the vDogPatrolv13.VR folder to your mission folder.

Step 3: Update your mission's description.ext file to include the contents of the DEMO MISSION's description.ext file or just move the file if you don't have it.

Step 4:
In the Eden Editor, on a unit's Init field add: 
null = [this,"Alsatian_Random_F",1] execVM "scripts\vDogPatrol.sqf";

So in this example:

this (is the name of the Unit who will get the patrol Dog companion).

Alsatian_Random_F is the kind of Dog that will be used. The script accepts two inputs right now: Alsatian_Random_F and Fin_random_F.

1 is the number of Dogs to be added under that unit's command. (Can be more than one but it is not suggested).

 

vDog Patrol Notes:
- The patrol dogs can be added to both Player Units or Ai Units but since this is a MP compatible light weight script there are no commands for the dogs. They still behave like well trained dogs even without manual commands.
- The dogs cannot kill enemy units but will disable them for a few seconds and will damage their legs. They are more like a detection tool rather than killing machines.

- The dogs initially bark and point (reveal) the closest enemy in a 100 meters radius. If the enemy unit gets closer than 75 meters the Dog will then start running towards its prey and then sprint. A vicious attack on the victim follows.

- The dog will only stop chasing selected targets if the enemy unit gets 120 mtrs away from the dog/dog owner or if its owner is dead. So if you want your dog to return to you or stop attacking get 120 mtrs away from the enemy.
- Patrol Dogs are not attacked by the Arma 3 Ai (Arma 3 engine limitation and the work arounds are not compatible with the lightweight nature of this script).

- Still I have set up the script in a way that if the Dog Owner dies then the dog stops being aggressive to compensate the Ai not attacking them. (The Ai will attack the owner and if they kill him then it is like they have killed the Dog).
- If a dog owner gets very far away from the Dog the Dog will teleport back to its owner only if he is not inside a vehicle. This also simulates the dog getting in the vehicle with its owner.

 

 

vDog Feral Details:

 

Spoiler

 

vDogFeral.sqf notes and differences with vDogPatrol.sqf:

- Feral dogs do not require a unit to work like the patrol Dogs, just a trigger created via Editor or via Script.

- The Area of the trigger will be the Feral Dogs's Territory.
- You can set the trigger activation to any condition. Set condition to True to spawn the feral dogs on mission start.
- The dogs initially bark and point (reveal) their closest target. If the target unit gets closer the Dogs will then start running towards their prey and then sprint. A vicious attack on the victim follows.

- Unlike the patrol Dogs (that are trained to disarm and attack the legs of their targets) these FERAL Dogs do full damage to their victims and will kill anyone with 6 to 8 bites.

 

vDogFeral.sqf Usage:

In the Eden Editor, on a trigger's on ACTIVATION field add: 
null = [thisTrigger,3] execVM "scripts\vDogFeral.sqf";
So in this example:
3 is the number of Feral Dogs to be added inside the trigger area.

 

 

Updates/Changelogs:

Spoiler

 

vDog Patrol and vDog Feral Scripts version 1.3b "FERAL DOGS" RELEASED! (04/24/19)

 

Release highlights/Changelog:

1.3:

- Now includes a brand new script that adds Multiplayer Compatible FERAL DOGS! to your missions by using just a trigger! (MORE DETAILS BELOW).

These wild dogs roam their territory (trigger Area) in packs and viciously attack anyone who invades their space but will not pursue targets outside of this area.

- Both the vDog Patrol and vDog Feral have a new damage model. Now the damage adds up the more the dogs bite a particular target. (Previously the damage was flat meaning that the dogs could never kill their target).

- Added ACE 3 support! (The script will now defect if you are using ACE 3 and apply the correct damage commands that work with ACE MEDICAL).

- Final tweaks to sounds volume/distance ratios. (Now dogs can be heard over longer distances).

1.3B (HotFix):

- Updated the Dogs attack distance so they don't reach enemies who are high above the ground.

- Updated and Improved the Demo Mission with both Patrol Dogs and Feral Dogs present and examples with Patrol Dogs on Player, on Ai enemy and Feral Dogs Guarding a tower as their territory by using a trigger.

- Updated Readme Files to show latest changes.

 

vDog Patrol Script version 1.2 "WINTER IS HERE" RELEASED! (04/14/19)

 

Release highlights/Changelog:

 

- Removed the CBA Community Based addons dependency! (Still recommended thou just in case!)

- Improved sounds volume/distance ratios. (Now uses remoteExec Say3d).

- (Optimization) The script now stops if the Owner of the Dog does not have simulations enabled (enableSimulation false;). This makes the script much lighter when combined with good dynamic simulation values.

- The dogs will now disengage targets if they get 120 mtrs away from them or their owners. (Previously the dogs would never stop chasing a target once it was selected and until it was dead.)

- The script has a random delay so it does not get loaded while all the other mission scripts are being loaded. (Dogs take up to a minute to be fully loaded into your mission session to prevent potential stutters.)

 

Special Thanks and Credits:

Spoiler

 

This Script would not have been possible without the awesome and kind help of johnnyboy.

For single player missions I recommend everyone to check out johnnyboy's JBOY Dog script. It is light years ahead of anything else in terms of more complex features. (Link below).

 

Adapted from the amazing work of Monovdd / Carlos A. Arango S. and Team Condor. http://www.armaholic.com/page.php?id=15304

 

 

Known Limitations:

Spoiler

 

Because of the way BI implemented animals in Arma 3 the vDogs:

- Are not valid targets for other Ai so they are best used against players. As work around the vDog Patrol dogs stop attacking if their owner/handler dies while the vDog Feral dogs will only attack enemies inside their territory.

- Animals have no collisions so they go through solid objects and structures like walls, doors etc. As work around I made the dogs slower than humans in full sprint and another way to escape them is to get to a higher place.

- Dogs have no attack animations so I had to give them a sort of "acceleration" when attacking targets to sort of "emulate" a bite.

 

 

Please don't hesitate to post any questions, suggestions, bugs and testing reports.

 

Enjoy.

  • Like 4
  • Thanks 2

Share this post


Link to post
Share on other sites

Very nice !

Thank you very much LSValmont and congratulations for the release !

  • Thanks 1

Share this post


Link to post
Share on other sites

I am just following your footsteps Dear George!

 

Still left like 200 scripts just to break even with you!

  • Haha 2

Share this post


Link to post
Share on other sites

I would suggest to make an announcement here as well :

Thanks LSValmont !

 

+ keep it up !  :thumbs-up:

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, GEORGE FLOROS GR said:

I would suggest to make an announcement here as well :

Thanks LSValmont !

 

+ keep it up !  :thumbs-up:

 

Done! Thanks for the heads up!

  • Thanks 1

Share this post


Link to post
Share on other sites

vDog Patrol Script version 1.2 "WINTER IS HERE" RELEASED!

 

Release highlights:

 

- Removed the CBA Community Based addons dependency! (Still recommended thou just in case!)

- Improved sounds volume/distance ratios. (Now uses remoteExec Say3d).

- (Optimization) The script now stops if the Owner of the Dog does not have simulations enabled (enableSimulation false;). This makes the script much lighter when combined with good dynamic simulation values.

- The dogs will now disengage targets if they get 120 mtrs away from them or their owners. (Previously the dogs would never stop chasing a target once it was selected and until it was dead.)

- The script has a random delay so it does not get loaded while all the other mission scripts are being loaded. (Dogs take up to a minute to be fully loaded into your mission session to prevent potential stutters.)

 

DOWNLOAD LINK: https://drive.google.com/open?id=12vnoCKFjBndIdRrSYo4WSXb8H4WlAtJr

  • Like 2

Share this post


Link to post
Share on other sites

Seems nice ^^  :thumbsup:

Might even include it in one of my missions too..

  • Like 2

Share this post


Link to post
Share on other sites

This is awesome LSValmont ! Really nice work. I am having fun with it. Does anyone know how I can turn the damage into ACE3 damage. We use the ace3 medical system but when the dog bites, we don't show damage in ACE. Sorry random question just would love to integrate these dogs into our upcoming mission. 

  • Thanks 1

Share this post


Link to post
Share on other sites

I don't know how ACE3 damage works but the dogs currently only do LEG damage by using the following commands:

_rdmBiteDamage = selectRandom [0.5,0.6];
_closestHuman setHitPointDamage ["hitLegs", _rdmBiteDamage];

That way the dog always cripples the target but never kills it.

 

If that does not work with ACE3 you could try the most basic command so:

 

Replace these lines:

_rdmBiteDamage = selectRandom [0.5,0.6];

_closestHuman setHitPointDamage ["hitLegs", _rdmBiteDamage];

With these:

_humanDmgCheck = damage _closestHuman;    

_biteDamage =  _humanDmgCheck + 0.3;

_closestHuman setDamage _biteDamage;

 

Let me know if that works for you (and ACE3).

Share this post


Link to post
Share on other sites
5 hours ago, LSValmont said:

Let me know if that works for you (and ACE3).

Also running ACE Adv Med.

 

No, it throws an error missing a )

Share this post


Link to post
Share on other sites
1 hour ago, RL - AVE said:

Also running ACE Adv Med.

 

No, it throws an error missing a )

 

Try this then:

 

Replace these lines:

_rdmBiteDamage = selectRandom [0.5,0.6];

_closestHuman setHitPointDamage ["hitLegs", _rdmBiteDamage];

With these:

_humanDmgCheck = damage _closestHuman;

_biteDamage =  _humanDmgCheck + 0.3;

_closestHuman setDamage _biteDamage;

 

Please let me know if it works now.

Share this post


Link to post
Share on other sites

_closestHuman setDamage _biteDamage;I#I

[_closestHuman, "dogVictim"] remo...'

Error Invalid number in expression

 

line 273

Share this post


Link to post
Share on other sites
11 minutes ago, RL - AVE said:

_closestHuman setDamage _biteDamage;I#I

[_closestHuman, "dogVictim"] remo...'

Error Invalid number in expression

 

line 273

 

Ok final attempt:

 

Replace these lines (Original Script):

_rdmBiteDamage = selectRandom [0.5,0.6];

_closestHuman setHitPointDamage ["hitLegs", _rdmBiteDamage];

 

Or these new lines:

_humanDmgCheck = damage _closestHuman;

_biteDamage =  _humanDmgCheck + 0.3;

_closestHuman setDamage _biteDamage;

 

With This:

[_closestHuman, 0.6, "leg_r", "bullet"] call ace_medical_fnc_addDamageToUnit;

  • Like 1

Share this post


Link to post
Share on other sites
5 minutes ago, LSValmont said:

[_closestHuman, 0.6, "leg_r", "bullet"] call ace_medical_fnc_addDamageToUnit;

 

vDog Patrol Multiplayer Script is with this change now ACE compatible! 

  • Like 1

Share this post


Link to post
Share on other sites

vDog Patrol and vDog Feral Scripts version 1.3 "FERAL DOGS" RELEASED!

 

Release highlights/Changelog:

 

- Now includes a brand new script that adds Multiplayer Compatible FERAL DOGS! to your missions by using just a trigger! (MORE DETAILS BELOW).

These wild dogs roam their territory (trigger Area) in packs and viciously attack anyone who invades their space but will not pursue targets outside of this area.

- Both the vDog Patrol and vDog Feral have a new damage model. Now the damage adds up the more the dogs bite a particular target. (Previously the damage was flat meaning that the dogs could never kill their target).

- Added ACE 3 support! (The script will now defect if you are using ACE 3 and apply the correct damage commands that work with ACE MEDICAL).

- Final tweaks to sounds volume/distance ratios. (Now dogs can be heard over longer distances).

 

DOWNLOAD:

Demo Mission version 1.3 DOWNLOAD Link (Google drive): https://drive.google.com/open?id=1T75uuzKGmTn29dWxYvtIEaNPxItY6Rb2

Demo Mission version 1.3 DOWNLOAD Link (Armaholic) http://www.armaholic.com/page.php?id=35026

 

 

vDog Feral Details:
 

Spoiler

vDogFeral.sqf details and differences with the vDogPatrol.sqf:

- Feral dogs do not require a unit to work like the patrol Dogs, just a trigger created via Editor or via Script.

- The Area of the trigger will be the Feral Dogs's Territory.
- You can set the trigger activation to any condition. Set condition to True to spawn the feral dogs on mission start.
- The dogs initially bark and point (reveal) their closest target. If the target unit gets closer the Dogs will then start running towards their prey and then sprint. A vicious attack on the victim follows.

- Unlike the patrol Dogs (that are trained to disarm and attack the legs of their targets) these FERAL Dogs do full damage to their victims and will kill anyone with 6 to 8 bites.

 

vDogFeral.sqf Usage:

In the Eden Editor, on a trigger's on ACTIVATION field add: 
null = [thisTrigger,3] execVM "scripts\vDogFeral.sqf";
So in this example:
3 is the number of Feral Dogs to be added inside the trigger area.

 

 

  • Like 2

Share this post


Link to post
Share on other sites
On 4/23/2019 at 9:26 AM, LSValmont said:

vDog Patrol Script version 1.3 "FERAL DOGS" RELEASED!

 

1.3B (HotFix) RELEASED:

- Updated the Dogs attack distance so they don't reach enemies who are high above the ground.

- Updated and Improved the Demo Mission with both Patrol Dogs and Feral Dogs present and examples with Patrol Dogs on Player, on Ai enemy and Feral Dogs Guarding a tower as their territory by using a trigger.

- Updated Readme Files to show the latest changes.

 

1.3B Demo Mission DOWNLOAD LINK (Google Drive): https://drive.google.com/open?id=1AJ0NYIAVklLT1jBwq4x4d47EoKiiFaUs

1.3B Demo Mission DOWNLOAD LINK (Armaholic): http://www.armaholic.com/page.php?id=35026

  • Like 2

Share this post


Link to post
Share on other sites

Hiho, 

 

Something i noticed when using the original jbdog scripts is, that patrol or guard dogs would start to run in circles once its doghandler AI is killed,I assume because the dog gets stuck in a loop waiting for new commands. 

I have not been able to test your version yet or to properly read through all the posts/info, but have you considered this/come across this? 

 

We would need to add an exit condition that checks if the AI handler is dead, i assume. 

 

Cheers

Vd

  • Like 1

Share this post


Link to post
Share on other sites
27 minutes ago, Vandeanson said:

Hiho, 

 

Something i noticed when using the original jbdog scripts is, that patrol or guard dogs would start to run in circles once its doghandler AI is killed,I assume because the dog gets stuck in a loop waiting for new commands. 

I have not been able to test your version yet or to properly read through all the posts/info, but have you considered this/come across this? 

 

We would need to add an exit condition that checks if the AI handler is dead, i assume. 

 

Cheers

Vd

 

That is correct Vandeanson, the vDog Patrol script only runs under 2 conditions: The Ai handler is alive and the handler unit has its simulations enabled. If players are far away and the handler has its simulations disabled then the dog script is put on hold. If the handler is dead then the script tells the dog to play an idle animation and then exits. The dog now is like any regular ambient dog and will consume next to no resources.

 

Here are the code snipes that deal with that:

waitUntil {Sleep (2 + (random 2)); simulationEnabled _dogOwner && alive _dogOwner};

        while {alive _dog} do 
        {
            if (simulationEnabled _dogOwner) then {
            
         if (alive _dog && !alive _dogOwner) exitWith {_dog playMove "Dog_Idle_Stop";};

        if (!alive _dog) exitWith 
        {
        _dogGrpSideLogic = createGroup sideLogic;
        _deadDogLogic = _dogGrpSideLogic createUnit ["logic", getPos _dog, [], 0, "none"];
        [_deadDogLogic, "dogCry"] remoteExec ["say3D"];
        sleep 5;
        deleteVehicle _deadDogLogic;
        };
        if (alive _dogOwner && !(simulationEnabled _dogOwner)) then {[_dog, false] remoteExec ["enableSimulationGlobal",2]; sleep (10 + (random 10));} else {[_dog, true] remoteExec ["enableSimulationGlobal",2];};

Another thing to consider is that because this is a MULTIPLAYER focused script I had to put several and often random sleeps so the vDogs will never be as responsive as the JBOY Dogs.

 

That only means that in order to maximize optimization I had to make some concessions. The vDogs therefore do not react instantly to their ai/player handler's actions nor to their targets actions but it is still (or even more) realistic than dogs instantly picking up targets or reacting to their owners actions in a second.

 

They do what they are intended to do (alert its owner of enemy presence) quite well even if their attacks and speed are not as deadly as JBoys. 

  • Thanks 1

Share this post


Link to post
Share on other sites

Aaaaawe

... 

... 

... 

... Wait for it.. 

... 

... 

Some! 

  • Like 1

Share this post


Link to post
Share on other sites
8 hours ago, Vandeanson said:

Something i noticed when using the original jbdog scripts is, that patrol or guard dogs would start to run in circles once its doghandler AI is killed,I assume because the dog gets stuck in a loop waiting for new commands.  

I never thought of that.  That behaviour was intended for player controlled dog so that when player killed, dog circles dead player and mourns him (which is ok for SP).  I *think* for AI controlled dogs, if handler is killed, control of dog goes to next alive AI in same group.  If no more alive AI, then dog may go in circles again.  When no AI handlers alive in group, I should probably change the code so dog becomes feral or he joins next nearest AI of same side, or he runs away and is deleted when not near a player.

 

On 4/12/2019 at 1:20 PM, LSValmont said:

vDog Patrol and vDog Feral Scripts by Valmont are long time requested scripts that allows mission makers to easily add MULTIPLAYER COMPATIBLE patrol and feral Dogs to their missions in Arma 3.

Good job LSValmont!  The fact is, I will probably never get around to making JBOY Dog MP compatible, so you are filling a real need.  Thanks.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
1 hour ago, johnnyboy said:

Good job LSValmont!  The fact is, I will probably never get around to making JBOY Dog MP compatible, so you are filling a real need.  Thanks.

 

Thank you johnny, that compliment is a real honor specially coming from the father of all Arma 3 Dogs. 😄

 

Technically you filled the need for a Dog companion in Arma 3 first... and we all know BI didn't make it easy for you... 

 

To be honest I was about to give up on it until you came up with amazing ideas to make it work.

 

I make all my missions MP since all my family plays on a LAN so I really needed these scripts too. 😊

 

Believe it or not but Arma 2 had much better animal behavior than Arma 3. If Arma 2 was 64 bit I would be playing that...

  • Like 2

Share this post


Link to post
Share on other sites

Excellent work sir! love it thanks. been looking at this a while. One possible hitch, the damage to player by dog worked fine when hosting, but on a Dedicated server the dog attack & sound effects worked OK, but player did not get injured? may be a dedicated server problem.

 

  • Thanks 1

Share this post


Link to post
Share on other sites
1 hour ago, jgaz-uk said:

Excellent work sir! love it thanks. been looking at this a while. One possible hitch, the damage to player by dog worked fine when hosting, but on a Dedicated server the dog attack & sound effects worked OK, but player did not get injured? may be a dedicated server problem.

 

 

I am glad you are enjoying the vDogs scripts!

 

Was your issue with the Patrol Dogs or the Feral Dogs?

 

Because Patrol Dogs cannot kill players only hurt their legs.

 

Are the enemies falling unconscious or not even that? 

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

×