root-cause / v-decompiled-scripts

134 stars 49 forks source link

Decompiler #13

Open Kelioser opened 2 months ago

Kelioser commented 2 months ago

which decompiler do you use? and what settings?

root-cause commented 2 months ago

I use a private fork of https://github.com/calamity-inc/GTA-V-Script-Decompiler, Here are my settings: image

iSk1P commented 2 months ago

I use a private fork of https://github.com/calamity-inc/GTA-V-Script-Decompiler, Here are my settings: image

why i dont see Show tunable Names image

Kelioser commented 2 months ago

yeah me too, i guess it's part of the reason his fork is private, oh well, it's a really good option to have especially how powerful it can be!

iSk1P commented 2 months ago

yeah me too, i guess it's part of the reason his fork is private, oh well, it's a really good option to have especially how powerful it can be!

you are right

gir489returns commented 2 months ago

yeah me too, i guess it's part of the reason his fork is private, oh well, it's a really good option to have especially how powerful it can be!

In his credits he lists this repo from where he gets the tunable names from: https://github.com/Wildbrick142/V-Tunable-Names

The tunables are just a JOAAT like anything else, like the natives, the script event IDs, etc. The idea was that to squeeze every single ounce of performance out of the 360's integer-heavy CPU, they could instead compare 32-bit JOAATs than something like identifier. However, Rockstar sucks at coding, and thinks that writing a VM language is the best way to do scripts, when they could've just done something like implement Node.JS or Lua (like every other game engine), or Squirrel like Source 2. They instead had to be idiots and write it themselves.

All you need to do is basically override and implement the tunable code to do a JOAAT brute-force on the list. Although IDK if C# has an implementation of unordered_map (HashMap?), you could match the JOAAT hash to a string via the map. It should be very easy to implement.