Jump to content
Sign in to follow this  
J. Schmidt

Pegasus Team 101 MULE WIP

Recommended Posts

Here is the model.cfg and config.cpp scripts I created but for some reason they don't work. I don't know if I'm missing things or if the scripts themselves are missed up. I would appreciate it if some people in the community could help me out in fixing the scripts, since I'm a beginner at scripting.

Model.cfg

class CfgModels
{
class Default;
class Mule: Default
{
	skeletonName="Mule";
	class Animations
	{
		class FrontWheelL
		{
			type = "rotationX";
			source = "wheel";
			selection = "wheel_01_axis";
			axis = "";
			memory = true;
			sourceAddress = "loop";
			minValue = 0;
			maxValue = 1;
			angle0 = 0;
			angle1 = "rad -360";
		};
		class FrontWheelR
		{
			type = "rotationX";
			source = "wheel";
			selection = "wheel_02_axis";
			axis = "";
			memory = true;
			sourceAddress = "loop";
			minValue = 0;
			maxValue = 1;
			angle0 = 0;
			angle1 = "rad -360";
		};
		class CenterWheelL
		{
			type = "rotationX";
			source = "wheel";
			selection = "wheel_03_axis";
			axis = "";
			memory = true;
			sourceAddress = "loop";
			minValue = 0;
			maxValue = 1;
			angle0 = 0;
			angle1 = "rad -360";
		};
		class CenterWheelR
		{
			type = "rotationX";
			source = "wheel";
			selection = "wheel_04_axis";
			axis = "";
			memory = true;
			sourceAddress = "loop";
			minValue = 0;
			maxValue = 1;
			angle0 = 0;
			angle1 = "rad -360";
		};
		class RearWheelL
		{
			type = "rotationX";
			source = "wheel";
			selection = "wheel_05_axis";
			axis = "";
			memory = true;
			sourceAddress = "loop";
			minValue = 0;
			maxValue = 1;
			angle0 = 0;
			angle1 = "rad -360";
		};
		class RearWheelR
		{
			type = "rotationX";
			source = "wheel";
			selection = "wheel_06_axis";
			axis = "";
			memory = true;
			sourceAddress = "loop";
			minValue = 0;
			maxValue = 1;
			angle0 = 0;
			angle1 = "rad -360";
		};
		class Turret
		{
			type = "rotationY";
			source = "mainTurret";
			selection = "turret_axis";
			axis = "";
			memory = true;
			sourceAddress = "loop";
			minValue = 0;
			maxValue = 1;
			angle0 = 0;
			angle1 = "rad -360";
		};
			class Cammera
		{
			type = "rotationY";
			source = "mainTurret";
			selection = "cammera_axis";
			axis = "";
			memory = true;
			sourceAddress = "loop";
			minValue = 0;
			maxValue = 1;
			angle0 = 0;
			angle1 = "rad -360";
		};
	};
};
};
class CfgSkeletons
{
class Mule
{
	skeletonInherit="Car";
	skeletonBones[]=
	{
		"wheel_01_axis",
		"wheel_02_axis",
		"wheel_03_axis",
		"wheel_04_axis",
		"wheel_05_axis",
		wheel_06_axis",
		"turret_axis",
		"cammera_axis"
	};
};
};

Config.cpp

class CfgPatches 
{ 
   class YourTag_MULE 
   { 
       units[] = {"PT101_MULE"}; 
       weapons[] = {}; 
       requiredVersion = 0.1; 
       requiredAddons[] = {"CAWheeled_E"}; 
   }; 
}; 

class CfgVehicles 
{ 
   class hilux1_civil_3_open_EP1; 
   class PT101_MULE: hilux1_civil_3_open_EP1 
   { 
       displayName = "MULE"; 
       model = "\PegasusProjects\Units&Vehicles\PT101_Mule\pt101_mule.p3d"; 
       side = 3; 
       crew = "Civilian2"; 
       maxSpeed = 150; 
       transportSoldier = 0; 
   }; 
};  

