Home   Help Search Login Register  

Author Topic: Animals scriptable ?  (Read 7361 times)

0 Members and 1 Guest are viewing this topic.

Offline DMarkwick

  • Contributing Member
  • **
  • I'm a llama!
Re: Animals scriptable ?
« Reply #15 on: 13 Jul 2009, 15:07:01 »
Hey DeanosBeano - is there a particular reason you chose "USMC_LHD_Crew_Blue" class to slot the animal into? I notice using the soldier base class makes the dog sink into the ground, so I was wondering what was going on there.

While we're at it, when using a dog in this fashion the rpt file fills up with error messages like
"Bad action name HMMWV_Cargo01 - not found in DogActions"
every time the dog gets close to a vehicle. Is there a way to lose all these errors? By rediefining something in the config?

Also, how can I ensure that the dog is a non-groupable entity, even though it is on side West? I can possibly ungroup any grouped dog in script, but I was wondering if it's also a config entry.

Just a couple of questions ;)

Offline DeanosBeano

  • Addons Depot Staff
  • *****
  • SirDeanosbeano bstowed on me by sui ;)
    • Fraghaus
Re: Animals scriptable ?
« Reply #16 on: 15 Jul 2009, 12:33:13 »

 Well the reaason i picked that class was
1. he had a camo hidden texture so i could change his outfit with setobject texture
2. he didnt have any weapons sol ess problems with anim errors/

  I noticed that the rpt gave erros if the unit was ordered into a vehicle , i dint know the unit would try to get in a vehicle itself or the mere proximity would provoke ther errors.
 I guess the easiest way to obtain what you need is seek the playable dog inherit from that and i think i am correct in saying that these are not groupable , if they are then i guess you wil need a small script as you say checking and then making it join grpnull maybe.

  In essence this was all a quick ecperiment and i have not put more than 20 mins into it , i think alot more is achievable with time especially with fsms and this idle and straight distance etc command seems to be what makes the dog pause after 40meters and start another Fsm .
 anyway i f i get a chance i will try to look into it deeper.
 good luck .

DB
I love ofp

Offline DMarkwick

  • Contributing Member
  • **
  • I'm a llama!
Re: Animals scriptable ?
« Reply #17 on: 15 Jul 2009, 13:46:12 »
I do have a version that uses as it's base the playable dog, which as you say is not groupable and also does not report thousands of errors every time it gets near a vehicle. However, I cannot get that dog to move via any command at all, only doMove and doStop seem to work on the LHD dog, but even this does not work on the playable dog. It's very annoying, as in all other ways the playable dog is much preferable.

With the LHD dog I can call it to me, have it return to the handler, and have it "stay". But, it fills up the RPT with thousands of errors each time it gets near a vehicle (and, I presume, anything else for which there is no action for). The Playable dog gives no errors, but will run off toward it's initial editor placed position every time it's unused, and cannot be called or told to stay.

As part of the addon is that the dog can travel in the back of a car (HMMWV only) this becomes a problem. Also added to that the likely scenarios involving tracking people through urban areas, abandoned cars etc and the errors become prohibitive.

I get the depressing feeling it's all best solved with a sufficiently massaged config, but I am notoriously poor at dealing with configs :)
« Last Edit: 15 Jul 2009, 13:49:50 by DMarkwick »

Offline DeanosBeano

  • Addons Depot Staff
  • *****
  • SirDeanosbeano bstowed on me by sui ;)
    • Fraghaus
Re: Animals scriptable ?
« Reply #18 on: 15 Jul 2009, 14:07:21 »
hmm, i recall when i left the dog cfg , there was a problem with gestures and some sprint . i dont recall the dog having problems though with being near empty cars unless it was ordered inside one.

 this was the last config i used , further development would be to find some acceptable definitons for the gestures , tailwag etc and maybe you could replace cfgdogmocves with your wone, this is just the sinple fsms that the dog use , mayeb you can again redefine the actions that it wil lrequire and give it simple actions.  the best way to do this of course is to spot the errors in the rpt match them in the dog or human cfgmoves , apply them to your new cfgmoves and allshould be good.
 anyway if this is ot the same try it and see if it reduces ther errors , it is groupable unfortunately but it keeps a tight formation.

Code: [Select]
class CfgPatches
{
class dbo_man
{
units[] =
{
"dbo_doghandler"
};
weapons[] = {};
requiredVersion = 0.10;
requiredAddons[] = {


};
};
};



