Modding:Creating Item Icons: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 31: Line 31:
MySweetMod\Public\MySweetMod\Content\UI\[PAK]_UI '''Your _merged.lsx goes here. This tells the game where the atlas is. (and has its own UUID)'''
MySweetMod\Public\MySweetMod\Content\UI\[PAK]_UI '''Your _merged.lsx goes here. This tells the game where the atlas is. (and has its own UUID)'''


MySweetMod\Public\MySweetMod\GUI '''Icons_Items.lsx goes here. This tells the game what size the atlas is, where the image is on the atlas and what name the icon has to link it all up.'''
MySweetMod\Public\MySweetMod\GUI '''Icons_Items.lsx goes here. This tells the game what size the atlas is, where the image is on the atlas and what name the icon has to link it all up. This file is NOT converted to lsf!'''


== Sample Code ==
== Sample Code ==
If your mod uses only one icon and has a 64x64 atlas, you can use this:
If your mod uses only one icon and has a 64x64 atlas, you can use this:
<?xml version="1.0" encoding="utf-8"?>
<save>
    <version major="4" minor="0" revision="9" build="328" />
    <region id="TextureAtlasInfo">
        <node id="root">
            <children>
  <node id="TextureAtlasIconSize">
  <node id="TextureAtlasIconSize">
                     <attribute id="Height" type="int64" value="64"/>
                     <attribute id="Height" type="int64" value="64"/>
Line 54: Line 61:
  <attribute id="V2" type="float" value="1.0"/> Bottom side of icon
  <attribute id="V2" type="float" value="1.0"/> Bottom side of icon
  </node>  
  </node>  
            </children>
        </node>
    </region>
</save>
If you are making a mod that has a 256 size atlas room for 16 icons, you can use this:
<save>
    <version major="4" minor="0" revision="9" build="328" />
    <region id="TextureAtlasInfo">
        <node id="root">
            <children>
                <node id="TextureAtlasIconSize">
                    <attribute id="Height" type="int64" value="64"/>
                    <attribute id="Width" type="int64" value="64"/>
                </node>
                <node id="TextureAtlasPath">
                    <attribute id="Path" type="LSString" value="Assets/Textures/Icons/MySweetMod_Icons.dds"/>
                    <attribute id="UUID" type="FixedString" value="''GENERATE UUID HERE''"/>
                </node>
                <node id="TextureAtlasTextureSize">
                    <attribute id="Height" type="int64" value="256"/>
                    <attribute id="Width" type="int64" value="256"/>
                </node>
            </children>
        </node>
    </region>
    <region id="IconUVList">
        <node id="root">
            <children>
                <node id="IconUV">
                    <attribute id="MapKey" type="FixedString" value="MySweetMod_1_Icon"/> 1
                    <attribute id="U1" type="float" value="0.0"/> Left
                    <attribute id="U2" type="float" value="0.25"/> Right
                    <attribute id="V1" type="float" value="0.0"/> Top
                    <attribute id="V2" type="float" value="0.25"/> Bottom
                </node>
                <node id="IconUV">
                    <attribute id="MapKey" type="FixedString" value="MySweetMod_2_Icon"/> 2
                    <attribute id="U1" type="float" value="0.25"/> Left
                    <attribute id="U2" type="float" value="0.5"/> Right
                    <attribute id="V1" type="float" value="0.0"/> Top
                    <attribute id="V2" type="float" value="0.25"/> Bottom
                </node>
                <node id="IconUV">
                    <attribute id="MapKey" type="FixedString" value="MySweetMod_3_Icon"/> 3
                    <attribute id="U1" type="float" value="0.5"/> Left
                    <attribute id="U2" type="float" value="0.75"/> Right
                    <attribute id="V1" type="float" value="0.0"/> Top
                    <attribute id="V2" type="float" value="0.25"/> Bottom
                </node>
                <node id="IconUV">
                    <attribute id="MapKey" type="FixedString" value="MySweetMod_4_Icon"/> 4
                    <attribute id="U1" type="float" value="0.75"/> Left
                    <attribute id="U2" type="float" value="1.0"/> Right
                    <attribute id="V1" type="float" value="0.0"/> Top
                    <attribute id="V2" type="float" value="0.25"/> Bottom
                </node>
                <node id="IconUV">
                    <attribute id="MapKey" type="FixedString" value="MySweetMod_5_Icon"/> 1
                    <attribute id="U1" type="float" value="0.0"/> Left
                    <attribute id="U2" type="float" value="0.25"/> Right
                    <attribute id="V1" type="float" value="0.25"/> Top
                    <attribute id="V2" type="float" value="0.5"/> Bottom
                </node>
                <node id="IconUV">
                    <attribute id="MapKey" type="FixedString" value="MySweetMod_6_Icon"/> 2
                    <attribute id="U1" type="float" value="0.25"/> Left
                    <attribute id="U2" type="float" value="0.5"/> Right
                    <attribute id="V1" type="float" value="0.25"/> Top
                    <attribute id="V2" type="float" value="0.5"/> Bottom
                </node>
                <node id="IconUV">
                    <attribute id="MapKey" type="FixedString" value="MySweetMod_7_Icon"/> 3
                    <attribute id="U1" type="float" value="0.5"/> Left
                    <attribute id="U2" type="float" value="0.75"/> Right
                    <attribute id="V1" type="float" value="0.25"/> Top
                    <attribute id="V2" type="float" value="0.5"/> Bottom
                </node>
                <node id="IconUV">
                    <attribute id="MapKey" type="FixedString" value="MySweetMod_8_Icon"/> 4
                    <attribute id="U1" type="float" value="0.75"/> Left
                    <attribute id="U2" type="float" value="1.0"/> Right
                    <attribute id="V1" type="float" value="0.25"/> Top
                    <attribute id="V2" type="float" value="0.5"/> Bottom
                </node>
                <node id="IconUV">
                    <attribute id="MapKey" type="FixedString" value="MySweetMod_9_Icon"/> 1
                    <attribute id="U1" type="float" value="0.0"/> Left
                    <attribute id="U2" type="float" value="0.25"/> Right
                    <attribute id="V1" type="float" value="0.5"/> Top
                    <attribute id="V2" type="float" value="0.75"/> Bottom
                </node>
                <node id="IconUV">
                    <attribute id="MapKey" type="FixedString" value="MySweetMod_10_Icon"/> 2
                    <attribute id="U1" type="float" value="0.25"/> Left
                    <attribute id="U2" type="float" value="0.5"/> Right
                    <attribute id="V1" type="float" value="0.5"/> Top
                    <attribute id="V2" type="float" value="0.75"/> Bottom
                </node>
                <node id="IconUV">
                    <attribute id="MapKey" type="FixedString" value="MySweetMod_11_Icon"/> 3
                    <attribute id="U1" type="float" value="0.5"/> Left
                    <attribute id="U2" type="float" value="0.75"/> Right
                    <attribute id="V1" type="float" value="0.5"/> Top
                    <attribute id="V2" type="float" value="0.75"/> Bottom
                </node>
                <node id="IconUV">
                    <attribute id="MapKey" type="FixedString" value="MySweetMod_12_Icon"/> 4
                    <attribute id="U1" type="float" value="0.75"/> Left
                    <attribute id="U2" type="float" value="1.0"/> Right
                    <attribute id="V1" type="float" value="0.5"/> Top
                    <attribute id="V2" type="float" value="0.75"/> Bottom
                </node>
                <node id="IconUV">
                    <attribute id="MapKey" type="FixedString" value="MySweetMod_13_Icon"/> 1
                    <attribute id="U1" type="float" value="0.0"/> Left
                    <attribute id="U2" type="float" value="0.25"/> Right
                    <attribute id="V1" type="float" value="0.75"/> Top
                    <attribute id="V2" type="float" value="1.0"/> Bottom
                </node>
                <node id="IconUV">
                    <attribute id="MapKey" type="FixedString" value="MySweetMod_14_Icon"/> 2
                    <attribute id="U1" type="float" value="0.25"/> Left
                    <attribute id="U2" type="float" value="0.5"/> Right
                    <attribute id="V1" type="float" value="0.75"/> Top
                    <attribute id="V2" type="float" value="1.0"/> Bottom
                </node>
                <node id="IconUV">
                    <attribute id="MapKey" type="FixedString" value="MySweetMod_15_Icon"/> 3
                    <attribute id="U1" type="float" value="0.5"/> Left
                    <attribute id="U2" type="float" value="0.75"/> Right
                    <attribute id="V1" type="float" value="0.75"/> Top
                    <attribute id="V2" type="float" value="1.0"/> Bottom
                </node>
                <node id="IconUV">
                    <attribute id="MapKey" type="FixedString" value="MySweetMod_16_Icon"/> 4
                    <attribute id="U1" type="float" value="0.75"/> Left
                    <attribute id="U2" type="float" value="1.0"/> Right
                    <attribute id="V1" type="float" value="0.75"/> Top
                    <attribute id="V2" type="float" value="1.0"/> Bottom
                </node>
            </children>
        </node>
    </region>
</save>


== Tools to Create Icons ==
== Tools to Create Icons ==

Navigation menu