Edited by JSF 82nd Reaper

Share this post


Link to post
Share on other sites

Try this config as a start (requires OA/CO):

class CfgPatches
{
class YourTag_MULE
{
	units[] = {"YourTag_MULE"};
	weapons[] = {};
	requiredVersion = 0.1;
	requiredAddons[] = {"CAWheeled_E"};
};
};

class CfgVehicles
{
class hilux1_civil_3_open_EP1;
class YourTag_MULE: hilux1_civil_3_open_EP1
{
	displayName = "MULE";
	model = "\Pegasus Projects\Units & Vehicles\PT101_Mule\pt101_mule.p3d";
	side = 3;
	crew = "Civilian2";
	maxSpeed = 150;
	transportSoldier = 0;
};
};

Share this post


Link to post
Share on other sites

@PvPscene, Thank's, I copied your PHP Code and pasted it over my original Config.cpp script and saved it (as you can see above), but my addon still doesn't show up in the game and I don't even know if my Model.cfg is correct either. Because when I'm in Buldozer view on Oxygen 2 and click Enter my animations don't play through.

Share this post


Link to post
Share on other sites

a) the & and spaces in the model path looks dangerous; better remove them/redo your folder structure

b) what tool do you use for packing?

Share this post


Link to post
Share on other sites

you need a CfgSkeletons class in your model.cfg with a skeleton called Mule.

Edit: nevermind, i see it in the end (usually it comes before cfgModels, but its not fatal)

Edited by Soul_Assassin

Share this post


Link to post
Share on other sites
@PvPscene, Thank's, I copied your PHP Code and pasted it over my original Config.cpp script and saved it (as you can see above), but my addon still doesn't show up in the game and I don't even know if my Model.cfg is correct either. Because when I'm in Buldozer view on Oxygen 2 and click Enter my animations don't play through.

Hi , In addition to what others have said

In model.cfg your class msut be same name as P3d yours is pt101_mule.p3d

so

class Default;

class Mule: Default

mustbe

class Default;

class pt101_mule: Default

Lost of other things like our skeleton bones should come before Modelclass and subsequent animations.

if your packing from namespace put model.cfg from which you inherit in rootfolder and model.cfg for specific vehicle in the folder of the mule , i think you can simply paste arma1 mlod model.cfg from BIS in "PegasusProjects" and then in your "PT101_Mule" folder put config for the vehicle itself , this will help with inheritance from Car .

still alot missing from your model.cfg looking at it but it should at least animate in bulldozer with the above help.

Edited by Thromp

Share this post


Link to post
Share on other sites

@PvPscene, I'm using the BinPBO Personal Edition from the BI Tools to pack my addon.

---------- Post added at 12:25 AM ---------- Previous post was at 12:23 AM ----------

@Soul_Assassin, Thanks for your tip, I moved my CfgSkeletons at the very start of the Model.cfg, and removed all the spaces and the "&".

Share this post


Link to post
Share on other sites

So what are your latest files and does it work now?

Share this post


Link to post
Share on other sites

@Thromp, I changed the class Mule to class pt101_mule, and I believe I pasted the "model.cfg" from the BI Models download into my "PegasusProjects" folder but still no luck. Also whenever I start Buldozer now I get the message in the window; No entry "bin\config.cpp.CfgSkeletons".

My project folder on my P drive is sat up like this: p:\PegasusProjects\UnitsVehicles\PT101_Mule. So will that change where I should put the copy of the sample "model.cfg" from the BI Models download?

---------- Post added at 12:38 AM ---------- Previous post was at 12:37 AM ----------

So what are your latest files and does it work now?

@PvPscene, I haven't tried yet but I will try it now and see if it works, and could you tell me where I would find it in the game?

Share this post


Link to post
Share on other sites

In empty-cars. (first put an infantry to see the empty category)

Share this post


Link to post
Share on other sites

