Modding:Coding An Item: Difference between revisions

Jump to navigation Jump to search
no edit summary
(loca)
No edit summary
Line 236: Line 236:
  <node id="LongHair" />
  <node id="LongHair" />
  <node id="ParentRace">  
  <node id="ParentRace">  
 
  '''The parentrace nodes set the item to use race-specific meshes for githyanki, Dragonborn and Tiefling.  Unless this line is added and  specified, they  will use Human Body or Strong Human Body. (Which may be fine for some races such as Tieflings.)'''
  '''The parentrace nodes set the item to use race-specific meshes for githyanki, Dragonborn and Tiefling.  Unless this line is added and  specified, they  will use Human Body or Strong Human Body. (Which may be fine for some races such as Tieflings.)'''
  <children>
  <children>
Line 242: Line 242:
  <attribute id="MapKey" type="guid" value="6503c830-9200-409a-bd26-895738587a4a" /> Tiefling Male
  <attribute id="MapKey" type="guid" value="6503c830-9200-409a-bd26-895738587a4a" /> Tiefling Male
  <attribute id="MapValue" type="guid" value="00000000-0000-0000-0000-000000000000" />  
  <attribute id="MapValue" type="guid" value="00000000-0000-0000-0000-000000000000" />  
 
  </node>
  </node>
  '''(The other parentrace overrides all removed for length as they all follow the same format - the race UUID and the 0 mapvalue)'''
  '''(The other parentrace overrides all removed for length as they all follow the same format - the race UUID and the 0 mapvalue)'''
 
  </children>
  </children>
 
 
 
  </node>
  </node>
  <node id="ShortHair" />
  <node id="ShortHair" />
Line 265: Line 265:
  <children>
  <children>
  <node id="MaterialPresets" />
  <node id="MaterialPresets" />
 
   
   
  '''(We can add any colour available to us (cloth, leather, accent) but this circlet is only metal 1 so we only need to list metal 1.)'''
  '''(We can add any colour available to us (cloth, leather, accent) but this circlet is only metal 1 so we only need to list metal 1.)'''
Line 281: Line 281:
  </children>
  </children>
  </node>
  </node>
 
   
   
  <node id="Visuals">
  <node id="Visuals">
Line 310: Line 310:
  </save>
  </save>


==Loca==
Now, let's see how this links up to the localisation. Remember to name your loca loca.xml so it converts properly.


You can generate a handle by ticking the Handle box next to 'GENERATE' on the Multitool. It is much like an UUID but it starts with an H.
The version number has to do with internal references. Just make all of yours say 1.
<?xml version="1.0" encoding="utf-8"?><contentList>
<content contentuid="HANDLE1" version="1">Circlet</content>
<content contentuid="HANDLE2" version="1">My circlet is cool.</content>
<content contentuid="HANDLE3" version="1">Circlet Passive</content>
<content contentuid="HANDLE4" version="1">While the wearer has Mage Armour, each successful Saving throw causes the source of the Saving Throw to take 1-4 Radiant damage.</content>
</contentList>


==Armor and Passives==
==Armor and Passives==
Line 349: Line 337:
  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" "HANDLE3;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" "HANDLE4;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)"
==Loca==
Remember to name your localisation file loca.xml so it converts properly.
You can generate a handle by ticking the Handle box next to 'GENERATE' on the Multitool. It is much like an UUID but it starts with an H.
The version number has to do with internal references. Just make all of yours say 1.
<?xml version="1.0" encoding="utf-8"?><contentList>
<content contentuid="HANDLE1" version="1">Circlet</content>
<content contentuid="HANDLE2" version="1">My circlet is cool.</content>
<content contentuid="HANDLE3" version="1">Circlet Passive</content>
<content contentuid="HANDLE4" version="1">While the wearer has Mage Armour, each successful Saving throw causes the source of the Saving Throw to take 1-4 Radiant damage.</content>
</contentList>


==TreasureTable==
==TreasureTable==

Navigation menu