Quantcast

Jump to content

» «
Photo

[Guide] Driving Styles

37 replies to this topic
Eddlm
  • Eddlm

    Newie

  • Members
  • Joined: 24 Aug 2015
  • Spain

#1

Posted 30 September 2015 - 01:55 PM Edited by Eddlm, 22 March 2016 - 06:08 PM.

Based on the information shared in this thread.

 

 

Driving Styles work as a list of 32 bits converted to a decimal integer. Each bit acts as a flag, and enables or disables a function inside the driving abilities of the AI ped you're scripting.

You can translate these bits to integers (and viceversa) with a converter like this one.

 

You apply the driving style to the ped like this:

C# (ScriptHookVDotNet)
ped.DrivingStyle=DrivingStyle.Rushed or GTA.Native.Function.Call(GTA.Native.Hash.SET_DRIVE_TASK_DRIVING_STYLE, ped, int);

C++
AI::SET_DRIVE_TASK_DRIVING_STYLE(ped,int)

Here are all the flags, their corresponding integers and the known functionalities:

FLAG ENABLED - CONVERTED INTEGER - DESCRIPTION
00000000000000000000000000000001 - 1 - stop before vehicles
00000000000000000000000000000010 - 2 - stop before peds
00000000000000000000000000000100 - 4 - avoid vehicles
00000000000000000000000000001000 - 8 - avoid empty vehicles
00000000000000000000000000010000 - 16 - avoid peds
00000000000000000000000000100000 - 32 - avoid objects	
00000000000000000000000001000000 - 64 - ?
00000000000000000000000010000000 - 128 - stop at traffic lights
00000000000000000000000100000000 - 256 - use blinkers
00000000000000000000001000000000 - 512 - allow going wrong way (only does it if the correct lane is full, will try to reach the correct lane again as soon as possible)
00000000000000000000010000000000 - 1024 - go in reverse gear (backwards)
00000000000000000000100000000000 - 2048 - ?
00000000000000000001000000000000 - 4096 - ?
00000000000000000010000000000000 - 8192 - ?
00000000000000000100000000000000 - 16384 - ?
00000000000000001000000000000000 - 32768 - ?
00000000000000010000000000000000 - 65536 - ?
00000000000000100000000000000000 - 131072 - ?
00000000000001000000000000000000 - 262144 - Take shortest path (Removes most pathing limits, the driver even goes on dirtroads)
00000000000010000000000000000000 - 524288 - ?
00000000000100000000000000000000 - 1048576 - ?
00000000001000000000000000000000 - 2097152 - ?
00000000010000000000000000000000 - 4194304 - Ignore roads (Uses local pathing, only works within 200~ meters around the player)
00000000100000000000000000000000 - 8388608 - ?
00000001000000000000000000000000 - 16777216 - Ignore all pathing (Goes straight to destination)
00000010000000000000000000000000 - 33554432 - ?
00000100000000000000000000000000 - 67108864 - ?
00001000000000000000000000000000 - 134217728 - ?
00010000000000000000000000000000 - 268435456 - ?
00100000000000000000000000000000 - 536870912 - avoid highways when possible (will use the highway if there is no other way to get to the destination)
01000000000000000000000000000000 - 1073741824 - ?

Here are some examples of Driving Styles, gotten from ScriptHookVDotNet:

FLAGS - CONVERTED INTEGER - NAME/DESC OF THE DRIVING STYLE
01000000000011000000000000100101 - 1074528293 -  "Rushed"
00000000000011000000000000100100 - 786468 - "Avoid Traffic"
00000000000000000000000000000110 - 6 - "Avoid Traffic Extremely"
00000000000011000000000010101011 - 786603 - "Normal"
00000000001011000000000000100101 - 2883621 - "Ignore Lights"
00000000000000000000000000000101 - 5 -  "Sometimes Overtake Traffic"

Now that we know some flags what they do, lets analyze these known Driving Styles, starting with the simpler ones.

NOTE: flags not highlighted (marked with ^ ) are ignored by this guide, as we don't know what they do yet.

 

 

6 - Avoid Traffic Extremely

00000000000000000000000000000110
                             ^^
10 - 2 - Stop before peds
100 - 4 - Avoid vehicles

This driving style is the simpler of them all, as you see. The driver will only avoid vehicles, but stop before peds.

 

 

5 - Sometimes Overtake Traffic

00000000000000000000000000000101
                             ^ ^
1 - 1 - Stop before vehicles
100 - 4 - Avoid vehicles

This one, although simple, its also interesting. The driver will both stop before a vehicle and avoid it! How?

This is not a paradox or anything, it simply means the driver can stop before a vehicle or avoid it, probably at random.

 

1074528293 - Rushed, probably more used, works the same way:

01000000000011000000000000100101
                          ^  ^ ^                          
1 - 1 - Stop before vehicles
100 - 4 - Avoid vehicles
100000 - 32 - Avoid Objects

We all know what this one does, it's used in a lot of scripts. The driver will brake when a vehicle is nearby, but sometime after, he will end up passing the vehicle. It will avoid vehicles that are completely stopped, too.

That, added to the fact that it also avoids objects too, makes this driving style a somwehat careful one.

 

 

786603 - Normal

00000000000011000000000010101011
                        ^     ^^
1 - 1 - Stop before vehicles
10 - 2 - Stop before peds
10000000 - 128 - Stop at Traffic Lights

This seems to be the default style drivers use. Makes sense.

 

 

2883621 - Ignore Lights

00000000001011000000000000100101
                        ^ ^  ^ ^
1 - 1 - Stop before vehicles
100 - 4 - Avoid vehicles
100000 - 32 - Avoid Objects
10000000 - 128 - Stop at Traffic Lights [OFF]

I've highlighted the bit that would make it stop at traffic lights. You can see it is off this time.

 

 

786468 - Avoid Traffic

00000000000011000000000000100100
                          ^  ^
100 - 4 - Avoid vehicles
100000 - 32 - Avoid Objects

Another simple one, with only 4 flags on.

 

 

 

 

Having understood all of this, you can now create your own driving styles by setting ON any flags you need to.

 

1076 - Example

00000000000000000000010000110100
                     ^    ^^ ^
100 - 4 - Avoid vehicles
10000 - 16 - Avoid peds
100000 - 32 - Avoid Objects
10000000000 -  Reverse only

This driving style would be a pretty crazy one. the driver would avoid peds, vehicles and objects, all while going in reverse!

 

8388614 -  Example2

00000000100000000000000000010110
        ^                  ^ ^^
1 - 1 - Stop before vehicles
10 - 2 - Stop before peds
100000 - 32 - Avoid Objects
100000000000000000000000 - 4194304 - Ignore roads

This one would be fitting for any precise driving task. Careful, stopping at anything that moves, avoiding objects, and ignoring roads so the driver gets the vehicle exactly where you want.

 

 

 

Other natives that set the Driving Style

 

There are other natives that seem to override the Driving Style, you can set the Driving Style from there too.

 

Here's a list of the ones confirmed to set a Driving Style:

 

AI::TASK_VEHICLE_DRIVE_TO_COORD
AI::TASK_VEHICLE_DRIVE_TO_COORD_LONGRANGE
AI::TASK_VEHICLE_DRIVE_WANDER
AI::TASK_VEHICLE_ESCORT
AI::_TASK_VEHICLE_FOLLOW

 

 

 

 

Driver Ability

 

 

You can set the driver ability with PED:SET_DRIVING_ABILITY. While I am not sure if the max ability is 100f or 10f, I know that 100f works.

An higher value means that the AI reaction times and avoiding ability are better.

 

__________________


The lists above will be updated as more flags/natives are discovered, so stay tuned.

 

Remember that you pass the translated integer to the DrivingStyle native, not the binary presentation.

  • whorse, Cyron43, Transmet and 7 others like this

ISOFX
  • ISOFX

    Trick

  • Members
  • Joined: 31 May 2015
  • United-Kingdom

#2

Posted 30 September 2015 - 03:29 PM

Good work! will be using this thread in the future. thanks :)


ardaozkal
  • ardaozkal

    I made YoloNet (formerly danknet)!

  • New Members
  • Joined: 02 Aug 2015
  • Turkey

#3

Posted 30 September 2015 - 06:33 PM

Nice job!


Cyron43
  • Cyron43

    "I'm so bad I kick my own ass!" (GTA IV quote)

  • Members
  • Joined: 14 Apr 2013
  • Germany

#4

Posted 03 October 2015 - 01:51 PM

Great job. :)

elsewhat
  • elsewhat

    Rat

  • Members
  • Joined: 14 Aug 2015
  • Norway

#5

Posted 06 October 2015 - 07:15 AM

Thank you so much for the research. 

Have implemented driving modes support in the latest version 1.3.1 of my Scene Director mod https://www.gta5-mod.../scene-director

 

I have seven different driving styles: Aggressive, Careful, Cruise, Impatient, Offroad and reverse. 

 

 

Here is the code I'm using 

driving_mode.h:

#pragma once
#include <vector>
struct DrivingMode
{
	int value;
	std::string name;
	bool useVehicleMaxSpeed;
	float manualMaxSpeed;
};

enum DRIVING_FLAGS
{
	FLAG1_STOP_VEHS=1,
	FLAG2_STOP_PEDS=2,
	FLAG3_AVOID_VEHS=4,
	FLAG5_AVOID_PEDS=16,
	FLAG6_AVOID_OBJS=32,
	FLAG8_STOP_LIGHTS=128,
	FLAG11_REVERSE=1024,
	FLAG23_IGN_ROADS=4194304,
};

std::vector<DrivingMode> getAllDrivingModes();
DrivingMode getDefaultDrivingMode();
DrivingMode getNextDrivingMode(DrivingMode drivingMode);

driving_mode.cpp:

#include "driving_mode.h"
#include <vector>
#include <algorithm>

std::vector<DrivingMode> gtaDrivingModes= {
	{ FLAG3_AVOID_VEHS|FLAG5_AVOID_PEDS|FLAG6_AVOID_OBJS, "Aggressive", true, 0.0 },
	{FLAG1_STOP_VEHS|FLAG2_STOP_PEDS|FLAG8_STOP_LIGHTS, "Careful", false, 15.0 },
	{ FLAG1_STOP_VEHS | FLAG2_STOP_PEDS | FLAG8_STOP_LIGHTS, "Cruise", false, 5.0 },
	{ FLAG1_STOP_VEHS | FLAG3_AVOID_VEHS, "Impatient", false, 30.0 },
	{ FLAG23_IGN_ROADS | FLAG6_AVOID_OBJS, "Offroad",true, 0.0 },
	{FLAG3_AVOID_VEHS|FLAG5_AVOID_PEDS|FLAG6_AVOID_OBJS|FLAG11_REVERSE, "Reverse", true,0.0 },
};

std::vector<DrivingMode> getAllDrivingModes() {
	return gtaDrivingModes;
}

DrivingMode getDefaultDrivingMode() {
	return gtaDrivingModes[0];
}

DrivingMode getNextDrivingMode(DrivingMode drivingMode){
	int foundIndex = std::find_if(gtaDrivingModes.begin(), gtaDrivingModes.end(), [=](DrivingMode const& compDrivingMode) {
		return (compDrivingMode.value == drivingMode.value && compDrivingMode.manualMaxSpeed == drivingMode.manualMaxSpeed);
	}) - gtaDrivingModes.begin();
	if (foundIndex + 1 >= gtaDrivingModes.size()) {//not found or in last element
		return gtaDrivingModes[0];
	}
	else {
		return gtaDrivingModes[foundIndex + 1];
	}
}

Eddlm
  • Eddlm

    Newie

  • Members
  • Joined: 24 Aug 2015
  • Spain

#6

Posted 13 October 2015 - 12:49 AM Edited by Eddlm, 13 October 2015 - 12:54 AM.

I've found two flags more.

1000000000000000000 - 262144 - "Take shortest path"
1000000000000000000000000 - 16777216 - "Ignore all pathing" (Goes straight to destination)

