I created a Flamethrower, a basic machine gun that fires 30 bullets in a very rapid fashion, with a flame graphic, so i re-created a flamethrower basically, but there's one problem...
It doesn't spawn or even appear in the debug menu...
Any ideas? This is how my Weapons_Guns.xml (Wich i called "Weapons_NewGuns.xml") looks like:
Quote<?xml version="1.0" encoding="utf-8" ?>
<ThingDefs>
<ThingDef Name="BaseGun" Abstract="True">
<category>Item</category>
<eType>Equipment</eType>
<thingClass>Equipment</thingClass>
<label>Gun</label>
<equipmentType>Primary</equipmentType>
<isGun>True</isGun>
<pathCost>10</pathCost>
<useStandardHealth>True</useStandardHealth>
<selectable>True</selectable>
<maxHealth>100</maxHealth>
<altitudeLayer>Item</altitudeLayer>
<alwaysHaulable>True</alwaysHaulable>
<tickerType>Never</tickerType>
<storeCategories>
<li>Weapons</li>
</storeCategories>
<comps>
<li>
<compClass>CompForbiddable</compClass>
</li>
</comps>
<verb>
<id>Nonnative</id>
<verbClass>Verb_Shoot</verbClass>
<cooldownTicks>30</cooldownTicks>
<label>VerbGun</label>
<description>Verb fires bullets.</description>
<hasStandardCommand>true</hasStandardCommand>
<targetParams>
<canTargetPawns>true</canTargetPawns>
<canTargetBuildings>true</canTargetBuildings>
<worldObjectTargetsMustBeAutoAttackable>true</worldObjectTargetsMustBeAutoAttackable>
</targetParams>
<canMiss>true</canMiss>
</verb>
</ThingDef>
<ThingDef Name="BaseBullet" Abstract="True">
<category>Projectile</category>
<tickerType>Normal</tickerType>
<altitudeLayer>Projectile</altitudeLayer>
<thingClass>Bullet</thingClass>
<label>Bullet</label>
<useStandardHealth>False</useStandardHealth>
<neverMultiSelect>True</neverMultiSelect>
<baseMaterialType>Transparent</baseMaterialType>
</ThingDef>
<!-- ============================================================== -->
<ThingDef ParentName="BaseBullet">
<defName>Bullet_Flame</defName>
<label>Flame</label>
<texturePath>Things/Projectile/Bullet_Flame</texturePath>
<projectile>
<impactWorld>true</impactWorld>
<damageType>BulletIncendiary</damageType>
<DamageAmountBase>2</DamageAmountBase>
<Speed>30</Speed>
</projectile>
</ThingDef>
<ThingDef ParentName="BaseGun">
<defName>Flamethrower</defName>
<label>Flamethrower</label>
<description>Burn! Buuuurn! The favorite weapon of a pyroman!</description>
<texturePath>Things/Item/Equipment/Flamethrower</texturePath>
<interactSound>InteractBoltActionRifle</interactSound>
<purchasable>True</purchasable>
<basePrice>500</basePrice>
<verb>
<projectileDef>Bullet_Flame</projectileDef>
<accuracy>4</accuracy>
<burstShotCount>30</burstShotCount>
<ticksBetweenBurstShots>1</ticksBetweenBurstShots>
<warmupTicks>100</warmupTicks>
<range>30</range>
<fireSound>ShotPistol</fireSound>
</verb>
</ThingDef>
Any ideas of what i did wrong? Anything that i deleted maybe?
Are you missing the <ThingDefs> tag at the end of your document?
It appears you missed an 'S' here..
Quote from: SlimeCrusher on March 01, 2014, 04:19:43 PM.....
</ThingDef>
[/size]
Any ideas of what i did wrong? Anything that i deleted maybe?
[/quote]
Quote from: Tynan on March 02, 2014, 11:06:40 AM
Are you missing the <ThingDefs> tag at the end of your document?
You missed the </ThingDefs> tag.
The document opens with a <ThingDefs> tag; you need to close that. All XML documents have one parent tag like this.
Oh thanks! It should work now...
Umm a question, how do you put new sounds to guns? Like the flamethrower sounds like a pistol, but can i add a new custom sound? All sounds are shots if im right
I have a problem with the texture and the <damageType>BulletIncendiary</damageType> but i think i can solve them out by myself
You can't make DamageTypes in Alpha2. Use the Flame damage type.
For the sound, you'll have to make a SoundDef, and point it at a .wav file in your Sounds directory. The Core mod has examples.
Again, thanks! I tried using the BulletIncendiary, it worked perfectly, although it filled the place with oil poddles lol
I'll try the sound, i have finnaly found a suitable sound, i'll post the mod when i finish as a test mod
Edit: Umm in reality, it wasn't <damageType>, it was <thingClass>, the thing that was used in the T-9 IL to make it work, i'll add the damageType also to see what i got, although it works perfectly, only i'll make the reload time a bit lower, as its EXTREMELY UNDERpowered...
Also, i can't get the sound working, i'll post the mod without sound for now, if i make it work i'll post the complete test mod