200
editsAd placeholder
Modding:Coding An Item: Difference between revisions
Jump to navigation
Jump to search
no edit summary
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
You have made a mesh for a human man, a circlet. We are going to add it to the game. | You have made a mesh for a human man, a circlet. We are going to add it to the game. | ||
Remember to check your naming conventions for .lsf.lsx files so the multitool correctly converts them, and keep in mind that some lsx files should not be converted to lsf at all. | Remember to check your naming conventions for .lsf.lsx files so the multitool correctly converts them, and keep in mind that some lsx files should not be converted to lsf at all. | ||
This guide does not cover adding custom icons. | |||
==File Overview== | ==File Overview== | ||
Line 109: | Line 109: | ||
</save> | </save> | ||
==Materials and Texture .lsx== | |||
Now, we move on to our materialbank. | Now, we move on to our materialbank. | ||
I am not reproducing for length but should be easy enough to find an item's material to copy if you search the SourceFile listed. | |||
<?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||
<save> | <save> | ||
Line 123: | Line 125: | ||
<attribute id="MaterialType" type="uint8" value="13" /> | <attribute id="MaterialType" type="uint8" value="13" /> | ||
<attribute id="Name" type="LSString" value="CircletMaterialName" /> Again this is never referenced anywhere else, but it is best to keep it as unique as you can to prevent clashes. | <attribute id="Name" type="LSString" value="CircletMaterialName" /> Again this is never referenced anywhere else, but it is best to keep it as unique as you can to prevent clashes. | ||
<attribute id="SourceFile" type="LSString" value="Public/Shared/Assets/Materials/Characters/CHAR_BASE.lsf" /> | <attribute id="SourceFile" type="LSString" value="Public/Shared/Assets/Materials/Characters/CHAR_BASE.lsf" /> | ||
<children> | <children> | ||
<node id="ScalarParameters"> x7 | <node id="ScalarParameters"> x7 | ||
Line 155: | Line 157: | ||
(End of MaterialBank) | (End of MaterialBank) | ||
Now the material we have found, SourceFile "Public/Shared/Assets/Materials/Characters/CHAR_BASE.lsf" is a fairly standard shader without transparency or glowing. Materials that can be Transparent have 'Alpha' in the title. For example, | |||
"Public/Shared/Assets/Materials/Characters/CHAR_BASE_AlphaTest_2S.lsf" or "CHAR_BASE_AlphaTest_2S_Dither" will enable alpha and make the mesh visible from both sides (turns off backface culling). | |||
Materials with _VT at the end are useless to us, as they only work with virtual texture. A virtualtexture is essentially a box for textures that makes it load faster. We don't have any way of putting mods in virtualtextures ourselves so do not use those materials. | |||
In order to make pants disappear when boots are put on, you may need to use a _Vertcut Material, such as 'Public/Shared/Assets/Materials/Characters/CHAR_BASE_VertCut.lsf', and ensure VertexMask is set to True in the mesh lsx. (As well as vertex painting the item itself the desired colour) | |||
We now add a texturebank to the same lsx. | We now add a texturebank to the same lsx. | ||
<region id="TextureBank"> | <region id="TextureBank"> | ||
Line 181: | Line 191: | ||
</save> | </save> | ||
If there is anything wrong, your item may simply refuse to show up, so it is worth double checking everything here. | If there is anything wrong with the material, your item may simply refuse to show up, so it is worth double checking everything here. | ||
==RootTemplate== | ==RootTemplate== | ||
Line 198: | Line 208: | ||
<attribute id="DisplayName" type="TranslatedString" handle="HANDLE1" version="1" /> '''Generate a handle for this in your .loca file.''' | <attribute id="DisplayName" type="TranslatedString" handle="HANDLE1" version="1" /> '''Generate a handle for this in your .loca file.''' | ||
<attribute id="EquipSound" type="FixedString" value="ea27b98e-5fc0-4b0d-8602-e4a421dd481e" /> '''Not necessary but you may wish to specify one or it will use whatever default sound is in the parent template.''' | <attribute id="EquipSound" type="FixedString" value="ea27b98e-5fc0-4b0d-8602-e4a421dd481e" /> '''Not necessary but you may wish to specify one or it will use whatever default sound is in the parent template.''' | ||
<attribute id="Icon" type="FixedString" value="Item_Cloth_Headwear_Circlet_Silver_A" /> ''' | <attribute id="Icon" type="FixedString" value="Item_Cloth_Headwear_Circlet_Silver_A" /> '''This is a base game icon- custom icons require addition lsx and texture work''' | ||
<attribute id="LevelName" type="FixedString" value="" /> | <attribute id="LevelName" type="FixedString" value="" /> | ||
<attribute id="MapKey" type="FixedString" value="0000000000000000000000000002" /> '''This links up to the armor.txt to form the armor.''' | <attribute id="MapKey" type="FixedString" value="0000000000000000000000000002" /> '''This links up to the armor.txt to form the armor.''' |