Ludeon Forums

RimWorld => Support => Topic started by: Darker on January 08, 2014, 04:28:15 PM

Title: What's wrong with this pawn
Post by: Darker on January 08, 2014, 04:28:15 PM
If you insert following pawn to any map, his Food and Rest stats won't get changed (never gets tired and hungry). However also, clicking "Needs" button for him will break the game.

I tried to compare it with regular pawn using XML compare tool (http://www.deltaxml.com/products/core/demo), but that didn't help...

Map with that guy is in the attachment.

Here is the pawn XML: (copy it in your map to see) - this board really needs SPOILER tag
Quote      <Thing Class="Pawn">
         <Def>Pawn</Def>
         <ID>Pawn4710017</ID>
         <Pos>(24, 0, 183)</Pos>
         <Rot>2</Rot>
         <Team>Colonist</Team>
         <Kind>Colonist</Kind>
         <CharacterName>Human</CharacterName>
         <Age>39</Age>
         <CarriedThing IsNull="True" />
         <Drawer>
            <Renderer>
               <BodyName>Dennis</BodyName>
               <HeadName>Bob</HeadName>
            </Renderer>
         </Drawer>
         <HealthTracker>
            <PawnHealth>100</PawnHealth>
            <TicksToNextHeal>552</TicksToNextHeal>
         </HealthTracker>
         <Mind Class="Pawn_MindHuman">
            <MindState>
               <LastJobTag>Idle</LastJobTag>
               <EnemyTarget>null</EnemyTarget>
            </MindState>
            <WorkSettings>
               <WorkPriorities>
                  <KeyList>
                     <WorkType>Firefighter</WorkType>
                     <WorkType>Construction</WorkType>
                     <WorkType>Repair</WorkType>
                     <WorkType>Growing</WorkType>
                     <WorkType>Mining</WorkType>
                     <WorkType>PlantCutting</WorkType>
                     <WorkType>Hauling</WorkType>
                     <WorkType>Cleaning</WorkType>
                  </KeyList>
                  <ValueList>
                     <Int32>4</Int32>
                     <Int32>4</Int32>
                     <Int32>4</Int32>
                     <Int32>4</Int32>
                     <Int32>4</Int32>
                     <Int32>4</Int32>
                     <Int32>4</Int32>
                     <Int32>4</Int32>
                  </ValueList>
               </WorkPriorities>
            </WorkSettings>
         </Mind>
         <Jobs>
            <CurJob>
               <JType>Goto</JType>
               <TargetA>
                  <TargetThing>null</TargetThing>
                  <TargetLoc>(24, 0, 181)</TargetLoc>
               </TargetA>
               <TargetB IsNull="True" />
            </CurJob>
            <CurJobDriver Class="JobDriver_Goto" />
         </Jobs>
         <Pather>
            <Moving>True</Moving>
            <NextSquare>(24, 0, 182)</NextSquare>
            <TicksUntilMove>34</TicksUntilMove>
            <TotalMoveDuration>42</TotalMoveDuration>
            <Destination>
               <TargetThing>null</TargetThing>
               <TargetLoc>(24, 0, 181)</TargetLoc>
            </Destination>
         </Pather>
         <Equipment>
            <Primary IsNull="True" />
            <Secondaries />
         </Equipment>
         <Inventory>
            <InventoryList />
         </Inventory>
         <Filth>
            <CarriedFilth>
               <Filth Class="Filth">
                  <Def>FilthDirt</Def>
                  <ID>FilthDirt4722784</ID>
                  <Thickness>1</Thickness>
                  <Sources />
               </Filth>
            </CarriedFilth>
         </Filth>
         <Food>
            <PieceFood>
               <CurLevel>50.0101</CurLevel>
               <TicksToNextStarveDamage > 2804 </TicksToNextStarveDamage>
            </PieceFood>
         </Food>
         <Rest>
            <PieceRest>
               <CurLevel>39.74253</CurLevel>
            </PieceRest>
         </Rest>
         <Psychology>
            <LoyaltyBase>
               <CurLevel>40.26126</CurLevel>
            </LoyaltyBase>
            <PieceHappiness>
               <CurLevel>40.25983</CurLevel>
            </PieceHappiness>
            <PieceFear>
               <CurLevel>33.20939</CurLevel>
            </PieceFear>
            <PieceEnvironment>
               <CurLevel>62</CurLevel>
            </PieceEnvironment>
            <PieceOpenness>
               <CurLevel>41.5</CurLevel>
            </PieceOpenness>
            <ThoughtHandler>
               <ThoughtList>
                  <Thought Class="Thought">
                     <ThoughtType>EnvironmentBeautiful</ThoughtType>
                     <Age>0</Age>
                  </Thought>
                  <Thought Class="Thought">
                     <ThoughtType>EnvironmentPretty</ThoughtType>
                     <Age>0</Age>
                  </Thought>
               </ThoughtList>
            </ThoughtHandler>
         </Psychology>
         <Prisoner IsNull="True" />
         <Ownership IsNull="True" />
         <Talker>
            <LastTalkTime>5243560</LastTalkTime>
         </Talker>
         <Skills>
            <Level_Construction>5</Level_Construction>
            <XpSinceLastLevel_Construction>0</XpSinceLastLevel_Construction>
            <Level_Growing>10</Level_Growing>
            <XpSinceLastLevel_Growing>0</XpSinceLastLevel_Growing>
            <Level_Research>5</Level_Research>
            <XpSinceLastLevel_Research>0</XpSinceLastLevel_Research>
            <Level_Mining>5</Level_Mining>
            <XpSinceLastLevel_Mining>0</XpSinceLastLevel_Mining>
            <Level_Shooting>5</Level_Shooting>
            <XpSinceLastLevel_Shooting>0</XpSinceLastLevel_Shooting>
            <Level_Melee>5</Level_Melee>
            <XpSinceLastLevel_Melee>0</XpSinceLastLevel_Melee>
            <Level_Social>5</Level_Social>
            <XpSinceLastLevel_Social>0</XpSinceLastLevel_Social>
            <Level_Cooking>5</Level_Cooking>
            <XpSinceLastLevel_Cooking>0</XpSinceLastLevel_Cooking>
            <Level_Medicine>5</Level_Medicine>
            <XpSinceLastLevel_Medicine>0</XpSinceLastLevel_Medicine>
            <Level_Artistic>5</Level_Artistic>
            <XpSinceLastLevel_Artistic>0</XpSinceLastLevel_Artistic>
            <Level_Crafting>5</Level_Crafting>
            <XpSinceLastLevel_Crafting>0</XpSinceLastLevel_Crafting>
         </Skills>
         <Story>
            <StoryItems>
               <Int32>4</Int32>
               <Int32>5</Int32>
            </StoryItems>
         </Story>
         <Traits>
            <TraitList>
               <Trait Class="Trait">
                  <DefName>Leader</DefName>
               </Trait>
               <Trait Class="Trait">
                  <DefName>Tough</DefName>
               </Trait>
            </TraitList>
         </Traits>
     </Thing>



[attachment deleted by admin: too old]
Title: Re: What's wrong with this pawn
Post by: Tynan on January 09, 2014, 11:14:08 PM
He must have been dead, and from a very old game version. Several key components are null (ownership, etc). His story section holds the ancient way of addressing story content, and has no appearance content. He has no apparel tracker.

I don't even know where you got this, but it's way, way out of date. That is, presuming you're using the testing versions you have access to.

But even if you're not, a lot of those nulls shouldn't be.
Title: Re: What's wrong with this pawn
Post by: Darker on January 10, 2014, 06:33:28 AM
This is an older post, however, the fields I left empty seemed to get repopulated by the game with no problem. I tried deleting them for other pawns and they kept working. But, now it's out of date.

Generally, I was trying to find out how to make a pawn without specifiing everything, because that's a code line per tag and I'm lazy.