class CfgVehicleClasses
{
class dbo_handler
{
displayName = "dbo_Dog";
};
};

class CfgVehicles
{
  class USMC_LHD_Crew_Blue;
  class DBO_doghandler :USMC_LHD_Crew_Blue
    {
      scope = 2;
      displayName = "dbo_dog";
       model = "\ca\animals2\Dogs\Pastor\Pastor";
       moves = "CfgMovesDog";
       icon = "\Ca\animals2\data\mapicon_animals_ca.paa";
       gestures = "";
      faction ="USMC";
      boneHead = "head";
      bonePrimaryWeapon = "head";
   
       memoryPointHeadAxis = "head_axis";
      formationX = -1;
      formationZ = -2;
      formationTime = 2.5;
              weaponSlots = "1 + 4 + 12* 256 + 2* 4096 + 2 + 8* 16  + 12*131072";
      fsmFormation = "Formation";
      triggerAnim = "\CA\animals2\dogs\data\Anim\dogStop";
     // fsmFormation = "ca\characters\scripts\formationC.fsm";
      fsmDanger = "ca\characters\scripts\formationCDanger.fsm";
      woman = 0;
       gestureNo = "";
      gestureYes = "";
      gestureFollow = "";
      gestureAdvance = "";
      faceType = "Default";
      boneLEye = "l_eye";
      boneREye = "r_eye";
      boneLEyelidUp = "eye_upl";
      boneREyelidUp = "eye_upr";
      boneLEyelidDown = "eye_lwl";
      boneREyelidDown = "eye_lwr";
      boneLPupil = "l_pupila";
      boneRPupil = "r_pupila";
      memoryPointAim = "aimPoint";
      memoryPointCameraTarget = "camera";
      extCameraPosition[] = {
        0,
        0.5,
        -2.5
      };
      side =1;
      vehicleclass= "dbo_handler";
      accuracy = 1000;
   
         class VariablesScalar
      {
        _runDistanceMax = 111230;
        _maxIdleTime = 5;
        _movePrefer = 0.5;
        _threatMaxRadius = 350;
        _formationPrefer = 0.1;
        _scareLimit = 0.1;
        _dangerLimit = 1;
      };
     

    };
   
};

 I havent touched them for a time but i am sure it wont need much to  fix 90% of your problems.

 
I love ofp

Offline DMarkwick

  • Contributing Member
  • **
  • I'm a llama!
Re: Animals scriptable ?
« Reply #19 on: 15 Jul 2009, 14:59:05 »
Thanks for the info DB, that looks like the template from which I made one of my dogs.

About the cfgmoves stuff, where would I find all this? I cannot find them defined in Animals(2) or Characters(2) etc. Also I don't know where the DogActions are defined, which makes up all the dog errors in the RPT.

I don't mean to suck up your time like this, I can usually get what I want in code myself, but as far as configs go, I don't really have much of a clue I'm afraid. This tracker dog thing is working REALLY well, and just about the only thing stopping us releasing it is the errors in the RPT vs controllability of the dog.

Offline DeanosBeano

  • Addons Depot Staff
  • *****
  • SirDeanosbeano bstowed on me by sui ;)
    • Fraghaus