@PvPscene, Thanks for the help I was able to find it, but when I previewed it, it came up with this error; "Cannot open object pegasusprojects\unitsvehicles\pt101_mule\pt101_mule.p3d." Should I re-post my Config.cpp and Model.cfg for you to see them since they've been updated?

Share this post


Link to post
Share on other sites

@PvPscene, Here are the new Model.cfg and Config.cpp: (By the way I haven't created the geometry lod yet.)

Model.cfg

class CfgSkeletons
{
class pt101_mule
{
	skeletonInherit="Car";
	skeletonBones[]=
	{
		"wheel_01_axis",
		"wheel_02_axis",
		"wheel_03_axis",
		"wheel_04_axis",
		"wheel_05_axis",
		"wheel_06_axis",
		"turret_axis",
		"cammera_axis"
	};
};
};
class CfgModels
{
class Default;
class pt101_mule: Default
{
	skeletonName="Mule";
	class Animations
	{
		class FrontWheelL
		{
			type = "rotationX";
			source = "wheel";
			selection = "wheel_01_axis";
			axis = "";
			memory = true;
			sourceAddress = "loop";
			minValue = 0;
			maxValue = 1;
			angle0 = 0;
			angle1 = "rad -360";
		};
		class FrontWheelR
		{
			type = "rotationX";
			source = "wheel";
			selection = "wheel_02_axis";
			axis = "";
			memory = true;
			sourceAddress = "loop";
			minValue = 0;
			maxValue = 1;
			angle0 = 0;
			angle1 = "rad -360";
		};
		class CenterWheelL
		{
			type = "rotationX";
			source = "wheel";
			selection = "wheel_03_axis";
			axis = "";
			memory = true;
			sourceAddress = "loop";
			minValue = 0;
			maxValue = 1;
			angle0 = 0;
			angle1 = "rad -360";
		};
		class CenterWheelR
		{
			type = "rotationX";
			source = "wheel";
			selection = "wheel_04_axis";
			axis = "";
			memory = true;
			sourceAddress = "loop";
			minValue = 0;
			maxValue = 1;
			angle0 = 0;
			angle1 = "rad -360";
		};
		class RearWheelL
		{
			type = "rotationX";
			source = "wheel";
			selection = "wheel_05_axis";
			axis = "";
			memory = true;
			sourceAddress = "loop";
			minValue = 0;
			maxValue = 1;
			angle0 = 0;
			angle1 = "rad -360";
		};
		class RearWheelR
		{
			type = "rotationX";
			source = "wheel";
			selection = "wheel_06_axis";
			axis = "";
			memory = true;
			sourceAddress = "loop";
			minValue = 0;
			maxValue = 1;
			angle0 = 0;
			angle1 = "rad -360";
		};
		class Turret
		{
			type = "rotationY";
			source = "mainTurret";
			selection = "turret_axis";
			axis = "";
			memory = true;
			sourceAddress = "loop";
			minValue = 0;
			maxValue = 1;
			angle0 = 0;
			angle1 = "rad -360";
		};
			class Cammera
		{
			type = "rotationY";
			source = "mainTurret";
			selection = "cammera_axis";
			axis = "";
			memory = true;
			sourceAddress = "loop";
			minValue = 0;
			maxValue = 1;
			angle0 = 0;
			angle1 = "rad -360";
		};
	};
};
}; 

Config.cpp

class CfgPatches 
{ 
   class pt101_mule 
   { 
       units[] = {"PT101_MULE"}; 
       weapons[] = {}; 
       requiredVersion = 0.1; 
       requiredAddons[] = {"CAWheeled_E"}; 
   }; 
}; 

class CfgVehicles 
{ 
   class hilux1_civil_3_open_EP1; 
   class pt101_mule: hilux1_civil_3_open_EP1 
   { 
       displayName = "MULE"; 
       model = "\PegasusProjects\UnitsVehicles\PT101_Mule\pt101_mule.p3d"; 
       side = 3; 
       crew = "Civilian2"; 
       maxSpeed = 150; 
       transportSoldier = 0; 
   }; 
};

Edited by JSF 82nd Reaper

Share this post


Link to post
Share on other sites

I've Created the Geometry Lod now and it gave my computer 6 hours of hell in creating it, but it was completed. I have the Geometry/Resolution 1.000/ShadowVolume 1.000/ShadowVolume-View Cargo/View-Cargo/Memory/LandContact Lods created. Is there any other lod or lods that I'm missing? And I don't know what else I'm missing for scripts, or in my Model.cfg/Config.cpp. I still need help.

While I was in the game and placed my MULE in the editor, when I went to preview mission it came up with this error; "Cannot open object pegasusprojects\unitsvehicles\pt101_mule\pt101_mul e.p3d." What does this mean, and how do I fix it?

Edited by JSF 82nd Reaper

Share this post


Link to post
Share on other sites

It means the model is not there or path is wrong

, is that space in mul e.p3d a mistake on forum or is it wrong in config too ?

Share this post


Link to post
Share on other sites

Your binpbo settings might be wrong. Post a screenshot of them please.

Share this post


Link to post
Share on other sites

@Thromp, I believe it's a glitch on the forum, for there's no spaces in my config or when i typed it on the forum here.

@PvPscene, Here's a screenshot of my BinPBO...

It's very hard to see so I'll type it: Addon Source Directory "p:\pegasusprojects\unitsvehicles\pt101_mule"

Destination Directory "C:\Program Files\Steam\steamapps\common\arma 2 operation arrowhead\@Misc\addons"

Should I just put my pt101_mule folder in just the P drive, without having to go through 2 folders before the program can get to the actual pt101_mule folder, like it is now; "pegasusprojects\unitsvehicles\pt101_mule"?

---------- Post added at 04:29 PM ---------- Previous post was at 03:30 PM ----------

I finally got it to work, I just put the pt101_mule folder in just the P drive instead of the program having to go through 2 folders to get to the actual folder. But there is still no animation, and the model is twice the size of a unit, and it's suppose to be as tall as a unit. What do I need to do to fix that?

Edited by JSF 82nd Reaper

Share this post


Link to post
Share on other sites

I was able to re-size my addon successfully and I textured it with just colors, and with some textures that I pulled out of the BI Models download I have. But I can walk through my vehicle in the game, how do I fix that?

---------- Post added at 10:41 PM ---------- Previous post was at 09:07 PM ----------

Here is an update of how Pegasus Team's MULE looks like in game, but people are still able to walk through it...

pt101_MULE.jpg

Edited by JSF 82nd Reaper

Share this post


Link to post
Share on other sites

JSF 82nd Reaper

As in your other thread, this image is too large. Also, do not crosspost.

Share this post


Link to post
Share on other sites
I was able to re-size my addon successfully and I textured it with just colors, and with some textures that I pulled out of the BI Models download I have. But I can walk through my vehicle in the game, how do I fix that?

---------- Post added at 10:41 PM ---------- Previous post was at 09:07 PM ----------

Here is an update of how Pegasus Team's MULE looks like in game, but people are still able to walk through it...

In your geometry LOD, are the shapes named "ComponentXX" where XX is a number starting from 01? If not, in O2 select in menu "Structure > Topology > Find Components" and the shapes will be named accordingly.

If this doesn't help, your Geo LOD is probably too detailed. Keep in mind that this is really just used for collision detection so keep it as simple as possible. As a start, work with a simple box, no fancy details.

Also in your list of LOD's i miss the Fire geometry LOD.

Share this post


Link to post
Share on other sites

@[FRL]Myke, I was finally able to fix it, and I believe that everything is done for the model now, I added the ViewGeometry/FireGeometry/ViewCargoGeometry and ETC now. So my next question would be how do I get the animations to work ingame/Buldozer view? Am I missing things in my Model.cfg, or is my script all wrong? And how would I go about making the pt101_mule controlled remotely? After all it's an unmanned vehicle that carries gear/supplies, and provides suppression fire.

Share this post


Link to post
Share on other sites
And how would I go about making the pt101_mule controlled remotely? After all it's an unmanned vehicle that carries gear/supplies, and provides suppression fire.

to make it controllable i would make it contain one ai crew which can't eject from the vehicle at all. this would allow it to move and fire weapons etc.

Share this post


Link to post
Share on other sites

Is that last MODEL.CFG you current file?

Several major issues.

selections called "...axis" ?

No, the bits you want to animate: Select whole section and call it something like "Turret1" or "Wheel1"

Each of these is a BONE, connecting back to the main Skeleton.

In model.cfg you tell it every bone, but showing that link back to the main spine or root.

Root or spine starts as ""

Bones/Links are always defined in pairs, hence my format below

So you would define the skeleton as;

class CfgSkeletons 
{ 
class default
{
	isDiscrete = 1;
	skeletonInherit = "";
	skeletonBones[] = {};
};
class pt101_mule: default
{
	isDiscrete=1;
	skeletonInherit = "";
	skeletonBones[]=
	{
	"Turret1","",
	"Wheel1","",
	"Wheel2","",
	"Wheel3","",
	"Wheel4",""
	};
   };

};
....
....
....

Always drop the last comma.

As for axis, these are just 1 or 2 point defined in the MEMORY LOD, and don't need to be defined in the Skeleton, only stated in the axis= bit.

To watch animation in Buldozer

- model.cfg file must be in same directory as P3D

- If you edit the model.cfg file live, Buldozer WILL NOT take up the edit without a lot of RELOAD / REFRESH

- The p3d file name MUST match the class you defined in CfgModels. In your case "pt101_mule"

- Extent of animation and Direction of movement wil not always match the parameters in the model.cfg (weirdness)

- Always double-double check that your named sections are not incorrectly overlaping each other. This can cause an animation to stop completely/never work.

Share this post


Link to post
Share on other sites
So my next question would be how do I get the animations to work ingame/Buldozer view?

Looking at your configs and naming here, you seem to be cutting a hell of a lot of corners and taking too much guess work, if i may presume here, i think we all did it once and believe me , it creates more problems than you would get by doing it right :).

