Jump to content
johnnyboy

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

Recommended Posts

1 minute ago, johnnyboy said:

@T.Gavin, cool.  It may take me a day or two to do it.  I need to copy all the new files to the template mission, then test it to be sure I don't send you a broken set of code.

No worries! 

Share this post


Link to post
Share on other sites

Hey johnnyboy, thanks for making this script! I'm having some trouble getting the feral dog packs to spawn, I can get everything such as the trigger, the game logic and the init set up, but it keeps giving me an "Error undefined variable in expression: JBOY_dogPackCreate" and quotes the script to create a dog pack in the trigger's activation box.

 

I'm not sure what I'm doing wrong since I'm pretty script inept, and I would love some help figuring it out! 

Share this post


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

Hey johnnyboy, thanks for making this script! I'm having some trouble getting the feral dog packs to spawn,

Hey man, thanks for the interest in JBOY dog.  I just opened my template mission set on Tanoa, and followed the instructions below to create the trigger (these instructions are comments in the template mission init.sqf file), and it worked perfectly.  I clicked play, and the pack spawned and started to attck player and player's AI buddy.

// **************************************************************************
// To spawn a feral dog pack, place a trigger on the map, and name it dogPackTrigger1.
// Then paste the code below into that trigger.
// Make trigger radius 400 x 400 (or larger...you don't want player to see pack spawn)
// Make trigger activated by anybody present
// **************************************************************************
/*
_dmy=[] spawn 
{
    _pos = getpos dogPackTrigger1; 
    _followerDogTypes = ["Fin_blackwhite_F","Fin_ocherwhite_F","Fin_tricolour_F","Alsatian_Black_F","Alsatian_Sandblack_F"];   
    _pack = [_pos, 7, "Alsatian_Sand_F", _followerDogTypes, 50] call JBOY_dogPackCreate; 
}; 

I didn't get any errors.   Try the above in the template mission you downloaded to be sure creating the triggers spawns the dog pack.   Then duplicate these steps in your own mission where you are trying to add the dogs.

 

Also note that you need the following line in your init.SQF which will guarantee that the script JBOY_dogPackCreate is compiled and available to the trigger (that might cause the error you reported if JBOY_dogPackCreate was not compiled).

call compile preprocessFileLineNumbers "JBOY_Dog\JBOY_DogInit.sqf";

Good luck running from those dog packs.   Try it with just a pistol and see how far you get!  hahaha...

  • Like 1
  • Thanks 2

Share this post


Link to post
Share on other sites

@johnnyboy Thanks an absolute ton! I didn't know I needed that line in my Init.sqf, maybe that was the problem all along :face_palm:

 

I'm working on a survival mission basically, with AI robots like a Skynet sort of thing (UGVs and such) along with radiation, and I wanted to make the woodlands a little bit more deadly to the players (and other AI). I'm sure with your feral dog pack script, I'll be able to make the players just as scared of the woods as the cities! >:D

 

Thanks again!

  • Like 1

Share this post


Link to post
Share on other sites
1 minute ago, ContheJon said:

I'm working on a survival mission basically, with AI robots like a Skynet sort of thing (UGVs and such) along with radiation, and I wanted to make the woodlands a little bit more deadly to the players (and other AI). I'm sure with your feral dog pack script, I'll be able to make the players just as scared of the woods as the cities! >:D

 

Thanks again!

Glad to help dude.  Your mission idea sounds cool.  If you end up recording any feral dog action in your mission, post a link here! 

  • Like 1

Share this post


Link to post
Share on other sites

I was thinking of recording some trailers for future missions, so if I do that I'll try and get a hold of some footage of me running for my life from dogs!

 

EDIT: I tried using those scripts you provided but still no bueno. Now I'm not sure if this is what I've done wrong; in the script for the feral dog pack you provided a script line in the init.sqf and said to delete everything below that line, but I couldn't find that line in the init.sqf. This is line: 

 

// ************************************************************************** // Create game logic used by JBOY_AIFightsDogs.sqf to force AI to fire weapons. // ************************************************************************** JBOYDogLogicCenter = createCenter sideLogic; JBOYDogLogicGroup = createGroup JBOYDogLogicCenter; JBOYDogGameLogic = JBOYDogLogicGroup createUnit ["Logic", [0,0,0], [], 0, "NONE"];

 

This didn't exist in my init.sqf so I had to add it in manually, and from there I deleted all other scripts apart from the _pos = getpos dogPackTrigger1; script (edited it down to just that line for this comment for brevity, I used the full script obviously :P). I'm not sure if that's the problem.

 

I will say that it seems to be giving me an error on the trigger now, not the dogPackCreate, so I've made it one step closer it seems! :D

Edited by ContheJon
  • Like 2

Share this post


Link to post
Share on other sites

My first episode in a mini-campaign featuring JBOY Dog has just been released.  Get it here:  Last Tango in Tanoa - Episode 1.

 

And here's a short jungle combat video with dog aiding the attack taken from that mission:

 

 

  • Like 5
  • Thanks 1

Share this post


Link to post
Share on other sites
On 6.4.2018 at 2:02 AM, ContheJon said:

I was thinking of recording some trailers for future missions, so if I do that I'll try and get a hold of some footage of me running for my life from dogs!

 

EDIT: I tried using those scripts you provided but still no bueno. Now I'm not sure if this is what I've done wrong; in the script for the feral dog pack you provided a script line in the init.sqf and said to delete everything below that line, but I couldn't find that line in the init.sqf. This is line: 

 

// ************************************************************************** // Create game logic used by JBOY_AIFightsDogs.sqf to force AI to fire weapons. // ************************************************************************** JBOYDogLogicCenter = createCenter sideLogic; JBOYDogLogicGroup = createGroup JBOYDogLogicCenter; JBOYDogGameLogic = JBOYDogLogicGroup createUnit ["Logic", [0,0,0], [], 0, "NONE"];

 

This didn't exist in my init.sqf so I had to add it in manually, and from there I deleted all other scripts apart from the _pos = getpos dogPackTrigger1; script (edited it down to just that line for this comment for brevity, I used the full script obviously :P). I'm not sure if that's the problem.

 

I will say that it seems to be giving me an error on the trigger now, not the dogPackCreate, so I've made it one step closer it seems! :D

Hi @ContheJon,

 

I spawn in the feral dog packs as following:

@johnnyboy this is the script and setup i was using in my dynamic bandit camp video we spoke about, maybe you can spot the mistake and the reason why the barks dont work=) (when the dogs target me, I get a notification that certain soundfiles have not been found).

 

create a sqf file "feraldogspawn.sqf"

add this code to the .sqf file:

 

It will randomly keep spawning random amount of dog packs around you in random distance and that will attack you when they get close enough to you (random distance)

I have not yet implemented a deletion code line (e.g. delete old pack if a new one spawns) I will provide once i find the time.

Spoiler

sleep 600;
sleep (random 1000);
while {true} do {
_dmy=[] spawn
{
    _pos = [getPosATL player, 100, 350, 2, 0, 100, 0] call BIS_fnc_findSafePos;
    _followerDogTypes = ["Fin_blackwhite_F","Fin_ocherwhite_F","Fin_tricolour_F","Alsatian_Black_F","Alsatian_Sandblack_F"];
    _pack = [_pos, (random 7), "Alsatian_Sand_F", _followerDogTypes, (random 2500)] call JBOY_dogPackCreate;
};Sleep (random 3600);Sleep 1000};

 

 

add the following to your init.sqf:

 

Spoiler



call compile preprocessFileLineNumbers "JBOY_Dog\JBOY_DogInit.sqf";

//if jip player and not server then exit
_JIPplayer = not isServer && isNull player;
if (_JIPplayer) exitwith {};

[] execVM "feraldogspawn.sqf";

 

 

add the following to your description.ext:

 

Spoiler


	#include "JBOY_Dog\Dialog\Common.hpp"
	#include "JBOY_Dog\Dialog\JBOY_gui_Dog.hpp"

class RscTitles
{
	#include "JBOY_Dog\Dialog\Common.hpp"
	#include "JBOY_Dog\Dialog\JBOY_gui_Dog.hpp"
};

class CfgSounds
{
    #include "JBOY_Dog\Sounds\JBOY_Dog_Sounds.hpp"
};

 

Also: it is important that you copy and paste the following files from the script download into your mission folder:

JBOY, JBOY_Dog

 

I hope this helps and have fun!

Vandeanson

Edited by Vandeanson
  • Like 1
  • Thanks 2

Share this post


Link to post
Share on other sites

@sirhc221 is working on a very immersive mission where you are a security guard for a construction site, accompanied by your trusty  dog companion.  His attention to detail is quite impressive (makes the town come alive).  Love to see Boomer out traveling the world!

 

  • Like 4

Share this post


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

 this is the script and setup i was using in my dynamic bandit camp video we spoke about, maybe you can spot the mistake and the reason why the barks dont work=) (when the dogs target me, I get a notification that certain soundfiles have not been found).

@Vandeanson the script code you posted above looks good to me.   Just verify you have the following folder with sound files in it:

 

JBOY_Dog\Sounds

 

Which should have all the sound files referenced in JBOY_Dog\Sounds\JBOY_Dog_Sounds.hpp (which you correctly referenced in your description.ext per your post).

 

Very strange.

 

Does the first pack spawned have sounds, but not subsequent packs spawned?  The only difference I see in your code and my template is that I only spawned one pack, and you are spawning multiple packs via a loop over time.

 

 

  • Like 1

Share this post


Link to post
Share on other sites

Thanks for the plug on my mission, hopefully I can get back to it, add a few more fun 'dog' things and finally finish the darn thing.  I just keep finding more and more stuff to do and add to it lol

  • Like 1

Share this post


Link to post
Share on other sites

The first line of this thread on page 1 says: Now updated to Version 1.3 on June 9, 2917.

That's 900 years into the future, man, assuming I have my century right.

  • Like 1
  • Haha 2

Share this post


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

That's 900 years into the future, man, assuming I have my century right.

That's because this mod is centuries ahead, dude!!!!

  • Like 2
  • Haha 1

Share this post


Link to post
Share on other sites

Sorry for this question lol. I am working on a Prison Break mission that is coop play. Could I use the dog to follow AI opfor units ie  prison guard Patrols in the POW camp. I will like to have the ? more for Visual and auditory effects following the guards around the camp.  

 

I have not yet tried this script but always wanted to ?

Share this post


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

I am working on a Prison Break mission that is coop play. Could I use the dog to follow AI opfor units ie  prison guard Patrols in the POW camp. I will like to have the ? more for Visual and auditory effects following the guards around the camp. 

Yes.  You can assign the dog to an AI unit, and it will follw him around.  You can give the AI unit waypoints to walk a perimeter, and give the dog the "heel" command once (in your init.sqf, or a trigger, or a script), and dog will follow the unit around the waypoints.

 

AI controlled dog won't attack enemy of Unit controlling dog by default.  But with a little more scripting that is very doable right now also.

  • Like 1

Share this post


Link to post
Share on other sites

Very cool will the dog bark at least at enemy units within line of sight.

Share this post


Link to post
Share on other sites
Just now, avibird 1 said:

Very cool will the dog bark at least at enemy units within line of sight.

Dog will stop, growl, and look in the direction of detected enemy.  His detection distance default is 75 meters, he does not have to have line of sight (sense of smell, hearing, etc).

  • Like 3
  • Thanks 1

Share this post


Link to post
Share on other sites
On 4/11/2018 at 12:30 AM, johnnyboy said:

@Vandeanson the script code you posted above looks good to me.   Just verify you have the following folder with sound files in it:

 

JBOY_Dog\Sounds

 

Which should have all the sound files referenced in JBOY_Dog\Sounds\JBOY_Dog_Sounds.hpp (which you correctly referenced in your description.ext per your post).

 

Very strange.

 

Does the first pack spawned have sounds, but not subsequent packs spawned?  The only difference I see in your code and my template is that I only spawned one pack, and you are spawning multiple packs via a loop over time.

 

 

@johnnyboy I think the problem was that I had indeed not properly updated the description.ext in the mission i made the video with;) Once i test again I will conform if that was indeed the issue!

  • Like 1

Share this post


Link to post
Share on other sites

Question:  Since I use ACE3 all the time for my missions, i am unable to heal boomer using a medkit.  I was thinking of a workaround and I have one but (now remember I have no clue has to coding lol) I'm missing one vital piece of info.   I am using game logic module as such:  

 

pickedUpCount = 0; pickup_code = { deleteVehicle (_this select 0); pickedUpCount = pickedUpCount + 1; hint format ["You fed Boomer.", pickedUpCount]; whatwouldiputhere setDamage 0; };

 

and of course I have a can of food that when picked up executes the code BUT the dog is not a player so i cant put player setDamage, i did try _dog thinking maybe but nah lol 

 

So, since you're the expert here, am I on the right track or is there another  way to do this that is easier and more obvious

Share this post


Link to post
Share on other sites

@sirch221, I'm away from my computer for 4 days, so can't see my code.  But 

If you look in the dog create script you will see the dog handle Damage eventhandler.  I think there is a dog variable you can set to heal the dog.  Look for the code that adds heal action to handler in that script.

  • Like 1

Share this post


Link to post
Share on other sites

Ok I'll start there and see what I can do with it, at one point I thought it'd be cool to have a vet building where you had to take Boomer to get healed that would add a whole new dimension to your missions, keep tracking bad guys and not heal boomer knowing one more shot could kill him..risk losing bad guys to save dog?  tough choices indeed lol

Share this post


Link to post
Share on other sites

I'm using track & kill dogs for one of my upcoming missions, and because they can sometimes sneak up on a player, I went to freesound.org and got an angry bark sound which I set to play when the dog(s) get within 300 meters of the player. I used playSound3D with high volume. It has a nice psychological effect when you're on the run and hear those dogs coming hehe.

 

Share this post


Link to post
Share on other sites
On 4/22/2018 at 5:38 PM, sirhc221 said:

Ok I'll start there and see what I can do with it, at one point I thought it'd be cool to have a vet building where you had to take Boomer to get healed that would add a whole new dimension to your missions, keep tracking bad guys and not heal boomer knowing one more shot could kill him..risk losing bad guys to save dog?  tough choices indeed lol

Those are interesting ideas @sirhc221.

 

42 minutes ago, AZCoder said:

I'm using track & kill dogs for one of my upcoming missions, and because they can sometimes sneak up on a player, I went to freesound.org and got an angry bark sound which I set to play when the dog(s) get within 300 meters of the player. I used playSound3D with high volume. It has a nice psychological effect when you're on the run and hear those dogs coming hehe.

I like the pyschological effect idea @AZCoder.  The dog packs should bark aggressively once they pick up the scent and start chasing human units.  I think the distance was alot less than 300 meters though.  I'll have to take a look if that is still working, as someone else reported the dog packs not barking.

Share this post


Link to post
Share on other sites

They do bark for sure, I just wanted something extra spicy added at the start of the chase. You know me, I always add some unique flavor.

 

  • Like 2

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

×