Jump to content
Sign in to follow this  
J. Schmidt

Pegasus Team 101 MULE WIP

Recommended Posts

I just finished the a UGV Controller for the MULE, I yet have to figure out how to get implement an action that when you enter UGV Mode (Remote Control the MULE,) that the unit pulls it out of his gear and puts it in his hands. And when the unit exit UGV Mode he stores the Controller back into his gear.

Here's a picture of the UGV Controller:

UGVControler.jpg

Edited by JSF 82nd Reaper

Share this post


Link to post
Share on other sites

Is there a way in which I can equip the UGV Controller other than using a weapons class? (To better understand what I'm asking I have added this to the config.cpp)

class CfgWeaponsClasses
{
class ACE_Javelin_CLU;
class pt101_mule: ACE_Javelin_CLU
   { 
               displayName = "UGV Controler";
	        WeaponClass = "UGV";
               model = "P:\pt101_mule\pt101_ugvcontroller.p3d";
   };
};

This CfgWeaponclass that I put in the Config.cpp allows me to equip the controller like you would with the ACE_Javelin_CLU, but when I do this the unit holds it like he would binoculars. Also how would I get the screen on the UGV Controler to sync with what the Camera on the MULE is looking at? And do I need to create a whole new weapon class to get a better holding animation and still be able to pull it out when I switch to remote control?

Edited by JSF 82nd Reaper

Share this post


Link to post
Share on other sites

I've done some major updates to the config.cpp file, but the MULE only shoots in one direction no mater which way I face the turret. How do I fix this? It's probably something to do with the config files but I just don't know.

Config.cpp:

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

class CfgWeaponClasses
{
   class UGV
   {
       displayName = "UGV - UGV Controller";
   };
};

class CfgWeapons
{
   class ACE_MX2A;
   class pt101_ugvcontroller: ACE_MX2A
   {
       displayName = "UGV Controller";
       weaponClass = "UGV";
       model = "\pt101_mule\pt101_ugvcontroller.p3d";    
   };
};

class CfgVehicleClasses
{
class UGV
{
	displayName = "UGV - MULE";
};
};

class CfgVehicles 
{
class M1129_MC_EP1;
class pt101_mule: M1129_MC_EP1
   { 
       displayName = "MULE";
	vehicleClass = "UGV";
       model = "P:\pt101_mule\pt101_mule.p3d";
       maxSpeed = 60;
	animated = true;
	scope = 2;
	picture = "\Ca\wheeled\data\ico\stryker_ICV_CA.paa";
	Icon = "\Ca\wheeled\data\map_ico\icomap_Stryker_CA.paa";
	mapSize = 10;
	nameSound = "stryker";
	commanderCanSee = 31;
   	gunnerCanSee = 31;
   	driverOpticsModel = "\ca\Wheeled\optika_stryker_driver";
	soundEngine[] = {\ca\wheeled\Data\Sound\Stryker_ICV_engine,db-10,0.8};
	soundGear[] = {\ca\wheeled\Data\Sound\shifter_v3,db-65,1};
	SoundGetIn[] = {\ca\wheeled\Data\Sound\M151A1_door_v1,db-45,1};
	SoundGetOut[] = {\ca\wheeled\Data\Sound\M151A1_door_v1,db-50,1};
	memoryPointSupply = "supply";
		selectionFireAnim = "zasleh";
	enableGPS = true;
	transportSoldier = 0;
	side = 1;
	crew = "US_Soldier_Crew_EP1";
	fuelCapacity = 246;
	armor = 150;
	damageResistance = 0.01199;
	crewVulnerable = false;
	threat[] = {0.5, 0.5, 0.5};
	viewCargoShadow = true;
	viewCargoShadowDiff = 0.05;
	viewDriverShadowDiff = 0.05;
	viewGunnerShadowDiff = 0.05;
	hideProxyInCombat = 1;
	weapons[] = {};
	magazines[] = {};
	hasGunner = true;
	gunnerHasFlares = true;
};
};

class Turrets
{
class Turret;
class MainTurret: Turret
{
	body = "mainTurret";
	gun = "mainGun";
	scope = 2;
	gunBeg = "gun_muzzle";
	gunEnd = "gun_chamber";
	minElev = -25; 
	maxElev = +60;
	initElev = 0;
	minTurn = -90; 
	maxTurn = +90;
	initTurn = 0;
	minTurnAI = -90;
	maxTurnAI = +90;
	outGunnerMayFire = false;
	gunnerOpticsModel = "\ca\Tracked\optika_stryker_gunner";
	gunnerOutOpticsModel = "";
	gunnerForceOptics = false;
	memoryPointGunnerOutOptics = "";
	memoryPointGunnerOptics = "gunnerview";
	memoryPointGun = "machinegun";
	selectionFireAnim = "zasleh";
};

class Camera;
class CommanderOptics: Camera
{
	body = "camera";
	gun = "comturret";
	scope = 1;
	animationSourceBody = "obsTurret";
	animationSourceGun = "obsGun";
	gunBeg = "";
	gunEnd = "";
	minElev = -5;
	maxElev = 20;
	initElev = 0;
	minTurn = -360;
	maxTurn = 360;
	initTurn = 0;
	minTurnAI = -90;
	maxTurnAI = +90;
	outGunnerMayFire = false;
	inGunnerMayFire = true;
	gunnerOpticsModel = "\ca\Tracked\optika_stryker_gunner";
	gunnerOutOpticsModel = "";
	gunnerOutForceOptics = 0;
	gunnerOutOpticsShowCursor = 0;
	memoryPointGunnerOutOptics = "";
	memoryPointGunnerOptics = "commanderview";
	memoryPointGun = "camera";
	selectionFireAnim = "zasleh_1";
};
};

Model.cfg

class CfgSkeletons
{
class Default;
class pt101_mule: Default
{
	isDiscrete=1;
	skeletonInherit="";
	skeletonName="pt101_mule";
	skeletonBones[]=
	{
		"turret","maingun",
		"minigun","turret",
		"turret","comturret",
		"camera","turret",
		"comturret","camera",
		"camera","comturret",
		"wheel1","",
		"wheel2","",
		"wheel3","",
		"wheel4","",
		"wheel5","",
		"wheel6",""
	};
};
};
class CfgModels
{
class Default
{
	isDiscrete="true";
	skeletonInherit="";
	skeletonBones[]={};
};
class pt101_mule: Default
{
	skeletonName="pt101_mule";
	sectionsInherit="";
	sections[]=
	{
		"turret",
		"minigun",
		"camera",
		"wheel1",
		"wheel2",
		"wheel3",
		"wheel4",
		"wheel5",
		"wheel6"
	};
	class Animations
	{
		class FrontWheelL
		{
			type="rotationX";
			source="wheel";
			selection="wheel1";
			axis="wheel1_axis";
			memory="1";
			sourceAddress="loop";
			minValue=0;
			maxValue=1;
			angle0="0";
			angle1="rad -360";
		};
		class FrontWheelR
		{
			type="rotationX";
			source="wheel";
			selection="wheel2";
			axis="wheel2_axis";
			memory="1";
			sourceAddress="loop";
			minValue=0;
			maxValue=1;
			angle0="0";
			angle1="rad -360";
		};
		class CenterWheelL
		{
			type="rotationX";
			source="wheel";
			selection="wheel3";
			axis="wheel3_axis";
			memory="1";
			sourceAddress="loop";
			minValue=0;
			maxValue=1;
			angle0="0";
			angle1="rad -360";
		};
		class CenterWheelR
		{
			type="rotationX";
			source="wheel";
			selection="wheel4";
			axis="wheel4_axis";
			memory="1";
			sourceAddress="loop";
			minValue=0;
			maxValue=1;
			angle0="0";
			angle1="rad -360";
		};
		class RearWheelL
		{
			type="rotationX";
			source="wheel";
			selection="wheel5";
			axis="wheel5_axis";
			memory="1";
			sourceAddress="loop";
			minValue=0;
			maxValue=1;
			angle0="0";
			angle1="rad -360";
		};
		class RearWheelR
		{
			type="rotationX";
			source="wheel";
			selection="wheel6";
			axis="wheel6_axis";
			memory="1";
			sourceAddress="loop";
			minValue=0;
			maxValue=1;
			angle0="0";
			angle1="rad -360";
		};
		class Turret
		{
			type="rotationY";
			source="mainTurret";
			selection="turret";
			axis="turret_axis";
			memory="1";
			sourceAddress="loop";
			minValue=0;
			maxValue=1;
			angle0="0";
			angle1="rad +360";
		};
		class Minigun
		{
			type="rotationZ";
			source="revolving";
			selection="minigun";
			axis="minigun_axis";
			memory="1";
			sourceAddress="loop";
			minValue=0;
			maxValue=1;
			angle0="0";
			angle1="rad -360";
		};
		class Camera
		{
			type="rotation";
			source="obsTurret";
			selection="camera";
			axis="camera_axis";
			memory="1";
			sourceAddress="loop";
			minValue=0;
			maxValue=1;
			angle0="0";
			angle1="rad +360";
		};
	};
};
};

(BTW, I changed the screen of the UGV Controller to black, along with sizing it down a bit to make it look more realistic.)

Edited by JSF 82nd Reaper

Share this post


Link to post
Share on other sites

I'm trying to get a proxy to load that I created when added to the MULE but have not had any luck. The proxy that I added is a railing that I created that goes all the way around the MULE (Where one would attach their ruck) and saved it to \ca\temp\proxies\pt101_mule_grate. It shows up in the Buldozer View but when I check the game it says something like cannot load object, or cannot load proxy. I don't know what I'm missing, and I still haven't fixed the turret problem, the AI still are crazy and I can't get the weapons to work properly.

For the weapons all I want is for the selection of only the 8 missiles and the machine gun, but all I'm getting is the weaponry that the stryker class I'm using has and it's not synced to any of the animations/turret direction. I don't want the commander to be able to shoot anything, and I need the missiles to act like they would when used on an aircraft or helo, and the machine gun to sync when shooting.

What am I missing and, or is missed up?

---------- Post added at 10:40 PM ---------- Previous post was at 10:33 PM ----------

I'm trying to get a proxy to load that I created when added to the MULE but have not had any luck. The proxy that I added is a railing that I created that goes all the way around the MULE (Where one would attach their ruck) and saved it to \ca\temp\proxies\pt101_mule_grate. It shows up in the Buldozer View but when I check the game it says something like cannot load object, or cannot load proxy. I don't know what I'm missing, and I still haven't fixed the turret problem, the AI still are crazy and I can't get the weapons to work properly.

I created the proxy because when I add the railing to the model itself, I get the "Too many Vertices" error, and I've simplified everything that I can already.

Edited by JSF 82nd Reaper

Share this post


Link to post
Share on other sites

I have good news, I was able to fix the turret and camera so the AI doesn't spin in circles very fast and all the the time. But I still haven't figured out how to get the sights of the turret to work, and shoot in the direction of the turret. Also I haven't worked on the remote control script yet and still need help to fix the load-out of the MULE, and fire the mini-gun. I also need to get the missiles to fire. Both the mini-gun and the missile launcher are animated but not working, and I don't know what I need to do. I also need to texture the model still instead of using the paint option in Oxygen 2. I will provide the updated model.cfg and config.cpp bellow when I get on my desktop computer.

Share this post


Link to post
Share on other sites

Try some these parameters. Use your on variable name.

gunBeg = "usti hlavne1";

gunEnd = "konec hlavne1";

memoryPointGun = "usti hlavne1";

missileBeg = "spice rakety";

missileEnd = "konec rakety";

Failing that, send it to me and I'll have a look.

Share this post


Link to post
Share on other sites

Thanks to much effort and hard work from Gnat the MULE has a better loadout and the many errors that were occurring now are gone. Now I can move on to playing around with texturing and creating the Remote Control script with Feint.

Here's an update picture of the MULE with some armor texture I'm playing around with, without UV Mapping, but when I'm done it'll be UV Mapped.

http://i1138.photobucket.com/albums/n529/JSF_82nd_Reaper/Project%2001%20MULE/pt101_mule_update02.jpg (736 kB)

Edited by JSF 82nd Reaper

Share this post


Link to post
Share on other sites

I'm having trouble with the UV Editor in Oxygen 2, I click it and it pops up on the task-bar but there's no window? So I'm unable to create the UV Mapping without it, I tried using 3ds Max 9 but I don't like the Unwrap UV editing it has.

I've found that if I use "dofollow.sqf" script the MULE acts more like a UGV, and I still can pull up the Remote Control and control it. (It's still buggy though.)