262144  Is pretty cool, the driver will take the shortest path to get to its destination. It uses every road/dirtroad available, even special intersections that normal drivers don't usually use, like the 180º turns on the highways.

16777216 Can be useful for drag races.

 

 

 

I've added them to the OP list.


gtaVmod
  • gtaVmod

    Snitch

  • Members
  • Joined: 25 Apr 2015
  • Ukraine

#7

Posted 13 October 2015 - 05:56 PM

Guys who on earth taught you to use decimals as flag values?? :panic:

 

It's either binary or hexadecimals !

  • jedijosh920 likes this

InfamousSabre
  • InfamousSabre

    Harpocrates

  • Members
  • Joined: 03 Jan 2013

#8

Posted 13 October 2015 - 07:02 PM

Guys who on earth taught you to use decimals as flag values?? :panic:

 

It's either binary or hexadecimals !

 

Who on earth taught you that they are any different?

They represent the exact same data.


gtaVmod
  • gtaVmod

    Snitch

  • Members
  • Joined: 25 Apr 2015
  • Ukraine

#9

Posted 13 October 2015 - 07:06 PM

Yes, same data but impossible to understand binary value.

Imho table should be converted to this style to be handy:

 

(1<<N) | 0xHEXVALUE


Eddlm
  • Eddlm

    Newie

  • Members
  • Joined: 24 Aug 2015
  • Spain

#10

Posted 14 October 2015 - 11:05 AM Edited by Eddlm, 14 October 2015 - 11:29 AM.

Yes, same data but impossible to understand binary value.

Function.Call(Hash.TASK_VEHICLE_DRIVE_TO_COORD_LONGRANGE, Squad1Leader, GetLastVehicle(Squad1Leader), pos.X, pos.Y, pos.Z, 70f, 4 | 16 | 32| 262144, 10f);

Using integers to represent the flags, this works perfectly.

Is there any problem in C++ or something?

 

 

Anyway, if there is people that use HEX values instead of decimals, I should add the coversion too. You can convert them with the converter mentioned in the guide, too.


InfamousSabre
  • InfamousSabre

    Harpocrates

  • Members
  • Joined: 03 Jan 2013

#11

Posted 14 October 2015 - 11:56 AM

 

Yes, same data but impossible to understand binary value.

Function.Call(Hash.TASK_VEHICLE_DRIVE_TO_COORD_LONGRANGE, Squad1Leader, GetLastVehicle(Squad1Leader), pos.X, pos.Y, pos.Z, 70f, 4 | 16 | 32| 262144, 10f);

Using integers to represent the flags, this works perfectly.

Is there any problem in C++ or something?

 

 

Anyway, if there is people that use HEX values instead of decimals, I should add the coversion too. You can convert them with the converter mentioned in the guide, too.

 

integers work fine in C++. Honestly, I just use binary and convert it at run time, but yes, some people will use hex.


gtaVmod
  • gtaVmod

    Snitch

  • Members
  • Joined: 25 Apr 2015
  • Ukraine

#12

Posted 14 October 2015 - 04:12 PM

Using integers to represent the flags, this works perfectly.

Yes, but very amateurish.

InfamousSabre
  • InfamousSabre

    Harpocrates

  • Members
  • Joined: 03 Jan 2013

#13

Posted 15 October 2015 - 11:40 AM Edited by InfamousSabre, 16 October 2015 - 12:51 AM.

 

Using integers to represent the flags, this works perfectly.

Yes, but very amateurish.

 

You've no place to say what is or isn't "amateurish".
 
Guess HazardX is amateurish too. Who knew?

public enum AnimationFlags
	{
		Unknown12 = 2048,
		Unknown11 = 1024,
		Unknown10 = 512,
		Unknown09 = 256,
		Unknown08 = 128,
		Unknown07 = 64,
		Unknown06 = 32,
		Unknown05 = 16,
		Unknown04 = 8,
		Unknown03 = 4,
		Unknown02 = 2,
		Unknown01 = 1,
		None = 0
	}

Oh, look. The same exact thing as what Eddlm posted, but the integers are now in an enum.

