Jump to content
Sign in to follow this  
tubeyoumedia

Vehicles faster offroad?

Recommended Posts

Hello,

I'm trying to make some cars go faster offroad(Almost like the same speed), so my question is, is there any methods to do this?, if so how?

Yes, i've searched.

Thanks

Help would be grateful

Best Regards,

Tube

Share this post


Link to post
Share on other sites

Can't be done with scripting AFAIK.

You would need to create an addon and then change the base class of all the different vehicles so that:

terrainCoefficient=1;

One is same speed as on road, higher numbers will mean the car is slower offroad. Default is 3.

See here: http://community.bistudio.com/wiki/CfgVehicles_Config_Reference

And here: http://browser.six-projects.net/cfg_vehicles/tree?utf8=%E2%9C%93&=A2+with+OA%3A+v1.62&version=63&commit=Change

I think this is all you would need to do, although I am not an expert in configs.

Share this post


Link to post
Share on other sites

Ok thanks. Is terraincoef the same thing?

Edited by tubeyoumedia

Share this post


Link to post
Share on other sites

i've never used the setVelocity command, so i'm not even sure if it works the way you want but it has this example in wiki

_vel = velocity _vehicle;
_dir = direction _vehicle;
_speed = 10; comment "Added speed";
_vehicle setVelocity [(_vel select 0)+(sin _dir*_speed),(_vel select 1)+
(cos _dir*_speed),(_vel select 2)];

Edited by Nimrod_Z

Share this post


Link to post
Share on other sites

You'll need to do something like this

place in init of vehicle

null=[this] execvm "boostAI.sqf"

save as boostAI.sqf

_vehicle = _this select 0;
while {true} do {
_vel = velocity _vehicle;
_dir = direction _vehicle;
_speed = 0.2; comment "Added speed";
_vehicle setVelocity [(_vel select 0)+(sin _dir*_speed),(_vel select 1)+
(cos _dir*_speed),(_vel select 2)];
sleep 0.001;
};

I wouldn't use anything higher than 0.2 for speed otherwise AI can't take the corners.

Share this post


Link to post
Share on other sites

Thx for all the replies, been testing stuff out the latest days, and none of these really result in what i want it to do, does anyone know if it is possible to make vehicles offroad as fast offroad, as fast on road? As TerrainCoef makes it for example, if the car goes 120 on road, it goes about 85 offroad.

Share this post


Link to post
Share on other sites

This will require some work and research on your part. I can't help you with that,

(Idea taken from Gravel Road Speed by andersson (problem solved courtesy of this mod))

Open the Island you want faster cars on. (Using Eliteness)

Open the Config.bin (Using Laza)

Save the Config.bin as a Config.cpp (editable with notepad)

Remember to remove everything from the top of this file before where it says: class CfgPatches (Laza leaves it there and it'll crash)

Find: class CfgSurfaces

change all values of Rough to: rough = 0.030000;

Now, if you want all default Arma2 map terrain to work you'll need to add as many other CfgSurfaces from as many other maps as you can open, copy them

but only paste this bit into your main config.cpp (under CfgSurfaces obviously)

Example of other CfgSurface Types not included in panthera2:

class Roadway : Default

{

access = 2;

rough = 0.030000;

dust = 0.500000;

};

class Asfalt : Roadway

{

access = 2;

rough = 0.030000;

dust = 0.500000;

};

class Cesta : Roadway

{

access = 2;

rough = 0.030000;

dust = 0.500000;

};

Now, your config.cpp should look like this,

class CfgPatches 
{
class FastOffRoad 
{
	units[] = {};
	weapons[] = { };
	requiredVersion = 1.0;
	requiredAddons[] = {};
};
	fileName = "FastOffRoad.pbo";
	author = "Me";
	mail = "Me@me.info";
};
};

class CfgSurfaces 
{
class Default 
{
};
       class IBRPantheragrassSurface : Default
{
	files = "ibr_grass_*";
	rough = 0.030000;
	dust = 0.100000;
	soundEnviron = "grass";
	character = "ibr_PgrassClutter";
	soundHit = "soft_ground";
};
class Roadway : Default
{
access = 2;
rough = 0.030000;
};
       class Asfalt : Roadway
      {
      access = 2;
       rough = 0.030000;
      };

// plus as many more surfaces as you can find - etc, etc,

};

Note: you will need to keep all of the extra data intact - SoundEnviron, Character, Soundhit etc as per the Island Original, it needs to re-read this to work.

create a folder called whatever you called your class CfgPatches, here it's FastOffRoad

Put the config.cpp into this folder and pack-it (I use PBOview for simple stuff like this)

It'll create a pbo called FastOffRoad.pbo

Put this FastOffRoad.pbo file into an @folder/addons (maybe your own @MyMods/Addons folder?)

Run this at folder after the Island you want it to work on: -mod=@panthera;@Lingor;@MyMods;

It will override the default values provided by the Islands.

I think both server and client need this file if you play with friends, but otherwise you should see an improved performance off-road.

Worked for me anyway, full road speeds on grass surfaces, oh yeah !

EDIT:

Actually the more I play with this the less I understand it. If I did as I say it doesn't quite work

It only works (for example) if I am playing on Panthera, and I modify (and add more surfaces) to a new panthera2.pbo and run this in an additional @folder. If I just name the pbo FastOffRoad.pbo it doesn't seem to pick it up. Could just be a folder path issue, as it is no longer referencing panthera, but maybe someone else can shed light on how a Universal Off Road pbo could be created and bi-Signed The solution is still found in doing it this way, that's the main thing.

Edited by Palyarmerc

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  

×