Skip to content

add heist modifier #181

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

Merged
merged 3 commits into from
Apr 19, 2025
Merged

add heist modifier #181

merged 3 commits into from
Apr 19, 2025

Conversation

kurumimeow
Copy link
Contributor

added apartment, diamond casino, cayo perico and doomsday heist modifier
_

@@ -65,6 +73,18 @@ namespace YimMenu
return *static_cast<std::add_pointer_t<std::remove_reference_t<T>>>(Get());
}

template<typename T>
Copy link
Collaborator

@maybegreat48 maybegreat48 Apr 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just use At() and get/set the pointer instead of using these helper functions. Same goes for the globals

if (0 <= primary_target && primary_target <= 3)
{
switch (primary_target)
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using Tunables::GetTunable instead

using Command::Command;

virtual void OnCall() override
{
Copy link
Collaborator

@maybegreat48 maybegreat48 Apr 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Iterate all players and modify this field in GlobalPlayerBD instead. Modifying others' broadcast stuff is generally bad practice, but you should be fine for this one (assuming you are the script host)

{
ScriptGlobal(1929794 + 1 + 1).SetValue<int>(100 - (_ApartmentHeistCut1.GetState() + _ApartmentHeistCut2.GetState() + _ApartmentHeistCut3.GetState() + _ApartmentHeistCut4.GetState()));
ScriptGlobal(1929794 + 1 + 2).SetValue<int>(_ApartmentHeistCut2.GetState());
ScriptGlobal(1929794 + 1 + 3).SetValue<int>(_ApartmentHeistCut3.GetState());
Copy link
Collaborator

@maybegreat48 maybegreat48 Apr 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should use At(offset, size_per_element) to access arrays and At(offset) to access struct fields instead of adding stuff in the ScriptGlobal ctor. This applies to most globals and locals in this PR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alright 😊

@maybegreat48
Copy link
Collaborator

LGTM for the most part. I'm just worried about how these globals and locals would be updated because there are a lot, but I'm sure we'll figure something out

@xZueS19
Copy link

xZueS19 commented Apr 14, 2025

great work @kurumimeow, can't wait for this to be added to the menu

@boxlemons21
Copy link

great work @kurumimeow, can't wait for this to be added to the menu
If all this time has passed and it didnt get merged and accepted then it probably wont, u can js add it urself ig

@xZueS19
Copy link

xZueS19 commented Apr 14, 2025

great work @kurumimeow, can't wait for this to be added to the menu
If all this time has passed and it didnt get merged and accepted then it probably wont, u can js add it urself ig

u r wrong

@boxlemons21
Copy link

great work @kurumimeow, can't wait for this to be added to the menu
If all this time has passed and it didnt get merged and accepted then it probably wont, u can js add it urself ig

u r wrong

I hope im wrong cuz i rlly want it lol

@CSY0N
Copy link
Contributor

CSY0N commented Apr 14, 2025

hm you should know that Heists Money has daily Limit like Nightclub Safe etc the get safe i recommend you the get know what the daily limit is bcs over daily limit it will be risky

@boxlemons21
Copy link

hm you should know that Heists Money has daily Limit like Nightclub Safe etc the get safe i recommend you the get know what the daily limit is bcs over daily limit it will be risky

IMG_2889

Sm1 already mentioned

@xZueS19
Copy link

xZueS19 commented Apr 14, 2025

on second thoughts i quit from this conservation cause it got away from the main point of this pull request and this should not happen again

@xZueS19
Copy link

xZueS19 commented Apr 14, 2025

@kurumimeow smth i found that when using instant finish for casino heist the money does not appear in the transaction log neither added to total money earned. i'm sure this aint right

@Matze6239
Copy link

how do i add this to my menu?

@maybegreat48
Copy link
Collaborator

Can i add all this to my menu now or do i have to wait until you approve it?

You can do whatever you want under the terms of the GPL-2 license

@boxlemons21

This comment was marked as spam.

@xZueS19
Copy link

xZueS19 commented Apr 15, 2025

Can i add all this to my menu now or do i have to wait until you approve it?

You can do whatever you want under the terms of the GPL-2 license

Accept it already 😭😭🙏

u have to wait until @kurumimeow make the changes and it will be approved

@kurumimeow
Copy link
Contributor Author

Please have patience guys, it requires some changes as @maybegreat48 mentioned. Globals and Locals mostly changes after game update so we need to overcome that as much as we can so that it can be easy to manage.

@maybegreat48 maybegreat48 marked this pull request as draft April 16, 2025 00:06
@maybegreat48
Copy link
Collaborator

I've marked this PR as a draft. When you're ready to work on it, feel free to mark it as ready for review and request a review from anyone with write access to this repo

@El-BaVari
Copy link

I think Rockstar changed the limit from 15M to 3M. Correct me if I'm wrong

- used tunables instead of globals for primary target
- removed cayo perico "remove cooldown" as setup gets the job done
@boxlemons21
Copy link

I think Rockstar changed the limit from 15M to 3M. Correct me if I'm wrong

nope, you are very correct.

@kurumimeow kurumimeow marked this pull request as ready for review April 19, 2025 20:41
@kurumimeow
Copy link
Contributor Author

@kurumimeow smth i found that when using instant finish for casino heist the money does not appear in the transaction log neither added to total money earned. i'm sure this aint right

Probably you are exceeding 3.6 million.

@xZueS19
Copy link

xZueS19 commented Apr 19, 2025

@kurumimeow smth i found that when using instant finish for casino heist the money does not appear in the transaction log neither added to total money earned. i'm sure this aint right

Probably you are exceeding 3.6 million.

i was getting the money that was 3.59 ish but i found it gets added to total earned but not appear in the transaction log, it's fine tho as i don't do any heists anymore after R* shit reduced the cap of the apartment heist to 3mil

@boxlemons21
Copy link

@kurumimeow smth i found that when using instant finish for casino heist the money does not appear in the transaction log neither added to total money earned. i'm sure this aint right

Probably you are exceeding 3.6 million.

i was getting the money that was 3.59 ish but i found it gets added to total earned but not appear in the transaction log, it's fine tho as i don't do any heists anymore after R* shit reduced the cap of the apartment heist to 3mil

not only that, the transaction section "service_earn_bend_job" was also capped at 3m not 15m anymore

@maybegreat48
Copy link
Collaborator

OK, I'm merging this for now, but once we get lua scripting, this should be converted into one to improve maintainability

@maybegreat48 maybegreat48 merged commit 6e6e151 into YimMenu:enhanced Apr 19, 2025
@Jiqegolo2671
Copy link

Sorry if this is a wrong place to ask, but is this compatible with V2's Solo missions? Tried the early version few days ago (2x week) on Humane Finale to instant finish it. It did instant finish, later however the apartment board was bugged with a 'BLANK' finale and a clean board. Had to cancel the 'BLANK' heist through Lester.

Additional info: Character didn't migrate, so starting all over. Didn't get Series A calls after instant finishing Humane nor after cancelling the blank one.

@xZueS19
Copy link

xZueS19 commented Apr 20, 2025

@kurumimeow
this is what appears after using the instant finish
image
and it's with ur latest commits
and this is the transaction log
image
the 3mil is for the apartment heist i did just before i did the casino and i got 3.51 mil for the casino and there's the cash
image
it's okey by me but i fear that it gets detected cause it does not get added in the transactions

@kurumimeow
Copy link
Contributor Author

Sorry if this is a wrong place to ask, but is this compatible with V2's Solo missions? Tried the early version few days ago (2x week) on Humane Finale to instant finish it. It did instant finish, later however the apartment board was bugged with a 'BLANK' finale and a clean board. Had to cancel the 'BLANK' heist through Lester.

Additional info: Character didn't migrate, so starting all over. Didn't get Series A calls after instant finishing Humane nor after cancelling the blank one.

For apartment heists you need to call lester to cancel heist, as setup button doesn't refresh the board unlike other heists, it only skips preparations of currently selected heist. It is common that the board will not refresh for some heists if you use instant finish.

@Jiqegolo2671
Copy link

Jiqegolo2671 commented Apr 20, 2025

It is common that the board will not refresh for some heists if you use instant finish.

Good to know. Guess I'll have to wait for updated solo missions.

@kurumimeow
Copy link
Contributor Author

@kurumimeow this is what appears after using the instant finish image and it's with ur latest commits and this is the transaction log image the 3mil is for the apartment heist i did just before i did the casino and i got 3.51 mil for the casino and there's the cash image it's okey by me but i fear that it gets detected cause it does not get added in the transactions

I believe you have completed the heist solo. This could be the reason for not appearing on "heist passed" screen. If you do the heist with other players your take will appear on the final screen. Anyway, in both cases you are receiving money as long as it's within the limit. And about the transaction log idk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants