Editing Modding:Coding An Item
Jump to navigation
Jump to search
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 1: | Line 1: | ||
<div class="nomobile" column-width: "60em2;> | |||
The start to creating a new item is | |||
Meanwhile in your '''Armor.txt''', they link up like this: | Meanwhile in your '''Armor.txt''', they link up like this: | ||
Armor.txt | Armor.txt | ||
new entry "MY_COOL_NEW_CIRCLET" | new entry "MY_COOL_NEW_CIRCLET" | ||
type "Armor | type "Armor" | ||
using "_Head_Magic_Circlet" | |||
data "RootTemplate" "0000000000000000000000000002" | |||
using "_Head_Magic_Circlet" | data "Rarity" "Rare" | ||
data "RootTemplate" "0000000000000000000000000002" | |||
data "Rarity" "Rare" | |||
data "PassivesOnEquip" "MAG_Radiant_Radiating_Helmet_Passive;CUSTOMPASSIVEIMADE" '''(The ; seperates passives.)''' | data "PassivesOnEquip" "MAG_Radiant_Radiating_Helmet_Passive;CUSTOMPASSIVEIMADE" '''(The ; seperates passives.)''' | ||
If adding a custom passive, your '''Passive.txt''' will look like this | If adding a custom passive, your '''Passive.txt''' will look like this. | ||
The example passive code is borrowed from Isobel's armor. | The example passive code is borrowed from Isobel's armor. | ||
Line 401: | Line 18: | ||
new entry "CUSTOMPASSIVEIMADE" | new entry "CUSTOMPASSIVEIMADE" | ||
type "PassiveData" | type "PassiveData" | ||
data "DisplayName" " | data "DisplayName" "PASSIVEHANDLE1;1" '''(Generate a handle for this in your .loca file.)''' | ||
data "Description" " | data "Description" "PASSIVEHANDLE2;1" '''Generate a handle for this in your .loca file.)''' | ||
data "Icon" "CUSTOMPASSIVEICON" '''(we can set this up in the same way an item icon is set up)''' | data "Icon" "CUSTOMPASSIVEICON" '''(we can set this up in the same way an item icon is set up)''' | ||
data "DescriptionParams" "DealDamage(1d4, Radiant)" | data "DescriptionParams" "DealDamage(1d4, Radiant)" | ||
data "StatsFunctorContext" "OnAttacked" | data "StatsFunctorContext" "OnAttacked" | ||
data "StatsFunctors" "IF(context.HasContextFlag(StatsFunctorContext.OnAttacked) and HasStatus('MAGE_ARMOR') and IsLastConditionRollSuccess(ConditionRollType.ConditionSavingThrow) and not Self() and IsSavingThrow()):DealDamage(SWAP, 1d4, Radiant,Magical)" | data "StatsFunctors" "IF(context.HasContextFlag(StatsFunctorContext.OnAttacked) and HasStatus('MAGE_ARMOR') and IsLastConditionRollSuccess(ConditionRollType.ConditionSavingThrow) and not Self() and IsSavingThrow()):DealDamage(SWAP, 1d4, Radiant,Magical)" | ||
Now, you need to put it in the treasuretable. | Now, you need to put it in the treasuretable. | ||
Your treasuretable should look like this: | Your treasuretable should look like this: | ||
Line 433: | Line 31: | ||
CanMerge 1 | CanMerge 1 | ||
new subtable "1,1" | new subtable "1,1" | ||
object category "I_MY_COOL_NEW_CIRCLET",1,0,0,0,0,0,0,0 | object category "I_MY_COOL_NEW_CIRCLET",1,0,0,0,0,0,0,0 '''(Do not forget the ''I_'' prefix!)''' | ||
This will make it spawn in the tutorial chest. | |||
{| class="nomobile" style="text-align:center; margin: auto; border:1px solid #785000; font-size:83%; background-color:#1B1B1B; width: 60;" ; | |||
[[Category:Modding guides]] | |- style="font-weight:bold; background-color:#281C14; color:#c27736; border:0px none;" | ||
[[ | | colspan="2" | | ||
[[File:bgwiii.png|30px|link=Template:NavWiki]] [[BG3Wiki:Community|Community]] • [[Guide:Guides|Guides]] • [[Modding: Modding resources|Modding]] | |||
|- | |||
| style="background-color:#28201B; color:#c27736; width: 15%;" |[[:Category:Modding|Modding guides]] | |||
| style="text-align:left; padding:0 4px;" |<div class="navcat" ;> | |||
<categorytree hideprefix="1" hideroot="1" mode="pages">Modding guides</categorytree> | |||
</div> | |||
|- | |||
| style="background-color:#28201B; color:#c27736; width: 15%;" |[[Modding:Modding resources|Modding resources]] | |||
| style="text-align:left; padding:0 4px;" |<div class="navcat" ;> | |||
<categorytree hideprefix="1" hideroot="1" mode="pages">Modding resources</categorytree> | |||
</div> | |||
|}</div><div class="noexcerpt navigation-not-searchable" style="text-align:center"><span class="nodesktop"> [[Modding:Index|Modding index]] </span></div> |