BG3-Community-Library-Team / BG3-Community-Library

Baldur's Gate 3 Community Library exists to provide a common collection of Spells, Scripts, Items, Statuses, Passives, and other useful material that will assist modders in creating new content.
MIT License
92 stars 207 forks source link

StaticData Dictionaries: RootTemplates #110

Open NellsRelo opened 9 months ago

NellsRelo commented 9 months ago

Create Dictionary Mapping Root Template entry Names and UUIDs for easy-access in SE functions.

May involve creating helper functions to generate entries.

arnaudpourbaix commented 7 months ago

Just curious about that. I was trying to modify a few values in Root Templates using SE, CL, or CF. In my case, it is related to Potions, so there are no UUID but it is possible to use Stats:

<attribute id="Stats" type="22" value="OBJ_Potion_Of_Animal_Speaking" />

Now suppose I want to change status duration on use, it would be that path: Stats OBJ_Potion_Of_Animal_Speaking -> OnUsePeaceActions -> Action -> Attributes -> StatusDuration

For API, I imagine something like this :

{ 
  "stats": "OBJ_Potion_Of_Animal_Speaking",
  "updates": [
    "pathIds": "OnUsePeaceActions.Action.Attributes.StatusDuration",
    "attributes": [
      "value": 10,
    ]
  ]
}

I don't know anything about CL yet, but I'll look at this because I really need to update RootTemplate by scripting. I assume it would be core read and write API in CL and update API in CF ?