Re: Animals scriptable ?
« Reply #20 on: 15 Jul 2009, 16:19:26 »
well if you use worldeaters tool you can get the full cfg then your looking for

 
Code: [Select]
class CfgMovesDog : CfgMovesAnimalsBase
  {
    primaryActionMaps[] = {
      "DogActions",
      "NoActions"
    };

within which is

Code: [Select]
  class DogActions : NoActions
      {
        Stop = "Dog_Stop";

I love ofp

Offline Trexian

  • Members
  • *
Re: Animals scriptable ?
« Reply #21 on: 15 Jul 2009, 17:31:02 »
Where can I find worldeater's tool?  It sounds like his tool can fill the void in terms of what I need, too.  No matter how deep I get into this, it seems like I still have difficulty figuring out where to put the bits of stuff.

Thanks for all your help!
Sic semper tyrannosauro.

Offline DeanosBeano

  • Addons Depot Staff
  • *****
  • SirDeanosbeano bstowed on me by sui ;)
    • Fraghaus
Re: Animals scriptable ?
« Reply #22 on: 15 Jul 2009, 17:35:17 »
worldeaters dumpconfig can be found here

 http://www.ofpec.com/forum/index.php?topic=33539.0

 good luck i look forward to the dogs
I love ofp

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Animals scriptable ?
« Reply #23 on: 15 Jul 2009, 19:42:44 »
Relevant config from animals2.pbo - animconfig folder attached.


Planck
I know a little about a lot, and a lot about a little.

Offline Trexian

  • Members
  • *
Re: Animals scriptable ?
« Reply #24 on: 15 Jul 2009, 19:54:29 »
Excellent!  :clap:

The errors reported in the rpt are in the nature of:
Code: [Select]
Bad action name HMMWV_Driver - not found in DogActions
Bad action name HMMWV_Cargo01 - not found in DogActions
Bad action name HMMWV_Cargo01 - not found in DogActions
Bad action name HMMWV_Cargo01 - not found in DogActions
Bad action name UAZ_Cargo01 - not found in DogActions

(Repeated hundreds of times.)

It appears as though a cfg entry in the addon dog that defined, perhaps as a new class or added to class DogActions: NoActions, either null values - so that it does nothing - or the sitting action - so it just sits there - for HMMWV_Driver, etc. - might work.

Edited.  That is still a terrible one-sentence paragraph, but I hope it is still understandable...
« Last Edit: 15 Jul 2009, 20:01:44 by Trexian »
Sic semper tyrannosauro.

Offline DeanosBeano

  • Addons Depot Staff
  • *****
  • SirDeanosbeano bstowed on me by sui ;)
    • Fraghaus
Re: Animals scriptable ?
« Reply #25 on: 15 Jul 2009, 21:33:06 »
 hmm,
 Again i dont undertsand why you are getting them errors , unlees your suing some kinda movein commands, i have put a dog with the above congfig i posted earlier near 20 empty vehicle types and i dont get those errors.
 could you describe the scenario that creates those errors ?

I love ofp

Offline Trexian

  • Members
  • *
Re: Animals scriptable ?
« Reply #26 on: 15 Jul 2009, 21:52:46 »
I will give it my best attempt. :)  I don't think I have a copy of the config - DM's got it.

The dog and handler are not grouped together.  There are scripted commands for the handler to do certain things with the dog.

The "errors" - or "alerts" - happen when the player is the dog and moves near a vehicle (at this point, Humvees and sedans).  It seems like the sim looks at each vehicle, figures out that the dog can't get in, then sends that alert to the rpt.  The result is simply that the dog can't get in, which we already know.

I am not sure if it happens when the player is the handler - I haven't followed the changes to the rpt close enough.

The goal is to just prevent those alerts from being sent to the rpt.
Sic semper tyrannosauro.

Offline DMarkwick

  • Contributing Member
  • **
  • I'm a llama!
Re: Animals scriptable ?
« Reply #27 on: 15 Jul 2009, 23:23:12 »
hmm,
 Again i dont undertsand why you are getting them errors , unlees your suing some kinda movein commands, i have put a dog with the above congfig i posted earlier near 20 empty vehicle types and i dont get those errors.
 could you describe the scenario that creates those errors ?



Hey DB, would there be any value in me sending you the addon as it currently is? It's a JTD_TrackerDog.pbo and a mission with all the addon files in it, ready to be moved into the pbo itself.

Basically when the player "moves" into the dog role, he runs around the vehicle, generating errors. The errors do not occur when the dog is "attachTo"d the handler.

Offline Worldeater

  • Former Staff
  • ****
  • Suum cuique
Re: Animals scriptable ?
« Reply #28 on: 16 Jul 2009, 00:13:07 »
when the player "moves" into the dog role
Great, one step closer to have a dream come true...

SCNR
try { return true; } finally { return false; }

Offline DeanosBeano

  • Addons Depot Staff
  • *****
  • SirDeanosbeano bstowed on me by sui ;)
    • Fraghaus
Re: Animals scriptable ?
« Reply #29 on: 16 Jul 2009, 00:41:29 »

Hey DB, would there be any value in me sending you the addon as it currently is? It's a JTD_TrackerDog.pbo and a mission with all the addon files in it, ready to be moved into the pbo itself.

Basically when the player "moves" into the dog role, he runs around the vehicle, generating errors. The errors do not occur when the dog is "attachTo"d the handler.

 sure mate send me a link in PM, i will be online about 6-7 pm GMT tomorrow i will take a look no problem, hopefully i can try to eliminate some of those errors for ya and you can get that Dog out there
I love ofp