Jump to content
johnnyboy

JBOY Dog [v1.5 - updated 12/21/2018]

Recommended Posts

/**********************************************************************************************************
Track
**********************************************************************************************************/
	_TackAction = _handler addAction ["Dog: Track",
    {
	_dog=_this select 3 select 0; 
         if (isnull (attachedTo _dog)) then  // can't track if dog in vehicle 
        {
            _scentTrailDetectDistance = _dog getVariable "vScentTrailDetectDistance";
            _scentMarkers = nearestObjects [_dog, ["Sign_Arrow_Large_Cyan_F"], _scentTrailDetectDistance] ;
            if ((count _scentMarkers) > 0) then
            {
            // trail needs at least 2 markers...this sometimes happens when attacking prey, previous markers deleted, and only one new marker created for prey survivor
                _preyTrackingObj = (_scentMarkers select 0) getvariable "prey";
                _trail = _preyTrackingObj getVariable "trail";
                if ((count _trail) > 1) then             
                {
                    _scentMarker = _scentMarkers select 0;
                    _dog setVariable ["vCurrentScentMarker",_scentMarker,true];
                    _dog setVariable ["vMoveToPos", getpos _scentMarker, true]; 
                    _dummy= [_scentMarker] execVM "JBOY_Dog\JBOY_DogScentDeleteOlderScent.sqf";
                };  
            };
            // if above does not find a new closer scentmarker, there still may be an older scentmarker known to dog that causes next if to be true.
            if !(isnull (_dog getVariable "vCurrentScentMarker")) then
            {
                _dog setVariable ["vCommand", 'track', true];
            } else
            {
                _dummy= [_dog, .3, "whimper1","Whimper"] execVM "JBOY_Dog\delaySay.sqf";
            };
        };
    }, [_dog]];

i add this for track action in  dog_assign_action.sqf, but it doesn't appear in wheel menu

 

And I don't know if it's bug: if the dog was killed, the option take dog not appears

Share this post


Link to post
Share on other sites

I tried adding this but it wont spawn the dog and I am not getting the dog menu. This was done on altis life

Share this post


Link to post
Share on other sites
On 3/26/2017 at 8:33 AM, superordi said:

i add this for track action in  dog_assign_action.sqf, but it doesn't appear in wheel menu

 

And I don't know if it's bug: if the dog was killed, the option take dog not appears

Since you got the Action menu to work, I'm confident this Track action can be added in and made to work also.  However, I have zero time right now to correct it for you myself.

 

Regarding dog being killed, I hadn't thought of the scenario where dog gets killed, so you get option to go get another dog.  But that would be easy for you to script.  Use same commands that are in init.sqf to create a dog, and give the player option to take him.

 

 

Share this post


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

I tried adding this but it wont spawn the dog and I am not getting the dog menu. This was done on altis life

Hi Androxe, thanks for the interest.

 

I don't know anything abot the Altis Life mod, and I don't plan to learn it.  But I believe @TheGreenOrange has been integrating the dog into the orgobyte Humanity RP mod, and succussfully got the dog to spawn (I think).  Maybe he can offer some advice.

 

Regardless, you need to provide more details of your problem.  Your simple problem statement is not enough information for someone to help you.   Good luck!

Share this post


Link to post
Share on other sites

I haven't checked out this thread for awhile.   But in the mean time I have some locations of where to put the doggie for some RHS vics.   Instructions on how to add these custom ones are on page 5.

 

Classname                                       Location

 

rhsusf_m1025_d_m2                       0,-0.5,-1.18

rhsusf_M1232_M2_usarmy_d         -0.05,-1.5,0.3

rhsusf_rg33_M2_d                           0,-1.3,-1.01

rhsusf_M1117_D                               0.2,0.12,-1.24

 

 

These locations seem to look good for onlookers that are seeing the dog from the outside.  Strangely enough, when you enter these vehicles, the dog is not visible  :eh:

Otherwise it is functional.  Enjoy.

 

--ATV

  • Like 1

Share this post


Link to post
Share on other sites
23 minutes ago, accuracythruvolume said:

These locations seem to look good for onlookers that are seeing the dog from the outside.  Strangely enough, when you enter these vehicles, the dog is not visible  :eh:

Otherwise it is functional.  Enjoy.

Thanks ATV, I will put them in the next release so others benefit from your effort.  How about a screenshot per vehicle so we can admire Boomer's new rides?  (And help people decide what vehicles to choose).

 

Regarding dog not visible inside, that is a weird model thing with attached objects and vehicles.  Most new vehicles it seems to work ok.  With others, when you are in vehicle, the dog (or any attached object) will appear to be attached outside the vehicles to player.  And sometimes it depends if player is in first person or 3rd person view.  Nothing I can do about that.  And with some vehicles it depends what position player is in the vehicle (driver sees dog outside vehicle, other positions see dog inside vehicle).


But it always looks good for players not in vehicles.

 

I had this problem a long time ago, when I wanted to place a rifle in the offroad cab back window like a redneck rifle rack, but driver could not see the attached object.

 

Thanks for thse contributions!  When will we see a mission posted?

Share this post


Link to post
Share on other sites

I think it has to do with BI's method of vehicle interiors.   Tanks are the best example.    Just hop in a tank with an interior and then go into zeus and clip through it to see where you are.   Often times things don't match up in the "world" vs. "what your viewpoint sees" all of the time.   Either way,  I'll take a look at some more vics and find some more workable locations.    I'll try to remember to snag a screenshot, because seeing how they look is always handy.

 

--ATV

  • Like 1

Share this post


Link to post
Share on other sites

Fantastic script Johnny!

 

I'm running in to a couple of hurdles while trying to set up a situation where you are pursuing a group of enemies, but they aren't in formation (some have stopped moving or are positioned along the dog's 'trail', to act as rearguards etc). A few questions (please bear with me as I'm a total novice when it comes to scripting): 

 

- While tracking or 'heeling' is there a way to get the dog to detect enemies in the same group as the main target, and report them as a contact? I've tried defining them as 'prey' by adding them to the init.sqf e.g. 

 

Spoiler

_dmy = [quarry1, quarry2, quarry3] spawn {params["_prey"];sleep 2; preyObject1=[_prey] call JBOY_dogPreyInit;}; 

 

but that returns errors (and is probably dumb). 

 

- Is there a way to modify the dog's HP (mission is taking place in hilly terrain, so he's accidentally injuring himself falling off of rocks/down slopes fairly often...)

 

- Is there a way of tweaking/reducing the objects dropped by the quarry? 

 

Thanks again for the script!

 

Share this post


Link to post
Share on other sites
2 minutes ago, riggs said:

While tracking or 'heeling' is there a way to get the dog to detect enemies in the same group as the main target, and report them as a contact? I've tried defining them as 'prey' by adding them to the init.sqf e.g. 

That's a known issue.  I plan to modify it to detect, stop, growl, and look in direction of any enemy detected within 75 meters.  But currently he only detects the dude being tracked.  I won't get to this for a month or so.  It requires script logic changes.  You're welcome to dive in and try to fix it, else you have to wait.  Sorry.

5 minutes ago, riggs said:

- Is there a way to modify the dog's HP (mission is taking place in hilly terrain, so he's accidentally injuring himself falling off of rocks/down slopes fairly often...)

Another known issue.  I plan to fix it so dog doesn't take fall damage (big problem in steep jungle of Tanoa).  You could look at the dog_create script where his handle_damage eventhandler is created.  That can be changed to not take damage if source of damage is not a unit.  Once again, make the changes yourself, or wait a month or so.  I also plan to add a heal action on the dog so you can heal him.  And maybe make him incapacitated instead of dead, so you can always heal him and continue mission.  Adding a heal action is something you could script outside of my scripts if you wanted.  Spawn a loop watching damage of dog, and add a heal action to the dog if damaged.  The heal action would just have unit who plays the action play a heal animation, then set the dog's damage to zero.

 

9 minutes ago, riggs said:

- Is there a way of tweaking/reducing the objects dropped by the quarry? 

Yeah, there's a script that with an array of objects that can be dropped.  You could tweak what objects are dropped, and the frequency.  Right now I think that its too frequent (less objects should be dropped).  I'm away from my arma computer, and heading out for a 10 day vacation, so can't tell you which one that is right now.

 

I do plan on improving the dog in about a month.  Other features planned:

- detect bombs, mines, drugs, money (i.e., any object you tell it to).

- detect any enemy within 75 meters

