-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Request]: Calling script functions #164
Comments
Okay, I will work on it for my upcoming PR |
How exactly? |
Script: net_main_offline |
What's the function name? And can you give me an example award hash? |
Currently I don't have the latest decompiled scripts, but here is the function:
And for award hashes: |
Added CHEAT_XP example
Maybe there will be a lot of skid menus added soon lol |
Nice work! |
@AAA-ALR From what I can tell from your code, you're basically hijacking a (random?) script, forcing its Instruction Pointer to the function you want to call? I'm assuming FindScriptThread finds a non-running script thread? Why can't you simply just allocate a new script for the thread runner and use it? There's always a chance if you use something like freemode (IDK what RDR2 calls it), that some script will do GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH and have it return non-zero, and it thinks that the script is running, when in actuality it's just us doing script schenanigns. tl;dr: Is there a more efficient way to create a script in the thread stack? |
I don't know much about the game scripts,But this net_main_offline is like a freemod of GTA |
After a little research I've discovered there are award hashes located in: @AAA-ALR nice work, but I don't think we need the script thread for this function. We can just create our own thread and stack call the ScriptVM function then delete them. |
UnkByteData_script_vm seems to indicate if globals are enabled or not. Incredible work on this though! |
@maybegreat48 has already made an implementation that will be included into the menu soon. Thank you for asking before creating a PR though. |
To add some context, our development workflow now involves a private development repository to prevent certain paid menu grifters (especially a menu named "Fortitude") from stealing our source before it makes it to HorseMenu |
@maybegreat48 I understand. May I ask if you're just implementing the function wrapper or are you doing more research on this give award thing? Thanks for your efforts btw. |
I've reversed the file containing the award hashes, but many of them don't seem to work as intended, likely due to the lack of proper YMT parsing support for RDR2 |
Here is an award item from that file: |
|
Anything that's supposed to give you gold doesn't actually give you gold <Item type="ItemDatabaseAward" key="hash_12CFDBFF">
<key>hash_12CFDBFF</key>
<maxclaims value="-1" />
<ignoresmodifiers value="false" />
<debugonly value="false" />
<serveronly value="false" />
<awarditems>
<experience value="0" />
<items itemType="ItemDatabaseAwardItem">
<Item>
<key>hash_00000001</key>
<path />
<qty value="0" />
</Item>
</items>
<unlocks itemType="ItemDatabaseAwardUnlock" />
</awarditems>
</Item> |
Problem
No response
Solution
Writing a script function wrapper as in YimMenu
Reason
It's possible to add gold, cash, xp, loot tables, and collectibles instantly with script functions.
Additional context
No response
The text was updated successfully, but these errors were encountered: