Jump to content
Sign in to follow this  
vitamin

Replacing vehicle model went wrong

Recommended Posts

I replaced default Res medical UAZ (class SGUAZG) with VW T2 by Airwolf, and was really happy with final results as long as I just watched from outside. Boarding this car however, made me a bit confused (and sad too).

Driver's view:

30htt1e.jpg

Passenger's view:

2eyz977.jpg

I'd appreciate it very much, if someone could tell me why this happens and how to fix it?

Share this post


Link to post
Share on other sites

Airwolf's vehicle probably uses different proxies for the the driver and co-driver. Proxies, being 3d models, also have x, y and z coordinates - they're not all centred.

The relevant parts of the config are:

	class UAZG:Car
	{
	driverAction="ManActUAZDriver";
	cargoAction[]={"ManActUazCoDriver","ManActCargo"};
	};

class SGUAZG:UAZG
	{
	cargoAction[]={"ManActM113Injured","ManActCargo"};
	};

As you can see SGUAZG inherits from UAZG, the cargoAction line superceding that from the parent. Check what's in the VW van config - you'll need to copy its driverAction and cargoAction. It's a lot more trouble if they created their own proxies rather than using one of BIS' originals.

Share this post


Link to post
Share on other sites

Thank you very much rageQuit for your quick reply. You were perfectly right about those 'cargoAction' and 'driverAction' sections. After replacing them everything works fine now:)

BTW, I'd like to ask you if changing those values won't cause any problems while playing BIS missions or campaigns. Here's original 'SGUAZG' config:

transportSoldier=2;
cargoIsCoDriver[]={0,0};
driverAction=ManActUAZDriver;
cargoAction[]={ManActM113Injured,ManActCargo};

And here's VW T2 config:

transportSoldier=[b]3[/b];
cargoIsCoDriver[]={[b]1[/b],0};
driverAction="[b]ManActSkodaDriver[/b]";
cargoAction[]={"[b]ManActSkodaCoDriver[/b]","[b]ManActSkodaCoDriverBack[/b]","[b][u]ManActawmvwbusambcargo[/u][/b]"};

I marked changed values in bold as I'm not sure what they mean and if they BIS compatible?

Share this post


Link to post
Share on other sites

Lets go through it line by line.

transportSoldier

This is increased from 2 to 3, meaning one more person can be carried. Not really a problem as all the units that start a mission aboard can still fit in.

cargoIsCoDriver

Can't remember what this does, if anything - but BIS considers anyone who sits upfront with the driver (shotgun!) to be a co-driver. 1 is true; 0 false for the same array of cargoAction.

driverAction

The driver has the posture of a Skoda driver rather than a UAZ driver. The angles of the torso and joints may be slightly different, but at least the proxy sits correctly on his seat. Not a problem.

cargoAction

This is where most changes are. This, in addition to cargoIsCoDriver, mean that the first passenger sits alongside the driver rather than lying in a stretcher (ManActM113Injured).

Also "ManActawmvwbusambcargo" is not one of BIS' = ManAct AirWolf Mod VW Bus Ambulance Cargo, so I'd remove that whole cargo proxy.

transportSoldier=2;
cargoIsCoDriver[]={1,0};
driverAction="ManActSkodaDriver";
cargoAction[]={"ManActSkodaCoDriver","ManActSkodaCoDriverBack"};

Share this post


Link to post
Share on other sites

Thank you once again rageQuit for your explanation. I made necessary adjustments according to your suggestions. But I'm being curious about that cargoAction section - would it be difficult to make VW T2 work with default SGUASG values?

Share this post


Link to post
Share on other sites

It would involve editing the model itself. The old proxies would need to be removed, and their replacements added and positioned.

The difficulty comes from there being many stages, rather than from any individual step, particularly if you've not done any editing before.

Share this post


Link to post
Share on other sites

I remember I even couldn't get this damn Buldozer (or O2 was it?) to work so I think I'll just leave it. But I have another question - how do I replace models that are not defined in the main config file? Some vehicles (and weapons) have their own configs in \Res\Addons folder or are hidden in O.pbo (same folder). Is editing those configs my only choice? Or is it possible to copy&paste those external classes to my main config file and this will hopefully overwrite the original configs from all pbos inside \Res\Addons folder?

Share this post


Link to post
Share on other sites

Well, I made a quick test and added SoldierGSniper class to main config (by default it is in O_wp.pbo file) and it's working. The model I replaced is the one that shows up in game - not the BIS one. But I have no idea how it works actually? I would suppose it shouldn't work at all because now there are two identical classes defined. How the game engine knows which one to use? Has anyone made some more tests with such replacements and could share his observations and findings?

Edited by vitamin
spelling

Share this post


Link to post
Share on other sites

OFP 1.96 and the main config file is the one from ECP 1.085 mod. (let's say I'm making my version of EECP;)

Share this post


Link to post
Share on other sites

I can't find it again, but there use to be some posts around here showing the loading order of configs in OFP. Anyway if you changed the main config.bin, i suppose it loads before the o.pbo one, so basically you can replace the resistance main classes, as long as they inherit from the vanilla ones.

Share this post


Link to post
Share on other sites

So does it mean that I can have duplicate classes and the game still will work fine? No need to worry about some crushes or unpredictable things to happen during gameplay (saving/loading missions)?

Share this post


Link to post
Share on other sites

Well i don't know, i've reworked a lot the main config.bin but i never tried to replace resistance base classes.

Share this post


Link to post
Share on other sites

Looks like I will have to just try it out and see if it works :butbut: (and keep my fingers crossed;))

Share this post


Link to post
Share on other sites

This time I have much bigger problem with those 'driverAction' and 'cargoAction' parameters. I replaced BIS motorcycle with BMW R71 from Libmod but cannot get it to work properly. When I use default BIS parameters, it looks like this:

bdrslc.jpg

And replacing them with Libmod code doesn't fix that problem at all:j:

2nsql9i.jpg

I copied CfgModels section of that BMW model, and even added 'ProxyCrew' classes to my main config file and it still looks wrong:(

Would anyone help me please with this issue as I have no idea what possibly could be wrong here?

Share this post


Link to post
Share on other sites

Only this:

driverAction="ManActBMWDriver";
cargoAction[]={"ManActBMWCoDriverOne"};

Share this post


Link to post
Share on other sites

Ok, you have to search for the cfgvehicleactions entries with BMWdriver and BMWCodriverOne, and then for the relevant anims entry in the cfgMoves class.

Share this post


Link to post
Share on other sites

OK, thank you very much ProfTournesol for your help. I'll update this post as soon as I add that missing code to my config file.

EDIT:

You are incredible ProfTournesol - have a look:

3509boo.jpg

You fixed it:) Thank you once again for your help.

Edited by vitamin
update

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  

×