• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

how to create a new damage category ?

random person

New member
I was making a crawbar mod so I can open gun safes with one hit , so my idea was to make it weak but with a high damage bonus that works onely for safes .

Any idea of what I can do ?

 
I haven’t tried it, but I would attempt to

  • make a new “safe” material just for safes or whatever else you want to be affected
  • set the gun safe block to use the new material
  • give your crowbar item a high “damageBonus.safe” value


(I could have the syntax wrong - posting from my phone).

 
I haven’t tried it, but I would attempt to
  • make a new “safe” material just for safes or whatever else you want to be affected
  • set the gun safe block to use the new material
  • give your crowbar item a high “damageBonus.safe” value


(I could have the syntax wrong - posting from my phone).
I tried to add a new material called safe but it didn't work as a damage category .

 
I tried to add a new material called safe but it didn't work as a damage category .
If I recall correctly, in TS A15 we had to edit the assembly.DLL to add new custom damage categories

 
Make the crowbar able to upgrade the safes with right click

EG

Code:
<block id="628" name="cntGunSafe">
<property name="Group" value="Building"/>
<property name="Class" value="SecureLoot"/>
<property name="Material" value="Mmetal_hard"/>
<property name="Shape" value="ModelEntity"/>
<property name="Model" value="Entities/LootContainers/gun_safePrefab"/>
<property name="MultiBlockDim" value="1,2,1"/>
<property name="ImposterExchange" value="imposterBlock" param1="18"/>
<property name="IsTerrainDecoration" value="true"/>
<property name="Place" value="TowardsPlacerInverted"/>
<property name="LootList" value="42"/>
<property name="DowngradeBlock" value="cntGunSafeInsecure"/>
<property class="RepairItems"> <property name="forgedIron" value="20"/> </property>
[color="#FFFF00"]<property class="UpgradeBlock">
	<property name="ToBlock" value="cntGunSafeInsecure"/>
	<property name="Item" value="Crowbar"/>
	<property name="ItemCount" value="0"/>
	<property name="UpgradeHitCount" value="8"/>
</property>[/color]
<drop event="Destroy" count="0"/>
<drop event="Fall" name="scrapMetalPile" count="1" prob="0.75" stick_chance="1"/>
<property name="EconomicValue" value="690"/>
</block>
 
Last edited by a moderator:
Make the crowbar able to upgrade the safes with right clic
EG

Code:
<block id="628" name="cntGunSafe">
<property name="Group" value="Building"/>
<property name="Class" value="SecureLoot"/>
<property name="Material" value="Mmetal_hard"/>
<property name="Shape" value="ModelEntity"/>
<property name="Model" value="Entities/LootContainers/gun_safePrefab"/>
<property name="MultiBlockDim" value="1,2,1"/>
<property name="ImposterExchange" value="imposterBlock" param1="18"/>
<property name="IsTerrainDecoration" value="true"/>
<property name="Place" value="TowardsPlacerInverted"/>
<property name="LootList" value="42"/>
<property name="DowngradeBlock" value="cntGunSafeInsecure"/>
<property class="RepairItems"> <property name="forgedIron" value="20"/> </property>
[color="#FFFF00"]<property class="UpgradeBlock">
	<property name="ToBlock" value="cntGunSafeInsecure"/>
	<property name="Item" value="Crowbar"/>
	<property name="ItemCount" value="0"/>
	<property name="UpgradeHitCount" value="8"/>
</property>[/color]
<drop event="Destroy" count="0"/>
<drop event="Fall" name="scrapMetalPile" count="1" prob="0.75" stick_chance="1"/>
<property name="EconomicValue" value="690"/>
</block>
Nope , that wont work in my case .

- - - Updated - - -

If I recall correctly, in TS A15 we had to edit the assembly.DLL to add new custom damage categories
So how did you do that ??

Will it work if I write a skript on unity and do it with the sdx tool ?

 
"* damage_category = head, glass, stone, cloth, concrete, boulder, metal, wood, earth, snow, plants, leaves

Used to determine the damage category if an item hits this block.

This corresponds to <property name="DamageBonus.earth" value="5" /> in items.xml so this is used for bonus damage."

for what is boulder used (cant find a item)? maybe change/try that.

 
Last edited by a moderator:
"* damage_category = head, glass, stone, cloth, concrete, boulder, metal, wood, earth, snow, plants, leavesUsed to determine the damage category if an item hits this block.

This corresponds to <property name="DamageBonus.earth" value="5" /> in items.xml so this is used for bonus damage."

for what is boulder used (cant find a item)? maybe change/try that.
Oh , that might actually work !!

Thanks dude .

 
Back
Top