Share this post


Link to post
Share on other sites

For a model that simple I'd start my texture maping the simple way.

Select a face or 2, press A, drag a box over the general area, rightclick inside the box, load texture, press B to apply that texture against the face. Rightclick Unload texture.

..... if you didn't know already.

Share this post


Link to post
Share on other sites

@Gnat thanks to your suggestion I'm able to add textures without the UV Mapping. I was also successful at getting the Rails to finally show in game with your suggestion of putting it in the same folder of the MULE.

Here's a short video that I created with the 2nd Update of the MULE, which couldn't have been possible without Gnat's help. Thank you Gnat!

Share this post


Link to post
Share on other sites

I finally finished the texturing and am quite pleased with the outcome. Now it's just the matter of adding any last things to the mule, creating a better Remote Control script, and fixing anything that may need to be fixed.

Share this post


Link to post
Share on other sites

@Gnat I'm still having no luck with getting the Gear action to show up when I'm behind the MULE. I'll post the Config.cpp so you can check what may be wrong. I was wondering because of the edit lod you put in, could it have messed up the cargo/supply memory point in the memory lod?

Config.cpp

class CfgPatches
{
class CAWheeled
{
	units[] = {"pt101_mule","pt101_ugvcontroller"};
	weapons[] = {};
	requiredVersion = 0.1;
	requiredAddons[] = {"CAWheeled_E"};
};
};
class CfgWeaponClasses 
{ 
   class UGV 
   { 
       displayName = "UGV - UGV Controller"; 
   }; 
}; 
class CfgWeapons 
{ 
   class ACE_MX2A; 
   class pt101_ugvcontroller: ACE_MX2A 
   { 
       displayName = "UGV Controller"; 
       weaponClass = "UGV"; 
       model = "\pt101_mule\pt101_ugvcontroller.p3d";     
   }; 
}; 
class CfgVehicleClasses
{
class UGV
{
	displayName = "UGV - MULE";
};
};
class CfgVehicles 
{
class LAV25;
class Mule_Step1 : LAV25
{
	scope = 1;
	class NewTurret;
	class Turrets;
	class MainTurret;
	class CommanderOptics;
	class viewpilot;
	class viewgunner;
	class AnimationSources;
	class HitPoints;
};
class pt101_mule: Mule_Step1
   { 

	faction = "BIS_US";

       displayName = "MULE";

//		vehicleClass = "UGV";

       model = "\pt101_mule\pt101_mule.p3d";
       maxSpeed = 60;
	animated = true;
	scope = 2;
	picture = "\Ca\wheeled\data\ico\stryker_ICV_CA.paa";
	Icon = "\Ca\wheeled\data\map_ico\icomap_Stryker_CA.paa";
	mapSize = 10;
	nameSound = "stryker";
	commanderCanSee = 31;
   	gunnerCanSee = 31;
   	driverOpticsModel = "\ca\Wheeled\optika_stryker_driver";
	soundEngine[] = {\ca\wheeled\Data\Sound\Stryker_ICV_engine,db-10,0.8};
	soundGear[] = {\ca\wheeled\Data\Sound\shifter_v3,db-65,1};
	SoundGetIn[] = {\ca\wheeled\Data\Sound\M151A1_door_v1,db-45,1};
	SoundGetOut[] = {\ca\wheeled\Data\Sound\M151A1_door_v1,db-50,1};

	enableGPS = true;
	transportSoldier = 0;
	side = 1;
	crew = "US_Soldier_Crew_EP1";
	fuelCapacity = 246;
	armor = 150;
	damageResistance = 0.01199;
	crewVulnerable = false;
	threat[] = {0.5, 0.5, 0.5};
	viewCargoShadow = true;
	viewCargoShadowDiff = 0.05;
	viewDriverShadowDiff = 0.05;
	viewGunnerShadowDiff = 0.05;
	hideProxyInCombat = 1;
	transportMaxWeapons = 5000; 
       transportMaxMagazines = 20000; 
       transportMaxBackpacks = 25; 
       supplyRadius = 1.4;

	gunnerHasFlares = true;

//---------------------------		
// Copy of LAV-25 Base View definitions
//---------------------------

