News: Welcome back to Bullworth! If you haven't already, you will need to reset your password..


Author Topic: PedStats  (Read 2784 times)

0 Members and 1 Guest are viewing this topic.

Offline AfterLife

  • The Reaper
  • Sr. Member
  • ***
  • Posts: 830
  • Gender: Male
  • I'm from the AfterLife...
    • View Profile
PedStats
« on: March 15, 2015, 01:56:52 AM »
How do I change the block frequency etc in PedStats?

Offline DaBOSS54320

  • Hero Member
  • ****
  • Posts: 3,398
  • Gender: Female
    • View Profile
Re: PedStats
« Reply #1 on: March 15, 2015, 02:50:30 AM »
Open /Bully/Config/dat/pedstats.dat in any text editor (notepad++ being my personal preference) and simply edit the stats. At the top of the file, Rockstar left information regarding what each of the stats does in the game. This file sets the default values for ped stats, but the stats can be changed in scripts and/or missions.


If you want to change the stats of individual peds in a LUA script, this can be done as well using GameSetPedStat, or PedOverrideStat. They both have the same effect, and I haven't noticed any differences between the two. They both take 3 arguments, the ped to set the stat on, the stat ID, and the new value for the stat. For example, GameSetPedStat(gPlayer,20,200) or PedOverrideStat(gPlayer,20,200).

The stats are the same for the scripting functions as they are in pedstats.dat, however you need to use a number ID to reference a certain stat. It's pretty simple to get the stat number from pedstats.dat. A will never be changed, so it has no number, as it's not technically a stat anyway. B is 0, C is 1, D is 2, E is 3, F is 4, and it keeps going like that down the file. Just start with replacing B with 0, and label the rest of the lines in the file counting up from that 0.

There is also a function GameGetPedStat, which takes the ped and stat id, and returns the current value of a stat for that ped. For example playerAnimSpeed = GameGetPedStat(gPlayer,20).

Offline AfterLife

  • The Reaper
  • Sr. Member
  • ***
  • Posts: 830
  • Gender: Male
  • I'm from the AfterLife...
    • View Profile
Re: PedStats
« Reply #2 on: March 15, 2015, 02:58:10 AM »
Open /Bully/Config/dat/pedstats.dat in any text editor (notepad++ being my personal preference) and simply edit the stats. At the top of the file, Rockstar left information regarding what each of the stats does in the game. This file sets the default values for ped stats, but the stats can be changed in scripts and/or missions.


If you want to change the stats of individual peds in a LUA script, this can be done as well using GameSetPedStat, or PedOverrideStat. They both have the same effect, and I haven't noticed any differences between the two. They both take 3 arguments, the ped to set the stat on, the stat ID, and the new value for the stat. For example, GameSetPedStat(gPlayer,20,200) or PedOverrideStat(gPlayer,20,200).

The stats are the same for the scripting functions as they are in pedstats.dat, however you need to use a number ID to reference a certain stat. It's pretty simple to get the stat number from pedstats.dat. A will never be changed, so it has no number, as it's not technically a stat anyway. B is 0, C is 1, D is 2, E is 3, F is 4, and it keeps going like that down the file. Just start with replacing B with 0, and label the rest of the lines in the file counting up from that 0.

There is also a function GameGetPedStat, which takes the ped and stat id, and returns the current value of a stat for that ped. For example playerAnimSpeed = GameGetPedStat(gPlayer,20).
Will it work if we have multiple PedOverrideStats? And what do you mean by "STAT ID"?
« Last Edit: March 15, 2015, 03:02:20 AM by 私たちは »

Offline DaBOSS54320

  • Hero Member
  • ****
  • Posts: 3,398
  • Gender: Female
    • View Profile
Re: PedStats
« Reply #3 on: March 15, 2015, 04:08:31 AM »
You can override/set as many stats as you like.
Stat ID is the number that refers to each stat, LUA will need you to pass a number into the function call to specify the stat you want to change, rather than the letter of the stat shown in pedstats.dat. However they line up in the same order as in pedstats, starting with B as 0.

Offline AfterLife

  • The Reaper
  • Sr. Member
  • ***
  • Posts: 830
  • Gender: Male
  • I'm from the AfterLife...
    • View Profile
Re: PedStats
« Reply #4 on: March 15, 2015, 05:38:01 AM »
Okay thanks.