Jump to content

Ped Events


Recommended Posts

/* Me and Cerb were having a look-see at these files tonight, here's what we came to:

Data/Decision/Pedevent.txt - Listing of possible "events" that can be performed by the player/cops/peds

Data/Decision/<filename.ped> - References to events in the pedevent.txt, followed by parameters for what to do for said event?

 

Example:COP.PED

data values2:16,4,200,0.000000,0.000000,0.000000,100.000000,0,1,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,44,4,510,100.000000,100.000000,100.000000,100.000000,0,1,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,45,4,200,0.000000,0.000000,0.000000,100.000000,0,1,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,59,4,200,0.000000,0.000000,0.000000,100.000000,0,1,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,7,4,702,0.000000,0.000000,0.000000,100.000000,1,1,0,0,0,100,0,0,1000,0.000000,100.000000,0.000000,0.000000,1,1,0,0,0,100,0,0,1700,0.000000,100.000000,0.000000,100.000000,1,1,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,9,4,1105,0.000000,100.000000,0.000000,100.000000,0,1,0,0,0,100,0,0,1700,0.000000,100.000000,0.000000,100.000000,1,1,0,0,0,0,0,0,200,0.000000,0.000000,0.000000,0.000000,0,1,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,12,4,412,0.000000,100.000000,100.000000,100.000000,0,1,50,50,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,56,4,508,0.000000,0.000000,0.000000,100.000000,0,1,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,

 

The first line, 16, seems to be used alot, although it has no listing in the pedevent.txt. Same for 12. "4" seems to be necessary for every entry..

Line 2, 44 EVENT_POTENTIAL_WALK_INTO_OBJECT 44

Line 3, 45, unknown event?

Line 4, 59, EVENT_FIRE_NEARBY 59

Line 5, 7, EVENT_DRAGGED_OUT_CAR 7

Line 6, 9, EVENT_DAMAGE 9

Line 7, 12, EVENT_POTENTIAL_GET_RUN_OVER 12

Line 8, 56, EVENT_POTENTIAL_WALK_INTO_VEHICLE 56

 

See where im going with this?

i would imagine the floats in the parameters of the .ped files, are area checks around the actors, to check for the associated event. The 0/1's might be some flags.

 

Anyone else got any ideas on this? */

Link to comment
https://gtaforums.com/topic/179930-ped-events/
Share on other sites

Craig Kostelecky

I tried looking at the cop.ped info in Excel so I could see things easier. Here's what I've found so far. Each line is made up of 80 numbers.

The ped ID is the first term and like ashdexx said, the next value is always 4.

 

That leaves us with 78 more parameters. Those remaining parameters are in 6 groups of 13. Here's the way those numbers are broken down.

 

The first number is an integer value which varies greatly (values like 200, 510, 702, 1105, 412, and many more).

Then there are four floating-point numbers (most have 6 decimal places even though all are 0s).

Those floats are mostly 0.0, 50.0, or 100.0. Then after that, there's 8 more values which are all integers.

These are mostly 0, 1, 50, or 100. So it looks like the last 12 parameters could all be various percentages.

 

But why would the first four be floats and the rest be ints?

 

Then that process repeats for 5 more groups of numbers.

 

Hope that helps.

Edited by Craig Kostelecky
Link to comment
https://gtaforums.com/topic/179930-ped-events/#findComment-2574424
Share on other sites

/* More info, i think that 2nd int (right after the "always 4", is a kind of ...linker, or trigger setup, to other events, example:

 

15,4,911,5.000000,70 (etc...)

 

every line that has "911" for that int, is events 15, 51, 65 and 75, or..

EVENT_SHOT_FIRED 15

EVENT_HIGH_ANGER_AT_PLAYER 51

EVENT_SEEN_PANICKED_PED 65

EVENT_DANGER 75

 

or how about this example.. (COP.PED)

9,4,1105...

15,4,1105...

36,4,1105...

31,4,1105...

41,4,1105...

17,4,1105...

 

which is events 9,15,36,31,41 and 17, or...

 

EVENT_DAMAGE 9

EVENT_SHOT_FIRED 15

EVENT_ACQUAINTANCE_PED_HATE 36

EVENT_GUN_AIMED_AT 31

EVENT_VEHICLE_DAMAGE_WEAPON 41

EVENT_PED_ENTERED_MY_VEHICLE 17

 

...all things that piss of the cops in the game.

 

What would be nice to know is if the Int values are hardcoded (ALL of "911" for instance, will have to trigger specific events), or if we can define new ones, and make new AI for the game colgate.gif

 

Btw the .grp files, are the same as peds files, but it looks like its for groups of people, instead of individuals. */

