Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. GTA Online

      1. The Diamond Casino Heist
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
    2. Red Dead Online

      1. Frontier Pursuits
      2. Find Lobbies & Outlaws
      3. Help & Support
    3. Crews

      1. Events
    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Redemption

    1. Grand Theft Auto Series

    2. GTA 6

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
      5. GTA IV Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA SA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA VC Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA III Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    3. Gangs

    1. News

    2. Forum Support

    3. Site Suggestions

Demarest

Thirst For Blood development

Recommended Posts

pdescobar
breaking 176 health limit is easy. you have to hit into higher momory range than stat 24 is located. i have done it before with probably 367 or something higher. if it is still interesting let me know so i will find it in my data. i remember as well it is stored as float (all of the important are) not as int so you have to trick it a bit because there is no opcode to access float stat.

Pardon me straying back off topic, but could you share your trick for properly setting the float values for illegitimate stats?

 

I've been able to convert the mismatched integer return value of stats 82-118 into the true floats they represent by using float assignment opcodes on the returned integer, but I haven't figured out how to go the other way and actually set them without screwing up the value...

Share this post


Link to post
Share on other sites
PLPynton

have you tried like this one:

 

 

0624: increase_stat  $DDA by  999999.0 ;;integer with floating-point values0626: decrease_stat  $DDA by  999999.0 ;;integer with floating-point values

 

 

i know that ain't the most elegant method, actually that is not a method at all, but that is the key in case like this one. actually it is about forseing using scripted coding how the real float stored there will change.

 

user posted image

and the bar actually works

 

that stat is 468 (means health bar maximum) and can be changed to 1454 to achieve bar with 255 health points. finally usual set_health works in wider range after this one (0 to 255) but you will have to avoid increasing (decrease does not reset it back) stat 24 by any scripted integer based command.

 

speaking about stats the range is reaching much higher than i have read somewhere (stat 342). the stats are placed up to cell 400 something. watch out for 452 and 492 or it can crash.

Share this post


Link to post
Share on other sites
Demarest
you will have to avoid increasing (decrease does not reset it back) stat 24 by any scripted integer based command.

 

speaking about stats the range is reaching much higher than i have read somewhere (stat 342). the stats are placed up to cell 400 something. watch out for 452 and 492 or it can crash.

All of this goes over my head. Starting with stat 24 because you say integer, but it's a float. So know idea what it is we're being cautioned against.

 

Cool find.

Share this post


Link to post
Share on other sites
pdescobar

 

have you tried like this one:

 

 

0624: increase_stat  $DDA by  999999.0;;integer with floating-point values0626: decrease_stat  $DDA by  999999.0;;integer with floating-point values

 

 

i know that ain't the most elegant method, actually that is not a method at all, but that is the key in case like this one. actually it is about forseing using scripted coding how the real float stored there will change.

You're right that it's not an elegant solution, but even that hasn't worked for me. Consider the following. Stat 85 is part of the section of stats which return the wrong type. Based on experimental results, the actual value at that memory location is a value from ar_stats.dat equal to 10.0 in the unmodified game. Using the 0652/0653 opcodes to retrieve its value returns 1092616192 because of the type mismatch. As a test, I have attempted to set that value to 20.0 which would be 1101004800 when interpreted as an integer.

 

This:

 

0629: change_stat 85 to 1101004800

 

results in the stat being zeroed.

 

While this:

 

0624: increase_stat 85 by 8388608.0

 

results in the stat remaining at its original value.

 

And pretty much every combination of opcode and argument I've tried gives one of those same two results: zeroing the stat or leaving it unchanged. I have yet to come up with a way to actually set that value to 20.0 from the stat opcodes.

 

EDIT: I have finally figured out how to do what I wanted. Apparently, the stat-changing opcodes such as 0624 limit their second parameter to the range -32768 to 32767, so you have to make your adjustments in a series of small chunks. For more on this, see the topic I created to pull the discussion out of Dem's thread here: http://www.gtaforums.com/index.php?act=ST&f=49&t=257379

 

 

speaking about stats the range is reaching much higher than i have read somewhere (stat 342). the stats are placed up to cell 400 something. watch out for 452 and 492 or it can crash.

 

op9080 determined the following during memory investigations: (reference)

 

0xB79380 - array of 82 floats, stats 0 - 81.

0xB79000 - array of 223 ints, stats 120 - 342.

 

While the stats at 120-342 are 32-bit ints, the opcodes that change these stats actually truncate their parameter to 16 bits and sign-extend them to 32 bits before applying them.

The following stats are limited to a value of 1000 by the opcodes that change the stats:

65-67, 21-25, 69-80, 160, 164-165, 223, 225, 229-230, 233, 241-244.

So, in memory, there is an array of stats 120-342 followed by 4 unknown bytes, followed by an array of stats 0-81. It stands to reason that values outside those two ranges will work in terms of letting you access memory, but because the opcode handlers don't "approve" of them, they don't handle the data properly and you wind up with type mismatches.

 

When I was playing around with stats, I did indeed find that stat 344-350 were type-mismatched copies of stats 0-6 and this would make sense given the memory layout posted by op9080. That same correspondence should hold through to stat 425 following which we would be venturing into unknown memory. Possibly then you get copies of stats 82-119 again and then you get truly different values starting at 464, but that's all just speculation. Regardless, I'm not surprised that higher values both work and can give unpredictable results when modified.

 

EDIT: Once again, see http://www.gtaforums.com/index.php?act=ST&f=49&t=257379 for further discussion on using the stat opcodes for memory access.

Edited by pdescobar

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 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.