- script AI Handlers to detect a scent trail and AI commands dog to follow trail (and AI follows dog until combat)

- script AI Handlers to command dogs to attack detected enemies.

- and more I can't remember right now!

 

Anyway, I'm stoked you are using it, and appreciate the feedback.  Please post a link to your mission, a video, or screenshot when you are ready to share something.

Share this post


Link to post
Share on other sites

Thanks for the quick response, it's appreciated. 

 

I was going to ask about the mine detection (I tried the snippet M1ke posted earlier in the thread but couldn't make it work, again, novice scripter!) - unfortunately that + the tracking group members are integral to what I want to achieve, so unless I somehow stumble into a solution with beginner's luck, I'll be eagerly awaiting the next version!

 

It'll be a very small/basic mission as it's (potentially) going to be the first one I've ever finished...but I'll let you know when/if it's ever playable.

 

Enjoy the vacation. :)

 

 

Share this post


Link to post
Share on other sites

Just wanted to share with you all my progress....

 

We have working dogs on the Vertigo Network RP server (dedicated).

 

 

Share this post


Link to post
Share on other sites

Now for the life of me.....I cannot get an Addaction command to work and spawn a dog via scroll wheel action.  Probably because ive been looking at this code for 3 days straight

Share this post


Link to post
Share on other sites
On 4/20/2017 at 2:56 PM, T.Gavin said:

Now for the life of me.....I cannot get an Addaction command to work and spawn a dog via scroll wheel action.  Probably because ive been looking at this code for 3 days straight

Hey T.G.  Still having issues?  I just got back from vacation and saw this post.  If you're asking for help, please provide more details.

Share this post


Link to post
Share on other sites
On 4/20/2017 at 9:47 PM, T.Gavin said:

Just wanted to share with you all my progress....

 

We have working dogs on the Vertigo Network RP server (dedicated).

 

Did you have a lot of trouble to implement them or did it work "out of the box" so to speak?

 

The whole JBOY Dog thing would open up so much possibilities on mp/coop mission, its insane. Thank you for your work @johnnyboy

  • Like 1

Share this post


Link to post
Share on other sites

Excellent stuff! J thanks. Is there any way to heal the dogs? found if you just walk/bump into them they are injured. 

Or is it possible to make them harder to injure in the scripting, but then I suppose the wild dog packs would be harder to kill. so ability to heal your dog would be better.

 

Your demo mission on Stratis has absolutely everything working which makes it harder for us mere mortal mission makers to sort out the scripting.

Is there a basic mission i.e. One man & his dog, with minimum init scripting, that we could use for other missions.

 

Have tested on our a dedicated server it & found that only one player can be set as a dog handler, but then it does work!

 

The out of the box demo mission is a bit buggy on the dedicated, & if transferred to a different map the extra dogs don't spawn in behind the marker cans.

 

CORRECTION It works if you host it your self but NOT on a dedicated server the dog was doing its own thing not under control.

 

BUT its still Awesome scripting sir! especially give how buggy A3 can be!

Edited by jgaz-uk
Correction.
  • Like 1

Share this post


Link to post
Share on other sites

Thanks for the feedback @jgaz-uk.

 

MP and dedicated: I haven't worked on that, and it may be a long time before I do.  There are a couple guys who have modified the script to be MP compliant (see posts earlier in this thread).  Maybe they can help you.

 

Dog damage and Healing:  I am close to releasing a new version that allows handler to heal the dog.  And it also prevents fall damage.  Dogs were taking crazy damage when going down steep terrain, so that will no longer happen.  Collision damage with player will also not happen.  The dog damage problem is totally solved by this I think.

 

Basic Mission with minimum init:  That's a good idea.  I'll try to do that for the next release.  I'm also planning a simple tracking combat mission so people can have some fun with the dog, and clearly demonstrate what an asset he is in jungle combat.

 

Upcoming Release will have these improvements:

