Jump to content

[V] Script/Native Documentation and Research


Recommended Posts

Alexander Blade

There is no code segment inside that global registration scripts , so the game doesn't call main() for that scripts .

Result of my research today:

NETWORK_GET_BACKGROUND_LOADING_RECIPIENTS // 0x97A770BEEF227E2B 0x1CFB3F51 (NETWORK)SC_INBOX_MESSAGE_GET_DATA_FLOAT // 0xFFE5C16F402D851D (SOCIALCLUB)NETWORK_HAS_CONTROL_OF_PAVEMENT_STATS // 0xC01E93FAC20C3346 (NETWORK)IS_PED_STANDING_IN_COVER // 0x6A03BF943D767C93 (PED)SET_PED_PATHS_WIDTH_PLANT is actually SET_PED_PATH_MAY_ENTER_WATERPROCESS_CASH_GIFT // 0x20194D48EAEC9A41 0xC5D8B1E9 (NETWORKCASH)NETWORK_CAN_BET // 0x3A54E33660DED67F 0xE3802533 (NETWORKCASH)

I've renamed _0xAF754F20EB5CD51A to _IS_RADAR_ENABLED but I'm not sure where's the difference to IS_RADAR_HIDDEN because !IS_RADAR_HIDDEN() returns the same.

However, this seems to be important in some cases (e.g. scaleform functions) because some scripts call _IS_RADAR_ENABLED() before !IS_RADAR_HIDDEN() ⤵

 

cellphone_controller.ysc

if (UI::_AF754F20EB5CD51A()) { // _IS_RADAR_ENABLED    if (!UI::IS_RADAR_HIDDEN()) {
Edited by Unknown_Modder

I believe I have determined the purpose of the following methods:

OBJECT::_0x6BAB9442830C7F53(Hash doorHash, Any p1, BOOL p2, BOOL p3) // Sets the acceleration limit of a door. // i.e. How fast it can open, or the inverse hinge resistance; 0 seems to lock doors.    Any p1  // always an integer, 0-4 are used but it may go higher (acceleration limit)    BOOL p2 // always 0 (unused)    BOOL p3 // always 1 (unused)  // Renamed method:OBJECT::_SET_DOOR_ACCELERATION_LIMIT(Hash doorHash, int limit, BOOL p2, BOOL p3)
OBJECT::_0xB6E6FBA95C7324AC(Hash doorHash, float p1, BOOL p2, BOOL p3) // Sets the ajar angle of a door. // i.e. How open the door is, 0.0 is closed / default.    float p1 // a float from -1.0 to 1.0, may accept values outside of range (ajar angle)    BOOL p2  // always 0 (unused)    BOOL p3  // always 1 (unused)  // Renamed method:OBJECT::_SET_DOOR_AJAR_ANGLE(Hash doorHash, float ajar, BOOL p2, BOOL p3)

This is based on my personal de-obfuscation of b678d.

 

Does anyone have a list of the groups and their hex value representations?

It looks like R* just randomizes a hex value for these hashes; groups only have 8 characters.




On another note, does anyone know if these native functions keep their data when you start a new game?
GAMEPLAY::REGISTER_INT_TO_SAVE()GAMEPLAY::REGISTER_ENUM_TO_SAVE()GAMEPLAY::REGISTER_FLOAT_TO_SAVE()GAMEPLAY::REGISTER_BOOL_TO_SAVE()GAMEPLAY::REGISTER_TEXT_LABEL_TO_SAVE()​

i.e. Can you reset the values by starting a new game, or is there a specific data reset you have to do besides just deleting save files in-game?

Edited by Tehelee

I've recently come across this method, and it's not in the Native DB.

int __678_$2F14983962462691(char *);

For anyone curious, I've figured out it's function and named it:

int GRAPHICS::_GET_MODIFIABLE_SCALEFORM(char* scaleformName);

This returns a Scaleform movie that can be modified with:

GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION(int scaleform, char* functionName); GRAPHICS::_POP_SCALEFORM_MOVIE_FUNCTION();
Edited by Tehelee

Tehelee

Declare that native yourself in your file in a way funcs are declared in natives.h .

Okay, not a problem; is there any way to decifer a namespace for these?

 

Also, what about adding them to the DB? Considering we can edit, what about additional entries?

mockba.the.borg

Hi there,

 

(switching to rant mode)

 

Whoever is changing booleans to integers or even worse: floats on the native BD, please stop.

Please do some research before doing so. Then look at the native's description (if any) and suspect that it may be correct, before completely dismissing it.

If your script is failing compilation because of type mismatch, it would make more sense to fix the issue on your script, not on the natives database.

If you change a boolean to a float there, it may keep working for your mod, but it will stop working for people whose languages will expect the right variable type, and using that updated native.h will break their mods.

 

So, again, lets stress this out: The great power of the little pencil comes with great responsibility. Test it before changing, look at the decompiled scripts and see if that passed parameter "smells" more like a float or like a boolean. Floats on the decompiled scripts will apear with decimal points, like 1.0, or hex representations like 0x3f800000 (which is also 1.0). Integer (bitmapped or not) are trickier. To tell an integer from a boolean you may need to look at its usage throughout the scripts and see if it is used with any value other than 1 or 0.

 

And finally: NO, the parameters to _TASK_BRING_VEHICLE_TO_HALT are NOT x, y, z ... please read its description.

 

(switching back to whatever before mode)

 

Cheers,

Mockba.

Edited by mockba.the.borg
  • Like 4
mockba.the.borg

HI there,

 

The CAM::RENDER_SCRIPT_CAMS native on the DB shows 5 parameters, but on the decompiled scripts it is presented with 6 parameters.

The extra parameter seems to be a boolean, as it is always presented with either 0 or 1.

How can I fix this on the DB? The pencil allows me to change the existing parameter, but not add a new one.

 

Thanks,

Mockba.

Alexander Blade

mockba.the.borg

I do such changes manually . You can call it with 5 params as well , missing param will be set to false . Usually when native param gets added in patch it's set to affect nothing by default so R* don't need to fix all scripts with that native manually .

Edited by Alexander Blade
  • Like 2
  • 4 weeks later...

Well it's nice to see this thread hasn't yet been littered with the "Updates out, where are you AB?" sort of comments. Take your time dude and don't rush for people who are too impatient, I've already seen a wealth of comments of people complaining the game won't work, without realising the same thing happens every update.

  • Like 3
Alexander Blade

We are performing final testings now , update will be out soon , please be patient .

 

Well it's nice to see this thread hasn't yet been littered with the "Updates out, where are you AB?" sort of comments. Take your time dude and don't rush for people who are too impatient, I've already seen a wealth of comments of people complaining the game won't work, without realising the same thing happens every update.

 

 

This was the nicest "reminder" I have ever seen ... lol ... :)

  • Like 8
TheAdmiester

Quick question. I know you've said Rockstar scrambles the hashes every update (or something along those lines), so what is it you do to fix and update the Scripthook?

 

Do you have an automated process or do you have to somehow find everything manually each time?

 

We are performing final testings now , update will be out soon , please be patient .

 

Well it's nice to see this thread hasn't yet been littered with the "Updates out, where are you AB?" sort of comments. Take your time dude and don't rush for people who are too impatient, I've already seen a wealth of comments of people complaining the game won't work, without realising the same thing happens every update.

 

 

This was the nicest "reminder" I have ever seen ... lol ... :)

 

I appreciate it Alexander, your work is incredible and without it the modding community would be relatively nowhere.

How far along are you guys? Do you have an estimate on when the update will be released?

I'm just curious. I just purchased GTA V for the PC and installed a bunch of mods before I hop in. But the biggest ones I find essential for the game require scripting. So until then I'm waiting patiently. By no means do we want to rush you, but do you have an idea on how long it will take? As in days, weeks?

 

I'd appreciate it, and again thank you very much : D

Edited by tyridge77

I appreciate it Alexander, your work is incredible and without it the modding community would be relatively nowhere.

 

 

How far along are you guys? Do you have an estimate on when the update will be released?

I'm just curious. I just purchased GTA V for the PC and installed a bunch of mods before I hop in. But the biggest ones I find essential for the game require scripting. So until then I'm waiting patiently. By no means do we want to rush you, but do you have an idea on how long it will take? As in days, weeks?

 

I'd appreciate it, and again thank you very much : D

 

 

It will most likely be done in a day or two. But seriously you guys need to stop asking, if you want it so bad then figure out how to do it yourself. We all have lives outside of GTA modding.

  • Like 1

 

I appreciate it Alexander, your work is incredible and without it the modding community would be relatively nowhere.

 

 

How far along are you guys? Do you have an estimate on when the update will be released?

I'm just curious. I just purchased GTA V for the PC and installed a bunch of mods before I hop in. But the biggest ones I find essential for the game require scripting. So until then I'm waiting patiently. By no means do we want to rush you, but do you have an idea on how long it will take? As in days, weeks?

 

I'd appreciate it, and again thank you very much : D

 

 

It will most likely be done in a day or two. But seriously you guys need to stop asking, if you want it so bad then figure out how to do it yourself. We all have lives outside of GTA modding.

 

It has always taken Alex 1-3 days no need to lie to people its been like that almost every update.

Alex knows what hes doing all this oh don't rush him its precious let him take his time we see this always being posted every update.

 

You think he cares about you all posting HURRY and ect no he works on his time and he is known to release within 1-3 days.

Alwayskaffa

Its will be here, when its here.

 

 

 

We are performing final testings now , update will be out soon , please be patient .

 

Well it's nice to see this thread hasn't yet been littered with the "Updates out, where are you AB?" sort of comments. Take your time dude and don't rush for people who are too impatient, I've already seen a wealth of comments of people complaining the game won't work, without realising the same thing happens every update.

 

 

This was the nicest "reminder" I have ever seen ... lol ... :)

 

I appreciate it Alexander, your work is incredible and without it the modding community would be relatively nowhere.

How far along are you guys? Do you have an estimate on when the update will be released?

I'm just curious. I just purchased GTA V for the PC and installed a bunch of mods before I hop in. But the biggest ones I find essential for the game require scripting. So until then I'm waiting patiently. By no means do we want to rush you, but do you have an idea on how long it will take? As in days, weeks?

 

I'd appreciate it, and again thank you very much : D

 

Edited by Alwayskaffa
mockba.the.borg

Hi all,

 

(Switching to rant mode)

 

Guys, this thread is for sharing documentation and discoveries on the natives, not to rush Alexander into releasing ScriptHookV.

I may have done it the past? Maybe ... but then I learnt my lesson.

I suggest we create a topic called "Rush Alexander to release ScriptHookV after an update", and post these messages there.

Of course he is invited to NEVER look at that topic.

And then we leave this topic alone for native discoveries and documentation.

If I was a moderator here I would delete all the posts above, including mine. Including this one.

 

Peace out!

 

(switching back to I-don't-give-a-f*ck mode)

 

Cheers,

Mockba.

  • Like 2
unknown modder

mine is still say scripthook is still saying FATAL: unknown game version, check http://dev-c.comfor updates? i just updated my game along with the new scripthook update please help ab!

be safe, delete scripthookv.dll from your game folder and then redownload the latest and copy that. you'll definitely be using the right version then

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.