	class ViewOptics
	{
		initAngleX = 0;
		minAngleX = -30;
		maxAngleX = 30;
		initAngleY = 0;
		minAngleY = -100;
		maxAngleY = 100;
		initFov = 0.466;
		minFov = 0.466;
		maxFov = 0.466;
	};
	class ViewPilot
	{
		initAngleX = 10;
		minAngleX = -65;
		maxAngleX = 85;
		initAngleY = 20;
		minAngleY = -150;
		maxAngleY = 150;
		initFov = 0.7;
		minFov = 0.25;
		maxFov = 1.4;
	};
//---------------------------		
// Copy of LAV-25 Base Turret definitions
//---------------------------
	class Turrets: Turrets
	{
		class MainTurret: MainTurret
		{
			weapons[] = {"M242","M240_veh"};
			magazines[] = {"210Rnd_25mm_M242_APDS","210Rnd_25mm_M242_HEI","1200Rnd_762x51_M240"};
			soundServo[] = {"\ca\Weapons\Data\Sound\gun_elevate",0.0177828,1,15};
			minElev = -4.5;
			maxElev = 74;
			minTurn = -360;
			maxTurn = 360;
			gunnerAction = "LAV25_Gunner_out";
			gunnerInAction = "LAV25_Gunner";
			forceHideGunner = 0;
			gunnerOpticsModel = "\ca\weapons\2Dscope_LAV_7";
			gunnerOutOpticsModel = "";
			memoryPointGun = "machinegun";
			gunBeg = "muzzle_1";
			gunEnd = "chamber_1";
			body = "MainTurret";
			gun = "MainGun";
			animationSourceBody = "MainTurret";
			animationSourceGun = "MainGun";
			gunnerForceOptics = 1;
			outGunnerMayFire = 0;
			startEngine = 1;
			primaryGunner = 4;
			class HitPoints: HitPoints
			{
				class HitTurret
				{
					armor = 0.8;
					material = -1;
					name = "vez";
					visual = "vez";
					passThrough = 1;
				};
			};
			selectionFireAnim = "zasleh_1";
			class ViewGunner
			{
				initAngleX = 5;
				minAngleX = -65;
				maxAngleX = 85;
				initAngleY = 0;
				minAngleY = -150;
				maxAngleY = 150;
				initFov = 0.7;
				minFov = 0.25;
				maxFov = 1.1;
			};
			gunnerOpticsEffect[] = {"TankGunnerOptics2","OpticsBlur1","OpticsCHAbera1"};
			class ViewOptics
			{
				initAngleX = 0;
				minAngleX = -30;
				maxAngleX = 30;
				initAngleY = 0;
				minAngleY = -100;
				maxAngleY = 100;
				initFov = 0.2;
				minFov = 0.05;
				maxFov = 0.2;
			};
			class Turrets
			{
				class CommanderOptics: NewTurret
				{
					proxyType = "CPCommander";
					proxyIndex = 1;
					gunnerName = "commander";
					primaryGunner = 0;
					primaryObserver = 1;
					gunnerOpticsShowCursor = 0;
					body = "obsTurret";
					gun = "obsGun";
					animationSourceBody = "obsTurret";
					animationSourceGun = "obsGun";
					animationSourceHatch = "hatchCommander";
					soundServo[] = {"",0.00316228,1};
					startEngine = 0;
					gunBeg = "";
					gunEnd = "";
					minElev = -4;
					maxElev = 20;
					initElev = 0;
					minTurn = -360;
					maxTurn = 360;
					initTurn = 0;
					commanding = 2;
					viewGunnerInExternal = 0;
					gunnerOpticsModel = "\ca\weapons\2Dscope_com2";
					gunnerOutOpticsModel = "";
					gunnerOutOpticsColor[] = {0,0,0,1};
					gunnerOutForceOptics = 0;
					gunnerOutOpticsShowCursor = 0;
					memoryPointGunnerOutOptics = "commander_weapon_view";
					memoryPointGunnerOptics = "commanderview";
					memoryPointsGetInGunner = "pos driver";
					memoryPointsGetInGunnerDir = "pos driver dir";
					class ViewGunner
					{
						initAngleX = 5;
						minAngleX = -65;
						maxAngleX = 85;
						initAngleY = 0;
						minAngleY = -150;
						maxAngleY = 150;
						initFov = 0.7;
						minFov = 0.25;
						maxFov = 1.1;
					};
					gunnerOpticsEffect[] = {"TankGunnerOptics2","OpticsBlur1","OpticsCHAbera1"};
					class ViewOptics
					{
						initAngleX = 0;
						minAngleX = -30;
						maxAngleX = 30;
						initAngleY = 0;
						minAngleY = -100;
						maxAngleY = 100;
						initFov = 0.3;
						minFov = 0.025;
						maxFov = 0.3;
					};
					gunnerInAction = "LAV25_Commander";
					gunnerAction = "LAV25_Commander_Out";
					outGunnerMayFire = 1;
					weapons[] = {"SmokeLauncher"};
					magazines[] = {"SmokeLauncherMag","SmokeLauncherMag"};
					stabilizedInAxes = 0;
				};
			};
		};
	};
};
};

---------- Post added at 01:28 PM ---------- Previous post was at 01:27 PM ----------

Here an updated picture of the MULE being 100% textured. I'm pleased with it myself, but I know there can always be improvements, so I'm not going to stress it, since it it my first time texturing something, and due to not being able to create a UV Map for the UV editor isn't working anymore for some reason.

http://i1138.photobucket.com/albums/n529/JSF_82nd_Reaper/Project%2001%20MULE/pt101_mule_textured.jpg (714 kB)

Edited by JSF 82nd Reaper

Share this post


Link to post
Share on other sites

:eek: Unfortunately I got really carried away with texturing and now have created 5 variations of the MULE, and I don't know how to get them all included in the Config.cpp and Model.cfg files. I was able to get one of the Models to work, but now the Machine-gun's firing animation doesn't work anymore, but all the other animation do. :eek:

Here's are pictures of the 5 different variations of the MULE:

MULE Woodland

http://i1138.photobucket.com/albums/n529/JSF_82nd_Reaper/Project%2001%20MULE/MULE%20Variations/MULEWoodland.jpg (557 kB)

MULE Tan

http://i1138.photobucket.com/albums/n529/JSF_82nd_Reaper/Project%2001%20MULE/MULE%20Variations/MULETan.jpg (576 kB)

MULE Multicam

