Jump to content

[V] Script/Native Documentation and Research


Recommended Posts

unknown modder

 

int _GET_AIRCRAFT_COUNTERMEASURE_COUNT(Vehicle aircraft); // 0xF846AA63DF56B804void _SET_AIRCRAFT_COUNTERMEASURE_COUNT(Vehicle aircraft, int countermeasureCount); // 0x9BDA23BF666F0855int _GET_AIRCRAFT_BOMB_COUNT(Vehicle aircraft); // 0xEA12BD130D7569A1void _SET_AIRCRAFT_BOMB_COUNT(Vehicle aircraft, int bombCount); // 0xF4B2ED59DEB5D774BOOL _ARE_BOMB_BAY_DOORS_OPEN(Vehicle aircraft); // 0xD0917A423314BBA8float _GET_PLANE_HOVER_MODE_PERCENTAGE(Vehicle plane); // 0xDA62027C8BDB326E

You dont happen to know if there is one that checks if bomb bay doors are FULLY open?

 

I'm not sure, But I thought the _ARE_BOMB_BAY_DOORS_OPEN only returns true when they are fully open. Feel free to test it out yourself though

I'm not sure, But I thought the _ARE_BOMB_BAY_DOORS_OPEN only returns true when they are fully open. Feel free to test it out yourself though

Returns TRUE if doors are open or opening, so immediately after the OPEN_BOMB_BAY_DOORS and until CLOSE_BOMB_BAY_DOORS is called.

Returns FALSE if doors are closed or closing, so immediately after CLOSE_BOMB_BAY_DOORS and until OPEN_BOMB_BAY_DOORS is called.

 

On the other hand, does anyone know the location and name of the file with sound for bomb bay doors opening/closing? Or a way to disable it through natives (AUDIO::STOP_SOUND maybe?).

Edited by darkphoenixxx
  • 2 months later...

I found a site containing natives that don't exist in the first version by accident.

There are way more extra natives than I thought.

https://macoonier.github.io/GTA5-NativeDatabase/

the repo https://github.com/Macoonier/GTA5-NativeDatabase

Edited by kagikn
  • Like 2

Hi, it's amazing everything I've learned from reading you.

I can manage now in reverse engineering when I knew nothing before.
So thank you for your knowledge sharing, albeit limited a few times :)
In such a short time learning in the end, I was able to create beautiful things, like a YSC disassembler, YSC edit in runtime (nop overwrite anyway) and so many interesting things.
( thanks to documentation scrProgram on gtamodding anyway for ysc :lol: )
There are far too many talents here.
Also, i saw that the registration native function was changed in b1290 ( little obfuscation i suppose ), it does not look very complex to reverse.
I could never have understood all these things without all that has been said here.
:santa:
Thanks to all reverse engineering mans ^^
Edited by Transmet

While waiting for the repair.

 

I made a small trampoline to analyze the use of native uses in "YSC" scripts.
I do not think I'm helping anyone with that, but it's always good to share what's relevant to this topic.

https://github.com/Transmet92/GTA-V-Natives-Stats

 

It does the percentage of use of each native call during the game, I did it for basic personal use.

( trampoline native opcode in scrProgram interpreter )

I'll post an example of output in the github a little later.

  • 4 weeks later...

 

Can anyone shed some light on how native "GET_CLOSEST_OBJECT_OF_TYPE" works ? Does this work off coordinates as get_closest_vehicle ?

 

Some further explanation of the params would be appreciated.

var object = get_closest_object_of_type(x_pos, y_pos, z_pos, max_distance, object_hash, unk_bool);

Its pretty similar to get closest vehicle only you have to specify the exact model hash you're searching for

 

 

 

I'm trying to remove a bush, like:

 

returnedProp = Function.Call<Prop>(Hash.GET_CLOSEST_OBJECT_OF_TYPE, -561.7426f, 4439.272f, 24.94009f, 0.1f, 1277635601, 0); // prop_bush_lrg_03

if (returnedProp != null && returnedProp.Handle != 0) returnedProp.Delete();

 

But the bush stubbornly remains undeleted. What am I doing wrong?!

 

Edited by meimeiriver
  • 2 months later...

idk when the next update for script v will be out but i am very anxious on its release after having soo much fun before the update of gta5 and now having to delete the latest script hook im kinda bummed out buuut in the long run i wait patiently hoping for that next update keep up the good work alex

  • 3 weeks later...

Hi all,

 

Was having trouble making a countdown before a race/event, and after some digging found from decompiled script "country_race":

 

ScaleformID "COUNTDOWN" with scaleform movie function "SET_MESSAGE", text component "NUMBER", add text component integer with a number (for countdown).

 

This will display the number on a circle background, like the countdown before races.

 

Combined with REQUEST_SCRIPT_AUDIO_BANK "HUD_321_GO" and playing the sounds "3_2_1" and "GO" from "HUD_MINI_GAME_SOUNDSET" it's almost like the real thing :)

 

 

 

static void _DISABLE_VEHICLE_NEON_LIGHTS(Vehicle vehicle, BOOL disable) { invoke<Void>(0x83F813570FF519DE, vehicle, disable); }
Been in the game since 573 but hasn't been documented. Saves you the headache of storing neon states and detecting if you messed with them, or the game messed with them, if you simply wanna turn sets on or off.

 

(Native is used in the vehicle interaction menu in Online)

 

Edit:

