Skip to content

[MHWilds] via.rds.Mandrake addr changes all the time #1316

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

Open
KrisCris opened this issue Apr 19, 2025 · 1 comment
Open

[MHWilds] via.rds.Mandrake addr changes all the time #1316

KrisCris opened this issue Apr 19, 2025 · 1 comment

Comments

@KrisCris
Copy link

KrisCris commented Apr 19, 2025

Describe the bug

    local saveDataManager            = sdk.get_managed_singleton("app.SaveDataManager")
    local systemSaveData             = saveDataManager._SystemSaveData
    local systemData                 = systemSaveData._Data
    local systemCommon               = systemData._SystemCommon
    log.debug(tostring(systemCommon.HunterTicketsUsed))
    log.debug(tostring(systemCommon.HunterTicketsUsed))
    log.debug(tostring(systemCommon.HunterTicketsUsed))
    log.debug(tostring(systemCommon.HunterTicketsUsed))

The via.rds.Mandrake typed object's address that we printed out changes all the time, so I am unable to change its properties via systemCommon.HunterTicketsUsed.v = 0 or systemCommon.HunterTicketsUsed:set_field("v", 0).

Instead, if I do

    local hunterTicketUsed           = systemCommon.HunterTicketsUsed
    hunterTicketUsed:set_field("v", 0)
    systemCommon:set_field("HunterTicketsUsed", hunterTicketUsed)

changes would apply.

FYI, I am just choosing this object as an example, and there are still some extra steps required to successfully change hunterTicketUsed, but I don't think we need to talk about it here.

Identify the REFramework version
c09ad7b

Screenshots
Image

@KrisCris
Copy link
Author

KrisCris commented May 7, 2025

Ah is it because that via.rds.Mandrake field is inlined/stored by value, not by reference, on its parent object?

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

No branches or pull requests

1 participant