Jump to content
johnnyboy

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

Recommended Posts

I've been playing around with the script for some time now. Although it's excellent work, I noticed two issues (apart from dogs ignoring map objects, which you already mentioned in your "known issues" list).

 

- Hand signs seem to continue throughout each attack, which becomes annoying when trying to fire a weapon

- The dog (sometimes?) moves away about a hundred meters after an attack, which can quickly get you into trouble if there are multiple enemies around

 

And it would be awesome to see compatibility for RHS vehicles, although this is not urgent  :P.

 

Thank you so much again for this great script anyway.

Thanks for the issue report.  I noticed the same 2 issues, and they should be fixed in next release.  In next release, after an Attack the dog should automatically go into Stay mode, staying near who he attacked.  And you can re-command him to Heel or any other command from there.

 

Regarding Vehicles--especially addon vehicles--I doubt I'll get around to supporting every one.  But I will support any vehicle where people do the leg work.

 

I'll support any vehicle if you (or anyone) provides the following:

  1.  Name of Vehicle object
  2. Relative position on vehicle to attach dog
  3. AI vehicle cargo position number that we should lock so an AI unit does not board vehicle and clip with the dog (if applicable)

To find the relative position, create an empty mission, create a dog, and use this command to attach the dog to the vehicle:

dog1 playMove "Dog_Sit";
dog1 attachTo (myRHSTruck modelToWorld [0,0,0]);

Then preview the mission and see where dog attaches.  Via Command Console, tweak the [x,y,z] offset values in modelToWorld command, until the dog is exactly where you want him (flat on surface, not clipping with vehicle).  Record the offset and send me the info above, and I will add the vehicle to the supported list.

 

I will also show you where to alter the code to support the vehicle so you don't have to wait for my next release.

  • Like 1

Share this post


Link to post
Share on other sites

I think it is possible (using memory points or turret locations) to find all seats in vehicle, check if empty and then attach dog to memory point.

Share this post


Link to post
Share on other sites

I think it is possible (using memory points or turret locations) to find all seats in vehicle, check if empty and then attach dog to memory point.

I tried that, but it only looked good in the back of flat trucks.  Any other seats or benches dog clipped into vehicle.  So if you want it to look clean you have to tweak the relative position until it looks good.  Thanks though!

Share this post


Link to post
Share on other sites

That sounds fantastic, johnnyboy. It's also great to see you're open to work with the community. Although my understanding of commands, scripts, etc. is quite limited, I will try to find out the values I need to provide so you - or we - can edit the code to make those vehicles compatible. It seems rather straightforward, now that you explained it. Thank you again!

Share this post


Link to post
Share on other sites

That is really cool...I remember A2 had a dog mod that was used to locate bombs and IEDs..going to try this out..thanks for sharing it!

 

 

Diesel

  • Like 1

Share this post


Link to post
Share on other sites

...

 My idea for tracking is to run a loop on the hunted unit, where we record his current position in an array every 30 seconds or so.  This array becomes the scent trail for dog to follow.  Its easier to send dog directly to target's position, but that is cheating and does not truly simulate tracking.  I also want the tracking code to allow for a predefined array of positions (a "path") to be used by the dog as well.  This would be for scripted mission.  Example:  K9 cop at murder crime scene, dog picks up trail of murderer, and dog follows pre-defined path to murderer location.

 

Sounds great. I'm halfway into a similar script, my approach is to use an Arrow-HelperObject created locally on the server dropped every X seconds by the tracked unit. On this object I can setVariable more meta data like a timestamp. My main benefit is being able to use nearestObject to find the next path segment.

 

Works well. I'm still missing things like attacking animation and interaction with the dog though and have been busy with other things in the meantime, so I hope your script to make mine obsolete, hehe.

 

Edit: Feel free to take a look at wip https://github.com/gruppe-adler/a_st_searchDogs.Desert_E/tree/master/GRAD_searchDogs

  • Like 1

Share this post


Link to post
Share on other sites

Sounds great. I'm halfway into a similar script, my approach is to use an Arrow-HelperObject created locally on the server dropped every X seconds by the tracked unit. On this object I can setVariable more meta data like a timestamp. My main benefit is being able to use nearestObject to find the next path segment.

 

Works well. I'm still missing things like attacking animation and interaction with the dog though and have been busy with other things in the meantime, so I hope your script to make mine obsolete, hehe.

 

Edit: Feel free to take a look at wip https://github.com/gruppe-adler/a_st_searchDogs.Desert_E/tree/master/GRAD_searchDogs

Danke Nomisum!  I'll take a look for sure.  Using objects for the breadcrumbs is an interesting idea.  So far I'm just planning on an array of positions.  When dog near enough to an array position the hunt begins.  To track the hunted you increment forward in array.  To back-track, you decrement through the array.

 

What are some use cases for meta-data per breadcrumb?

 

Anyway, thanks much.  A lot of people have contributed to this script, which is great.  :)

 

EDIT:  Wow!  I'm reading your scripts and you have done alot.  Great job.  I think your overall approach is cleaner than mine.  I should refactor, but I'll never have the time for that sadly.  There is absolutely code plus sound fx I'd like to borrow, and you will be credited of course!  Thanks again.  Also, if you want to continue developing your dog script, and use anything from mine, that would also be perfectly ok with me.

  • Like 1

Share this post


Link to post
Share on other sites

Danke Nomisum!  I'll take a look for sure.  Using objects for the breadcrumbs is an interesting idea.  So far I'm just planning on an array of positions.  When dog near enough to an array position the hunt begins.  To track the hunted you increment forward in array.  To back-track, you decrement through the array.

 

What are some use cases for meta-data per breadcrumb?

 

Anyway, thanks much.  A lot of people have contributed to this script, which is great.  :)

 

EDIT:  Wow!  I'm reading your scripts and you have done alot.  Great job.  I think your overall approach is cleaner than mine.  I should refactor, but I'll never have the time for that sadly.  There is absolutely code plus sound fx I'd like to borrow, and you will be credited of course!  Thanks again.  Also, if you want to continue developing your dog script, and use anything from mine, that would also be perfectly ok with me.

 

Thanks! Feel free to rip whatever you want. Glad to be of help! It's my first time doing AI, so I wanted to be as clean as possible not to get an unreadable piece of code.

 

The sounds are only definitions as of now, but IIRC I prepared some of them already locally. I am currently in holidays but will check asap after returning home, which should be next week. 

 

@breadcrumb: Currently I am only storing the timestamp for identifying the newest of the nearestObjects (strongest smell) and a "smellStrength", which I wanted to use later on, for example increasing the smell if the target stays longer on the same place or weather influences wash smell away... you could also tweak smell-strength depending on the stance of the target, so laying down produces a bigger smell. My plan was to use this in our TvT scenario with a downed pilot hunted by opposing sides, so everything to make being hunted more interesting to the pilot and real possibilities to outsmart the dog and not magically get tracked were my goals.

 

How were you planning to find out the nearest position in an growing array? I think it could really hit performance, the longer the tracked path becomes.

Share this post


Link to post
Share on other sites

Now updated to Version 1.1.  Download link in original post is for demo mission updated to v1.1. Use the T Key to invoke new dialog menu.

 

Version 1.1 Change Log:

  • New clean dialog menu thanks to Soolie!  Replaced clumsy actions menu with menu dialog accessed via T key.
    • (Cosmic10R:  Your number menu is also awesome, but I chose no-addon required route for now.  Maybe in the future I will support both.  It shouldn't be too hard to plug it in. Thanks much for the contribution though!)
  • Feral Dog Packs:  Feral dog packs roam, and attack whoever they encounter, then roam again.  Can be spawned by a trigger when player enters an area.  Kudos to AZ Coder for some logic and ideas.
  • Improved AI fighting dogs.  Not perfect though.  Very difficult since AI doesn't recognize dogs as enemy.
  • MP compatibility changes to JBOY Dog that Persion MO recommended to fix JBOY Chicken.  JBOY Dog not MP tested though...any volunteers?
  • Dogs now attack and fetch snakes.
  • JBOY Dog now includes latest version of JBOY Chicken.
  • Fixed bug where multiple hand signals given during attack.
  • Dogs now stop after attacking person (instead of running off).
  • Many small improvements/tweaks.
  • A few more cool dog sound fx thanks to AZ Coder.

Now Steam is updating my ARMA 3 to version 1.66.  I'm praying feverishly that dogs have not been broken by this new version!!! :suspicious:

 

Please report any bugs or suggestions!  Cheers all.  :cheers:

 

See new menu and Dog Packs in action:

  • Like 5

Share this post


Link to post
Share on other sites

Hicks and co. ain't got shit on JBOY!

 

Very nice update dude. Thanks.

  • Like 1

Share this post


Link to post
Share on other sites

Great job! Happy to see something I made(even a simple ui) in such a cool addon!

  • Like 2

Share this post


Link to post
Share on other sites

Now Steam is updating my ARMA 3 to version 1.66.  I'm praying feverishly that dogs have not been broken by this new version!!! :suspicious:

 

 

I know right? LOL  My first thought too, about all the mods I use.

 

Also I found a bug in my campaign because your vicious dogs killed off an entire AI team, and that team became a null value that one of my other scripts did not expect, haha. So thanks!

  • Like 1

Share this post


Link to post
Share on other sites

Saw this only today - wow, that's amazing, johnnyboy! Fantastic work!

  • Like 1

Share this post


Link to post
Share on other sites

Hicks and co. ain't got shit on JBOY!

 

Very nice update dude. Thanks.

Haha.  Thanks EO!

 

Great job! Happy to see something I made(even a simple ui) in such a cool addon!

Thank you sir!  It would have taken me forever to figure out menus on my own, so you saved me tons of time.

 

Also I found a bug in my campaign because your vicious dogs killed off an entire AI team, and that team became a null value that one of my other scripts did not expect, haha. So thanks!

:icon_dj:   All part of my evil plan dude.  Wait til you see what they can do to an armored column! 

 

New version frontpaged on the Armaholic homepage.

 

To the ever-vigilant Foxhound:  Thanks again!

 

Saw this only today - wow, that's amazing, johnnyboy! Fantastic work!

Thanks Undeceived.  You may not know it yet, but your next awesome plot-driven mission needs a good canine character... :bb:

  • Like 2

Share this post


Link to post
Share on other sites

Too good! Totally needed this, the dogs were just a wee bit brain lacking I suppose. 

  • Like 1

Share this post


Link to post
Share on other sites

Fantastic work! This will see a direct implementation into the newest version of my scenario (including wild dog packs). Haven't had the time to test it myself yet, but from what the video shows I can pretty much say that there are some major improvements. Congrats! Keep up the great work.

 

EDIT: I don't want to disappoint you, but so far I've only implemented the wild dog packs because the dog that accompanies the player lead to some issues (don't know the details) and he's too slow to follow the player in this type of mission. Hopefully I'm able to add it again later on ;) .

  • Like 2

Share this post


Link to post
Share on other sites

There's a bug with the menu. It's using createDisplay instead of createDialog so you can move with the menu open. Trouble is, the list of commands respond to keypresses.

So, if you have the menu open and hit "D" in order to move right, you select "D"etain on the list.

I'm not 100% on this but I think the only ways to fix it are -

Change it to createDialog so you can't move with the command menu open ,

Change the names of any commands starting with "WASD", 

or possibly add keyhandlers for WASD that negate any selections they make.

 

ex. of what a keyhandler might do

if menu is open & keypress is in [w,a,s,d] then
continue previous dog command
_ctrl lbSetCurSel -1;// deselects item in listbox
  • Like 1

Share this post


Link to post
Share on other sites

 

There's a bug with the menu. It's using createDisplay instead of createDialog so you can move with the menu open. Trouble is, the list of commands respond to keypresses.

So, if you have the menu open and hit "D" in order to move right, you select "D"etain on the list.

I might have to fire my menu guy... ;)

 

Just kidding...thanks much for the report.  I noticed this problem, but it didn't bother me until now when I added a grenade to the player.  So hitting G key executes the Dog Get In command AND throws a grendade.  Not good.

 

My quick fix is to prefix all the options with a dash in the menu display.  Menu still looks good, player can use WASD to move around, and dash "-" key less likely to be a problem.

 

Anyone wanting to fix this in their version of JBOY Dog should do the following:

 

1. Edit this file:  JBOY_Dog/JBOY_fnc_DogDialog.sqf

2. Replace line #55  with this line below and save.

_commands = ["- Heel","- Sit","- Stay","- Move There","- Attack","- Fetch","- Detain","- Get In","- Get Out","- Dismiss"];

This fix will be included in next release of JBOY Dog (which is probably a few weeks away).

 

Revised menu with dashes looks like this:

menu_Dashes.jpg

  • Like 4

Share this post


Link to post
Share on other sites

Just have to report a MAJOR BUG which make this script basically unplayable FOR ME!

 

 

 

Every time Boomer barks...my two 90 lb RL dogs start barking lake 2 mad MDFKR..running around the house looking for the "intruder" HAHAHAHHAHAHAHA :D  :D  :D  :D  :D  :D  :D

 

ps:My wife's gonna kill me....hihihihihihi

  • Like 2

Share this post


Link to post
Share on other sites

Just have to report a MAJOR BUG which make this script basically unplayable FOR ME!

 

 

 

Every time Boomer barks...my two 90 lb RL dogs start barking lake 2 mad MDFKR..running around the house looking for the "intruder" HAHAHAHHAHAHAHA :D  :D  :D  :D  :D  :D  :D

 

ps:My wife's gonna kill me....hihihihihihi

I love it!  :lol:   I guess I have to add legal disclaimers to JBOY Dog dictating that I am no way responsible for affecting marriages...

  • Like 1

Share this post


Link to post
Share on other sites

Zagor PMed me the question below, so I have added "How To" documentation to the 2nd post in this thread.  See 2nd post for "How to Add Feral Dog Packs Only To a Mission".

 

Zagor's question:

 

 

Wat I'm planning is this: mission i on thiskr winter, where you,as a spetsnaz TL, are hunting a nuke location in a cold,snow stormy island. And what better than a pack of wild dogs /wolves running around the forest to keep you on your toes?

So my question is: how do I set it up to have just the feral dog roaming around and respawn when they are all dead?

  • Like 1

Share this post


Link to post
Share on other sites

I love it!  :lol:   I guess I have to add legal disclaimers to JBOY Dog dictating that I am no way responsible for affecting marriages...

:lol:  :lol:  :lol:  :lol:  :lol:  :lol:  :lol:

Share this post


Link to post
Share on other sites

I've implemented Tracking and Swimming for dogs.  I'm still working on a bug, but should post a new version of the JBOY Dog tonight or tomorrow.  Meanwhile, here's a video showing off these new features:

  • Tracking
    • Dogs pick up a scent trail and follow it.
    • Scent trails end when tracked units cross water or get in vehicles.  Trails begin again when tracked unit exits water or vehicles.
    • Via barking, whining and growling, dogs indicate to player if they have found a scent trail, if trail has ended, or if enemy is near.
  • Swimming
    • Dogs follow handler in Heel mode and swim (fixes arma problem where vanilla dogs walk underwater on seabed)
  • SITREP command:  Dog barks once when given this command.  Helps know where your dog is in the dense jungle.

 

 

  • Like 5

Share this post


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

I've implemented Tracking and Swimming for dogs. 

 

NOW....ARE YOU SOMETHING OR WHAT????

 

THANK YOU JBoy!!!!

You never end to amaze me. Couples of questions: how far in time scent will last? Will the dog pick up scent from "target" objects?

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

×