Adding Heat Damage to an item? Is it possible?

Started by QuantumX, October 08, 2016, 09:19:55 AM

Previous topic - Next topic

QuantumX

Hello,

I'm trying to find a way to add heat damage to an item (not a pawn), so when its above a certain ambient temperature the item takes damage like deterioration? would someone know how to do this using xml only?

I've searched through the xmls and cannot see an obvious way to do this?

Thanks in advance

Project 06

I dont know how you would go about doing this but im almost certain that you cannot do this using ONLY xml.

QuantumX

Quote from: Project 06 on October 08, 2016, 02:43:49 PM
I dont know how you would go about doing this but im almost certain that you cannot do this using ONLY xml.

Thanks for the comment Project 06, tbh i had that feeling it might not be possible with using just XML.. :( and have have not clue in creating assemblies...

RawCode

what do you exactly to archive?

please explain fully

RemingtonRyder

#4
Snowmen have Comp_Melter (last I checked, anyway).

Edit: Melter, not Meltable

skullywag

Apart from what Marvin mentioned this is indeed c# only, youd probably make a new comp and tell it what you wanted it to do on each tick.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

QuantumX

Thanks for the info..

To be clear on what i wanted to, i wanted a items (generator) that output alot of heat, to take damage is the ambient temperate went over a certain value, until it gets destroyed.

I have no clue how to write assemblies.. likely out of my skill set :( Thanks for the replies.

RemingtonRyder

Comp_Melter does almost exactly that, except of course it does so when the temperature is greater than 0C. Unfortunately, as skully said, you'd have to make a new one if the temperature you're looking to 'melt' at is different.

QuantumX

Quote from: MarvinKosh on October 09, 2016, 11:46:05 AM
Comp_Melter does almost exactly that, except of course it does so when the temperature is greater than 0C. Unfortunately, as skully said, you'd have to make a new one if the temperature you're looking to 'melt' at is different.

Thats... may be an option, thanks for that MarvinKosh... good to know...

Don Tacos

How about copying the bit from Hives in BuildingsNatural.xml?

<tickerType>Rare</tickerType>
<comps>
    <li Class="CompProperties_TemperatureDamaged">
        <safeTemperatureRange>
          <min>20</min>
          <max>9999</max>
        </safeTemperatureRange>
        <damagePerTickRare>11</damagePerTickRare>
    </li>
</comps>

Don Tacos

#10
Okay. Normally, that would simply cause your building to deteriorate into thin air.  If you want it to blow up, add these lines:

<killedLeavings>
      <Fire>1</Fire>
     <Boom>1</Boom>
</killedLeavings>

"Boom" is an new object you create that will have 1hp and flammability. Add something like this to your object:

<comps>
      <li Class="CompProperties_Explosive">
        <explosiveRadius>6.9</explosiveRadius>
        <explosiveDamageType>Bomb</explosiveDamageType>
        <explosiveExpandPerStackcount>1.2</explosiveExpandPerStackcount>
        <startWickHitPointsPercent>0.333</startWickHitPointsPercent>
        <wickTicks>
          <min>30</min>
          <max>70</max>
        </wickTicks>
      </li>
    </comps>

When your building is hotter than 20 Celsius, it will deteriorate until it drops a flame and an explosive object.  The fire will ignite the object, causing an explosion even in the rain.