Skip to content

Commit

Permalink
RC3
Browse files Browse the repository at this point in the history
Rebalanced Centipede weapons, grenade warmup times, added FSX milking to
boomrats, fixed tribal trader incident, nerfed charge weapons, fixed
raiders not switching weapons, fixed loadouts not unequipping weapons
  • Loading branch information
NoImageAvailable committed May 5, 2016
1 parent 2edaf83 commit 4a0fdc6
Show file tree
Hide file tree
Showing 13 changed files with 231 additions and 59 deletions.
Binary file modified Assemblies/CombatRealism.dll
Binary file not shown.
85 changes: 84 additions & 1 deletion Defs/FactionDefs/Factions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,89 @@
<FactionDefs>

<!-- Normal humanlike factions -->

<FactionDef>
<defName>Tribe</defName>
<label>tribe</label>
<description>These people have been here a very long time. Maybe their ancestors crashed here a thousand years ago. Maybe they survived some cataclysm that destroyed a technological civilization here. In any case, the tribals are mostly nomadic people who live off the land using primitive tools and weapons.\n\nSome tribes are more aggressive than others; many are open to trade and alliances, even with strange peoples like yourselves. Close cooperation or recruitment will be very difficult because of the vast sociotechnological and linguistic gap between the tribals and yourselves.\n\nDespite their apparent technological weakness, the tribals can be dangerous enemies and valuable friends because of their skill with low-tech warfare, their numbers, and their hardiness.</description>
<pawnsPlural>tribespeople</pawnsPlural>
<requiredCountAtGameStart>1</requiredCountAtGameStart>
<canMakeRandomly>true</canMakeRandomly>
<raidCommonality>100</raidCommonality>
<canStageAttacks>true</canStageAttacks>
<startingGoodwill>
<min>-50</min>
<max>30</max>
</startingGoodwill>
<mustStartOneEnemy>true</mustStartOneEnemy>
<factionNameMaker>NamerFactionTribal</factionNameMaker>
<pawnNameMaker>NamerPersonTribal</pawnNameMaker>
<techLevel>Neolithic</techLevel>
<backstoryCategory>Tribal</backstoryCategory>
<leaderTitle>Chief</leaderTitle>
<hairTags>
<li>Tribal</li>
</hairTags>
<naturalColonyGoodwill>
<min>-100</min>
<max>10</max>
</naturalColonyGoodwill>
<caravanTraderKinds>
<li>Caravan_Neolithic_BulkGoods</li>
<li>Caravan_Neolithic_CombatSupplier</li>
<li>Caravan_Neolithic_SlavesMerchant</li>
</caravanTraderKinds>
<!--
<visitorTraderKinds>
<li>Visitor_Neolithic_Standard</li>
</visitorTraderKinds>
-->
<pawnGroupMakers>
<li Class="PawnGroupMaker_Normal">
<options>
<li>
<selectionWeight>60</selectionWeight>
<kind>TribalWarrior</kind>
</li>
<li>
<selectionWeight>100</selectionWeight>
<kind>TribalArcher</kind>
</li>
<li>
<selectionWeight>70</selectionWeight>
<kind>TribalChief</kind>
</li>
</options>
</li>
<li Class="PawnGroupMaker_Trader">
<traders>
<li>
<selectionWeight>1</selectionWeight>
<kind>TribalTrader</kind>
</li>
</traders>
<carriers>
<li>
<selectionWeight>1</selectionWeight>
<kind>PackMuffalo</kind>
</li>
</carriers>
<guards>
<li>
<selectionWeight>60</selectionWeight>
<kind>TribalWarrior</kind>
</li>
<li>
<selectionWeight>100</selectionWeight>
<kind>TribalArcher</kind>
</li>
</guards>
</li>
</pawnGroupMakers>
<homeIconPath>World/FactionHomes/DefaultHome</homeIconPath>
<homeIconColor>(50,200,50)</homeIconColor>
</FactionDef>

