Border Collie

Started by ajaviide, December 14, 2016, 12:30:37 PM

Previous topic - Next topic

sulusdacor

JobDriver threw exception in initAction. Pawn=Kelly, Job=Train A=Thing_BorderCollie35594, Exception: System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorld.JobDriver_InteractAnimal.RequiredNutritionPerFeed (Verse.Pawn animal) [0x00000] in <filename unknown>:0
  at RimWorld.JobDriver_InteractAnimal+<FeedToils>c__Iterator6.<>m__13 () [0x00000] in <filename unknown>:0
  at Verse.AI.JobDriver.TryActuallyStartNextToil () [0x00000] in <filename unknown>:0


the first two lines job driver exception tells you there is a general problem with the train task. this could be on the pawn side or animal side at this point.
if you look at the following lines it lists the jobdriver in question and the "direct error". the interactanimal seems to be the general job driver for all animals. so since you seem to get this only on your modded animal (i assume here the normal vanilla animals work) and it lists the "RequiredNutritionPerFeed" there is a problem with the food the modded animal takes.

now this could be due to that the diet,food/hungerrate or other values in the xml that determine what/how the food is picked the trainer takes to train. you should look into this direction.

ajaviide

Im getting obsessed with it, its my lunch brake now:)

i missed line :
<foodType>OmnivoreAnimal, OvivoreAnimal</foodType>

so its traineable now.

Atleast im making some progress he he, well it seems fine for now, but i dont have time atm to test further, but im feeling optimistic.
Back to work now.

kudos for all the help

ajaviide

i just wanted to ask off topic.
I have never played before dev console open.

When i was testing this mod i didnt get any errors that would open the window anymore. But when i opened log window manually there still some yellow errors. (not dog related) Like when new pawn joined i got couple joy related errors. And also some yellow errors about steel and wood.

Is it normal?

[attachment deleted by admin due to age]

sulusdacor

uhm good question^^ i personaly mostly ignore the yellow errors if they dont break my game and i can not avoid them. since if feel they have more a warning status then a "things gone horrible wrong" vibe, like the red ones. at least that is usally the impression i'm getting from these.

for the error, no clue really. your guess is as good as mine ;)

so this is just a shot in the dark: but i assume all things that appear will get an number. so the thing_steel/woodlog would be some random ressouce lying around. why these would be destroyed or not found i'm not sure. since there is the hint with load, the game could maybe not find the referenced item again. so it could be just a random load warning/error. maybe ressouces were droped on a full stack and then they usally move to a near free tile. so could be something went wrong there. maybe when you spawn the random ressouces spawned in places you could not get to (wall or ruins spawned over them?).

ajaviide

Thx sulusdacor for help!

Would not  managed it without your support and help.
Updated to 16 quite easily. Had to change only one line.

My girlfriend promised to make me new vector graphics for bordercollie on her Christmas brake.I hope she does not forget :)
I might release this mod after she does it but no ETA.

Was quite educational experience, might try to do some more later :)