Jump to content
johnnyboy

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

Recommended Posts

Thank you bud! I'll work on that, although I prefer the crate. Don't want ANYONE play "pigeon shooting" with my new buddy...HIHIHIHIH!! 

  • Like 1

Share this post


Link to post
Share on other sites

Loved that parachuting dog video, although technically they ride in tandem with their handler.

Geronimo.jpg_thumb.jpg?imgmax=800

 

  • Like 1

Share this post


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

Loved that parachuting dog video, although technically they ride in tandem with their handler.

Tandem Boomer Drop?  That would be super sweet my brother.

  • Like 1

Share this post


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

Tandem Boomer Drop?  That would be super sweet my brother.

NOW you're talking man!!!!! THAT's the sheeet...right there!

Share this post


Link to post
Share on other sites

Hi I am new here. signed up after following this mod for about a week! looks great what you have done so far. I have been wanting a dog mod since first getting arma 3 about 5/6 weeks ago! I run an exile server for me and a few mates as we are more into pve then pvp. I was wondering would it be possible to add this script to exile? I have been trying to get it running on my server but not having much luck! I see its trying to start up in my logs but getting a lot off errors! as you can guess im quite new to modding arma 3 as I have not had it very long! so im not able to get the dog to show up or even the menu to open! could you give any advice as to how I would go about getting this working in exile? thank you and keep up the great work!

Share this post


Link to post
Share on other sites

Hi @Chris Blake, welcome to the forums.  Regarding Exile Mod, I know nothing about it, and honestly I've never made a mod.   I have no plans to integrate JBOY Dog with any specific mod.   JBOY Dog is a set of scripts, not a mod, that a mission creator can add to a mission.  These scripts could be integrated into a mod.  I grant permission for anyone to use and modify these scripts any way they like (including putting them in a mod), I just ask they give me a little credit, and post a link in this thread.

 

To add JBOY Dog to a mission, you do the following:

 

1. Create and save a mission via the Eden editor (or use an existing mission).

2. Download the dog sample mission from the top post.

3. Copy the JBOY and JBOY_DOG folders from the sample mission folder to your mission folder.

4. If your mission does not have a description.ext file already, then copy this file into your mission directory

5. If your mission does have a description.ext file already, then merge the contents from the sample description.ext into your mission's description.ext.  The parts you want are all the CfgSounds entries, the #includes under clas RscTitles, and the two includes above #RscTitles.

6. If your mission does not have an init.sqf, then create an empty one.

7. Open your mission init.sqf and the sample dog mission init.sqf in an editor.  From the sample init.sqf copy all the lines from the beginning of the file to the line below (including line below into your mission).

_n=[] spawn {sleep 2; dog1 setVariable ["vCommand", 'sit', true]};    // Issue first command to dog (sit, heel, stay, etc.  Sleep to allow dog to be initialized first.

8. Start your mission.

 

The above steps will create a dog near a player.  That dog can now be commanded via bringing up a menu using the T command.

 

There is more code in the init.sqf showing examples of how to create dog packs, how to assign dogs to AI units, how to start a scent trail to be dropped by units (that can later be tracked by a dog, and calls to create some chickens and rabbits to run JBOY Turbo Chicken on.).  You can experiment with those after you get the basic player controlled dog working (which should be easy if you follow the above steps).

 

WARNING:  These scripts have not been tested and verified as MP compliant.  I'm looking for MP testing volunteers BTW.  My guess is there will be a few MP related problems to fix, but not too many.   I don't have time to pursue that right now, so any help by the community would be appreciated.

 

 

  • Like 1

Share this post


Link to post
Share on other sites

Thank you for the reply. I will give that a try later and let you know how it goes.

 

update:

ok after seeing I only needed to remove the text under:

 

_n=[] spawn {sleep 2; dog1 setVariable ["vCommand", 'sit', true]};

 

as I had done the rest already as you said, I thought I would give it a quick try!

 

Still no luck, no dog and no "T" menu. I see this in my server log though:

 

4:26:16 Error in expression <

_dog = createAgent [_dogType, _pos, [], 0, "CAN_COLLIDE"];

_dog setAni>

4:26:16 Error position: <_pos, [], 0, "CAN_COLLIDE"];

_dog setAni>

4:26:16 Error Undefined variable in expression: _pos

4:26:16 File mpmissions\__cur_mp.Altis\JBOY_Dog\JBOY_dog_create.sqf, line 27

4:26:16 Error in expression <call JBOY_fnc_DogDisplayEH;};

dog1 = [handler1, "Fin_tricolour_F", (handler1 m>

4:26:16 Error position: <handler1, "Fin_tricolour_F", (handler1 m>

4:26:16 Error Undefined variable in expression: handler1

 

4:26:20 Error in expression <_dog setSpeaker "NoVoice";

if (!isNull _handler) then

{

_handler setVariable [">

4:26:20 Error position: <_handler) then

{

_handler setVariable [">

4:26:20 Error Undefined variable in expression: _handler

4:26:20 File mpmissions\__cur_mp.Altis\JBOY_Dog\JBOY_dogCommand.sqf, line 27

 

however its 4:44am here now so I am off to bed and will see what can be done later. Thanks again

Edited by Chris Blake

Share this post


Link to post
Share on other sites

4:44 am?  Sounds like another case of Arma addiction..  Thanks for providing the error messages.

 

I may have spotted the problem.  In the code below I mixed usage of player and handler1.  Since in my demo mission, the player unit is named handler1 in the editor, it causes me no problems.  But I should have used the term player consistently here, so people implementing this can call the player whatever they want, and because in a multi-player case, we won't necessarily know the name of each player unit. 

 

So replace handler1 in these lines with player:

_dogMenu = [] spawn {sleep 2; _d=[player] call JBOY_fnc_DogDisplayEH;};  // Add dog menu to player
dog1 = [handler1, "Fin_tricolour_F", (handler1 modelToWorld [2,2,0]), true] call JBOY_dog_create;  // Create dog. 4th parameter true means use Johnnyboy voice for commands.
nul = [dog1, handler1, 2.5] execVM "JBOY_Dog\JBOY_dogCommand.sqf";    // Start command listener for dog

So changed code looks like this:

_dogMenu = [] spawn {sleep 2; _d=[player] call JBOY_fnc_DogDisplayEH;};  // Add dog menu to player
dog1 = [player, "Fin_tricolour_F", (player modelToWorld [2,2,0]), true] call JBOY_dog_create;  // Create dog. 4th parameter true means use Johnnyboy voice for commands.
nul = [dog1, player, 2.5] execVM "JBOY_Dog\JBOY_dogCommand.sqf";    // Start command listener for dog

Sorry about that, hope this fix yields a working dog for you!

Share this post


Link to post
Share on other sites

Hay thanks again for getting back to me on this. Still no dog and no menu :(

 

Got new errors in my log:

 

15:18:19 NetServer::SendMsg: cannot find channel #2093953923, users.card=0
15:18:19 NetServer: users.get failed when sending to 2093953923
15:18:19 Message not sent - error 0, message ID = ffffffff, to 2093953923 (bugs)

 

My guess is it's due to the way exile is set up! Not sure if this help but here is 2 other lines from my log showing me connecting:

 

15:24:22 "ExileServer - Player bugs (UID 76561198249938322) connected!"
15:24:29 "ExileServer - Starting session for 'bugs' with ID 'KmAEIFTU'..."

 

Other then that I see no other errors and server runs fine.

 

In my mission file it looks like players are handled like so:

 

class Groups
 {
  items=1;
  class Item0
  {
   side="GUER";
   class Vehicles
   {
    items=100;
    class Item0
    {
     position[]={13237.161,20.660374,11705.338};
     special="NONE";
     id=0;
     side="GUER";
     vehicle="Exile_Unit_GhostPlayer";
     player="PLAY CDG";
     leader=1;
     skill=0.60000002;
    };
    class Item1
    {
     position[]={13234.718,19.578526,11705.455};
     special="NONE";
     id=1;
     side="GUER";
     vehicle="Exile_Unit_GhostPlayer";
     player="PLAY CDG";
     skill=0.60000002;
    };

 

It goes on like this to class item 99 so my guess is that's to assign up to 100 players! but I could be wrong, still getting used to this! I have my server set to 10 players max in my server launcher as I only play with a handful of friends and will up the number in future if need be!

 

Again not sure if it helps, just chucking in as much info as I can think of that may help!

 

Thanks again for getting back to me so soon and trying to help.

Share this post


Link to post
Share on other sites

NP dude.  All those errors look totally unrelated to dog scripts to me (the previous errors you posted were dog script related).  I've never set up an Exile server, so I can't help there.

 

To narrow down the problem, I suggest you comment out calls to dog scripts and start your Exile server and/or run your test mission.  If you still get these new errors, then you know its not dog related, and you have to work on your Exile setup.   But if Exile starts up clean, then we know there is some kind of incompatibility with dog scripts.

 

I don't understand the "player="PLAY CDG"" bit per unit in the .sqm file.  That looks mod-specific to me.  Here's how a playable/player unit looks in a vanilla Arma mission of mine:

		class Item142
		{
			dataType="Group";
			side="West";
			class Entities
			{
				items=10;
				class Item0
				{
					dataType="Object";
					class PositionInfo
					{
						position[]={14529.838,2.5346496,11928.676};
						angles[]={0,3.6389592,0};
					};
					side="West";
					flags=2;
					class Attributes
					{
						skill=0.46666664;
						rank="LIEUTENANT";
						init="this assignAsdriver boat2; this moveindriver boat2;  bravo = group this; ";
						name="bravo_leader";
						description="Bravo Team Leader";
						isPlayer=1;
						isPlayable=1;
					};
					id=2567;
					type="B_recon_TL_F";
					atlOffset=62.023407;
				};

Note that there is no "Player" property.   Playable units all have isPlayable=1.  And the unit marked as player in the editor also has isPlayer=1.

 

This Exile Player property may or may not be related to your error messages.  There is no way for me to know.

 

Advice:  Look for Exile Mod documentation.  See if there is a section for how to run scripts on player units within Exile.  And any advice for Exile misison customization using init.sqf.

Share this post


Link to post
Share on other sites

Ok thanks I will have a look to find some exile docs and ask in the forums if need be and I will let you know what I come up with.

Share this post


Link to post
Share on other sites

This addition is really nice!   Could a function be added to get the dog to be usable with more vehicles?   Keep up the good work JBOY.

 

--ATV

Share this post


Link to post
Share on other sites

Thanks ATV!  For each vehicle, I need to collect Vehicle Object Name and position relative to vehicle where we attach the dog.  It's a bit tedious to tweak relative position until it looks clean.

 

If anyone has a particular vehicle they are interested in, they can provide me that info, and I will add it to the script.  See this post for exactly what I need provided for me to add a vehicle.

 

I'm happy to add vehicles for people willing to do that little bit of work. :)   Otherwise it could be months before I add more vehicles.

Share this post


Link to post
Share on other sites

Just confirming this DOES NOT work on a dedi multiplayer server.  I will try and get you details/error logs today.

Share this post


Link to post
Share on other sites

I can't get the doggie to spawn on a  dedi multiplayer server either :eh:

 

I use an addaction called from the init.sqf:

 

[[Doghouse, ["<t color='#3388DD'>Wakeup K9","Scripts\CreateDog.sqf"]],"addAction",true,true] call BIS_fnc_MP;

 

CreateDog.sqf:

 

_target = _this select 0;
_caller = _this select 1;
_ID = _this select 2;

_class = typeOf _caller;
if (_class == "B_T_Recon_F") then
{
	if ( isNil { _caller getVariable "HasDog" }  ) then 
	{
		_caller setVariable [ "HasDog", 1 ];
		// **************************************************************************
		// Create dog and have him follow player
		// **************************************************************************
		_dogMenu = [] spawn {sleep 2; _d=[player] call JBOY_fnc_DogDisplayEH;};  // Add dog menu to player
		dog1 = [_caller, "Fin_tricolour_F", (_caller modelToWorld [2,2,0]), true] call JBOY_dog_create;  // Create dog. 4th parameter true means use Johnnyboy voice for commands.
		nul = [dog1, _caller, 2.5] execVM "JBOY_Dog\JBOY_dogCommand.sqf";    // Start command listener for dog
		//nul = [dog1, _caller] execVM "JBOY_Dog\JBOY_dog_assign_actions.sqf"; // if dog has handler, assign action menu to handler
		_n=[] spawn {sleep 2; dog1 setVariable ["vCommand", 'sit', true]};    // Issue first command to dog (sit, heel, stay, etc.  Sleep to allow dog to be initialized first.
		// **************************************************************************
		// Start Trail Detection for dog1
		// **************************************************************************
		dog1 setVariable ["vScentTrailDetectionOn", true, true]; // Must set this property true if you want dog to track a trail of scentMarkers.
		_dmy = [] spawn {sleep 1; _d=[dog1] call JBOY_DogScentDetectionLoop;};
	};
};

waituntil
{
	sleep 6;
	((!alive _caller) or (!alive dog1))
};

_caller setVariable [ "HasDog", nil ];

sleep 5;

deleteVehicle dog1;

This allows my dog handler class to only have a dog, and just one.   If they or the doggie dies, then they can return to the doghouse and spawn another one.

 

Works fine in local multi,   NO doggie on dedi.

Share this post


Link to post
Share on other sites
On 1/20/2017 at 6:47 AM, T.Gavin said:

Just confirming this DOES NOT work on a dedi multiplayer server.  I will try and get you details/error logs today.

Hey TG.  Thanks for testing. I need the details/logs in order to have a clue where to start debugging.

 

6 hours ago, accuracythruvolume said:

Works fine in local multi,   NO doggie on dedi.

Hi ATV.  Thanks for posting how you are calling this.  Are there any errors displayed?  Any errors in the arma rpt log?  I need some more details to pursue.

 

Also, did the player get a dog menu (T key to see it)?

 

This is the first statement in JBOY_dog_create:

_dog = createAgent [_dogType, _pos, [], 0, "CAN_COLLIDE"];

Is createAgent a Global command?  I don't understand why you won't see a dog when this command executes.

Share this post


Link to post
Share on other sites

Hey Man, I'm having a blast with Boomer!!! Just a couple of things:

  

-In one my mission I have to extract with a "rhsusf_mkvsoc" boat. I didn't want to leave Boomer behind, so I set a position on the deck with "attachTo  [0, -3, -0.15]" which is a good looking pos .How do I set that up in the "JBOY_getDogPOSPerVeh.sqf"?

 

-I noticed that when you bump into the dog it get wounded. I don't know if is intended, but it would  be nice to be able to heal him. Is that even possible?

 

Thank you JBoy!!!

Share this post


Link to post
Share on other sites

Hi Zagor, glad you are enjoying it.  I just looked at  "JBOY_getDogPOSPerVeh.sqf" , and that may be dead code i should remove.  I need to clean up dog supported vehicles to be an array definition, but until I do, you have to change 2 scripts to add your new vehicle.

 

Modify JBOY_dogExecuteAction.sqf:

Within the case "getin" code, add an "or" to the list of supported vehicle types:

          if (!(isnull _obj) and (_obj isKindOf "Offroad_01_unarmed_base_F" 
                                or _obj isKindOf "Offroad_01_base_F"
                                or _obj isKindOf "Offroad_02_unarmed_base_F"
                                or _obj isKindOf "Rubber_duck_base_F"
                                or _obj isKindOf "Heli_Light_01_unarmed_base_F"
                                or _obj isKindOf "rhsusf_mkvsoc"  //  rhs vehicle added here Zagor!!!!
                                )) then 

Modify JBOY_dogCommand.sqf:

In the "getin" section of the script, add the following case statement to the existing case statements.  You can quickly find this section of the code by searching for this string '"case (_veh isKindOf "Rubber_duck_base_F"):' in the editor of your choice (I use Notepad++).

               case (_veh isKindOf  "rhsusf_mkvsoc"):   // rhs vehicle added by Zagor
                {_attachPos = [0, -3, -0.15];  
                 //_veh  lockCargo [0, true];  // prevent AI from boarding into same spot and clipping
                };

Notice the commented out lockCargo statement.  If the dog's attach position will clip with another unit boarding that vehicle, you may want to lock that cargo position to prevent clipping.  If it's not a problem for your mission, then leave it commented out.

 

Offtopic:  Do you make chimichurri sauce?  I just had a Steak Fritte dinner with chimicurri on the steak and it was delicious.  Since you have an Argentinian dog and you are a chef...maybe you are a chimichurri fan...

  • Like 1

Share this post


Link to post
Share on other sites

Hey man, thank you. I've modify the 2 scripts and gonna test it now...reporting  back asap.What about the healing thing?Coul we make the dog "allowDamage false" unless fired upon?(EH?)

 

15 hours ago, johnnyboy said:

Offtopic:  Do you make chimichurri sauce?  I just had a Steak Fritte dinner with chimicurri on the steak and it was delicious.  Since you have an Argentinian dog and you are a chef...maybe you are a chimichurri fan...

HAHAHAHa...I also have a British Bull Terrier..that doesn't make me a fan of "fish&chips"..hahahhahah...sorry mate, couldn't resist on that!

I'll get you a chimichurri recipe if you like!!!

  • Like 1

Share this post


Link to post
Share on other sites

Works mate!!

 I had to adjust (my fault) the position from  

attachPos = [0, -3, -0.15]

to 

attachPos = [0, -3, -0.75]

but is perfect!!!

  • Like 1

Share this post


Link to post
Share on other sites
10 minutes ago, zagor64bz said:

Works mate!!

How about a screenshot of Boomer cruisin' in his new ride?

Share this post


Link to post
Share on other sites
21 minutes ago, johnnyboy said:

How about a screenshot of Boomer cruisin' in his new ride?

Here you go mate!!

Spoiler

Arma3_2017_01_24_21_50_08_848.jpg

Spoiler

Arma3_2017_01_24_21_48_57_934.jpg

..don't mess with SEALS combat dog!!

 

HAHAHAHHA...

  • Like 2

Share this post


Link to post
Share on other sites

Ha ha that is great!

 

I think JBOY that you may have something like:  if (!isServer) then exitWith {};   somewhere in the code, that may be why dedi servers are a no go.

 

As with the poster above, I think RHS vehicles will be very popular requests to add.  Hummers, the RHS and orginal MELB, UAZs, etc.   Would you like that classnames for those?

Share this post


Link to post
Share on other sites

As I suspected, you have this statement in a bunch of your scripts:

 

if (!isServer)  exitwith {};

 

I removed a bunch of them, leaving the dogpack ones alone, and I got the dog to work on Dedi.  Commands work, doggie gets in / out of vics, tracks bad guy that I have my mission setup to do.  So that was the reason that dedi was a no go  :rthumb:

 

I've also I don't get the message that the dog has a scent to track, but I did get the message that the end of the scent trail has been reached. (perhaps I forgot to remove the isServer part for that particular script)

 

--ATV

  • Like 1

Share this post


Link to post
Share on other sites
6 hours ago, accuracythruvolume said:

As I suspected, you have this statement in a bunch of your scripts:

 

if (!isServer)  exitwith {};

 

I removed a bunch of them, leaving the dogpack ones alone, and I got the dog to work on Dedi.  Commands work, doggie gets in / out of vics, tracks bad guy that I have my mission setup to do.  So that was the reason that dedi was a no go  :rthumb:

 

I've also I don't get the message that the dog has a scent to track, but I did get the message that the end of the scent trail has been reached. (perhaps I forgot to remove the isServer part for that particular script)

 

--ATV

That's great news ATV.  Thanks for these details, I will hunt down those statements.

 

A few questions:

  • For my education, why is "if (!isServer)  exitwith {};" a problem on dedicated?
  • And without it, don't I risk running the scrpts redundantly on all clients?
  • If more than one player connected, you still only had one dog correctly created?  (i.e., there wasn't a dog spammed per client?)

I really appreciate the help man, and will add you to the credits list!

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

×