<FactionDef>
<defName>Outlander</defName>
<label>outlander town</label>
Expand Down Expand Up @@ -206,7 +289,7 @@
<hidden>true</hidden>
<canFlee>false</canFlee>
<techLevel>Ultra</techLevel>
<earliestRaidDays>45</earliestRaidDays>
<earliestRaidDays>60</earliestRaidDays>
<startingGoodwill>
<min>-100</min>
<max>-100</max>
Expand Down
56 changes: 48 additions & 8 deletions Defs/ModHelperDefs/ModHelper.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,18 @@
<li>Boomalope</li>
</targetDefs>
</li>
<li>
<compProps Class="CommunityCoreLibrary.CompProperties_ShearableRenameable">
<compClass>CommunityCoreLibrary.CompShearableRenameable</compClass>
<growthLabel>Chemical fullness</growthLabel>
<shearIntervalDays>5</shearIntervalDays>
<woolAmount>1</woolAmount>
<woolDef>FSX</woolDef>
</compProps>
<targetDefs>
<li>Boomrat</li>
</targetDefs>
</li>
</ThingComps>
<TraderKinds>
<li>
Expand All @@ -57,14 +69,21 @@
<li Class="StockGenerator_Tag">
<tradeTag>CR_Ammo</tradeTag>
<countRange>
<min>500</min>
<max>1000</max>
<min>200</min>
<max>5000</max>
</countRange>
<thingDefCountRange>
<min>-1</min>
<max>4</max>
</thingDefCountRange>
</li>
<li Class="StockGenerator_Category">
<categoryDef>Ammo</categoryDef>
<thingDefCountRange>
<min>0</min>
<max>0</max>
</thingDefCountRange>
</li>
</stockGenerators>
</li>
<li>
Expand All @@ -73,14 +92,21 @@
<li Class="StockGenerator_Tag">
<tradeTag>CR_Ammo</tradeTag>
<countRange>
<min>100</min>
<max>200</max>
<min>50</min>
<max>100</max>
</countRange>
<thingDefCountRange>
<min>-1</min>
<max>2</max>
</thingDefCountRange>
</li>
<li Class="StockGenerator_Category">
<categoryDef>Ammo</categoryDef>
<thingDefCountRange>
<min>0</min>
<max>0</max>
</thingDefCountRange>
</li>
</stockGenerators>
</li>
<li>
Expand All @@ -89,15 +115,22 @@
<li Class="StockGenerator_Tag">
<tradeTag>CR_Ammo</tradeTag>
<countRange>
<min>2000</min>
<max>5000</max>
<min>500</min>
<max>2000</max>
</countRange>
<price>Cheap</price>
<thingDefCountRange>
<min>3</min>
<max>9</max>
</thingDefCountRange>
</li>
<li Class="StockGenerator_Category">
<categoryDef>Ammo</categoryDef>
<thingDefCountRange>
<min>0</min>
<max>0</max>
</thingDefCountRange>
</li>
<li Class="StockGenerator_Tag">
<tradeTag>CR_Turret</tradeTag>
<thingDefCountRange>
Expand All @@ -124,15 +157,22 @@
<li Class="StockGenerator_Tag">
<tradeTag>CR_Ammo</tradeTag>
<countRange>
<min>500</min>
<max>2000</max>
<min>200</min>
<max>1000</max>
</countRange>
<price>Cheap</price>
<thingDefCountRange>
<min>2</min>
<max>5</max>
</thingDefCountRange>
</li>
<li Class="StockGenerator_Category">
<categoryDef>Ammo</categoryDef>
<thingDefCountRange>
<min>0</min>
<max>0</max>
</thingDefCountRange>
</li>
<li Class="StockGenerator_Tag">
<tradeTag>CR_Turret</tradeTag>
<thingDefCountRange>
Expand Down
4 changes: 4 additions & 0 deletions Defs/ThingDefs/Weapons_Artillery.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
<thingClass>ThingWithComps</thingClass>
<label>artillery error</label>
<equipmentType>Primary</equipmentType>
<graphicData>
<texPath>Things/Item/Equipment/WeaponRanged/ChargeRifle</texPath>
<graphicClass>Graphic_Single</graphicClass>
</graphicData>
<tickerType>Never</tickerType>
<techLevel>Midworld</techLevel>
<soundInteract>ArtilleryShellLoaded</soundInteract>
Expand Down
8 changes: 4 additions & 4 deletions Defs/ThingDefs/Weapons_Grenades.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
<verbClass>Combat_Realism.Verb_ShootCROneUse</verbClass>
<hasStandardCommand>true</hasStandardCommand>
<range>10.0</range>
<warmupTicks>90</warmupTicks>
<warmupTicks>60</warmupTicks>
<noiseRadius>4</noiseRadius>
<ai_IsBuildingDestroyer>true</ai_IsBuildingDestroyer>
<soundCast>ThrowGrenade</soundCast>
Expand Down Expand Up @@ -170,7 +170,7 @@
<verbClass>Combat_Realism.Verb_ShootCROneUse</verbClass>
<hasStandardCommand>true</hasStandardCommand>
<range>10</range>
<warmupTicks>90</warmupTicks>
<warmupTicks>60</warmupTicks>
<noiseRadius>4</noiseRadius>
<ai_IsBuildingDestroyer>true</ai_IsBuildingDestroyer>
<ai_IsIncendiary>true</ai_IsIncendiary>
Expand Down Expand Up @@ -237,7 +237,7 @@
<verbClass>Combat_Realism.Verb_ShootCROneUse</verbClass>
<hasStandardCommand>true</hasStandardCommand>
<range>10</range>
<warmupTicks>90</warmupTicks>
<warmupTicks>60</warmupTicks>
<noiseRadius>4</noiseRadius>
<ai_IsBuildingDestroyer>false</ai_IsBuildingDestroyer>
<soundCast>ThrowGrenade</soundCast>
Expand Down Expand Up @@ -299,7 +299,7 @@
<verbClass>Combat_Realism.Verb_ShootCROneUse</verbClass>
<hasStandardCommand>true</hasStandardCommand>
<range>10</range>
<warmupTicks>90</warmupTicks>
<warmupTicks>60</warmupTicks>
<noiseRadius>4</noiseRadius>
<ai_IsBuildingDestroyer>false</ai_IsBuildingDestroyer>
<soundCast>ThrowGrenade</soundCast>
Expand Down
6 changes: 3 additions & 3 deletions Defs/ThingDefs/Weapons_Guns.xml
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@
<hasStandardCommand>true</hasStandardCommand>
<projectileDef>Bullet_762x51mmNATO_FMJ</projectileDef>
<forcedMissRadius>2.4</forcedMissRadius>
<warmupTicks>180</warmupTicks>
<warmupTicks>240</warmupTicks>
<range>107</range>
<burstShotCount>300</burstShotCount>
<ticksBetweenBurstShots>1</ticksBetweenBurstShots>
Expand Down Expand Up @@ -955,7 +955,7 @@
<hasStandardCommand>true</hasStandardCommand>
<projectileDef>Bullet_12x64mmCharged</projectileDef>
<forcedMissRadius>2.9</forcedMissRadius>
<warmupTicks>120</warmupTicks>
<warmupTicks>180</warmupTicks>
<range>93</range>
<ticksBetweenBurstShots>5</ticksBetweenBurstShots>
<burstShotCount>20</burstShotCount>
Expand Down Expand Up @@ -1010,7 +1010,7 @@
<projectileDef>Bullet_80x256mmFuel_Thermobaric</projectileDef>
<forcedMissRadius>3.5</forcedMissRadius>
<ai_IsIncendiary>true</ai_IsIncendiary>
<warmupTicks>180</warmupTicks>
<warmupTicks>240</warmupTicks>
<range>80</range>
<burstShotCount>1</burstShotCount>
<soundCast>InfernoCannon_Fire</soundCast>
Expand Down
14 changes: 7 additions & 7 deletions Defs/ThingDefs_Ammo/Projectiles_Advanced.xml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
<defName>Bullet_6x24mmCharged</defName>
<label>charge shot</label>
<projectile>
<damageAmountBase>15</damageAmountBase>
<damageAmountBase>11</damageAmountBase>
<secondaryDamage>
<li>
<def>Bomb_Secondary</def>
Expand All @@ -132,7 +132,7 @@
<defName>Bullet_6x24mmCharged_AP</defName>
<label>charge shot (Conc.)</label>
<projectile>
<damageAmountBase>15</damageAmountBase>
<damageAmountBase>11</damageAmountBase>
<secondaryDamage>
<li>
<def>Bomb_Secondary</def>
Expand All @@ -147,7 +147,7 @@
<defName>Bullet_6x24mmCharged_Ion</defName>
<label>charge shot (Ion)</label>
<projectile>
<damageAmountBase>15</damageAmountBase>
<damageAmountBase>11</damageAmountBase>
<secondaryDamage>
<li>
<def>Electrical</def>
Expand Down Expand Up @@ -175,15 +175,15 @@
</graphicData>
<projectile>
<damageDef>Bullet</damageDef>
<damageAmountBase>14</damageAmountBase>
<damageAmountBase>10</damageAmountBase>
<speed>260</speed>
<secondaryDamage>
<li>
<def>Bomb_Secondary</def>
<amount>3</amount>
</li>
</secondaryDamage>
<armorPenetration>1.0</armorPenetration>
<armorPenetration>0.95</armorPenetration>
</projectile>
</ThingDef>

Expand All @@ -199,12 +199,12 @@
</graphicData>
<projectile>
<damageDef>Bullet</damageDef>
<damageAmountBase>30</damageAmountBase>
<damageAmountBase>25</damageAmountBase>
<speed>220</speed>
<secondaryDamage>
<li>
<def>Bomb_Secondary</def>
<amount>25</amount>
<amount>15</amount>
</li>
</secondaryDamage>
<armorPenetration>1.2</armorPenetration>
Expand Down
2 changes: 1 addition & 1 deletion Defs/ThingDefs_Buildings/Buildings_Security.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@

<!--=============== 81mm mortar ===============-->

<ThingDef Name="MortarBase" ParentName="BuildingBase" Abstract="true">
<ThingDef Name="MortarBase" ParentName="BuildingBase" Abstract="True">
<label>81mm mortar</label>
<description>A mortar that launches explosive shells. Must be manned.</description>
<thingClass>Combat_Realism.Building_TurretGunCR</thingClass>
Expand Down
7 changes: 2 additions & 5 deletions Source/CombatRealism/Combat_Realism/Comps/CompAmmoUser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ public bool TryReduceAmmoCount()

ammo.Destroy();
compInventory.UpdateInventory();
if (!hasAmmo) DoOutOfAmmoAction();
}
return true;
}
Expand Down Expand Up @@ -272,11 +273,7 @@ private void DoOutOfAmmoAction()
{
MoteThrower.ThrowText(position.ToVector3Shifted(), "CR_OutOfAmmo".Translate() + "!");
}
if (wielder != null && wielder.jobs != null)
{
if (wielder.CurJob.def != JobDefOf.Hunt && compInventory != null) compInventory.SwitchToNextViableWeapon();
wielder.jobs.StopAll();
}
if (wielder != null && compInventory != null && (wielder.jobs == null || wielder.CurJob.def != JobDefOf.Hunt)) compInventory.SwitchToNextViableWeapon();
}

public void LoadAmmo(Thing ammo = null)
Expand Down
Loading

0 comments on commit 4a0fdc6

Please sign in to comment.