enum DRIVING_FLAGS
{
    FLAG1_STOP_VEHS=1,
    FLAG2_STOP_PEDS=2,
    FLAG3_AVOID_VEHS=4,
    FLAG5_AVOID_PEDS=16,
    FLAG6_AVOID_OBJS=32,
    FLAG8_STOP_LIGHTS=128,
    FLAG11_REVERSE=1024,
    FLAG19_SHORTEST_PATH=262144,
    FLAG23_IGN_ROADS=4194304,
};

Function.Call(Hash.TASK_VEHICLE_DRIVE_TO_COORD_LONGRANGE, Squad1Leader, GetLastVehicle(Squad1Leader), pos.X, pos.Y, pos.Z, 70f, FLAG3_AVOID_VEHS | FLAG5_AVOID_PEDS | FLAG6_AVOID_OBJS | FLAG19_SHORTEST_PATH, 10f);

 
Do it how you want. You don't like the way this method looks, but it is fundamentally the same. If you don't like it, don't do it in your code.


gtaVmod
  • gtaVmod

    Snitch

  • Members
  • Joined: 25 Apr 2015
  • Ukraine

#14

Posted 15 October 2015 - 05:04 PM

Instead of wasting time arguing you better educate yourself why do people use hex for flags.


Eddlm
  • Eddlm

    Newie

  • Members
  • Joined: 24 Aug 2015
  • Spain

#15

Posted 16 October 2015 - 03:20 PM Edited by Eddlm, 16 October 2015 - 03:21 PM.

Still not getting, in my infinite ignorance and criminal uneducated casualness, why hexadecimals are masterrace over ints and enums.

 

Stupid masterracing aside, I've been testing all the remaining unknown flags, without sucess. Nothing seems to change. I think I've seen the driver take curves faster while testing, but I couldn't confirm it.

 

I'm currently hunting the flag that allows the driver to drive against traffic, like the police does when they chase you.

 

Also, looks like SET_DRIVE_TASK_DRIVING_STYLE  sets the driving style instantly, which could be really useful in certain situations. Going to do some tests and then updating the guide.


gtaVmod
  • gtaVmod

    Snitch

  • Members
  • Joined: 25 Apr 2015
  • Ukraine

#16

Posted 16 October 2015 - 03:32 PM

Still not getting, in my infinite ignorance and criminal uneducated casualness, why hexadecimals are masterrace over ints and enums.

 

 

Here's example:

Try OR two operands (0x80000000 and 0x04000000) in mind. It's as simple as it could be: 0x84000000.

Now good luck to you doing same with decimal representation...


InfamousSabre
  • InfamousSabre

    Harpocrates

  • Members
  • Joined: 03 Jan 2013

#17

Posted 16 October 2015 - 10:01 PM Edited by InfamousSabre, 17 October 2015 - 01:50 AM.

Still not getting, in my infinite ignorance and criminal uneducated casualness, why hexadecimals are masterrace over ints and enums.

 

Stupid masterracing aside, I've been testing all the remaining unknown flags, without sucess. Nothing seems to change. I think I've seen the driver take curves faster while testing, but I couldn't confirm it.

 

I'm currently hunting the flag that allows the driver to drive against traffic, like the police does when they chase you.

 

Also, looks like SET_DRIVE_TASK_DRIVING_STYLE  sets the driving style instantly, which could be really useful in certain situations. Going to do some tests and then updating the guide.

 

I think that has to do with the particular task they are using.
I've noticed if using VEHICLE_CHASE (pretty sure this is what police use) to make a driver chase you, and you are both facing the correct direction on a road, but you are behind them and the last direction you moved was the direction you're facing, they wont even move. They will wait for you to catch up. If you never move, they'll sit there forever. The second you go the wrong way, whether you're reversing or otherwise, they'll turn around and come after you.


Eddlm
  • Eddlm

    Newie

  • Members
  • Joined: 24 Aug 2015
  • Spain

#18

Posted 17 October 2015 - 10:20 PM

Lets hope there's a way to set it on a driver without having him chasing anything!



Also, I've discovered stuff about PED::SET_DRIVER_ABILITY. Added to the guide.


gtaVmod
  • gtaVmod

    Snitch

  • Members
  • Joined: 25 Apr 2015
  • Ukraine

#19

Posted 18 October 2015 - 12:16 AM

There is also SET_DRIVER_AGGRESSIVENESS but i didn't noticed either it nor SET_DRIVER_ABILITY to affect anything.


Eddlm
  • Eddlm

    Newie

  • Members
  • Joined: 24 Aug 2015
  • Spain

#20

Posted 18 October 2015 - 11:01 AM

There is also SET_DRIVER_AGGRESSIVENESS but i didn't noticed either it nor SET_DRIVER_ABILITY to affect anything.

Spawn two AI drivers with their cars and tell them to go to a far place. SET_DRIVER_ABILITY to 0.0 in one and 100.0 in the second one. Notice how each one avoids traffic.

 

I think SET_DRIVER_AGGRESSIVENESS defines how aggresive they are when chasing, I need to do some tests.

 

SET_TASK_VEHICLE_CHASE_IDEAL_PURSUIT_DISTANCE and SET_TASK_VEHICLE_CHASE_BEHAVIOR_FLAG are worth some time of research, too.


elsewhat
  • elsewhat

    Rat

  • Members
  • Joined: 14 Aug 2015
  • Norway

#21

Posted 19 October 2015 - 09:58 AM

Tested out SET_DRIVER_AGGRESSIVENESS  in scene director, but end up disabling it as I saw no difference. (might be some difference but very hard to detect)

void action_increase_aggressiveness(Ped ped, bool suppress_msgs) {
	log_to_file("action_increase_aggressiveness");
	int actorIndex = get_index_for_actor(ped);
	if (actorIndex != -1) {
		float currentAggressiveness = actorDriverAgressiveness[actorIndex];
		if (currentAggressiveness >= 1.0f) {
			return;
		}
		currentAggressiveness = currentAggressiveness + 0.1f;
		if (currentAggressiveness > 1.0f)
		{
			currentAggressiveness = 1.0f;
		}
		PED::SET_DRIVER_AGGRESSIVENESS(ped, currentAggressiveness);
		actorDriverAgressiveness[actorIndex] = currentAggressiveness;
	}
	else {
		set_status_text("Actor must be stored in a slot to increase aggressiveness");
	}
}

Eddlm
  • Eddlm

    Newie

  • Members
  • Joined: 24 Aug 2015
  • Spain

#22

Posted 19 October 2015 - 06:58 PM Edited by Eddlm, 19 October 2015 - 06:58 PM.

You didn't notice differences because you used 1.0 like it is the max. The max is probably 10.0 (or 100.0), check this.


Cyron43
  • Cyron43

    "I'm so bad I kick my own ass!" (GTA IV quote)

  • Members
  • Joined: 14 Apr 2013
  • Germany

#23

Posted 23 October 2015 - 11:40 PM Edited by Cyron43, 24 October 2015 - 12:06 AM.

Hi @Eddlm. First let me say thank you for this list. I use this in my VAutodrive mod now instead of the DrivingStyle values provided by the scripthookVdotnet. However, using a new "Normal" driving style, calculated with your table, caused a misbehavior. I used this value 0x400C00A3, which is 1000000000011000000000010100011 binary. The value provided by scripthookVdotnet is 0xC00AB (0000000000011000000000010101011). Driving with the old value behaves as expected, while the new value causes the vehicle to stop before parked cars and not move anymore. This is interesting because the difference is in two unknown bits (bit 31 and bit 4).

For better comparison:

1000000000011000000000010100011 = stops before parked cars

0000000000011000000000010101011 = avoids parked cars

I will do further tests tomorrow to find out which of those two bits causes it.

  • InfamousSabre likes this

Cyron43
  • Cyron43

    "I'm so bad I kick my own ass!" (GTA IV quote)

  • Members
  • Joined: 14 Apr 2013
  • Germany

#24

Posted 24 October 2015 - 12:27 PM Edited by Cyron43, 24 October 2015 - 12:37 PM.

