[A11] Halo Weapon Pack (V 1.2 / 13.6.2015) moved by request of topic starter

Started by Helixien, June 10, 2015, 11:41:47 AM

Previous topic - Next topic

nmid

#15
..\Mods\(A11) RimHalo\Defs\ThingDefs\RH_Guns.xml

It has 3 core ThingDefs
1.   <ThingDef Name="BaseGun" Abstract="True">
2.   <ThingDef Name="BaseHumanGun" ParentName="BaseGun" Abstract="True">
3.   <ThingDef Name="BaseBullet" Abstract="True">
Let's ignore the bullets ;)

If you add the code from 2.
    <weaponTags>
      <li>Gun</li>
      <li>AdvancedGun</li>
    </weaponTags>

into 1., then ALL the guns under BaseGun will be added to edb prep.
It was earlier looking like this
  <ThingDef Name="BaseGun" Abstract="True">
    <category>Item</category>
    <thingClass>ThingWithComps</thingClass>
    <equipmentType>Primary</equipmentType>
    <pathCost>10</pathCost>
    <useHitPoints>True</useHitPoints>
    <selectable>True</selectable>
    <!-- <graphicOnGroundRandomRotateAngle>35</graphicOnGroundRandomRotateAngle> -->
    <drawGUIOverlay>true</drawGUIOverlay>
    <statBases>
      <MaxHitPoints>100</MaxHitPoints>
      <Flammability>1.0</Flammability>
      <DeteriorationRate>1</DeteriorationRate>
      <SellPriceFactor>0.5</SellPriceFactor>
    </statBases>
    <altitudeLayer>Item</altitudeLayer>
    <alwaysHaulable>True</alwaysHaulable>
    <tickerType>Never</tickerType>
    <techLevel>Spacer</techLevel>
    <thingCategories>
      <li>WeaponsRanged</li>
    </thingCategories>
    <inspectorTabs>
      <li>ITab_Art</li>
    </inspectorTabs>
    <comps>
      <li>
        <compClass>CompForbiddable</compClass>
      </li>
      <li>
        <compClass>CompEquippable</compClass>
      </li>
      <li>
        <compClass>CompQuality</compClass>
      </li>
      <li>
        <compClass>CompArt</compClass>
        <nameMaker>NamerGun</nameMaker>
        <descriptionMaker>ArtWeaponGun</descriptionMaker>
        <minQualityForArtistic>Excellent</minQualityForArtistic>
      </li>
    </comps>
    <smeltProducts>
      <Steel>7</Steel>
      <Plasteel>3</Plasteel>
    </smeltProducts>
  </ThingDef>

and it will now look like this

  <ThingDef Name="BaseGun" Abstract="True">
    <category>Item</category>
    <thingClass>ThingWithComps</thingClass>
    <equipmentType>Primary</equipmentType>
    <pathCost>10</pathCost>
    <useHitPoints>True</useHitPoints>
    <selectable>True</selectable>
    <!-- <graphicOnGroundRandomRotateAngle>35</graphicOnGroundRandomRotateAngle> -->
    <drawGUIOverlay>true</drawGUIOverlay>
    <statBases>
      <MaxHitPoints>100</MaxHitPoints>
      <Flammability>1.0</Flammability>
      <DeteriorationRate>1</DeteriorationRate>
      <SellPriceFactor>0.5</SellPriceFactor>
    </statBases>
    <altitudeLayer>Item</altitudeLayer>
    <alwaysHaulable>True</alwaysHaulable>
    <tickerType>Never</tickerType>
    <techLevel>Spacer</techLevel>
    <thingCategories>
      <li>WeaponsRanged</li>
    </thingCategories>
    <inspectorTabs>
      <li>ITab_Art</li>
    </inspectorTabs>
    <comps>
      <li>
        <compClass>CompForbiddable</compClass>
      </li>
      <li>
        <compClass>CompEquippable</compClass>
      </li>
      <li>
        <compClass>CompQuality</compClass>
      </li>
      <li>
        <compClass>CompArt</compClass>
        <nameMaker>NamerGun</nameMaker>
        <descriptionMaker>ArtWeaponGun</descriptionMaker>
        <minQualityForArtistic>Excellent</minQualityForArtistic>
      </li>
    </comps>
    <smeltProducts>
      <Steel>7</Steel>
      <Plasteel>3</Plasteel>
    </smeltProducts>
<weaponTags>
      <li>Gun</li>
      <li>AdvancedGun</li>
    </weaponTags>
  </ThingDef>


If you add the code from 2. into individual guns, then only that gun will be added to edb prep.
For eg, I just wanted one gun to appear on the already overloaded edb prep page... the MA37_HybridScope

    <!-- MA37_HybridScope ======================================================= -->
  <ThingDef ParentName="BaseGun">
    <defName>Gun_MA37_HybridScope</defName>
    <label>MA37 Hybrid Scope</label>
    <description>(Individual Combat Weapon System) Primary service rifle with a hybrid scope of all branches of the UNSC.</description>
   <graphicData>
      <texPath>HumanWeapons/MA37/MA37_HybridScope</texPath>
      <graphicClass>Graphic_Single</graphicClass>
   </graphicData>
(snip)
        <soundCast>MA37Fire</soundCast>
        <soundCastTail>GunTail_Medium</soundCastTail>
      </li>
    </verbs>
        <weaponTags>
      <li>Gun</li>
      <li>AdvancedGun</li>
    </weaponTags>
  </ThingDef>


I like how this game can result in quotes that would be quite unnerving when said in public, out of context. StorymasterQ

Helixien

I am aware of it. That is the first code I made so yeah^^ I am working on a new version and with new I mean, I am rewriting the whole code and also redo the graphics. Also did some new ones!

Not sure when I will be able to release it since I have another mod (Skyrim) that has to be finished.
Anyway, thanks for pointing it out.

nmid

I actually like it the way it is!

This way I can decide which gun I want to show up in edb.. but I'm pretty sure humanguns would also mean something else... perhaps if it's purchasable from traders / craftable.

Anyway, Skyrim!? I have about 1000 hours in that, sounds interesting.
But... I guess it will be limited to swords/bows/etc?
I like how this game can result in quotes that would be quite unnerving when said in public, out of context. StorymasterQ

Helixien

Well, the code is already written so I dont want to change that for the new defs.

Oh, and I meant I am working on a mod FOR Skyrim, not a Skyrim mod for RimWorld. Sorry^^ And I can relate, I may only have 500h in Skyrim, but over 1000 in Creation Kit.