Link to comment
https://gtaforums.com/topic/179930-ped-events/#findComment-2574489
Share on other sites

just had a look at these files.

 

i think the large int (first of the values that are repeated 6 times) could be a millisecond time, since multiples of 100 occur fairly often. the more specific times could then be precisely timed for animations.

 

also (these lines are from m_weak.ped):

 

9,4,415,50.000000,0.000000,10.000000,10.000000,0,1,100,0,0,0,0,0,200,50.000000,0.000000,0.000000,0.000000,0,1,0,0,0,0,0,0,1700,0.000000,100.000000,0.000000,0.000000,0,1,0,0,0,0,0,0,909,0.000000,100.000000,90.000000,90.000000,0,1,0,0,0,100,0,0,-1,etc...15,4,300,100.000000,0.000000,0.000000,0.000000,0,1,0,0,0,0,0,0,911,0.000000,75.000000,75.000000,75.000000,0,1,100,0,0,0,0,0,415,0.000000,25.000000,25.000000,25.000000,0,1,50,50,0,0,0,0,-1,etc...31,4,413,100.000000,50.000000,50.000000,50.000000,0,1,100,0,0,0,0,0,1700,0.000000,100.000000,0.000000,0.000000,0,1,0,0,0,0,0,0,909,0.000000,40.000000,40.000000,40.000000,0,1,100,0,0,0,0,0,412,0.000000,10.000000,10.000000,10.000000,0,1,100,0,0,0,0,0,-1,etc...11,4,600,4.000000,0.000000,90.000000,0.000000,0,1,0,0,100,0,0,0,200,96.000000,0.000000,10.000000,0.000000,0,1,0,0,0,0,0,0,-1,etc...

 

notice how the float columns sum?

Link to comment
https://gtaforums.com/topic/179930-ped-events/#findComment-2579357
Share on other sites

Craig Kostelecky

I was thinking that those floats might have been percentages. Your research seems to back that up. I don't know if I agree on the first number being a millisecond time. It looks more like another ID for specific events. Having the 911 correspond to everytime an emergency vehicle is sent out seems like too much to be a coincidence.

Link to comment
https://gtaforums.com/topic/179930-ped-events/#findComment-2581449
Share on other sites

  • 3 months later...

moved to Editing -> Misc

color removed from previous posts for readability

and i now beleive the "Int" (911), is actually a response type for the ped or group, in the files. these arent defined like the ped events though, there is no master lists of "responses", just the events.

Link to comment
https://gtaforums.com/topic/179930-ped-events/#findComment-2904166
Share on other sites

methodjuvenil

If I changed alot of these values and saw no change in behavior for the peds that I changed it for could this mean that the a.i. is hard coded and we changing this will have no effect?

 

BTW, think about this for a sec.

The quickest way for me to make cops act as cops should would be this method. PLEASE READ THIS I BEG YOU!!!!!

 

1.First. find out which group CJ belongs to (GANG1 GANG2 GANG3 PLAYER1???)

2.Then add it to the cops RESPECT List.

3.Next, since I have all COPs under every gangs HATE list they shoot beat and kill cops on sight. I just felt like adding this cuz it makes the game awesome.

4.When you are in game go around a cop and have someone punch you or attack you, the cop should do something cuz ur on his respect list but he doesn't, he even must run away!

5. Find the EVENT_ACQUAINTANCE_PED_RESPECT 39 line in a GangMbr.ped and replace/add to Cop.ped What this SHOULD do is make a cop behave the same way a gang does when one of its members(that they respect) is under attack. Right? The cop should go after someone attacking you because you are on their respect list and it is as if the cop is your gang member.

 

If this sounds good, try it for yourself. I hate to tell you that this doesn't work 4 me and I want one of u experts to tell me why.

If this works for you let me kno.

Edited by methodjuvenil
Link to comment
https://gtaforums.com/topic/179930-ped-events/#findComment-2904519
Share on other sites

  • 2 years later...

BIGGEST BUMP EVA!

 

Just made a nice discovery; any changes you want to make to ped events has to be done from the Allowed folder. Just on a hunch, I searched for "decision" in IDA and what do you know, it works!

 

Example: My created peds no longer look at weapons fire, editing m_norm.ped: (IN THE "DATA\DECISION\ALLOWED" FOLDER)

 

 

data values2:12,4,603,100.000000,100.000000,100.000000,100.000000,0,1,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,9,4,1000,0.000000,100.000000,50.000000,0.000000,0,1,0,0,0,100,0,0,415,50.000000,0.000000,25.000000,0.000000,0,1,100,0,0,0,0,0,200,50.000000,0.000000,25.000000,0.000000,0,1,0,0,0,0,0,0,1700,0.000000,100.000000,0.000000,0.000000,0,1,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,7,4,1000,0.000000,80.000000,80.000000,50.000000,1,1,0,0,0,100,0,0,700,100.000000,0.000000,0.000000,0.000000,1,1,0,0,0,100,0,0,702,0.000000,20.000000,20.000000,50.000000,1,1,0,0,0,100,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,15,4,1000,0.000000,80.000000,0.000000,0.000000,0,1,0,0,0,100,0,0,300,50.000000,0.000000,100.000000,100.000000,0,1,0,0,0,0,0,0,200,50.000000,0.000000,0.000000,0.000000,0,1,0,0,0,0,0,0,415,0.000000,20.000000,0.000000,0.000000,0,1,100,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,31,4,1000,0.000000,100.000000,0.000000,0.000000,0,1,0,0,0,100,0,0,413,100.000000,0.000000,0.000000,0.000000,0,1,100,0,0,0,0,0,1700,0.000000,100.000000,0.000000,0.000000,0,1,0,0,0,0,0,0,601,0.000000,0.000000,100.000000,100.000000,0,1,100,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,43,4,1000,0.000000,80.000000,80.000000,80.000000,0,1,0,0,0,0,0,0,911,0.000000,20.000000,20.000000,20.000000,0,1,0,0,0,0,0,0,200,100.000000,0.000000,0.000000,0.000000,0,1,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,36,4,1000,100.000000,100.000000,100.000000,100.000000,0,1,0,0,0,0,0,0,1700,0.000000,100.000000,0.000000,0.000000,0,1,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,37,4,300,100.000000,100.000000,100.000000,100.000000,0,1,0,0,0,0,0,0,1700,0.000000,100.000000,0.000000,0.000000,0,1,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,13,4,917,100.000000,100.000000,100.000000,100.000000,0,1,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,56,4,508,0.000000,0.000000,0.000000,100.000000,0,1,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,79,4,706,100.000000,100.000000,100.000000,100.000000,1,0,0,0,0,0,0,0,909,0.000000,0.000000,0.000000,100.000000,0,1,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,11,4,600,4.000000,0.000000,90.000000,0.000000,0,1,0,0,0,0,0,0,200,96.000000,0.000000,10.000000,0.000000,0,1,0,0,0,0,0,0,300,0.000000,100.000000,0.000000,0.000000,0,1,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,20,4,1700,0.000000,0.000000,0.000000,50.000000,0,1,0,0,0,0,0,0,200,0.000000,0.000000,0.000000,95.000000,0,1,0,0,0,0,0,0,300,0.000000,0.000000,0.000000,5.000000,0,1,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,46,4,514,0.000000,0.000000,0.000000,100.000000,0,1,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,44,4,510,100.000000,100.000000,100.000000,100.000000,0,1,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,-1,0.0,0.0,0.0,0.0,0,0,0,0,0,0,0,0,

 

 

So, delete the line with 15 (which, in PedEvents.txt is EVENT_SHOT_FIRED 15).

 

Hope this helps someone. smile.gif

Link to comment
https://gtaforums.com/topic/179930-ped-events/#findComment-1057301834
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.