It's _DISABLE_VEHICLE_NEON_LIGHTS. Unknown's remark.

Edited by ikt
  • 4 weeks later...
  • 1 month later...
Flying Scotsman
On 7/4/2018 at 3:50 PM, forumapp28 said:

How can i get original natives? Some natives edited by kids and is no longer working.

You can use other sites like: 

 

https://macoonier.github.io/GTA5-NativeDatabase/

  • 5 months later...
26 minutes ago, Copper_ said:

Still after downloading Script Hook V 1.0.1604.0, it still gives me the critical error message when loading up my game. I've deleted the old one and the dsound.dll aswell but I am still stumped

This isn't a support thread, it's a documentation thread... look in the Scripts & Plugins section, there's a thread in there.

Edited by Guest
  • 9 months later...
  • 1 month later...
  • 3 weeks later...
Jupiter_Hortenzievich

I've noticed, that somebody who is working on Native DB, have changed the declaration of some natives' parameters' and/or return type's value from the original to pointer!

For example, let's see the very first, 'PLAYER:: GET_PLAYER_PED'. It was originally a 'Player' now it is a 'Player*'. Dumb mistake! The script crashes when I try to dereference the 'pointer'. What changed? Nothing - they do the same!

I found a bunch of natives, like this, whose type or some parameters has been changed into a pointer. I also found falsified 'Entity', 'Vector3', 'Any', 'Vehicle', 'Ped' or 'Train' pointers.

The question is 'Why did they change?'. Particularly for n00b ScriptHookV ASI modders, this is a serious problem. Also a problem for me - I am the one who is working on the ScriptHookV Pascal SDK, and cannot decide which is really a pointer, or which is a falsified pointer. It also cannot be automatized to decide!

 

Anyway, thanks for creating the Native DB - but please, do not trash it for fun!

  • 4 months later...

this is 2020 april 2  the is no updated script hook v when will there be one released or avalible thanks for updateing.  script hook v it very useful for me it would be very hard for me with out it at this time I live on gta 5 and its mods I need to have it I love gta 5 and its mods I hope you get done with the upde soon I just got some new matieral and was woking it out and gta 5 updated trying to get this new zmodler 3 working well I just spent some money getting my gaming pc fixed the other day and got some software done so im waiting to get the new script hook v update pretty bad

thanks.

Edited by SLIMslim
1 hour ago, TP511 said:

Any news as to when script hook will be updated? 

Thanks for your time

No and there won't be any news until the updated version is released on the site of the person updating it... that's pretty much how it works. Only one person knows, that's how it's always been.

There's several (open source) drop-in replacements, but they're old.

 

OpenVHook, but stuck at 1365

Give-Two's ScriptHookV, afaik also 1365

 

Also there'd been some more significant changes after the Casino update, which might hamper just dropping in a new native map.

 

RagePluginHook is *not* compatible currently, but if it's updated before ScriptHookV and you're in a hurry for some reason, you can also try the Asi support for RPH.

 

So basically just wait.

  • 1 month later...
  • 2 weeks later...
Kenny Wall

Hello everyone, we are all waiting when Alex Blade will update ScriptHookV for EGS version of the game. Meanwhile i were able to patch ScriptHookV.dll,

so now it supports EGS version of Gta5 1.0.1868.4 and i want to share my work.

 

Luckily, natives' "hashes" were not changed, so i only had to change 12 game offsets which hook uses during its work.

I understand that this can look suspicious, but on this forum there are several people who know what is reverse engineering, so they can simply binary compare 
original ScriptHookV.dll with one from my archive and see that there are changes only in offset tables, game version check function and in couple of text messages.

 

Use it only with Gta5 1.0.1868.4 EGS, because i had to patch game version check function in such way that it will probably skip older versions. 
Also i had to use 1868.1 places in offset tables to hold new 1868.4 values, so 1868.1 won't work too. This is not a big problem for now, main goal was to support 1868.4 EGS.

 

Download link for ScriptHookV_1.0.1868.4.zip:

https://mega.nz/folder/X84UwS7a#WoDgLYaQHNed-IX7ETStCA

SHA256 of the archive: 7d10ef4468baf0f7d9588f0a96b4c328697a89631f3393adc4ac83133b16a9d0

 

Virustotal for archive:
https://www.virustotal.com/gui/file/7d10ef4468baf0f7d9588f0a96b4c328697a89631f3393adc4ac83133b16a9d0/detection

 

Virustotal for ScriptHookV.dll:

https://www.virustotal.com/gui/file/1112075e7cd4f0bf62e9c40638471ecd8abacc02c2314df99cfe9fd728a9db7e/detection

 

I've tested hook with NativeTrainer included with original archive, it seems to be working fine. Also there are reports from people on other forum, that LSPDFR is working with my updated scripthookv on Gta 1868.4 EGS.

 

 

Edited by Kenny Wall
typos

the ScriptHookV_1.0.1868.4.zip works great for me using the https://github.com/LukeRoss00/gta5-real-mod to play on Oculus Rift and on Quest using Oculus Link. But, it does not work for me when trying to use SteamVR via Radeon Relive VR (AMD's built in solution to playing SteamVR games on wireless headsets). I don't know if this also means it isn't working on Quest using Virtual Desktop either, has anyone tried? I can see the HUD and pause screens, but not the game. It is all black, but occasionaly will flash 1 frame of the actual game. People were experiencing this with old scripthookv i wonder if there's something that could be changed.

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.