Jump to content

[GTA SA] Change float multiplier to received damages with a CLEO mod?


ro4st

Recommended Posts

Is there any way to tweak the float multiplier to received damages of peds (Defend weakness stat) located in the pedstats.dat with a CLEO mod?

 

Example:

 

#   A                           B     C      D   E      F   G   H      I       J     K

STAT_COP             20.0  7.5    10  30  100 50  1.0   1.0   40    1

 

to

 

#   A                           B     C      D   E      F   G   H       I       J     K

STAT_COP             20.0  7.5    10  30  100 50  1.0   0.5   40    1

Link to comment
Share on other sites

It is possible. Just have to write a code that would pick the 8th number from STAT_COP line. 
Anyways, I am almost sure that it would be pointless. As far as I know - the game loads this file only once and changing it dynamically (in ex. from CLEO script) would be pointless. In other words - you'll have to change it via script and restart the game. You can confirm (or discomfirm) it by simply doing alt-tab while in game and change the values via notepad and check if it would work.

Link to comment
Share on other sites

  • 8 months later...
On 10/20/2022 at 3:11 PM, ro4st said:

Is there any way to tweak the float multiplier to received damages of peds (Defend weakness stat) located in the pedstats.dat with a CLEO mod?

 

Example:

 

#   A                           B     C      D   E      F   G   H      I       J     K

STAT_COP             20.0  7.5    10  30  100 50  1.0   1.0   40    1

 

to

 

#   A                           B     C      D   E      F   G   H       I       J     K

STAT_COP             20.0  7.5    10  30  100 50  1.0   0.5   40    1

{$CLEO .cs}

 

//-------------MAIN---------------


0000: NOP 

 

:NONAME_2
wait 0 
0A8D: 29@ = read_memory 12010640 size 4 virtual_protect 0 
29@ += 4 
0A8D: 29@ = read_memory 29@ size 4 virtual_protect 0 
30@ = 0 

 

:NONAME_46
0A8D: 0@ = read_memory 29@ size 1 virtual_protect 0 
29@ += 1 
if and
  0@ >= 0 
  128 > 0@ 
else_jump @NONAME_143 
005A: 0@ += 30@ // (int) 
if 
87D6:   not  0@ == $PLAYER_ACTOR // @ == $ (int) 
else_jump @ID_22

 

:ID_22
if 
0665: get_actor 0@ model_to 6@ 
00D6: if 
04A4:   6@ == 22 // == constant 
else_jump @NONAME_143

if

031D: actor 0@ hit_by_weapon 57

else_jump @NONAME_143

0467: clear_actor 0@ last_weapon_damage
0851: set_actor 0@ decrease_health_by 1@ affect_armour 0
0209: 1@ = random_int_in_ranges 0 1

else_jump @NONAME_143  

 

:NONAME_143
30@ += 256 
  30@ > 35584 
else_jump @NONAME_46 
jump @NONAME_2

Edited by Fideicide
Link to comment
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
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

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