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

    1. Red Dead Redemption 2

      1. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Diamond Casino & Resort
      2. DLC
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

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

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

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

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

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

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

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

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    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
    1. News

    2. Forum Support

    3. Site Suggestions

Alexander Blade

[V] Script/Native Documentation and Research

Recommended Posts

QuentinS

Tobedeleted

Edited by QuentinS

Share this post


Link to post
Share on other sites
Unknown_Modder

Some of the new b1103 natives (haven't had much time so only 4):

// STREAMING// I'm 99% sure it's the correct namestatic BOOL _IS_MODEL_A_PED(Hash modelHash) { return invoke<BOOL>(0x75816577FEA6DAD5, modelHash); } // 0x75816577FEA6DAD5// WEAPONstatic Hash _GET_PED_AMMO_TYPE_FROM_WEAPON_2(Ped ped, Hash weaponHash) { return invoke<Hash>(0xF489B44DD5AF4BD9, ped, weaponHash); } // 0xF489B44DD5AF4BD9// VEHICLE// 0.0f - 1.0fstatic void _SET_VEHICLE_ROCKET_BOOST_PERCENTAGE(Vehicle vehicle, float percentage) { invoke<Void>(0xFEB2DDED3509562E, vehicle, percentage); } // 0xFEB2DDED3509562Estatic int _GET_ALL_VEHICLES(int* vehsStruct) { return invoke<int>(0x9B8E1BF04B51F2E8, vehsStruct); } // 0x9B8E1BF04B51F2E8// purely based on a quick disassembly, not sure if it's correctstruct vehsStruct{    int maxSize;    int padding;    Vehicle vehs[300];};

Share this post


Link to post
Share on other sites
Quant

nvm.

Edited by Quant

Share this post


Link to post
Share on other sites
mockba.the.borg

 

Some of the new b1103 natives (haven't had much time so only 4):

// STREAMING// I'm 99% sure it's the correct namestatic BOOL _IS_MODEL_A_PED(Hash modelHash) { return invoke<BOOL>(0x75816577FEA6DAD5, modelHash); } // 0x75816577FEA6DAD5// WEAPONstatic Hash _GET_PED_AMMO_TYPE_FROM_WEAPON_2(Ped ped, Hash weaponHash) { return invoke<Hash>(0xF489B44DD5AF4BD9, ped, weaponHash); } // 0xF489B44DD5AF4BD9// VEHICLE// 0.0f - 1.0fstatic void _SET_VEHICLE_ROCKET_BOOST_PERCENTAGE(Vehicle vehicle, float percentage) { invoke<Void>(0xFEB2DDED3509562E, vehicle, percentage); } // 0xFEB2DDED3509562Estatic int _GET_ALL_VEHICLES(int* vehsStruct) { return invoke<int>(0x9B8E1BF04B51F2E8, vehsStruct); } // 0x9B8E1BF04B51F2E8// purely based on a quick disassembly, not sure if it's correctstruct vehsStruct{    int maxSize;    int padding;    Vehicle vehs[300];};

This is cool ... I wonder if there's a _GET_ALL_PEDS still to be discovered.

Edited by mockba.the.borg

Share this post


Link to post
Share on other sites
HeresOtis

Anyone have v1103 Steam dump?

Share this post


Link to post
Share on other sites
aaron25th

Long story - There is currently a bug with the race creator that has been ruining races for over a year now that I'm looking to find the cause of I have tracked it down to Global_1638223.f_17 in fm_race_creator being 536870912 which is the 29th bit.

 

I have found 2 references to the bit being set

GAMEPLAY::SET_BIT(&(Global_1638223.f_17), 29); 

but I am lost trying to find what is causing it to be set.

 

Any help is appreciated. Thanks

Edited by aaron25th

Share this post


Link to post
Share on other sites
alexcarmad

hello

Alexander Blade

when is next update for scripthook v coming out as mine says it needs updating but theres not one so not letting me play help please

Share this post


Link to post
Share on other sites
fbrown2700

script hook v no longer works after last gta v update i get error that it needs updated also even though i have the latest version of Script hook

Edited by fbrown2700

Share this post


Link to post
Share on other sites
NekoNya

@AB, Are you not posting the Native Tables anymore?

Share this post


Link to post
Share on other sites
Quant

corrected SET_TEXT_SCALE (0x07C837F9A01C34C9), someone f*cked it up.

Edited by Quant

Share this post


Link to post
Share on other sites
GamerAnsk3

 

@AB, Are you not posting the Native Tables anymore?

Just extract the table from SHV. Here: https://pastebin.com/n1ypT0xf

 

Did you try it? Because when I did I am getting this Error "Failed to Initialize NativeHooks"... Idk if this is the Good Hash Table...Any Ideas how to fix it?

Share this post


Link to post
Share on other sites
mockba.the.borg

AB has changed the way ScriptHookV works.

Instead of having multiple translation tables in there, and search each one vertically, he made it all one big table, and searches the natives horizontally.

So extracting the table from ScriptHookV now requires some extra work.

Not saying that the table above it wrong, I didn't test it.

Just saying that ScriptHookV table content has changed.

Share this post


Link to post
Share on other sites
unknown modder

 

 

@AB, Are you not posting the Native Tables anymore?

Just extract the table from SHV. Here: https://pastebin.com/n1ypT0xf

 

Did you try it? Because when I did I am getting this Error "Failed to Initialize NativeHooks"... Idk if this is the Good Hash Table...Any Ideas how to fix it?

 

Hooking natives, If I didnt know better I'd say you were using this for a GTA:Online modification which is not supported here

Share this post


Link to post
Share on other sites
NekoNya

 

 

@AB, Are you not posting the Native Tables anymore?

Just extract the table from SHV. Here: https://pastebin.com/n1ypT0xf

 

Did you try it? Because when I did I am getting this Error "Failed to Initialize NativeHooks"... Idk if this is the Good Hash Table...Any Ideas how to fix it?

 

 

Yup they work, You can't just put them into a hook and expect them to work you will probably need to-do some work yourself.

They are the translation tables of b1103 to b1180. So to speed things up you will need to write a small console application to update your existing table with the new addresses from the new table.

That's as much as I can help you with, If your unsure on how to-do any of that then I'd recommend learning the basics of Programming.

 

@unknown modder, Yeah I would have done that but I'm a little new to that whole thing and hadn't the clue were to start, Appreciate you posting the table, thanks ^^.

Share this post


Link to post
Share on other sites
mockba.the.borg

 

 

 

@AB, Are you not posting the Native Tables anymore?

Just extract the table from SHV. Here: https://pastebin.com/n1ypT0xf

 

Did you try it? Because when I did I am getting this Error "Failed to Initialize NativeHooks"... Idk if this is the Good Hash Table...Any Ideas how to fix it?

 

Hooking natives, If I didnt know better I'd say you were using this for a GTA:Online modification which is not supported here

 

 

Well ... not really ... I have bypassed all the natives and am going directly to their internal offsets, on my >>>OFFLINE<<<, >>non-online-capable<<< GTALua2 ... because I was tired of having to wait for AB to release a new ScriptHookV when a new version of the game comes out.

 

To be honest I am already modding the new v1180 without having ever played it online since the release.

 

GTA:O sucks, you are a hamster in a cage doing repetitive grinding for money ... offline modded GTA has much better vehicles and stuff, end everything is free ... :)

Share this post


Link to post
Share on other sites
unknown modder

 

Hooking natives, If I didnt know better I'd say you were using this for a GTA:Online modification which is not supported here

Well ... not really ... I have bypassed all the natives and am going directly to their internal offsets, on my >>>OFFLINE<<<, >>non-online-capable<<< GTALua2 ... because I was tired of having to wait for AB to release a new ScriptHookV when a new version of the game comes out.

 

To be honest I am already modding the new v1180 without having ever played it online since the release.

 

GTA:O sucks, you are a hamster in a cage doing repetitive grinding for money ... offline modded GTA has much better vehicles and stuff, end everything is free ... :)

 