All these improvements are done and tested.  I just need to integrate them back to my demo mission (and perhaps to a simple Basic Mission like you suggest).

  • Player can heal dog
  • Dog no longer takes fall damage or collision damage
  • Dog detects any near enemy (current version only detected the unit being tracked by dog).  This is now a huge plus while patrolling:  Your dog stops, growls, and looks in direction of enemy.  Great for avoiding being ambushed in dense jungle or villages.
  • If handler killed, another player in group can take control of dog.
  • Dog mourns when handler killed.
  • Persistent footprints for dudes being tracked (thanks to very clever script by @HallyG)
  • Cleaned up init.sqf (moved script compiling and some global var initialization to separate script, so only need one line to call this from init.sqf)
  • Dog Command Menu has been professionally localized to:
    • Italian (thanks to @zagor64bz)
    • German (thanks to @Undeceived)
    • Spanish (thanks to Johnnyboy's bi-lingual sister)
  • Dog Command Menu has been "Google Translate Localized" (i.e., localized badly) to:
    • French
    • Portuguese
    • Russian cyrillic alphabet
    • Czech
    • Polish

Localization Help Needed:  Need native speakers to localize dog command menu to French, Portuguese, Russian Cyrillic, Czech, and Polish.  Any volunteers?  There's only about 20 short lines to translate.  Message me and I will send you the string table.

 

I'm really excited about making a real mission with Boomer now!

 

  • Like 5

Share this post


Link to post
Share on other sites

 

 That sounds....awesome

 

 What do you think about red herrings as well such as dog growling at a rabbit -so he's not an absolute 100% accurate detector. Maybe even have doggy skill levels (more accuracy) and the ability to train?

  • Like 1

Share this post


Link to post
Share on other sites
23 minutes ago, froggyluv said:

 

 That sounds....awesome

 

 What do you think about red herrings as well such as dog growling at a rabbit -so he's not an absolute 100% accurate detector. Maybe even have doggy skill levels (more accuracy) and the ability to train?

Those are great ideas.  I was thinking about animals...more for hunting than red herrings, but red herrings is brilliant (add tension and humor at same time!).

 

Regarding doggy skill levels and training...another great idea...but waaaaaaaaaaay down the priority list for me.  Another idea not likely to be implemented soon is enemy detection distance affected by weather, wind direction and wind strength.

Share this post


Link to post
Share on other sites

CORRECTION   Multi Player;  It works if you host it your self but NOT on a dedicated server, the dog was doing its own thing, & not under control. I'm going to see if I can twiddle with the init to get it to work on the Dedicated server.

 

 

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

 

Sadly the usual basic int script stuff doesn't work :down:

Tried,

//---JIP Check (This code should be placed first line of init.sqf file)
if (!isServer && isNull player) then {isJIP=true;} else {isJIP=false;};

// Wait until player is initialized
if (!isDedicated) then {waitUntil {!isNull player && isPlayer player};};

 

Will have to leave it to the experts for Dedicated...

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, johnnyboy said:

Thanks for the feedback @jgaz-uk.

 

MP and dedicated: I haven't worked on that, and it may be a long time before I do.  There are a couple guys who have modified the script to be MP compliant (see posts earlier in this thread).  Maybe they can help you.

 

Dog damage and Healing:  I am close to releasing a new version that allows handler to heal the dog.  And it also prevents fall damage.  Dogs were taking crazy damage when going down steep terrain, so that will no longer happen.  Collision damage with player will also not happen.  The dog damage problem is totally solved by this I think.

 

Basic Mission with minimum init:  That's a good idea.  I'll try to do that for the next release.  I'm also planning a simple tracking combat mission so people can have some fun with the dog, and clearly demonstrate what an asset he is in jungle combat.

 

Upcoming Release will have these improvements:

All these improvements are done and tested.  I just need to integrate them back to my demo mission (and perhaps to a simple Basic Mission like you suggest).

  • Player can heal dog
  • Dog no longer takes fall damage or collision damage
  • Dog detects any near enemy (current version only detected the unit being tracked by dog).  This is now a huge plus while patrolling:  Your dog stops, growls, and looks in direction of enemy.  Great for avoiding being ambushed in dense jungle or villages.
  • If handler killed, another player in group can take control of dog.
  • Dog mourns when handler killed.
  • Persistent footprints for dudes being tracked (thanks to very clever script by @HallyG)
  • Cleaned up init.sqf (moved script compiling and some global var initialization to separate script, so only need one line to call this from init.sqf)
  • Dog Command Menu has been professionally localized to:
    • Italian (thanks to @zagor64bz)
    • German (thanks to @Undeceived)
    • Spanish (thanks to Johnnyboy's bi-lingual sister)
  • Dog Command Menu has been "Google Translate Localized" (i.e., localized badly) to:
    • French
    • Portuguese
    • Russian cyrillic alphabet
    • Czech
    • Polish

Localization Help Needed:  Need native speakers to localize dog command menu to French, Portuguese, Russian Cyrillic, Czech, and Polish.  Any volunteers?  There's only about 20 short lines to translate.  Message me and I will send you the string table.

 

I'm really excited about making a real mission with Boomer now!

 

Could I ever want/ask for more?....AWESOME improvement JBoy!!!!

You already know that most of those changes will do wonder in the mission that you test-played!!!!

 

Thank you man!!!

 

 

  • Like 1

Share this post


Link to post
Share on other sites
11 hours ago, johnnyboy said:

professionally localized

:icon_biggrin:

 

Just as a note, I was totally drunk when translating this.

 

Spoiler

Just kidding. :icon2: 

 

Looking forward to check it out again to see how the translation feels now.

 

Good job, johnnyboy!

  • Like 4

Share this post


Link to post
Share on other sites

Updated to Version 1.3.  Get Mission Template in the top post.

I took @jgaz-uk suggestion, and made the sample v1.3 mission a simpler "basic" mission template.   You can use this mission as a starting point for building your own mission using the dog.  The sample mission and the init.sqf only have the basics you need to spawn a dog with a player handler, and a single AI unit that is dropping a scent trail to be tracked.  The init.sqf contains comments and commented out code for you to incrementally add more features to the sample mission (feral dog pack, AI dog handler, animals to hunt and fetch).  This make the init.sqf less intimidating for those new to scripting (I hope).

 

JBOY Dog V1.3 improvements:

  • Player can heal dog
  • Dog no longer takes fall damage or collision damage
  • Dog detects any near enemy (current version only detected the unit being tracked by dog).  This is now a huge plus while patrolling:  Your dog stops, growls, and looks in direction of enemy.  Great for avoiding being ambushed in dense jungle or villages.
  • If handler killed, another player in group can take control of dog.
  • Dog mourns when handler killed.  Anybody have some better sound fx for a crying sad dog they can send me? 
  • Persistent footprints for dudes being tracked (thanks to very clever script by @HallyG)
  • Cleaned up init.sqf (moved script compiling and some global var initialization to separate script, so only need one line to call this from init.sqf)
  • Cleaned up Description.ext by moving JBOY sound file config statements to an include file.
  • Dog Command Menu has been professionally localized to:
    • Italian (thanks to @zagor64bz)
    • German (thanks to @Undeceived)
    • Spanish (thanks to Johnnyboy's bi-lingual sister)
  • Dog Command Menu has been "Google Translate Localized" (i.e., localized badly) to:
    • French
    • Portuguese
    • Russian cyrillic alphabet
    • Czech
    • Polish

Need Localization volunteers for French, Portuguese, Russian cyrillic, Czech and Polish!  Please contact me if you can help.  There are only 20 simple texts to translate.

 

Sorry, but not including Persistent Footprints at this time.   @HallyG's script is beautiful, but the footprints created by createSimpleObject are very black and stand out too much (why have a dog to track when you have super dark foot prints to follow?). The script uses the same .p3d as normal footprints, but ARMA must have special code to fade and color the prints depending on what terrain you are on (Arma created prints are subtle, but the createSimpleObject prints are in-your-face).  I hope to later do a hybrid approach where I capture player prints and save them in an array, and then setpos them to positions using HallyG's script.

  • Like 4

Share this post


Link to post
Share on other sites

Now translated to French also (merci @pierremgi!).

 

If you want the French menu, then replace the stringtable.xml file with this one:

https://www.dropbox.com/s/schj7r90hryuyn3/stringtable.xml?dl=0

 

I will include it in the next official update of JBOY dog also.  

Profitez Chien JBOY  en français!

Command_Menu_French_2.jpg

 

  • Like 1

Share this post


Link to post
Share on other sites

Awesome again! Thanks for that & nice test mission on Tanoa. Quite realistic having to get the dog to bark in the jungle to keep up with it, or not :eh:

 

I made a mission on ArmA 2 Prison Break where AI guards had dogs that would attack you if you left a compound (setcaptive trigger area) could that be done with this 1.3 version in Arma 3

 

  • Like 1

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

×