Jump to content

Is it possible to mod GlobalScripts.GlobalScriptBundle?


Recommended Posts

I was thinking of fudging it so Maia doesn't leave. I believe this is decided in the GlobalScripts.GlobalScriptBundle in this section:

[edit]I should clarify, this is about her leaving because of POWDERHOUSE, not because the previous quest. 

 
{
    "ScriptCalls": [
        {
            "Data": {
                "FullName": "Void DeliverMissive(StringTableType, Int32, Guid)",
                "Parameters": [
                    "Gui",
                    "4371",
                    "81700f52-4614-4c5e-baba-8a1cb1d44f24"
                ],
                "Flags": "",
                "UnrealCall": "",
                "FunctionHash": -275187270,
                "ParameterHash": -1215218949
            },
            "Conditional": {
                "Operator": 0,
                "Components": []
            }
        },
        {
            "Data": {
                "FullName": "Void RemoveFromParty(Guid)",
                "Parameters": [
                    "b1a7e802-0000-0000-0000-000000000000"
                ],
                "Flags": "",
                "UnrealCall": "",
                "FunctionHash": -1788529600,
                "ParameterHash": 171824928
            },
            "Conditional": {
                "Operator": 0,
                "Components": []
            }
        }
    ],
    "ID": "ba085bfc-0917-4a14-ab39-6559da364da0",
    "ScriptType": 0,
    "Filename": "gsd_companion_maia_leaves_powderhouse.globalscript"
},
{
    "ScriptCalls": [
        {
            "Data": {
                "FullName": "Void SetGlobalValue(String, Int32)",
                "Parameters": [
                    "n_Maia_Quest_State",
                    "4"
                ],
                "Flags": "",
                "UnrealCall": "",
                "FunctionHash": 1935477378,
                "ParameterHash": -511052062
            },
            "Conditional": {
                "Operator": 0,
                "Components": [
                    {
                        "$type": "OEIFormats.FlowCharts.ConditionalCall, OEIFormats",
                        "Data": {
                            "FullName": "Boolean IsGlobalValue(String, Operator, Int32)",
                            "Parameters": [
                                "b_Powderhouse_Destroyed",
                                "EqualTo",
                                "0"
                            ],
                            "Flags": "",
                            "UnrealCall": "",
                            "FunctionHash": 901380568,
                            "ParameterHash": 63017223
                        },
                        "Not": false,
                        "Operator": 0
                    }
                ]
            }
        },
        {
            "Data": {
                "FullName": "Void ShowMessageBox(StringTableType, Int32)",
                "Parameters": [
                    "AreaNotifications",
                    "125"
                ],
                "Flags": "",
                "UnrealCall": "",
                "FunctionHash": -1320128747,
                "ParameterHash": -341371816
            },
            "Conditional": {
                "Operator": 0,
                "Components": [
                    {
                        "$type": "OEIFormats.FlowCharts.ConditionalCall, OEIFormats",
                        "Data": {
                            "FullName": "Boolean IsGlobalValue(String, Operator, Int32)",
                            "Parameters": [
                                "b_Powderhouse_Destroyed",
                                "EqualTo",
                                "0"
                            ],
                            "Flags": "",
                            "UnrealCall": "",
                            "FunctionHash": 901380568,
                            "ParameterHash": 63017223
                        },
                        "Not": false,
                        "Operator": 0
                    }
                ]
            }
        },
        {
            "Data": {
                "FullName": "Void SetBenchedPartyMemberBusy(Guid, Boolean)",
                "Parameters": [
                    "b1a7e802-0000-0000-0000-000000000000",
                    "False"
                ],
                "Flags": "",
                "UnrealCall": "",
                "FunctionHash": 934743080,
                "ParameterHash": 776510437
            },
            "Conditional": {
                "Operator": 0,
                "Components": [
                    {
                        "$type": "OEIFormats.FlowCharts.ConditionalCall, OEIFormats",
                        "Data": {
                            "FullName": "Boolean IsGlobalValue(String, Operator, Int32)",
                            "Parameters": [
                                "b_Powderhouse_Destroyed",
                                "EqualTo",
                                "0"
                            ],
                            "Flags": "",
                            "UnrealCall": "",
                            "FunctionHash": 901380568,
                            "ParameterHash": 63017223
                        },
                        "Not": false,
                        "Operator": 0
                    }
                ]
            }
        },
        {
            "Data": {
                "FullName": "Void SetWantsToTalk(Guid, Boolean)",
                "Parameters": [
                    "b1a7e802-0000-0000-0000-000000000000",
                    "True"
                ],
                "Flags": "",
                "UnrealCall": "",
                "FunctionHash": 1006814398,
                "ParameterHash": 2030924572
            },
            "Conditional": {
                "Operator": 0,
                "Components": [
                    {
                        "$type": "OEIFormats.FlowCharts.ConditionalCall, OEIFormats",
                        "Data": {
                            "FullName": "Boolean IsGlobalValue(String, Operator, Int32)",
                            "Parameters": [
                                "b_Powderhouse_Destroyed",
                                "EqualTo",
                                "0"
                            ],
                            "Flags": "",
                            "UnrealCall": "",
                            "FunctionHash": 901380568,
                            "ParameterHash": 63017223
                        },
                        "Not": false,
                        "Operator": 0
                    }
                ]
            }
        }
    ],
    "ID": "2a44a39d-c6f5-4f8a-a64e-023c18a498b3",
    "ScriptType": 0,
    "Filename": "gsd_companion_maia_returns.globalscript"
},

Perhaps I can just delete the "b1a7e802-0000-0000-0000-000000000000" (I think that is Maia's GUID) parameter from the "Remove from party" thingy?

Alternatively, I might be able fudge some of the "Not" values so she only leaves if the powderhouse IS destroyed, or I could delete the whole section so that if anything happens at the powderhouse, nothing happens to Maia?

I'm also wondering if it's possible to just edit the original file if you can't use the override folder to do it?

Edited by Svartypops
  • Like 2
Link to comment
Share on other sites

So after a bit of testing, I think this might be possible. The game will load a .globalscriptbundle mod, provided all 3 of the lines below are present.

{
  "GlobalScripts": [],
  "GlobalExpressions": [],
  "GlobalPreferences": []
}

This seems the case even in cases such as yours where what you'd want to change only involves the GlobalScripts brackets.

Making changes this way does work from what I can tell from a very rough test involving modifying a few of the variables in the script that sets the VTC to unfriendly if you reject Alvari's offer in favour of keeping Maia in your party. The faction relation with the VTC seems to remain friendly (though they were still unwilling to work with me after the conversation), and upon leaving Neketaka I did not received the letter from Pallegina that removes her from my roster.

I'm not 100% sure it was just overriding the specific changes made to the script in the file or was actually overriding (and erasing) all other lines from the globalscripts.globalscriptbundle. From what I gather global scripts only run when they are called to, so my concern is that the modded file might just be setting this line as the only global script in existence. Nevermind, this is actually how a global script gets added for The Beast of Winter, so modding global scripts in this way should be totally fine!

Formatting example:

{
    "GlobalScripts": [
        {
            "ScriptCalls": [
                {
                    "Data": {
                        "FullName": "Void SetGlobalValue(String, Int32)",
                        "Parameters": [
                            "b_Queen_Hasongo_Missive_Delivered",
                            "2"
                        ],
                        "Flags": "",
                        "UnrealCall": "",
                        "FunctionHash": 1935477378,
                        "ParameterHash": 1987798281
                    },
                    "Conditional": {
                        "Operator": 0,
                        "Components": []
                    }
                },
                {
                    "Data": {
                        "FullName": "Void DeliverMissive(StringTableType, Int32, Guid)",
                        "Parameters": [
                            "Gui",
                            "3790",
                            "1e1efe1c-4781-40a0-b07d-741c839cdf06"
                        ],
                        "Flags": "",
                        "UnrealCall": "",
                        "FunctionHash": -275187270,
                        "ParameterHash": 724583833
                    },
                    "Conditional": {
                        "Operator": 0,
                        "Components": []
                    }
                }
            ],
            "ID": "03b357d7-7a96-454f-a9d3-c80820416374",
            "ScriptType": 0,
            "Filename": "gsd_04_queen_hasongo_missive.globalscript"
        }
    ],
    "GlobalExpressions": [],
    "GlobalPreferences": []
}

The above script normally would deliver the message from Onekaza that acknowledging your having gone to Hasongo, but will now instead deliver you one from Furrante instead.

You can test this by saving it as a .globalscriptbundle file, enabling cheats in the console and then calling the script using the console command:

CallGlobalScript 03b357d7-7a96-454f-a9d3-c80820416374

Edited by Kvellen
added a working example to show formating.
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...