Hooking natives is not the same as getting their entry points and invoking them directly.

Share this post


Link to post
Share on other sites
CamxxCore

 

 

 

 

@AB, Are you not posting the Native Tables anymore?

Just extract the table from SHV. Here: https://pastebin.com/n1ypT0xf

 

Did you try it? Because when I did I am getting this Error "Failed to Initialize NativeHooks"... Idk if this is the Good Hash Table...Any Ideas how to fix it?

 

Hooking natives, If I didnt know better I'd say you were using this for a GTA:Online modification which is not supported here

 

 

Well ... not really ... I have bypassed all the natives and am going directly to their internal offsets, on my >>>OFFLINE<<<, >>non-online-capable<<< GTALua2 ... because I was tired of having to wait for AB to release a new ScriptHookV when a new version of the game comes out.

 

To be honest I am already modding the new v1180 without having ever played it online since the release.

 

GTA:O sucks, you are a hamster in a cage doing repetitive grinding for money ... offline modded GTA has much better vehicles and stuff, end everything is free ... :)

 

 

In this case I'm pretty sure he is just another kid trying to get an online mod menu working. "Failed to Initialize Native Hooks" is a message from the online 'sudo mod' menu.

Share this post


Link to post
Share on other sites
GamerAnsk3

 

 

 

@AB, Are you not posting the Native Tables anymore?

Just extract the table from SHV. Here: https://pastebin.com/n1ypT0xf

 

Did you try it? Because when I did I am getting this Error "Failed to Initialize NativeHooks"... Idk if this is the Good Hash Table...Any Ideas how to fix it?

 

 

Yup they work, You can't just put them into a hook and expect them to work you will probably need to-do some work yourself.

They are the translation tables of b1103 to b1180. So to speed things up you will need to write a small console application to update your existing table with the new addresses from the new table.

That's as much as I can help you with, If your unsure on how to-do any of that then I'd recommend learning the basics of Programming.

 

@unknown modder, Yeah I would have done that but I'm a little new to that whole thing and hadn't the clue were to start, Appreciate you posting the table, thanks ^^.

 

 

If someone just can give the other Modification i would need to do that will be nice too... Im still a newbie and dont have a lot of knowlege tho but im doing my best...

Share this post


Link to post
Share on other sites
TriRozhka

Does zorg93's decompiler works with latest ysc's?

Can someone share 1180 decompiled scripts?

Share this post


Link to post
Share on other sites
unknown modder

Does zorg93's decompiler works with latest ysc's?

Can someone share 1180 decompiled scripts?

kinda. the natives would need updating. Im just trying to fix some annoying bug atm but once that is out the way I'll upload them

Share this post


Link to post
Share on other sites
TriRozhka

 

Does zorg93's decompiler works with latest ysc's?

Can someone share 1180 decompiled scripts?

kinda. the natives would need updating. Im just trying to fix some annoying bug atm but once that is out the way I'll upload them

 

 

I've extracted one .ysc from update.rpf and it looks like this (first bytes):