Tried 0xC00AB - 8 = car does not stop before parked cars
Tried 0xC00AB + 0x40000000 (bit 31) =  car does not stop before parked cars
Tried the old value from yesterday (0x400C00A3) where the misbehavior happened = car does not stop before parked cars

I don't get it! :blink:


Eddlm
  • Eddlm

    Newie

  • Members
  • Joined: 24 Aug 2015
  • Spain

#25

Posted 24 October 2015 - 05:44 PM

Lulz, that's interesting

 

The flags "stop before cars" and "stop before peds" have their "avoid" counterparts, maybe "stop before parked cars" has another counterpart somewhere.

 

I don't know if the drivers avoid parked cars by default, though.

 

the fourth bit would make sense to be about parked cars, as the third one is about avoiding driven cars.

Maybe 1 means stop and 0 means avoid?


Cyron43
  • Cyron43

    "I'm so bad I kick my own ass!" (GTA IV quote)

  • Members
  • Joined: 14 Apr 2013
  • Germany

#26

Posted 24 October 2015 - 05:52 PM

Lulz, that's interesting

 

The flags "stop before cars" and "stop before peds" have their "avoid" counterparts, maybe "stop before parked cars" has another counterpart somewhere.

 

I don't know if the drivers avoid parked cars by default, though.

 

the fourth bit would make sense to be about parked cars, as the third one is about avoiding driven cars.

Maybe 1 means stop and 0 means avoid?

It was the opposite at bit 4 but anyway, why this didn't have any effect today is totally beyond me and honestly I am a bit fed up with testing today. I made a new feature release of VAutodrive yesterday and some hours later I found out about this by pure coincidence at a tour around the golf club (many parked cars along the streets) and I rushed to get the bugfix released asap. Those incidents are somewhat exhausting for me but I guess I will continue testing tomorrow. :)


Eddlm
  • Eddlm

    Newie

  • Members
  • Joined: 24 Aug 2015
  • Spain

#27

Posted 24 October 2015 - 06:06 PM

 

1000000000011000000000010100011 = stops before parked cars

I thought that was the bit you were talking about

 

I like to test these things (with help of my bodyguard squad) so don't worry about research if it's not urgent for you ;)

  • Cyron43 likes this

3dplanet
  • 3dplanet

    Player Hater

  • Members
  • Joined: 13 Sep 2015
  • France

#28

Posted 20 November 2015 - 08:27 PM Edited by 3dplanet, 20 November 2015 - 08:28 PM.

Found this :
00100000000000000000000000000000 - 536870912 = driver do not go on highway
 
When using this on highway
00000000000000000000000000000100 - 4 - avoid vehicles
driver often stay stuck behind a vehicle (when the 2 lanes are full of vehicles for example).
 
Using
00000000000000000000100000000000 - 2048 - ?
and
00000000000000000001000000000000 - 4096 - ?
make the driver trying to go right and left to avoid vehicle after being stucked
 
00000000000000000000100000000000 - 2048 - ? not sure, but it could be "left overtake"
and

00000000000000000001000000000000 - 4096 - ? not sure, but it could be "right overtake"

 

tested with AI::TASK_VEHICLE_DRIVE_TO_COORD_LONGRANGE

  • elsewhat likes this

InfamousSabre
  • InfamousSabre

    Harpocrates

  • Members
  • Joined: 03 Jan 2013

#29

Posted 25 November 2015 - 09:00 PM Edited by InfamousSabre, 03 December 2015 - 12:15 AM.

Any info on SET_TASK_VEHICLE_CHASE_BEHAVIOR_FLAG? I'm trying to figure out how to make them stop waiting for me to catch up when I'm behind them, but no luck so far.


Eddlm
  • Eddlm

    Newie

  • Members
  • Joined: 24 Aug 2015
  • Spain

#30

Posted 05 March 2016 - 10:52 PM Edited by Eddlm, 05 March 2016 - 11:21 PM.

I've added two new flags I've found

8 - avoid empty vehicles
256 - use blinkers

Interestingly, normal NPCs never seem to use the last flag. It would be a good idea to make a roleplayish script that forces this flag on most vehicles.

  • InfamousSabre likes this




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users