BG3-Community-Library-Team / BG3-Compatibility-Framework

An API-based Driven Compatibility Framework for Baldur's Gate 3 Mods
MIT License
38 stars 13 forks source link

Simplify Support #68

Closed NellsRelo closed 9 months ago

NellsRelo commented 9 months ago

The API is useful, but requires the mod author to be comfortable with writing code, and having to write Lua to add support adds more avenues for failure. It would be useful to have a configuration approach, so mod authors could instead supply a configuration file that Compatibility Framework would use to automate the process.

As described by LaughingLeader, the mod author would supply the following .json file:

Mods/ModFolder/ScriptExtender/CompatibilityFrameworkConfig.json

{
    "FileVersion": 1,
    "Races": [
        {
            "UUID": "9c61a74a-20df-4119-89c5-d996956b6c66",
            "Children": [
                {
                    "Type": "EyeColors",
                    "Value": "c3c6b283-d4ba-48e1-19fc-e45623880b33",
                    "Action": "Insert"
                },
                {
                    "Type": "LipsMakeupColors",
                    "Value": "3cbf5e9d-31ad-4950-91d3-9cd6f566c9b0",
                    "Action": "Remove"
                }
            ]
        }
    ],
    "Subclasses": [
        {
            "UUID": "5b3cd5ec-4234-434e-a6c5-da5fc01183cd",
            "SubClassName": "Brute",
            "Class": "barbarian"
        }
    ]
}

Effectively, the Framework would parse this, build payloads, and ship them off to the API functions.

The Existing API capabilities should remain exposed, both for backwards compatibility as well as to ease the process for more complex additions that are better served with looping.