00000000h: 52 53 43 07 0A 00 00 00 82 00 EA 01 00 00 00 A0 ; RSC.....‚.к.... 00000010h: FB 7E 4A 04 C7 29 12 9B 8A 2A 47 B2 51 C2 0E AD ; ы~J.З).›Љ*GІQВ.­00000020h: 51 86 A6 03 BC 2C 6E E2 55 76 E8 21 DB 30 DA 14 ; Q†¦.ј,nвUvи!Ы0Ъ.00000030h: 4D 07 CE 78 C5 30 66 DB CD 08 5E 1D 76 39 B5 39 ; M.ОxЕ0fЫН.^.v9µ900000040h: 65 1F 93 A9 C0 42 4C DD 77 B3 0D DD DA 34 BD 18 ; e.“©АBLЭwі.ЭЪ4Ѕ.00000050h: E3 79 BF 98 12 52 C5 CA 4C 2A DB 43 EA C8 B4 6F ; гyї.RЕКL*ЫCкИґo00000060h: 8E 8B AB 07 B3 6E 77 EA 9C D4 85 BB D2 31 BA 20 ; Ћ‹«.іnwкњФ…»Т1є 00000070h: F4 EB 7E 19 46 6B 3B 6A 12 CA 9D 8B 9C B1 9E E3 ; фл~.Fk;j.Кќ‹њ±ћг00000080h: E1 18 F4 26 F6 96 AD BF 08 A3 E7 AE 1F D1 E1 D8 ; б.ф&ц–­ї.Јз®.СбШ00000090h: 54 BB DA D6 41 8A 5F 45 CF BD EE BF DB BE 1A 89 ; T»ЪЦAЉ_EПЅоїЫѕ.‰000000a0h: 0B 38 6E C8 60 70 94 BC 04 9D 7D EA 53 22 D7 AE ; .8nИ`p”ј.ќ}кS"Ч®000000b0h: B0 00 C6 AD 26 80 F2 45 00 0E 49 F4 56 A8 86 DF ; °.Ж­&ЂтE..IфVЁ†Я

Decompiler crashes when Im trying feed him with this. Header mismatach. Is it encrypted? I would be appreciated for advice.

Share this post


Link to post
Share on other sites
Flying Scotsman

I didn't find these by myself, but these should be responsible for Plane Bombs and Countermeasures (names might need double checked. I was in a rush):

/* Sets Airplane Bomb Count. Someone tested it by setting it to 500 bombs and it worked. No idea if there's a ceiling. */static void _SET_VEHICLE_BOMB_COUNT(Vehicle vehicle, int number) { invoke<Void>(0xF4B2ED59DEB5D774, vehicle, number); } // 0xF4B2ED59DEB5D774/* Sets Airplane Countermeasure Count. Same as above. */static void _SET_VEHICLE_COUNTERMEASURE_COUNT(Vehicle vehicle, int number) { invoke<Void>(0x9BDA23BF666F0855, vehicle, number); } // 0x9BDA23BF666F0855
Edited by Zemanez

Share this post


Link to post
Share on other sites
Unknown_Modder

I didn't find these by myself, but these should be responsible for Plane Bombs and Countermeasures (names might need double checked. I was in a rush):

/* Sets Airplane Bomb Count. Someone tested it by setting it to 500 bombs and it worked. No idea if there's a ceiling. */static void _SET_VEHICLE_BOMB_COUNT(Vehicle vehicle, int number) { invoke<Void>(0xF4B2ED59DEB5D774, vehicle, number); } // 0xF4B2ED59DEB5D774/* Sets Airplane Countermeasure Count. Same as above. */static void _SET_VEHICLE_COUNTERMEASURE_COUNT(Vehicle vehicle, int number) { invoke<Void>(0x9BDA23BF666F0855, vehicle, number); } // 0x9BDA23BF666F0855

There's no limit, you can set it as high as you want (See replies below). Also, after looking into what the new natives do I could only guess. But at that time (one week ago) zorg had figured it out already so he told me the names for the ones that he had figured out.

(I changed plane to aircraft for the first four since they work for some helis as well).

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
Edited by Unknown_Modder

Share this post


Link to post
Share on other sites
unknown modder

 

I didn't find these by myself, but these should be responsible for Plane Bombs and Countermeasures (names might need double checked. I was in a rush):

/* Sets Airplane Bomb Count. Someone tested it by setting it to 500 bombs and it worked. No idea if there's a ceiling. */static void _SET_VEHICLE_BOMB_COUNT(Vehicle vehicle, int number) { invoke<Void>(0xF4B2ED59DEB5D774, vehicle, number); } // 0xF4B2ED59DEB5D774/* Sets Airplane Countermeasure Count. Same as above. */static void _SET_VEHICLE_COUNTERMEASURE_COUNT(Vehicle vehicle, int number) { invoke<Void>(0x9BDA23BF666F0855, vehicle, number); } // 0x9BDA23BF666F0855

I'll put it out here what I told Unknown_Modder(the other one :D). Those natives do have a limit of 1000u, if you pass a value greater than that, nothing will happen. However the natives are used exclusively by the scripts and the bombs and countermeasures are entirely script controlled. This is why the bombs and countermeasures do nothing offline(like with the proxy mines from gun running). I made a mod for that which replicated what happened in freemode in single player, but haven't gotten around to doing it for smugglers run.

Share this post


Link to post
Share on other sites
Unknown_Modder

 

I didn't find these by myself, but these should be responsible for Plane Bombs and Countermeasures (names might need double checked. I was in a rush):

/* Sets Airplane Bomb Count. Someone tested it by setting it to 500 bombs and it worked. No idea if there's a ceiling. */static void _SET_VEHICLE_BOMB_COUNT(Vehicle vehicle, int number) { invoke<Void>(0xF4B2ED59DEB5D774, vehicle, number); } // 0xF4B2ED59DEB5D774/* Sets Airplane Countermeasure Count. Same as above. */static void _SET_VEHICLE_COUNTERMEASURE_COUNT(Vehicle vehicle, int number) { invoke<Void>(0x9BDA23BF666F0855, vehicle, number); } // 0x9BDA23BF666F0855
I'll put it out here what I told Unknown_Modder(the other one :D). Those natives do have a limit of 1000u, if you pass a value greater than that, nothing will happen. However the natives are used exclusively by the scripts and the bombs and countermeasures are entirely script controlled. This is why the bombs and countermeasures do nothing offline(like with the proxy mines from gun running). I made a mod for that which replicated what happened in freemode in single player, but haven't gotten around to doing it for smugglers run.

 

Oh, right, they do. Sorry for that, I accidentally looked at the getters, not the setters :facedesk:

.text:0000000140A61424    cmp    ebx, 3E8h

But that can be easily bypassed :) (although, like you mentioned, everything is script controlled so it wouldn't make any difference. And directly setting the value in CVehicle would be better anyway.)

Edited by Unknown_Modder

Share this post


Link to post
Share on other sites
unknown modder

 

 

I didn't find these by myself, but these should be responsible for Plane Bombs and Countermeasures (names might need double checked. I was in a rush):

/* Sets Airplane Bomb Count. Someone tested it by setting it to 500 bombs and it worked. No idea if there's a ceiling. */static void _SET_VEHICLE_BOMB_COUNT(Vehicle vehicle, int number) { invoke<Void>(0xF4B2ED59DEB5D774, vehicle, number); } // 0xF4B2ED59DEB5D774/* Sets Airplane Countermeasure Count. Same as above. */static void _SET_VEHICLE_COUNTERMEASURE_COUNT(Vehicle vehicle, int number) { invoke<Void>(0x9BDA23BF666F0855, vehicle, number); } // 0x9BDA23BF666F0855
I'll put it out here what I told Unknown_Modder(the other one :D). Those natives do have a limit of 1000u, if you pass a value greater than that, nothing will happen. However the natives are used exclusively by the scripts and the bombs and countermeasures are entirely script controlled. This is why the bombs and countermeasures do nothing offline(like with the proxy mines from gun running). I made a mod for that which replicated what happened in freemode in single player, but haven't gotten around to doing it for smugglers run.

 

Oh, right, they do. Sorry for that, I accidentally looked at the getters, not the setters :facedesk:

.text:0000000140A61424    cmp    ebx, 3E8h

But that can be easily bypassed :) (although, like you mentioned, everything is script controlled so it wouldn't make any difference. And directly setting the value in CVehicle would be better anyway.)

 

I feel like we are missing the important part. The bombs/cm are only scripted for gta:online. The only possible use this has is if someone makes a version offline and decides these natives need including

Share this post


Link to post
Share on other sites
Unknown_Modder

[...]

I feel like we are missing the important part. The bombs/cm are only scripted for gta:online. The only possible use this has is if someone makes a version offline and decides these natives need including

That's what I meant by "although, like you mentioned, everything is script controlled so it wouldn't make any difference" (gotta admit it probably wasn't clear enough).

Share this post


Link to post
Share on other sites
darkphoenixxx
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?

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.

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.


  • 2 Users Currently Viewing
    0 members, 0 Anonymous, 2 Guests

×
×
  • Create New...

Important Information

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