My advice can only be what i did and that is to Download Arma1 mlod ppackages and specifically wheeled or tracked then set up tour pdrive so all the animations are working in o2 and bulldozer ,which should be nothing more than placing the dl on the pdrive (or worst case putting a ca folder on it and putting them in there ).

choose a vehicle that is best matched to the type you want in game ,

next name the sections on your vehicle exactly the same as the ones in your chosen bis vehicle

in the beggining place your model in the working folder of BIS model

in the model config which is in the wheeled / or tracked find the class _which you are mirrioring

after that last closing bracket of that class simply put class nameofyourmule(p3d) : name of the bisclass your mirroring {};

for example

class mule : m1a1 {};

when that works take your model and the model.cfg and place it in your own folder and then to learn what everythings doing , start to create your own names for the selections and animations ( not necessary but will help you learn what they do)

after all that you should only need to follow PVPscenes advice on how to create the config.cpp ;)

Share this post


Link to post
Share on other sites

Sorry for not being on lately I'm at drill this weekend so I can't get on the computer durring the day, but I'll be back home on tuesday since I have a meeting with my college instructor in trying to get into general education classes on the internet.

@Gnat, Thanks for correcting that for me, and clearing up some of my confussion.

@Thromp, Yes as you said it's alot of guess work, and I really don't know what I'm doing when it comes to configs. I would greatly appreciate if the community or someone who understands configs could help recreate my model.cfg with me. I would like to get the MULE to act as a UAV, where the player can pull up a computer and control it remotely, and enable them to swival the cammera/turret freely to engage targets while the MULE is moving forward.

Edited by JSF 82nd Reaper

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
Sign in to follow this  

×