Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(api-v3): Blip.GetPropertyFlag (public) and Blip.SetPropertyFlag (private)#1628

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
Tivertoni wants to merge3 commits intoscripthookvdotnet:main
base:main
Choose a base branch
Loading
fromTivertoni:BlipPropertyFlags

Conversation

@Tivertoni
Copy link
Contributor

Added GetPropertyFlag(BlipPropertyFlag flag) — allows reading whether a specific blip property flag is set.

Added SetPropertyFlag(BlipPropertyFlag flag, bool value) — private setter for internal use; note that updating flags this way does not immediately refresh the blip visually atleast for some.

Originally intended as a refactor, but GetPropertyFlag could be useful as a public feature.

Refactoring and related bug fixes will be addressed in separate follow-up PRs.

Copy link
Member

@kagiknkagikn left a comment

Choose a reason for hiding this comment

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

Sorry, but we can't exposeGetPropertyFlag without considering how the gold tick flag changes the enum definition in b2699. I would hide the method to avoid potential flag shifts. We need to adjust bit indices by the running game version if it's being publicly exposed, that's for sure.

/// <summary>
/// Shows a gold tick indicator on the <see cref="Blip"/>.
/// </summary>
ShowGoldTick,
Copy link
Member

Choose a reason for hiding this comment

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

This flag isn't present in b2628 or earlier game versions. I tested in both b2628 and b2699 by watching which bitSHOW_HEADING_INDICATOR_ON_BLIP changes even.

@TivertoniTivertoni marked this pull request as draftOctober 27, 2025 21:11
@Tivertoni
Copy link
ContributorAuthor

I’ve converted this PR to a draft for now due to the ShowGoldTick issue.
By the way, did you archive the old builds yourself, or do you use a public archive? I know Steam supports downgrading, but I’m using GTA V on Epic Games and Rockstar Launcher. (Bought it twice)

@kagikn
Copy link
Member

kagikn commentedOct 28, 2025
edited
Loading

I archive old builds myself. I've downloaded depots with GTA5.exe files from Steam about 10 times to download builds I forgot to archive, though. I have a lot of memory-dumped exe files even, so I can search them for something I need to find quickly when I have to see (though that source code leak reduces the need).

@Tivertoni
Copy link
ContributorAuthor

I created a spreadsheet documenting when natives for each BLIP_FLAG were introduced.
Screenshot 2025-10-29 122444

@kagikn
Copy link
Member

kagikn commentedOct 29, 2025
edited
Loading

Fortunately, we have an alternative way to achieve what blip natives that change some property flags do with direct memory editing. Since we know trigger flags listed below and every flag exceptBLIP_FLAG_VALUE_CHANGED_GOLD_TICK andBLIP_FLAG_USE_SHORT_HEIGHT_THRESHOLD exists even in b373, we could substitute natives with combinations of a certain non-trigger flag and the corresponding trigger flag in older game versions.

enum eBLIP_TRIGGER_FLAG{BLIP_FLAG_VALUE_CHANGED_COLOUR =33,// when a colour changesBLIP_FLAG_VALUE_CHANGED_FLASH,// when the flash changesBLIP_FLAG_VALUE_REINIT_STAGE,// when blip must be re-initialised on the stageBLIP_FLAG_VALUE_REMOVE_FROM_STAGE,// when blip must be removed from the stage prior to destroying the objectBLIP_FLAG_VALUE_DESTROY_BLIP_OBJECT,// when blip object is to completely destoryedBLIP_FLAG_ON_STAGE,// set if the blip was on the stage last time the minimap was renderedBLIP_FLAG_VALUE_CHANGED_PULSE,// blip flagged to pulseBLIP_FLAG_UPDATE_ALPHA_ONLY,// update alpha directly without invoking SET_RADIUS_BLIP_COLOURBLIP_FLAG_VALUE_SET_NUMBER,// when to reinitialise the number shown on a blipBLIP_FLAG_EXECUTED_VIA_DLC,// will be TRUE once the blip has been executed on the drawlistBLIP_FLAG_EXECUTED_VIA_DLC_LAST_FRAME,// when blip was sent to the renderthread last frameBLIP_FLAG_UPDATE_STAGE_DEPTH,// blip has had its priority (or hover state) tweaked and needs its depth adjusted on the stageBLIP_FLAG_VALUE_CHANGED_TICK,// when the tick changes and needs to be updatedBLIP_FLAG_VALUE_CHANGED_GOLD_TICK,// when the gold tick changes and needs to be updatedBLIP_FLAG_VALUE_CHANGED_FOR_SALE,// when the for sale icon on a blip should be updatedBLIP_FLAG_VALUE_CHANGED_OUTLINE_INDICATOR,BLIP_FLAG_VALUE_CHANGED_FRIEND_INDICATOR,BLIP_FLAG_VALUE_CHANGED_CREW_INDICATOR,BLIP_FLAG_UPDATED_LOW_FREQ_FLAGS,// optimization; true when we've thrown a few less common flagsBLIP_FLAG_VALUE_TURNED_OFF_SHOW_HEIGHT,// when the SHOW_HEIGHT property is turned off - used to make sure the height blip is returned to level// omitted since we consider only final builds for SHVDN and not any builds where `__BANK` is set to true#if __BANK#endif// __BANKMAX_BLIP_TRIGGER_FLAGS};

For the crew indicator you can test it with*(int*)(blip.MemoryAddress + 0x24)) |= (1 << 20); *(int*)(blip.MemoryAddress + 0x24)) |= (1 << (49 - 32)) in b2699 or older. We should setBLIP_FLAG_UPDATED_LOW_FREQ_FLAGS when we manually setBLIP_FLAG_VALUE_CHANGED_* flags, though, otherwise such indicators would get recreated every frame. To addBLIP_FLAG_UPDATED_LOW_FREQ_FLAGS in b2628 or older, we can set it with an expression like*(int*)(blip.MemoryAddress + 0x24)) |= (1 << (50 - 32));.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@kagiknkagiknkagikn left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@Tivertoni@kagikn

[8]ページ先頭

©2009-2025 Movatter.jp