http://i1138.photobucket.com/albums/n529/JSF_82nd_Reaper/Project%2001%20MULE/MULE%20Variations/MULEMulticam.jpg (573 kB)

MULE Digital Desert

http://i1138.photobucket.com/albums/n529/JSF_82nd_Reaper/Project%2001%20MULE/MULE%20Variations/MULEDigitalDesert.jpg (563 kB)

MULE Desert

http://i1138.photobucket.com/albums/n529/JSF_82nd_Reaper/Project%2001%20MULE/MULE%20Variations/MULEDesert.jpg (541 kB)

Share this post


Link to post
Share on other sites

Odd about the Gear

Try changing

transportSoldier = 1;

As for multiple textures, you don't need multiple models, you can use these parameters;

hiddenSelections[]={"skin","wingleft","wingright"};

hiddenSelectionsTextures[] = {"\csj_p38\data\p38_skinA.paa","\csj_p38\data\p38_skinB.paa","\csj_p38\data\p38_skinB.paa","",""};

in each vehicle class definition.

How many textures are you using for each vehicle, just 1?

Whats their file names?

Share this post


Link to post
Share on other sites

@Gnat There are 4 seperate textures on each vehicle. The camera, lights, and suspension on each vehicle are the same "mule_tan_co.paa". Also all the wheels on each vehicle share the same texture as well (I think it's called the "humvee_details_co.paa") Then the hull's and turret's on each vehicle is what changes; One vehicle has "mule_digital_desert_co.paa", another vehicle uses the "mule_desert_co.paa", then "mule_multicam_co.paa", "mule_woodland_co.paa", and lastly the first MULE that I textured "mule_tan_co.paa".

So I can delete the other four Models, and only have to add a script in? If so I don't know where to put it in the config.cpp file, and the model.cfg.

---------- Post added at 02:17 PM ---------- Previous post was at 12:34 PM ----------

@Gnat I put the Config.cpp and Model.cfg back to their original state when you sent the edits back to me via email. I've also deleted the extra MULE models and am now back to just the one with its original name "pt101_mule".

I looked into many discussions about hiddenSelections and hiddenSelectionsTextures, and only understand to put the following lines into the Class CfgVehicles of the Config.cpp:

		hiddenSelections[] = 
	{
		"hull",
		"turret"
	};
	hiddenSelectionsTexture[] = 
	{
		"\pt101_mule\data\mule_desert_co.paa",
		"\pt101_mule\data\mule_digital_desert_co.paa",
		"\pt101_mule\data\mule_multicam_co.paa",
		"\pt101_mule\data\mule_woodland_co.paa"
	};		

I also added the "hull" and "turret" to the "sections" area in the Model.cfg after creating the "hull" and "turret" to lod 1's named selections. So what is needed so when someone places the MULE in the editor of the game they're able to choose what variant of the MULE they want?

Will I have to add the tan variant texture to the hiddenSelectionsTexture as well as keeping the "turret" and the "hull" of the MULE untextured?

Edited by JSF 82nd Reaper

Share this post


Link to post
Share on other sites

Wrong usage of those parameters.

- Ignore the textures that are the same on all vehicles.

- In O2, in the List of Textures window, CONTROL DOUBLE-CLICK the texture that is 'changing' (mule_desert_co.paa ? )

- This will highlight all faces with that texture.

- With these faces selected, in the Named Properties window, RIGHT-CLICK->NEW, call it "Skin1"

- Do this naming in every LOD where that texture is in use.

- Save the model

- In the MODEL.CFG, add "Skin1" to the sections[]= list.

Now in CONFIG.CPP between the last }; and the second last }; add;

class pt101_mule02: pt101_mule01
{
	displayName = "MULE DD";
	hiddenSelections[] = {"Skin1"}; 
	hiddenSelectionsTexture[] = {"\pt101_mule\data\mule_digital_desert_co.paa"};
};
class pt101_mule03: pt101_mule01
{
	displayName = "MULE MC";
	hiddenSelections[] = {"Skin1"}; 
	hiddenSelectionsTexture[] = {"\pt101_mule\data\mule_multicam_co.paa"};
};
class pt101_mule04: pt101_mule01
{
	displayName = "MULE WL";
	hiddenSelections[] = {"Skin1"}; 
	hiddenSelectionsTexture[] = {"\pt101_mule\data\mule_woodland_co.paa"};
};

Share this post


Link to post
Share on other sites

@Gnat it's working but not working at the same time. I can place 5 variations of the MULE, but they all look the same and do not have the texture that is suppose to be on them. I believe they have the LAV texture, which is one of the classes that are being used in the config.cpp file for the optics, turret, and weaponry.

Share this post


Link to post
Share on other sites

@Gnat Here's the full Model.cfg and Config.cpp

Config.cpp

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

class CfgVehicleClasses
{
class UGV
{
	displayName = "UGV - MULE";
};
};

class CfgVehicles 
{
class LAV25;
class Mule_Step1 : LAV25
{
	scope = 1;
	class NewTurret;
	class Turrets;
	class MainTurret;
	class CommanderOptics;
	class viewpilot;
	class viewgunner;
	class AnimationSources;
	class HitPoints;
};

class pt101_mule01: Mule_Step1
   { 

	faction = "BIS_US";

       displayName = "MULE T";
	vehicleClass = "UGV";
       model = "\pt101_mule\pt101_mule.p3d";
       maxSpeed = 60;
	animated = true;
	scope = 2;
	picture = "\Ca\wheeled\data\ico\stryker_ICV_CA.paa";
	Icon = "\Ca\wheeled\data\map_ico\icomap_Stryker_CA.paa";
	mapSize = 10;
	nameSound = "stryker";
	commanderCanSee = 31;
   	gunnerCanSee = 31;
   	driverOpticsModel = "\ca\Wheeled\optika_stryker_driver";
	soundEngine[] = {\ca\wheeled\Data\Sound\Stryker_ICV_engine,db-10,0.8};
	soundGear[] = {\ca\wheeled\Data\Sound\shifter_v3,db-65,1};
	SoundGetIn[] = {\ca\wheeled\Data\Sound\M151A1_door_v1,db-45,1};
	SoundGetOut[] = {\ca\wheeled\Data\Sound\M151A1_door_v1,db-50,1};

