Modding:Dependencies: Difference between revisions
No edit summary |
|||
(5 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
|description=This page is a hub for everything related to Modding Baldur's Gate 3. Check out the following guides to learn how to mod BG3. | |description=This page is a hub for everything related to Modding Baldur's Gate 3. Check out the following guides to learn how to mod BG3. | ||
|image=Modding_resources.webp | |image=Modding_resources.webp | ||
}}{{ | }}{{Modding box}}{{Modding sidebar}} | ||
== What is a | == What is a dependency? == | ||
A dependency when it comes to the game or modding is | A dependency, when it comes to the game or modding, is telling the game that your pak/mod depends on something from another pak/mod in order to work correctly. So when we want to reference an asset from a defined pak, say from the SharedDev.pak, and we make our pak and the asset doesn't show... if we were to then make our mod have a dependency on the SharedDev.pak, then that will tell the game where it needs to load some of our assets from. | ||
== Why do we want to use | == Why do we want to use dependencies? == | ||
So if we make a head mod that references a vanilla ID and the head shows up checkered we can fix that "bug" by making our mod dependent on the pak that material comes from. | So if we make a head mod that references a vanilla ID, and the head shows up checkered, we can fix that "bug" by making our mod dependent on the pak that material comes from. | ||
So breaking this down using heads | So, breaking this down using heads. If we want to use vanilla assets for our heads and were to use the dependency of the pak our textures and materials are in. This would mean we can reference their ID's without having to include MaterialBanks/TextureBanks. So when wanting to use vanilla materials/textures we only need our VisualBank entries. | ||
Or if we want to make a class mod and want to add an ability from another mod, after getting permission we would make our mod dependent on that mod. That way when both are installed our class mod would be able to use that ability without having to actually include it in our mod itself. | Or, if we want to make a class mod and want to add an ability from another mod, (after getting permission, of course), we would make our mod dependent on that mod. That way, when both are installed, our class mod would be able to use that ability without having to actually include it in our mod itself. | ||
== Example == | == Example == | ||
In this extract from the | In this extract from the game's GustavDev meta, this is saying the GustavDev pak is dependent on the SharedDev pak and the Gustav pak | ||
[[File:GustavDev Dependencies.webp]] | [[File:GustavDev Dependencies.webp]] | ||
== Adding Dependencies to Mod Paks == | == Adding Dependencies to Mod Paks == | ||
So using the example above the image below expands upon that and shows what lines are used from the original pak to make the dependencies section. You may need to open the image to see it in its full size. | So, using the example above, the image below expands upon that and shows what lines are used from the original pak to make the dependencies section. You may need to open the image to see it in its full size. | ||
[[File:Pak_Dependencies.webp|1000px]] | [[File:Pak_Dependencies.webp|1000px]] | ||
As code you can copy into your meta for a base. Copy this over the <b><node id="Dependencies"></b> line. | As code you can copy into your meta for a base. Copy this over the <b><node id="Dependencies"></b> line. | ||
As of Patch 5 it is best to copy these sections directly from the in game meta.lsx files to have as a base to edit, as some people have been getting issue with copy and pasting as of Patch 5. Just remember to remove the value in the MD5 line. | |||
<br> | <br> | ||
<node id="Dependencies"> | <node id="Dependencies"> | ||
Line 62: | Line 64: | ||
If you wish to make sure your mod is loading assets from the vanilla paks correctly you can make them dependent on the below paks. | If you wish to make sure your mod is loading assets from the vanilla paks correctly you can make them dependent on the below paks. | ||
As of Patch 5 it is best to copy these sections directly from the in game meta.lsx files, as some people have been getting issue with copy and pasting as of Patch 5. Just remember to remove the value in the MD5 line. | |||
<big>Shared</big> | <big>Shared</big> | ||
Line 101: | Line 105: | ||
<attribute id="Version64" type="int64" value="144255927711717104"/> | <attribute id="Version64" type="int64" value="144255927711717104"/> | ||
</node> | </node> | ||
{{Modding navbox}} | |||
[[Category:Modding resources]] | [[Category:Modding resources]] |
Latest revision as of 17:39, 9 January 2024
This page is a modding page, and follows its own rules and standards separate from the rest of the wiki. |
bg3.wiki modding |
---|
Modding homepage |
Modding resources - Meshes, Models, Tools, etc. |
Modding guides |
Hair modding |
Head modding |
Item modding - Armours, Outfits, Weapons etc. |
Race/class modding |
What is a dependency?[edit | edit source]
A dependency, when it comes to the game or modding, is telling the game that your pak/mod depends on something from another pak/mod in order to work correctly. So when we want to reference an asset from a defined pak, say from the SharedDev.pak, and we make our pak and the asset doesn't show... if we were to then make our mod have a dependency on the SharedDev.pak, then that will tell the game where it needs to load some of our assets from.
Why do we want to use dependencies?[edit | edit source]
So if we make a head mod that references a vanilla ID, and the head shows up checkered, we can fix that "bug" by making our mod dependent on the pak that material comes from.
So, breaking this down using heads. If we want to use vanilla assets for our heads and were to use the dependency of the pak our textures and materials are in. This would mean we can reference their ID's without having to include MaterialBanks/TextureBanks. So when wanting to use vanilla materials/textures we only need our VisualBank entries.
Or, if we want to make a class mod and want to add an ability from another mod, (after getting permission, of course), we would make our mod dependent on that mod. That way, when both are installed, our class mod would be able to use that ability without having to actually include it in our mod itself.
Example[edit | edit source]
In this extract from the game's GustavDev meta, this is saying the GustavDev pak is dependent on the SharedDev pak and the Gustav pak
Adding Dependencies to Mod Paks[edit | edit source]
So, using the example above, the image below expands upon that and shows what lines are used from the original pak to make the dependencies section. You may need to open the image to see it in its full size.
As code you can copy into your meta for a base. Copy this over the <node id="Dependencies"> line.
As of Patch 5 it is best to copy these sections directly from the in game meta.lsx files to have as a base to edit, as some people have been getting issue with copy and pasting as of Patch 5. Just remember to remove the value in the MD5 line.
<node id="Dependencies"> <children> <node id="ModuleShortDesc"> <attribute id="Folder" type="LSString" value="SharedDev"/> <attribute id="MD5" type="LSString" value=""/> <attribute id="Name" type="LSString" value="SharedDev"/> <attribute id="UUID" type="FixedString" value="3d0c5ff8-c95d-c907-ff3e-34b204f1c630"/> <attribute id="Version64" type="int64" value="36028797022722506"/> </node> </children> </node>
So let's break down these lines one by one;
This is the blue (1) line from the image. This needs to match the "Folder" line from the meta of the pak our mod is dependent on.
<attribute id="Folder" type="LSString" value="SharedDev"/>
Laughingleader explained to me that this line is best with a null value so change to "" if it has a value inside.
<attribute id="MD5" type="LSString" value=""/>
This is the yellow (2) line from the image. This needs to match the "Name" line from the meta of the pak our mod is dependent on.
<attribute id="Name" type="LSString" value="SharedDev"/>
This is the green (3) line from the image. This needs to match the "UUID" line from the meta of the pak our mod is dependent on.
<attribute id="UUID" type="FixedString" value="3d0c5ff8-c95d-c907-ff3e-34b204f1c630"/>
This is the pink (4) line from the image. This needs to match the "Version64" line from the meta of the pak our mod is dependent on. However if the game updates and there is a new version of this file then you want the latest "Version64" value. This is to guartentee it is loading the latest version of the asset your mod is dependent on.
<attribute id="Version64" type="int64" value="36028797022722506"/>
Vanilla Dependencies[edit | edit source]
If you wish to make sure your mod is loading assets from the vanilla paks correctly you can make them dependent on the below paks.
As of Patch 5 it is best to copy these sections directly from the in game meta.lsx files, as some people have been getting issue with copy and pasting as of Patch 5. Just remember to remove the value in the MD5 line.
Shared
<node id="ModuleShortDesc"> <attribute id="Folder" type="LSString" value="Shared"/> <attribute id="MD5" type="LSString" value=""/> <attribute id="Name" type="LSString" value="Shared"/> <attribute id="UUID" type="FixedString" value="ed539163-bb70-431b-96a7-f5b2eda5376b"/> <attribute id="Version64" type="int64" value="36029297386049870"/> </node>
SharedDev
<node id="ModuleShortDesc"> <attribute id="Folder" type="LSString" value="SharedDev"/> <attribute id="MD5" type="LSString" value=""/> <attribute id="Name" type="LSString" value="SharedDev"/> <attribute id="UUID" type="FixedString" value="3d0c5ff8-c95d-c907-ff3e-34b204f1c630"/> <attribute id="Version64" type="int64" value="36028797022722506"/> </node>
Gustav
<node id="ModuleShortDesc"> <attribute id="Folder" type="LSString" value="Gustav"/> <attribute id="MD5" type="LSString" value=""/> <attribute id="Name" type="LSString" value="Gustav"/> <attribute id="UUID" type="FixedString" value="991c9c7a-fb80-40cb-8f0d-b92d4e80e9b1"/> <attribute id="Version64" type="int64" value="36029301681017806"/> </node>
GustavDev
<node id="ModuleShortDesc"> <attribute id="Folder" type="LSString" value="GustavDev"/> <attribute id="MD5" type="LSString" value=""/> <attribute id="Name" type="LSString" value="GustavDev"/> <attribute id="UUID" type="FixedString" value="28ac9ce2-2aba-8cda-b3b5-6e922f71b6b8"/> <attribute id="Version64" type="int64" value="144255927711717104"/> </node>