RimWorld

RimWorld

Mechalit Faction v2 1.6
yavis 27 Oct, 2022 @ 3:35pm
Mech Lancer Mechanoids problem
Throwing a lot of same errors when enemies appear.
Enemies do not display textures and have no attributes.
It should be a problem when using with VFEM(Vanilla Factions Expanded - Mechanoids) series.
Sorry,I modified the file according to VFEM, the enemy textures are displayed normally, and the properties are normal.
I hope you can update the official version, thank you!

Errors in the logs:
Exception drawing Corpse_Mech_Lancer_M339150: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) [0x00029] in <eae584ce26bc40229c1b1aa476bfa589>:0 at System.ThrowHelper.ThrowArgumentOutOfRangeException () [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0 at Verse.Pawn_AgeTracker.get_CurKindLifeStage () [0x00049] in <501333add04d433e9b8a51d43bed4954>:0 at (wrapper dynamic-method) Verse.PawnGraphicSet.Verse.PawnGraphicSet.ResolveAllGraphics_Patch3(Verse.PawnGraphicSet) at (wrapper dynamic-method) Verse.PawnRenderer.Verse.PawnRenderer.RenderPawnAt_Patch3(Verse.PawnRenderer,UnityEngine.Vector3,System.Nullable`1<Verse.Rot4>,bool) at Verse.Corpse.DrawAt (UnityEngine.Vector3 drawLoc, System.Boolean flip) [0x0000b] in <501333add04d433e9b8a51d43bed4954>:0 at Verse.Thing.Draw () [0x00015] in <501333add04d433e9b8a51d43bed4954>:0 at Verse.ThingWithComps.Draw () [0x0000e] in <501333add04d433e9b8a51d43bed4954>:0 at Verse.DynamicDrawManager.DrawDynamicThings () [0x000d8] in <501333add04d433e9b8a51d43bed4954>:0 (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)


Modified Def file:
<?xml version="1.0" encoding="utf-8"?> <Defs> <ThingDef ParentName="BasePawn" Name="MechalitFaction_Mechanoid" Abstract="True"> <soundImpactDefault>BulletImpact_Metal</soundImpactDefault> <statBases> <PsychicSensitivity>0.5</PsychicSensitivity> <ToxicResistance>1</ToxicResistance> <Flammability>0</Flammability> <ComfyTemperatureMin>-100</ComfyTemperatureMin> <ComfyTemperatureMax>250</ComfyTemperatureMax> <MeatAmount>0</MeatAmount> <ArmorRating_Heat>2.00</ArmorRating_Heat> </statBases> <race> <fleshType>Mechanoid</fleshType> <needsRest>false</needsRest> <hasGenders>false</hasGenders> <foodType>None</foodType> <lifeExpectancy>2500</lifeExpectancy> <bloodDef>Filth_MachineBits</bloodDef> </race> </ThingDef> <PawnKindDef Name="MechalitFaction_MechanoidKind" Abstract="True"> <defaultFactionType>MehalitFaction</defaultFactionType> <aiAvoidCover>true</aiAvoidCover> <destroyGearOnDrop>true</destroyGearOnDrop> </PawnKindDef> <ThingDef ParentName="MechalitFaction_Mechanoid" Name="MechalitFaction_MechanoidWalker" Abstract="True"> <statBases> <MoveSpeed>5.5</MoveSpeed> <ArmorRating_Blunt>0.2</ArmorRating_Blunt> <ArmorRating_Sharp>0.4</ArmorRating_Sharp> </statBases> <race> <intelligence>ToolUser</intelligence> <thinkTreeMain>Mechanoid</thinkTreeMain> <baseBodySize>1.0</baseBodySize> <lifeStageAges> <li> <def>MechanoidFullyFormed</def> <minAge>0</minAge> <soundWounded>Pawn_Mech_Scyther_Wounded</soundWounded> <soundDeath>Pawn_Mech_Scyther_Death</soundDeath> <soundCall>Pawn_Mech_Scyther_Call</soundCall> </li> </lifeStageAges> <soundCallIntervalRange>1000~2000</soundCallIntervalRange> </race> <butcherProducts> <Steel>15</Steel> </butcherProducts> </ThingDef> <ThingDef ParentName="MechalitFaction_Mechanoid" Name="MechalitFaction_MechanoidWalker2" Abstract="True"> <statBases> <MoveSpeed>4.6</MoveSpeed> <ArmorRating_Blunt>0.3</ArmorRating_Blunt> <ArmorRating_Sharp>0.6</ArmorRating_Sharp> </statBases> <race> <intelligence>ToolUser</intelligence> <thinkTreeMain>Mechanoid</thinkTreeMain> <baseBodySize>1.0</baseBodySize> <lifeStageAges> <li> <def>MechanoidFullyFormed</def> <minAge>0</minAge> <soundWounded>Pawn_Mech_Scyther_Wounded</soundWounded> <soundDeath>Pawn_Mech_Scyther_Death</soundDeath> <soundCall>Pawn_Mech_Scyther_Call</soundCall> </li> </lifeStageAges> <soundCallIntervalRange>1000~2000</soundCallIntervalRange> </race> <butcherProducts> <Steel>25</Steel> </butcherProducts> </ThingDef> <ThingDef ParentName="MechalitFaction_MechanoidWalker"> <defName>Mech_Lancer_S</defName> <label>Lancer "Cicada"</label> <description>Lancer, created by the Mechalit faction, using mechanoid technology. The lancer of this modification is weaker than the usual lancer and is armed with the simple weapon of the Mechalit faction.</description> <tools> <li> <label>left fist</label> <capacities> <li>Blunt</li> </capacities> <power>10.0</power> <cooldownTime>2</cooldownTime> <linkedBodyPartsGroup>LeftHand</linkedBodyPartsGroup> <alwaysTreatAsWeapon>true</alwaysTreatAsWeapon> </li> <li> <label>right fist</label> <capacities> <li>Blunt</li> </capacities> <power>10.0</power> <cooldownTime>2</cooldownTime> <linkedBodyPartsGroup>RightHand</linkedBodyPartsGroup> <alwaysTreatAsWeapon>true</alwaysTreatAsWeapon> </li> <li> <label>head</label> <capacities> <li>Blunt</li> </capacities> <power>8.5</power> <cooldownTime>2</cooldownTime> <linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup> <ensureLinkedBodyPartsGroupAlwaysUsable>true</ensureLinkedBodyPartsGroupAlwaysUsable> <chanceFactor>0.2</chanceFactor> </li> </tools> <race> <body>Lancer</body> <baseHealthScale>0.7</baseHealthScale> <soundMeleeHitPawn>Pawn_Melee_Punch_HitPawn</soundMeleeHitPawn> <soundMeleeHitBuilding>Pawn_Melee_Punch_HitBuilding</soundMeleeHitBuilding> <soundMeleeMiss>Pawn_Melee_Punch_Miss</soundMeleeMiss> </race> </ThingDef> <ThingDef ParentName="MechalitFaction_MechanoidWalker2"> <defName>Mech_Lancer_M</defName> <label>Lancer "Hornet"</label> <description>Lancer, created by the Mechalit faction, using mechanoid technology. The lancer of this modification is more than 2 times stronger than the usual lancer and is armed with the advanced weapon of the Mechalit faction.</description> <tools> <li> <label>left fist</label> <capacities> <li>Blunt</li> </capacities> <power>15.0</power> <cooldownTime>2</cooldownTime> <linkedBodyPartsGroup>LeftHand</linkedBodyPartsGroup> <alwaysTreatAsWeapon>true</alwaysTreatAsWeapon> </li> <li> <label>right fist</label> <capacities> <li>Blunt</li> </capacities> <power>15.0</power> <cooldownTime>2</cooldownTime> <linkedBodyPartsGroup>RightHand</linkedBodyPartsGroup> <alwaysTreatAsWeapon>true</alwaysTreatAsWeapon> </li> <li> <label>head</label> <capacities> <li>Blunt</li> </capacities> <power>10.5</power> <cooldownTime>2</cooldownTime> <linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup> <ensureLinkedBodyPartsGroupAlwaysUsable>true</ensureLinkedBodyPartsGroupAlwaysUsable> <chanceFactor>0.2</chanceFactor> </li> </tools> <race> <body>Lancer</body> <baseHealthScale>2</baseHealthScale> <soundMeleeHitPawn>Pawn_Melee_Punch_HitPawn</soundMeleeHitPawn> <soundMeleeHitBuilding>Pawn_Melee_Punch_HitBuilding</soundMeleeHitBuilding> <soundMeleeMiss>Pawn_Melee_Punch_Miss</soundMeleeMiss> </race> </ThingDef> <PawnKindDef ParentName="MechalitFaction_MechanoidKind"> <defName>Mech_Lancer_S</defName> <label>Lancer "Cicada"</label> <race>Mech_Lancer_S</race> <combatPower>80</combatPower> <!--<itemQuality>Normal</itemQuality>--> <!--canBeSapper>true</canBeSapper--> <lifeStages> <li> <bodyGraphicData> <texPath>MechaLancer/LancerS</texPath> <graphicClass>Graphic_Multi</graphicClass> <drawSize>1.4</drawSize> <shadowData> <volume>(0.4, 0.8, 0.4)</volume> </shadowData> </bodyGraphicData> </li> </lifeStages> <weaponMoney>999~999</weaponMoney> <weaponTags> <li>MechaGunSimple</li> </weaponTags> </PawnKindDef> <PawnKindDef ParentName="MechalitFaction_MechanoidKind"> <defName>Mech_Lancer_M</defName> <label>Lancer "Hornet"</label> <race>Mech_Lancer_M</race> <combatPower>180</combatPower> <!--<itemQuality>Good</itemQuality>--> <!--canBeSapper>true</canBeSapper--> <lifeStages> <li> <bodyGraphicData> <texPath>MechaLancer/Lancer</texPath> <graphicClass>Graphic_Multi</graphicClass> <drawSize>1.5</drawSize> <shadowData> <volume>(0.4, 0.8, 0.4)</volume> </shadowData> </bodyGraphicData> </li> </lifeStages> <weaponMoney>9999~9999</weaponMoney> <weaponTags> <li>MechaGun</li> </weaponTags> </PawnKindDef> <!--FleshTypeDef> <defName>Mechanoid_Mechalit</defName> <corpseCategory>CorpsesMechanoid</corpseCategory> <wounds> <li> <texture>Things/Pawn/Wounds/WoundMechA</texture> </li> <li> <texture>Things/Pawn/Wounds/WoundMechB</texture> </li> <li> <texture>Things/Pawn/Wounds/WoundMechC</texture> </li> </wounds> </FleshTypeDef--> </Defs>
Last edited by yavis; 31 Oct, 2022 @ 9:14am
< >
Showing 1-1 of 1 comments
that guy 28 Oct, 2022 @ 1:43pm 
I'm having the same issue, but I'm not using VFEM.

Exception drawing Corpse_Mech_Lancer_S677328: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index at System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) [0x00029] in <eae584ce26bc40229c1b1aa476bfa589>:0 at System.ThrowHelper.ThrowArgumentOutOfRangeException () [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0 at Verse.Pawn_AgeTracker.get_CurKindLifeStage () [0x00049] in <947b134afd9f49cf9cc883edb73fe5db>:0 at (wrapper dynamic-method) Verse.PawnGraphicSet.Verse.PawnGraphicSet.ResolveAllGraphics_Patch2(Verse.PawnGraphicSet) at (wrapper dynamic-method) Verse.PawnRenderer.Verse.PawnRenderer.RenderPawnAt_Patch0(Verse.PawnRenderer,UnityEngine.Vector3,System.Nullable`1<Verse.Rot4>,bool) at Verse.Corpse.DrawAt (UnityEngine.Vector3 drawLoc, System.Boolean flip) [0x0000b] in <947b134afd9f49cf9cc883edb73fe5db>:0 at Verse.Thing.Draw () [0x00015] in <947b134afd9f49cf9cc883edb73fe5db>:0 at Verse.ThingWithComps.Draw () [0x0000e] in <947b134afd9f49cf9cc883edb73fe5db>:0 at Verse.DynamicDrawManager.DrawDynamicThings () [0x000d8] in <947b134afd9f49cf9cc883edb73fe5db>:0 UnityEngine.StackTraceUtility:ExtractStackTrace () Verse.Log:Error (string) Verse.DynamicDrawManager:DrawDynamicThings () (wrapper dynamic-method) Verse.Map:Verse.Map.MapUpdate_Patch1 (Verse.Map) (wrapper dynamic-method) Verse.Game:Verse.Game.UpdatePlay_Patch1 (Verse.Game) Verse.Root_Play:Update ()
< >
Showing 1-1 of 1 comments
Per page: 1530 50