Neanka / MCM_0.1_AS3

36 stars 6 forks source link

MCM can't find the correct script sometimes (one quest, two scripts) #37

Closed Zzyxz closed 5 years ago

Zzyxz commented 6 years ago

Hello,

I'm using version 1.23 My MCM sometimes interchanges the scripts and then complains: property not found in script. Is it possible to specify the script on the "sourceForm" ?

Like: MyMod.esp|800|namespace:ScriptTwo

Couldnt find any related info on that

Scrivener07 commented 6 years ago

Yea, I have an example here on some of my works in progress.

Config.json https://github.com/Scrivener07/FO4_ODST/blob/7c901d239275ae5402c194b3de2906479d47a3ec/Data.Prototype/MCM/Config/ODST/config.json#L37-L57

{
    "id": "iEmblem_Selected:Settings",
    "text": "Selected",
    "type": "dropdown",
    "help": "Select an emblem to edit.",
    "valueOptions":
    {
        "options":
        [
            "Emblem 1",
            "Emblem 2",
            "Emblem 3",
            "Emblem 4",
            "Emblem 5"
        ],
        "sourceType": "ModSettingInt",
        "sourceForm": "ODST.esp|1EEE",
        "propertyName": "Selected",
        "scriptName": "ODST:Emblems:Editor"
    }
},

Papyrus https://github.com/Scrivener07/FO4_ODST/blob/7c901d239275ae5402c194b3de2906479d47a3ec/Data.Prototype/Scripts/Source/ODST/ODST/Emblems/Editor.psc#L297-L298

int Property Selected = -1 Auto Hidden
{@`config.json` The currently selected preset to edit. @`config.json`}

Note that the property must be an Auto property. A full property won't work for some reason.

I have also used a CallFunction to set a property on a script. https://github.com/Scrivener07/FO4_Overlays/blob/f16bd37fad48df226e2fb6ed4cda5fd57cf40d80/Data/MCM/Config/Overlays/config.json

Zzyxz commented 6 years ago

Thanks for your answer.

I guess it's only possible with at least v1.31. As I'm more or less stuck on v1.23 there is probably the only way to go with globals and an external script :-/

Neanka commented 5 years ago

not a bug, just use v1.31+