Skip to content

Instantly share code, notes, and snippets.

@Neceros
Created January 30, 2020 21:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Neceros/6ccf03d11fa1ad0aaf7ad5661af49553 to your computer and use it in GitHub Desktop.
Save Neceros/6ccf03d11fa1ad0aaf7ad5661af49553 to your computer and use it in GitHub Desktop.
<ThingDef ParentName="BuildingBase">
<defName>Turret_HeavyTurret</defName>
<label>heavy turret</label>
<description>A portable automatic turret designed to hurt heavy targets. Fires continuously. Requires a lot of steel to refurbish its barrel after use. Might explode out to 6 tiles when damaged.</description>
<thingClass>Building_TurretGun</thingClass>
<graphicData>
<texPath>Things/Building/Security/TurretMini_Base</texPath>
<graphicClass>Graphic_Single</graphicClass>
<drawSize>(3,3)</drawSize>
<damageData>
<rect>(0.2,0.2,0.6,0.6)</rect>
</damageData>
<shadowData>
<volume>(0.27,0.25,0.27)</volume>
<offset>(0,0,0)</offset>
</shadowData>
</graphicData>
<uiIconPath>Things/Building/Security/TurretHeavy_MenuIcon</uiIconPath>
<uiIconScale>0.90</uiIconScale>
<minifiedDef>MinifiedThing</minifiedDef>
<altitudeLayer>Building</altitudeLayer>
<stealable>false</stealable>
<rotatable>false</rotatable>
<thingCategories>
<li>BuildingsSecurity</li>
</thingCategories>
<statBases>
<MaxHitPoints>220</MaxHitPoints>
<Flammability>0.4</Flammability>
<WorkToBuild>8500</WorkToBuild>
<Mass>20</Mass>
<Beauty>-50</Beauty>
<ShootingAccuracyTurret>0.96</ShootingAccuracyTurret>
</statBases>
<tickerType>Normal</tickerType>
<comps>
<li Class="CompProperties_Explosive">
<explosiveRadius>5.9</explosiveRadius>
<explosiveDamageType>Bomb</explosiveDamageType>
<chanceNeverExplodeFromDamage>0.9</chanceNeverExplodeFromDamage>
</li>
<li Class="CompProperties_Forbiddable"/>
<li Class="CompProperties_Power">
<compClass>CompPowerTrader</compClass>
<basePowerConsumption>370</basePowerConsumption>
</li>
<li Class="CompProperties_Flickable"/>
<li Class="CompProperties_Breakdownable"/>
<li Class="CompProperties_Glower">
<glowRadius>4</glowRadius>
<glowColor>(217,200,120,0)</glowColor>
</li>
<li Class="CompProperties_Refuelable">
<fuelLabel>Shots until barrel change</fuelLabel>
<fuelGizmoLabel>Barrel durability</fuelGizmoLabel>
<fuelFilter>
<thingDefs>
<li>Steel</li>
</thingDefs>
</fuelFilter>
<fuelCapacity>800</fuelCapacity>
<initialFuelPercent>1</initialFuelPercent>
<autoRefuelPercent>0.99</autoRefuelPercent>
<showFuelGizmo>true</showFuelGizmo>
<minimumFueledThreshold>1</minimumFueledThreshold>
<fuelMultiplier>7</fuelMultiplier>
<factorByDifficulty>false</factorByDifficulty>
<consumeFuelOnlyWhenUsed>true</consumeFuelOnlyWhenUsed>
<outOfFuelMessage>Cannot shoot: Needs new barrel</outOfFuelMessage>
<fuelIconPath>UI/Overlays/Barrel</fuelIconPath>
</li>
</comps>
<passability>PassThroughOnly</passability>
<pathCost>50</pathCost>
<fillPercent>0.4</fillPercent>
<hasTooltip>true</hasTooltip>
<stuffCategories>
<li>Metallic</li>
</stuffCategories>
<costStuffCount>180</costStuffCount>
<costList>
<Steel>280</Steel>
<Plasteel>60</Plasteel>
<ComponentIndustrial>6</ComponentIndustrial>
<ComponentSpacer>1</ComponentSpacer>
</costList>
<terrainAffordanceNeeded>Heavy</terrainAffordanceNeeded>
<designationCategory>Security</designationCategory>
<specialDisplayRadius>34.9</specialDisplayRadius>
<constructionSkillPrerequisite>8</constructionSkillPrerequisite>
<building>
<ai_combatDangerous>true</ai_combatDangerous>
<turretGunDef>Gun_HeavyTurret</turretGunDef>
<turretBurstCooldownTime>0.3</turretBurstCooldownTime>
<turretTopGraphicPath>Things/Building/Security/TurretHeavy_Top</turretTopGraphicPath>
</building>
<placeWorkers>
<li>PlaceWorker_TurretTop</li>
</placeWorkers>
<designationHotKey>Misc2</designationHotKey>
<researchPrerequisites>
<li>AdvancedTurrets</li>
</researchPrerequisites>
</ThingDef>
<ThingDef ParentName="BaseBullet">
<defName>Bullet_HeavyTurret</defName>
<label>heavy-turret bullet</label>
<graphicData>
<texPath>Things/Projectile/Bullet_Big</texPath>
<graphicClass>Graphic_Single</graphicClass>
</graphicData>
<projectile>
<damageDef>Bullet</damageDef>
<damageAmountBase>17</damageAmountBase>
<stoppingPower>1.5</stoppingPower>
<speed>100</speed>
</projectile>
</ThingDef>
<ThingDef ParentName="BaseHumanGun">
<defName>Gun_HeavyTurret</defName>
<label>heavy-turret gun</label>
<description>A simple automatic gun made to be mounted on a turret.</description>
<graphicData>
<texPath>Things/Item/Equipment/WeaponRanged/ChargeRifle</texPath>
<graphicClass>Graphic_Single</graphicClass>
</graphicData>
<soundInteract>Interact_Rifle</soundInteract>
<menuHidden>true</menuHidden>
<destroyOnDrop>true</destroyOnDrop>
<tradeability>None</tradeability>
<useHitPoints>false</useHitPoints>
<statBases>
<AccuracyTouch>0.99</AccuracyTouch>
<AccuracyShort>0.85</AccuracyShort>
<AccuracyMedium>0.60</AccuracyMedium>
<AccuracyLong>0.55</AccuracyLong>
<RangedWeapon_Cooldown>0.3</RangedWeapon_Cooldown>
<DeteriorationRate>0</DeteriorationRate>
<Mass>35</Mass>
<Flammability>0</Flammability>
</statBases>
<weaponTags Inherit="false">
<li>TurretGun</li>
</weaponTags>
<verbs>
<li>
<verbClass>Verb_Shoot</verbClass>
<hasStandardCommand>true</hasStandardCommand>
<defaultProjectile>Bullet_HeavyTurret</defaultProjectile>
<warmupTime>0</warmupTime>
<range>34.9</range>
<ticksBetweenBurstShots>8</ticksBetweenBurstShots>
<burstShotCount>1</burstShotCount>
<soundCast>Shot_Minigun</soundCast>
<soundCastTail>GunTail_Heavy</soundCastTail>
<muzzleFlashScale>9</muzzleFlashScale>
</li>
</verbs>
</ThingDef>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment