Skip to content
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

[public-1.14.0] MapHack: $modify is unable to work with multiple keyvalues sharing the same name #1534

Open
felis-catus opened this issue Oct 27, 2024 · 1 comment
Labels
Priority: Minimal These issues are things that are nice to have, but not required for the next release. Status: Reviewed Type: Code

Comments

@felis-catus
Copy link
Member

Reported on Discord earlier. $modify doesn't support instanced keyvalues on a single node, and won't respect the order either.

Example (uses nmo_dimension_time_b3_fixed entities):

"MapHack"
{   
    "pre_entities"
    {
        $modify
        {
            "match"
            {
                "targetname" "obj16_approachTrainstation"
            }  
            "delete"
            {
                "OnObjectiveBegin" "tj_trainhorn_close_wv,Kill,,19,-1"
                "OnObjectiveBegin" "tj_transition_finish_fade,Kill,,12,-1"
            }
        }
    }
}

Workaround:

Use multiple $modify nodes, e.g.

$modify { "match" { "targetname" "obj16_approachTrainstation" } "delete" { "OnObjectiveBegin" "tj_trainhorn_close_wv,Kill,,19,-1" } }
$modify { "match" { "targetname" "obj16_approachTrainstation" } "delete" { "OnObjectiveBegin" "tj_transition_finish_fade,Kill,,12,-1" } }
// and so on ...
@felis-catus felis-catus added Status: Reviewed Type: Code Priority: Minimal These issues are things that are nice to have, but not required for the next release. labels Oct 27, 2024
@rtxa
Copy link

rtxa commented Nov 1, 2024

May I add that that workaround didn't work for me neither. Deleting all key values and then inserting the specific ones I wanted did the job, as I did here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Minimal These issues are things that are nice to have, but not required for the next release. Status: Reviewed Type: Code
Development

No branches or pull requests

2 participants