	enableGPS = true;
	transportSoldier = 0;
	side = 1;
	crew = "US_Soldier_Crew_EP1";
	fuelCapacity = 246;
	armor = 150;
	damageResistance = 0.01199;
	crewVulnerable = false;
	threat[] = {0.5, 0.5, 0.5};
	viewCargoShadow = true;
	viewCargoShadowDiff = 0.05;
	viewDriverShadowDiff = 0.05;
	viewGunnerShadowDiff = 0.05;
	hideProxyInCombat = 1;

	gunnerHasFlares = true;

//---------------------------		
// Copy of LAV-25 Base View definitions
//---------------------------

	class ViewOptics
	{
		initAngleX = 0;
		minAngleX = -30;
		maxAngleX = 30;
		initAngleY = 0;
		minAngleY = -100;
		maxAngleY = 100;
		initFov = 0.466;
		minFov = 0.466;
		maxFov = 0.466;
	};
	class ViewPilot
	{
		initAngleX = 10;
		minAngleX = -65;
		maxAngleX = 85;
		initAngleY = 20;
		minAngleY = -150;
		maxAngleY = 150;
		initFov = 0.7;
		minFov = 0.25;
		maxFov = 1.4;
	};
//---------------------------		
// Copy of LAV-25 Base Turret definitions
//---------------------------
	class Turrets: Turrets
	{
		class MainTurret: MainTurret
		{
			weapons[] = {"M242","M240_veh"};
			magazines[] = {"210Rnd_25mm_M242_APDS","210Rnd_25mm_M242_HEI","1200Rnd_762x51_M240"};
			soundServo[] = {"\ca\Weapons\Data\Sound\gun_elevate",0.0177828,1,15};
			minElev = -4.5;
			maxElev = 74;
			minTurn = -360;
			maxTurn = 360;
			gunnerAction = "LAV25_Gunner_out";
			gunnerInAction = "LAV25_Gunner";
			forceHideGunner = 0;
			gunnerOpticsModel = "\ca\weapons\2Dscope_LAV_7";
			gunnerOutOpticsModel = "";
			memoryPointGun = "machinegun";
			gunBeg = "muzzle_1";
			gunEnd = "chamber_1";
			body = "MainTurret";
			gun = "MainGun";
			animationSourceBody = "MainTurret";
			animationSourceGun = "MainGun";
			gunnerForceOptics = 1;
			outGunnerMayFire = 0;
			startEngine = 1;
			primaryGunner = 4;
			class HitPoints: HitPoints
			{
				class HitTurret
				{
					armor = 0.8;
					material = -1;
					name = "vez";
					visual = "vez";
					passThrough = 1;
				};
			};
			selectionFireAnim = "zasleh_1";
			class ViewGunner
			{
				initAngleX = 5;
				minAngleX = -65;
				maxAngleX = 85;
				initAngleY = 0;
				minAngleY = -150;
				maxAngleY = 150;
				initFov = 0.7;
				minFov = 0.25;
				maxFov = 1.1;
			};
			gunnerOpticsEffect[] = {"TankGunnerOptics2","OpticsBlur1","OpticsCHAbera1"};
			class ViewOptics
			{
				initAngleX = 0;
				minAngleX = -30;
				maxAngleX = 30;
				initAngleY = 0;
				minAngleY = -100;
				maxAngleY = 100;
				initFov = 0.2;
				minFov = 0.05;
				maxFov = 0.2;
			};
			class Turrets
			{
				class CommanderOptics: NewTurret
				{
					proxyType = "CPCommander";
					proxyIndex = 1;
					gunnerName = "commander";
					primaryGunner = 0;
					primaryObserver = 1;
					gunnerOpticsShowCursor = 0;
					body = "obsTurret";
					gun = "obsGun";
					animationSourceBody = "obsTurret";
					animationSourceGun = "obsGun";
					animationSourceHatch = "hatchCommander";
					soundServo[] = {"",0.00316228,1};
					startEngine = 0;
					gunBeg = "";
					gunEnd = "";
					minElev = -4;
					maxElev = 20;
					initElev = 0;
					minTurn = -360;
					maxTurn = 360;
					initTurn = 0;
					commanding = 2;
					viewGunnerInExternal = 0;
					gunnerOpticsModel = "\ca\weapons\2Dscope_com2";
					gunnerOutOpticsModel = "";
					gunnerOutOpticsColor[] = {0,0,0,1};
					gunnerOutForceOptics = 0;
					gunnerOutOpticsShowCursor = 0;
					memoryPointGunnerOutOptics = "commander_weapon_view";
					memoryPointGunnerOptics = "commanderview";
					memoryPointsGetInGunner = "pos driver";
					memoryPointsGetInGunnerDir = "pos driver dir";
					class ViewGunner
					{
						initAngleX = 5;
						minAngleX = -65;
						maxAngleX = 85;
						initAngleY = 0;
						minAngleY = -150;
						maxAngleY = 150;
						initFov = 0.7;
						minFov = 0.25;
						maxFov = 1.1;
					};
					gunnerOpticsEffect[] = {"TankGunnerOptics2","OpticsBlur1","OpticsCHAbera1"};
					class ViewOptics
					{
						initAngleX = 0;
						minAngleX = -30;
						maxAngleX = 30;
						initAngleY = 0;
						minAngleY = -100;
						maxAngleY = 100;
						initFov = 0.3;
						minFov = 0.025;
						maxFov = 0.3;
					};
					gunnerInAction = "LAV25_Commander";
					gunnerAction = "LAV25_Commander_Out";
					outGunnerMayFire = 1;
					weapons[] = {"SmokeLauncher"};
					magazines[] = {"SmokeLauncherMag","SmokeLauncherMag"};
					stabilizedInAxes = 0;
				};
			};
		};
	};
};
    class pt101_mule02: pt101_mule01 
   { 
       displayName = "MULE DD"; 
       hiddenSelections[] = {"Skin1"};  
       hiddenSelectionsTexture[] = {"\pt101_mule\data\mule_digital_desert_co.paa"}; 
   }; 
   class pt101_mule03: pt101_mule01 
   { 
       displayName = "MULE MC"; 
       hiddenSelections[] = {"Skin1"};  
       hiddenSelectionsTexture[] = {"\pt101_mule\data\mule_multicam_co.paa"}; 
   }; 
   class pt101_mule04: pt101_mule01 
   { 
       displayName = "MULE WL"; 
       hiddenSelections[] = {"Skin1"};  
       hiddenSelectionsTexture[] = {"\pt101_mule\data\mule_woodland_co.paa"}; 
   }; 
};

Model.cfg

class CfgSkeletons
{
class Default;
class pt101_mule: Default
{
	isDiscrete=1;
	skeletonInherit="";
	skeletonName="pt101_mule";
	skeletonBones[]=
	{
		"MainTurret","";
		"MainGun","MainTurret",
		"canister","MainTurret",
		"comturret","MainTurret",
		"camera","MainTurret",
		"CameraUp","camera",
		"wheel1","",
		"wheel2","",
		"wheel3","",
		"wheel4","",
		"wheel5","",
		"wheel6",""
	};
};
};
class CfgModels
{
class Default
{
	isDiscrete="true";
	skeletonInherit="";
	skeletonBones[]={};
};
class pt101_mule: Default
{
	skeletonName="pt101_mule";
	sectionsInherit="";
	sections[]=
	{
		"MainTurret",
		"MainGun",
		"canister",
		"camera",
		"CameraUp",
		"wheel1",
		"wheel2",
		"wheel3",
		"wheel4",
		"wheel5",
		"wheel6",
		"Skin1"
	};
	class Animations
	{
		class FrontWheelL
		{
			type="rotationX";
			source="wheel";
			selection="wheel1";
			axis="wheel1_axis";
			memory="1";
			sourceAddress="loop";
			minValue=0;
			maxValue=2;
			angle0="0";
			angle1="rad -360";
		};
		class FrontWheelR
		{
			type="rotationX";
			source="wheel";
			selection="wheel2";
			axis="wheel2_axis";
			memory="1";
			sourceAddress="loop";
			minValue=0;
			maxValue=2;
			angle0="0";
			angle1="rad -360";
		};
		class CenterWheelL
		{
			type="rotationX";
			source="wheel";
			selection="wheel3";
			axis="wheel3_axis";
			memory="1";
			sourceAddress="loop";
			minValue=0;
			maxValue=2;
			angle0="0";
			angle1="rad -360";
		};
		class CenterWheelR
		{
			type="rotationX";
			source="wheel";
			selection="wheel4";
			axis="wheel4_axis";
			memory="1";
			sourceAddress="loop";
			minValue=0;
			maxValue=2;
			angle0="0";
			angle1="rad -360";
		};
		class RearWheelL
		{
			type="rotationX";
			source="wheel";
			selection="wheel5";
			axis="wheel5_axis";
			memory="1";
			sourceAddress="loop";
			minValue=0;
			maxValue=2;
			angle0="0";
			angle1="rad -360";
		};
		class RearWheelR
		{
			type="rotationX";
			source="wheel";
			selection="wheel6";
			axis="wheel6_axis";
			memory="1";
			sourceAddress="loop";
			minValue=0;
			maxValue=2;
			angle0="0";
			angle1="rad -360";
		};
		class MainTurret
		{
			type="rotationY";
			source="mainTurret";
			selection="MainTurret";
			axis="turret_axis";
			memory="1";
			sourceAddress="loop";
			minValue="rad -360";
			maxValue="rad +360";
			angle0="rad -360";
			angle1="rad +360";
		};
		class MainGun
		{
			type="rotationX";
			source="MainGun";
			selection="MainGun";
			axis="gun_axis";
			memory="1";
			minValue="rad -360";
			maxValue="rad +360";
			angle0="rad -360";
			angle1="rad +360";
		};
		class MiniGun
		{
			type="rotationZ";
			source="revolving";
			selection="minigun";
			axis="minigun_axis";
			memory="1";
			sourceAddress="loop";
			minValue=0;
			maxValue=1;
			angle0="rad -360";
			angle1="rad +360";
		};
		class Camera
		{
			type="rotationY";
			source="obsTurret";
			selection="camera";
			axis="camera_axis";
			memory="1";
			minValue="rad -360";
			maxValue="rad +360";
			angle0="rad -360";
			angle1="rad +360";
		};
		class CameraUp
		{
			type="rotationX";
			source="obsGun";
			selection="cameraup";
			axis="cameraup_axis";
			memory="1";
			minValue="rad -360";
			maxValue="rad +360";
			angle0="rad -360";
			angle1="rad +360";
		};
		class Canister
		{
			type="rotationX";
			source="MainGun";
			selection="canister";
			axis="canister_axis";
			memory="1";
			angle0="rad 0";
			angle1="rad +20";
		};
	};
};
};

Share this post


Link to post
Share on other sites

@Gnat You'll find the full Model.cfg and Config.cpp on page 7, thanks for all the help you've been offering me.

I'm am trying to figure out how to add the "Enter UGV Mode" just to the UGV Controller I created, without the mission creators having to do all kinds of things just to get it to work in-game. So all they have to do is put the mule down in the editor and equip the UGV Controller and go on about their business. Any Suggestions? I don't know how to get it to that point and fixed up to it's not all glitchy.

Enter.sqs

UGV_Operator remoteControl Commander UGV; Commander UGV switchCamera "Gunner";

Exit.sqs

objNull remoteControl Commander UGV; UGV_Operator switchCamera "External";

Right now the only way I can get this scripts to work is if I add a function module and put this in it:

UGV_Operator addAction ["Enter UGV Mode", "scripts\enter.sqs"]; UGV addAction ["Exit UGV Mode", "scripts\exit.sqs"];

The player who gets the Action to "Enter UGV Mode" is named the "UGV_Operator", and the MULE is named the "UGV" so it can get the Action to "Exit UGV Mode". But just like what you posted; was that when you use this the Camera that the Remote Control switches to is bugged out. I have also found that if I don't switch back to commander before Exiting the script, I either can't go back into Remote Control, or if I'm able to I can't switch positions in the MULE.

Another thing that happens is whenever I do exit the Remote control script, but then go back into it at a latter point in time I find that where ever I exited the remote control script at, the camera is back at the first known location of the mule and is still bugged out. So to counter this I have to switch to a different position in order to finally be where the MULE is at. Do you have any suggestions for this, or do you think you can come up with a script or something that'll work around this?

J.W. The rails that go around the outside of the MULE are finally spawning in-game. I wanted to do this so players can go up to the MULE and attach their rucks to the rails. Do you know how I could get this to work, via action when near the MULE?

:j: I am trying my best in trying to get this addon released within the month, but with how it's looking right now I may not be able to do that. I'm only a beginner and hardly know anything about scripting and 3d modeling. Any help that the community can offer will be Greatly Appreciated. :j:

Share this post


Link to post
Share on other sites

Great news, I've successfully created an actual working Remote Control script!!! But I need some help to add one little thing to it. I can't switch positions from the driver to the commander and gunner seat. I realize that the commander, driver, and gunner are not in the same group, but if when I do put them in the same group the remote control script becomes glitchy again. Does anyone know a way in which can counter this without grouping them in the same group? Also how do I get the scripts inside the pbo file, and work to where you just place in the editor and not have to add scripts to the mission?

Any help you can provide will be appreciated.

RemoteControl.sqf

private ["_controller","_cmdr","_driver","_group"];
_controller = UGV_Operator;
_cmdr = Commander UGV;
_driver = Driver UGV;
_group = group _controller; 

_controller remoteControl _cmdr;
_cmdr switchCamera "Gunner";
_cmdr action ["moveInDriver", UGV];

//Make AI Driver Controllable

[_cmdr] join grpNull;
selectPlayer _driver;

EndRemoteControl.sqf

private ["_controller","_cmdr"];
_controller = UGV_Operator;
_cmdr = Commander UGV;

objNull remoteControl _cmdr;
_controller switchCamera "External";
selectPlayer _controller;
[_cmdr] join grpNull;

Share this post


Link to post
Share on other sites

Typo

Replace

hiddenSelectionsTexture[]

with

hiddenSelectionsTextures[]

Sorry, I know nothing about the UAV stuff in the engine.

As you have already found out, the key to mod'ing a complex game engine like this;

Time + Persistence = success in steps

Share this post


Link to post
Share on other sites

@Gnat No problem you've helped me a lot, and the variants work now!!! Thank you. (BTW do you know how to get the scripts that I'm using into the pbo file, so all the player has to do is place a unit and name it "UGV_Operator" then place one of the variants of the MULE and name it "UGV"? But then they have to equip the "pt101_ugvcontroller" to the "UGV_Operator" in order for the action to "Enter UGV Mode"?

---------- Post added at 02:14 PM ---------- Previous post was at 02:04 PM ----------

Ok, after playing around with the Remote Control Script I was able to incorporate being able to change positions in the MULE. But now I'm facing a new problem, whenever I go back into "UGV Mode" I'm stuck being the commander and can't switch positions. I believe that if a #loop is somehow incorporated in the script it may fix it, but I don't know how to do so. Also how do I put these scripts into the pbo file, so all the player has to do is place a unit and name it "UGV_Operator" then place one of the variants of the MULE and name it "UGV"? But then they have to equip the "pt101_ugvcontroller" to the "UGV_Operator" and switch to the controller in order for the action to "Enter UGV Mode" to show?

Here are the Updated scripts:

RemoteControl.sqf

private ["_controller","_cmdr","_driver","_gun"];
_controller = UGV_Operator;
_cmdr = Commander UGV;
_driver = Driver UGV;
_gun = Gunner UGV;

_controller remoteControl _cmdr;
_cmdr switchCamera "Gunner";
_cmdr action ["moveInDriver", UGV];

//Make AI Controllable

[_cmdr] join grpNull;
selectPlayer _driver;
selectPlayer _gun;
selectPlayer _cmdr;

EndRemoteControl.sqf

private ["_controller","_cmdr","_driver","_gun"];
_controller = UGV_Operator;
_cmdr = Commander UGV;
_driver = Driver UGV;
_gun = Gunner UGV;

objNull remoteControl _cmdr;
objNull remoteControl _driver;
objNull remoteControl _gun;
_controller switchCamera "External";
selectPlayer _controller;	
[_cmdr] join grpNull;

(I had to put three objNulls so no matter what position that the player exits, they'll have control of there original character.) Any help will be Greatly Appreciated.

Share this post


Link to post
Share on other sites

Put a "scr" folder (just the name most people use, but can be anything) inside your "pt101_mule" project folder

Place the script inside that.

When calling the script you just need to call it like "\pt101_mule\scr\xxxxxx.sqf"

eg

	class EventHandlers	
	{
		init = "_this execVM ""\pt101_mule\scr\bing.sqf"";_this execVM ""\pt101_mule\scr\bang.sqf"";";

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  

×