Skip to content

Using Community Library Content

NellsRelo edited this page Aug 23, 2023 · 2 revisions

Using Community Library Content

While the library might look overwhelming, most of the work has been done to ensure ease of use for modders looking to incorporate its content. You don't need to copy/paste any of the Community Library content into your mod to make use of it. All you have to do is reference the ID of the piece you want in the right spot.

Adding a spell or passive to a race or class via progression

For example, let's say you want to add a spell from this mod into your own. You'll need three things:

  1. An entry in Public/ModName/Lists/SpellLists.lsx:
<?xml version="1.0" encoding="UTF-8"?>
<save>
    <version major="4" minor="0" revision="0" build="49"/>
    <region id="SpellLists">
        <node id="root">
            <children>
                <node id="SpellList">
                    <attribute id="Comment" type="LSString" value="SOME DESCRIPTIVE COMMENT HERE"/>
                    <attribute id="Spells" type="LSString" value="CL_Target_WeaknessToElectricity"/>
                    <attribute id="UUID" type="guid" value="A NEWLY GENERATED GUID HERE"/>
                </node>
	    </children>
        </node>
    </region>
</save>
  1. A reference in Public/ModName/Progressions/Progressions.lsx:
<?xml version="1.0" encoding="UTF-8"?>
<save>
    <version major="4" minor="0" revision="0" build="49"/>
    <region id="Progressions">
        <node id="root">
            <children>
                <node id="Progression">
                    <attribute id="Boosts" type="LSString" value=""/>
                    <attribute id="Level" type="uint8" value="1"/>
                    <attribute id="Name" type="LSString" value=""/>
                    <attribute id="PassivesAdded" type="LSString" value=""/>
                    <attribute id="ProgressionType" type="uint8" value="2"/>
                    <attribute id="Selectors" type="LSString" value="AddSpells(YOUR SPELLLIST ITEM'S GUID HERE)"/>
                    <attribute id="TableUUID" type="guid" value="A NEWLY GENERATED GUID HERE"/>
                    <attribute id="UUID" type="guid" value="A NEWLY GENERATED GUID HERE"/>
                </node>
        </node>
    </region>
</save>

Want a passive instead of a spell? Skip the Spell List step, and place the Name of your Passive into the PassivesAdded attribute instead:

<attribute id="PassivesAdded" type="LSString" value="CL_Passive_BludgeoningResistanceNonMagical"/>

Finally, a reference to the "TableUUID" field from your progression within your Class, Subclass, or Race: (Note - All irrelevant fields have been blanked out here)

<?xml version="1.0" encoding="UTF-8"?>
<save>
    <version major="4" minor="0" revision="0" build="49"/>
    <region id="Races">
        <node id="root">
            <children>
            <node id="Race">
                <attribute id="Description" type="TranslatedString" handle="" version="3"/>
                <attribute id="DisplayName" type="TranslatedString" handle="" version="3"/>
                <attribute id="Name" type="FixedString" value=""/>
                <attribute id="ParentGuid" type="guid" value=""/>
                <attribute id="DisplayTypeUUID" type="guid" value=""/>
                <attribute id="ProgressionTableUUID" type="guid" value="YOUR PROGRESSION TABLE UUID HERE"/>
                <attribute id="RaceSoundSwitch" type="FixedString" value=""/>
                <attribute id="UUID" type="guid" value=""/>
            </node>
            </children>
        </node>
    </region>
</save>

Using a library spell, passive, or other data item as a base for a more mod-specialized version

So, you really want the spell "Weakness to Fire" for your mod. But maybe you want to tweak some values, or change the name and description. Fortunately, this is extremely easy to do! Here we have the default CL_Target_WeaknessToFire spell. Let's say you want it to be a Level 3 spell. It'd be a bit cumbersome to copy all this:

new entry "CL_Target_WeaknessToFire"
type "SpellData"
using "CL_Target_Weakness_BASE"
data "Level" "2"
data "Icon" "Status_Burning"
data "DisplayName" "3aaa17f3-049b-4f93-be4f-4b0d3bc870c9"
data "SpellProperties" "ApplyStatus(CL_STATUS_WEAKNESS_TO_FIRE, 100, 9)"
data "TooltipStatusApply" "ApplyStatus(CL_STATUS_WEAKNESS_TO_FIRE, 100, 9)"

What you could do more easily is something like this:

new entry "CoolModName_Target_WeaknessToFire"
type "SpellData"
using "CL_Target_WeaknessToFire"
data "Level" "3"

This will pull all the data from CL_Target_WeaknessToFire into your own custom spell, and then overwrite the existing "Level" field with your new field. From there, just reference your custom spell instead of the Community Library version. This also works for passives, items, and even characters.

Clone this wiki locally