Editing Modding:Coding An Item

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 16: Line 16:
*
*
Unfortunately a lot of template armour mods are out of date, usually because the mod tools became more efficient. For example most of the [https://bg3.wiki/wiki/Modding:Race_UUID race UUIDS] mentioned on these are defunct and some of the metas don't work. They are still useful to learn from and much of the code will still work, but it is not recommended to use them as a template, just a learning tool. For example, Sample Equipment Mod's backpack templates will still work fine.
Unfortunately a lot of template armour mods are out of date, usually because the mod tools became more efficient. For example most of the [https://bg3.wiki/wiki/Modding:Race_UUID race UUIDS] mentioned on these are defunct and some of the metas don't work. They are still useful to learn from and much of the code will still work, but it is not recommended to use them as a template, just a learning tool. For example, Sample Equipment Mod's backpack templates will still work fine.
*[https://www.nexusmods.com/baldursgate3/mods/10554 Bububull's  lazy armor mod template] by Bububull.
*[https://www.nexusmods.com/baldursgate3/mods/400 Sample 3D Edited Equipment Mod] by AnteMaxx**A template mod for datamined and 3D edited armor modding. Contains 1 armor, 1 pair of mismatched boots, 1 pair of mismatched gloves, 1 headwear and 1 shoulder armor. Mainly a modder's resource, but can be enjoyed by players as well.
*A new template to use that contains many sample clothing items and how to put them in the tutorial chest.
*[https://www.nexusmods.com/baldursgate3/mods/400 Sample 3D Edited Equipment Mod] by AnteMaxx
**A template mod for datamined and 3D edited armor modding. Contains 1 armor, 1 pair of mismatched boots, 1 pair of mismatched gloves, 1 headwear and 1 shoulder armor. Mainly a modder's resource, but can be enjoyed by players as well.
*[https://www.nexusmods.com/baldursgate3/mods/278 Sample Magic Ring Mod] by AnteMaxx
*[https://www.nexusmods.com/baldursgate3/mods/278 Sample Magic Ring Mod] by AnteMaxx
**A template mod for magic ring and spell modding. Contains 4 magic rings. Mainly a modder's resource, but can be enjoyed by players as well.
**A template mod for magic ring and spell modding. Contains 4 magic rings. Mainly a modder's resource, but can be enjoyed by players as well.
Line 191: Line 188:
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). Underwear needs to have a Dither shader or it won't hide correctly.
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). Underwear needs to have a Dither shader or it won't hide correctly.


Materials with _VT at the end are less useful, as they only work with virtual texture. A virtualtexture is essentially a box for textures that makes it load faster. We can pack our own virtual textures with Script Extender and Lslib, but that is beyond the scope of this page.
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 packing virtualtextures ourselves, so do not attempt to use those materials.


In order to make, say, 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)
In order to make, say, 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)
Line 382: Line 379:
  Armor.txt
  Armor.txt
  new entry "MY_COOL_NEW_CIRCLET"
  new entry "MY_COOL_NEW_CIRCLET"
  type "Armor" '''Note that the 'type' section can enable the item to spawn in random places the game randomly puts items. If you wish it to never spawn anywhere else, either set <code>type ""</code>'''. Or, potentially, add <code>data "ItemGroup" ""</code> below.
  type "Armor"
  data "ValueOverride" "4000" '''(It's a very cool circlet and we want it to cost a lot!)'''
  data "ValueOverride" "4000" '''(It's a very cool circlet and we want it to cost a lot!)'''
  data "Weight" "0.01"
  data "Weight" "0.01"
  using "_Head_Magic_Circlet" '''(This tells it what slot to equip in. Ideally this should match up with the ParentTemplate you set up.)'''
  using "_Head_Magic_Circlet" '''(This tells it what slot to equip in. Ideally this should match up with the ParentTemplate you set up.)'''
  data "RootTemplate" "0000000000000000000000000002" '''Matches up to the rootemplate Mapkey.'''
  data "RootTemplate" "0000000000000000000000000002" '''Matches up to the rootemplate Mapkey.'''
  data "Rarity" "Rare" '''This effects what colour it is in your inventory, rarer things get a different colour outline.'''  
  data "Rarity" "Rare" '''This effects what colour it is in your inventory, rarer things get a different colour outline. Note that if you set things as common they may spawn in generic containers, which is not optimal for clean uninstalling.'''
  data "Boosts" "UnlockSpell(Target_MAG_HealingWord);UnlockSpell(Shout_MAG_HealingWord_Mass)" '''This forces it to give us these spells. Note that the character needs spell slots in able to use them! If you want it for everyone you may be better off setting it up as a custom passive'''.
  data "Boosts" "UnlockSpell(Target_MAG_HealingWord);UnlockSpell(Shout_MAG_HealingWord_Mass)" '''This forces it to give us these spells. Note that the character needs spell slots in able to use them! If you want it for everyone you may be better off setting it up as a custom passive'''.
  data "PassivesOnEquip" "MAG_Radiant_Radiating_Helmet_Passive;CUSTOMPASSIVEIMADE" '''(The ; seperates passives.)'''
  data "PassivesOnEquip" "MAG_Radiant_Radiating_Helmet_Passive;CUSTOMPASSIVEIMADE" '''(The ; seperates passives.)'''
Line 393: Line 390:
  data "MinAmount" "1"
  data "MinAmount" "1"
  data "MaxAmount" "1"  
  data "MaxAmount" "1"  
Other <code>using</code>  slots include <code>"ARM_Camp_Body"</code>,  <code>"_Vanity_Shoes_Generic_Common"</code> for camp clothes, <code>"_Foot_Magic"</code> for boots, <code>"ARM_Robe_Body"</code> for robes, <code>"_Hand"</code> for gloves.  
Other <code>using</code>  slots include <code>"ARM_Camp_Body"</code>,  <code>"_Vanity_Shoes_Generic_Common"</code> for camp clothes, <code>"_Foot_Magic"</code> for boots, <code>"ARM_Robe_Body"</code> for robes, <code>"_Hand"</code> for gloves.  


Please note that all contributions to Baldur's Gate 3 Wiki are considered to be released under the CC BY-NC-SA license, except when noted otherwise (see BG3Wiki:Copyrights for details). If you do not want your writing to be edited and redistributed at will, do not submit it here. Per our Content Rules, you are promising that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)