Modding:Coding An Item: Difference between revisions

Jump to navigation Jump to search
(Created page with "<div class="nomobile" column-width: "60em2;> The start to creating a new item is Meanwhile in your '''Armor.txt''', they link up like this: Armor.txt new entry "MY_COOL_NEW_CIRCLET" type "Armor" using "_Head_Magic_Circlet" data "RootTemplate" "0000000000000000000000000002" data "Rarity" "Rare" data "PassivesOnEquip" "MAG_Radiant_Radiating_Helmet_Passive;CUSTOMPASSIVEIMADE" (The ; seperates passives. : implies connection) If adding a custom passive, your '''Pas...")
 
No edit summary
Line 10: Line 10:
  data "RootTemplate" "0000000000000000000000000002"
  data "RootTemplate" "0000000000000000000000000002"
  data "Rarity" "Rare"
  data "Rarity" "Rare"
  data "PassivesOnEquip" "MAG_Radiant_Radiating_Helmet_Passive;CUSTOMPASSIVEIMADE" (The ; seperates passives. : implies connection)
  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.


  new entry "CUSTOMPASSIVEIMADE"
  new entry "CUSTOMPASSIVEIMADE"
  type "PassiveData"
  type "PassiveData"
  data "DisplayName" "PASSIVEHANDLE1;1" Generate a handle for this in your .loca file.
  data "DisplayName" "PASSIVEHANDLE1;1" '''(Generate a handle for this in your .loca file.)'''
  data "Description" "PASSIVEHANDLE2;1" Generate a handle for this in your .loca file.
  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 "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.
Your treasuretable should look like this:
new treasuretable "TUT_Chest_Potions"
CanMerge 1
new subtable "1,1"
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;" ;
{| class="nomobile" style="text-align:center; margin: auto; border:1px solid #785000; font-size:83%; background-color:#1B1B1B; width: 60;" ;