[1.3.0] Hospitality

Started by Orion, March 13, 2015, 11:19:16 AM

Previous topic - Next topic

Calistyn

I am also getting the same error as Der Failer anytime I run a tribal scenario. The pawns that don't have something to do just stand in place, and that same error he posted crops up.

comlink

Quote from: Der Failer on July 16, 2016, 06:37:47 PM
There seems to be a problem with this mod and the vanilla tribe scenario (the other two same to be fine). This only happens if pawns have noting to do. I've test this with only CCL and Hospitality activ.
Vulture threw exception while determining job (main): System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorld.ThinkNode_ConditionalNeedPercentageAbove.Satisfied (Verse.Pawn pawn) [0x00000] in <filename unknown>:0
  at RimWorld.ThinkNode_Conditional.TryIssueJobPackage (Verse.Pawn pawn) [0x00000] in <filename unknown>:0
  at Verse.AI.ThinkNode_Priority.TryIssueJobPackage (Verse.Pawn pawn) [0x00000] in <filename unknown>:0
  at Verse.AI.ThinkNode_Tagger.TryIssueJobPackage (Verse.Pawn pawn) [0x00000] in <filename unknown>:0
  at Verse.AI.ThinkNode_Priority.TryIssueJobPackage (Verse.Pawn pawn) [0x00000] in <filename unknown>:0
  at RimWorld.ThinkNode_Conditional.TryIssueJobPackage (Verse.Pawn pawn) [0x00000] in <filename unknown>:0
  at Verse.AI.ThinkNode_Priority.TryIssueJobPackage (Verse.Pawn pawn) [0x00000] in <filename unknown>:0
  at Verse.AI.Pawn_JobTracker.DetermineNextJob (Verse.ThinkTreeDef& thinkTree) [0x00000] in <filename unknown>:0  lastJobGiver=


I get the same. It appears to have something to do with Joy actions. I don't see any joy need bars for my tribals, so I assume Hospitality is either breaking Joy for them, or the fact they don't have a joy need is causing the idle actions to fail.

Orion

Quote from: comlink on July 17, 2016, 02:24:38 PM
Quote from: Der Failer on July 16, 2016, 06:37:47 PM
There seems to be a problem with this mod and the vanilla tribe scenario (the other two same to be fine). This only happens if pawns have noting to do. I've test this with only CCL and Hospitality activ.
I get the same. It appears to have something to do with Joy actions. I don't see any joy need bars for my tribals, so I assume Hospitality is either breaking Joy for them, or the fact they don't have a joy need is causing the idle actions to fail.
Thanks for reporting this one, guys! I didn't consider tribals would have any noticeable differences so I haven't tested with them recently. Good catch.

Quote from: Warforyou on July 17, 2016, 10:56:17 AM
Wow, you have to fix recruitment chance or something... My colonists with 12 social skill recruit almost any guest in seconds!  :D
This is on purpose. It used to be that the convincing took a lot of time and effort. Now it does't, but you do give up a lot of reputation each time. And the higher your reputation, the more stuff they bring when they visit. So there's a trade off.

Quote from: DariusWolfe on July 16, 2016, 04:27:27 PM
Is this already on Steam? I haven't gotten a decent setup for guests yet (so they mostly hang out in the wilderness, then thank me for my hospitality) so I can't tell if the changes are already live in my game.
It is! And yes, visitors have pretty low expectations in the beginning. I didn't want them to come, complain about the lack of a personal villa and leave again. Maybe it is a bit too easy, but hey, you can always switch to a higher difficulty ;)

newcadence

How do I increase trust? I can increase hospitality just fine, but not trust.

infinitewarp

I think I've encountered a bug with A14 and the latest version of Hospitality. I only have Core, CCL (no vanilla additions), and Hospitality. I've isolated this issue specifically to having Hospitality enabled.

At first, it just looks like a bunch of spurious errors, but then things get weird when someone dies...

Start a new colony with default "Crashlanded" settings, Cassandra Classic + Challenge, any random seed, any random location, any random characters. When the colonists first pop out of their pods, this exception is raised for each of them (in this case, his name is Matthew) and keeps popping up every second or so:

Exception ticking Matthew: System.NullReferenceException: Object reference not set to an instance of an object
  at Hospitality.GuestUtility.IsGuest (Verse.Pawn pawn) [0x00000] in <filename unknown>:0
  at Hospitality.ThoughtWorker_Expectations.CurrentStateInternal (Verse.Pawn p) [0x00000] in <filename unknown>:0
  at RimWorld.ThoughtWorker.CurrentState (Verse.Pawn p) [0x00000] in <filename unknown>:0
  at RimWorld.SituationalThoughtHandler.TryCreateSituationalThought (RimWorld.ThoughtDef def) [0x00000] in <filename unknown>:0
  at RimWorld.SituationalThoughtHandler.CheckRecalculateSituationalThoughtsAffectingMoodState () [0x00000] in <filename unknown>:0
  at RimWorld.SituationalThoughtHandler.get_SituationalThoughtsAffectingMood () [0x00000] in <filename unknown>:0
  at RimWorld.ThoughtHandler.get_Thoughts () [0x00000] in <filename unknown>:0
  at RimWorld.ThoughtHandler.DistinctThoughtGroups () [0x00000] in <filename unknown>:0
  at RimWorld.ThoughtHandler.TotalMood () [0x00000] in <filename unknown>:0
  at RimWorld.Need_Mood.get_CurInstantLevel () [0x00000] in <filename unknown>:0
  at RimWorld.Need_Seeker.NeedInterval () [0x00000] in <filename unknown>:0
  at RimWorld.Need_Mood.NeedInterval () [0x00000] in <filename unknown>:0
  at RimWorld.Pawn_NeedsTracker.NeedsTrackerTick () [0x00000] in <filename unknown>:0
  at Verse.Pawn.Tick () [0x00000] in <filename unknown>:0
  at Verse.TickList.Tick () [0x00000] in <filename unknown>:0


That's just a minor nuisance since it doesn't seem to affect anything, but then I noticed that any time a human dies, he/she usually (not always, it seems) vanishes from the world instead of leaving a corpse. I first noticed this when my guys were fighting a raid, but then I realized I could reproduce this with the debug tools. Just use the "Tool: Kill" and click on anyone. They vanish and the same exception is raised in a slightly different way:


NullReferenceException: Object reference not set to an instance of an object
  at Hospitality.GuestUtility.IsGuest (Verse.Pawn pawn) [0x00000] in <filename unknown>:0
  at Hospitality.ThoughtWorker_Expectations.CurrentStateInternal (Verse.Pawn p) [0x00000] in <filename unknown>:0
  at RimWorld.ThoughtWorker.CurrentState (Verse.Pawn p) [0x00000] in <filename unknown>:0
  at RimWorld.SituationalThoughtHandler.TryCreateSituationalThought (RimWorld.ThoughtDef def) [0x00000] in <filename unknown>:0
  at RimWorld.SituationalThoughtHandler.CheckRecalculateSituationalThoughtsAffectingMoodState () [0x00000] in <filename unknown>:0
  at RimWorld.SituationalThoughtHandler.get_SituationalThoughtsAffectingMood () [0x00000] in <filename unknown>:0
  at RimWorld.ThoughtHandler.get_Thoughts () [0x00000] in <filename unknown>:0
  at RimWorld.ThoughtHandler.DistinctSocialThoughtGroups (Verse.Pawn otherPawn) [0x00000] in <filename unknown>:0
  at RimWorld.Pawn_RelationsTracker.OpinionOf (Verse.Pawn other) [0x00000] in <filename unknown>:0
  at RimWorld.Pawn_RelationsTracker.Notify_PawnDied (Nullable`1 dinfo) [0x00000] in <filename unknown>:0
  at Verse.Pawn_HealthTracker.PawnKilled (Nullable`1 dinfo, Verse.Hediff hediff) [0x00000] in <filename unknown>:0
  at Verse.Pawn_HealthTracker.CheckForStateChange (Nullable`1 dinfo, Verse.Hediff hediff) [0x00000] in <filename unknown>:0
  at Verse.Pawn_HealthTracker.AddHediff (Verse.Hediff hediff, Verse.BodyPartRecord part, Nullable`1 dinfo) [0x00000] in <filename unknown>:0
  at Verse.DamageWorker_AddInjury.FinalizeAndAddInjury (Verse.Pawn pawn, Verse.Hediff_Injury injury, DamageInfo dinfo, Verse.LocalInjuryResult& result) [0x00000] in <filename unknown>:0
  at Verse.DamageWorker_AddInjury.ApplyDamagePartial (DamageInfo dinfo, Verse.Pawn pawn, Verse.LocalInjuryResult& result) [0x00000] in <filename unknown>:0
  at Verse.DamageWorker_AddInjury.ApplyToPawn (DamageInfo dinfo, Verse.Pawn pawn) [0x00000] in <filename unknown>:0
  at Verse.DamageWorker_AddInjury.Apply (DamageInfo dinfo, Verse.Thing thing) [0x00000] in <filename unknown>:0
  at Verse.Thing.TakeDamage (DamageInfo dinfo) [0x00000] in <filename unknown>:0
  at Verse.HealthUtility.GiveInjuriesToKill (Verse.Pawn p) [0x00000] in <filename unknown>:0
  at Verse.Dialog_DebugActionsMenu.<DoListingItems_GameModeMap>m__704 (Verse.Pawn p) [0x00000] in <filename unknown>:0
  at Verse.Dialog_DebugOptionLister+<DebugToolForPawns>c__AnonStorey3F1.<>m__6BD () [0x00000] in <filename unknown>:0
  at Verse.DebugTool.DebugToolOnGUI () [0x00000] in <filename unknown>:0
  at Verse.DebugTools.DebugToolsOnGUI () [0x00000] in <filename unknown>:0
  at RimWorld.UIRootMap.UIRootOnGUI () [0x00000] in <filename unknown>:0
  at Verse.Root.OnGUI () [0x00000] in <filename unknown>:0


(Also, thanks so much for keeping this mod working!  :D)

Orion

#845
Quote from: newcadence on July 17, 2016, 05:19:03 PM
How do I increase trust? I can increase hospitality just fine, but not trust.
Trust is based on the average the person likes your colonists. So if there's someone who shot their wife, trust will be harder to build, etc. To increase it, have your guys interact with them and make sure they hang out at the same places. The amount of trust required is different per visitor and based on their inbuilt recruitment difficulty (which can be pretty high, especially when you're ahead of the population curve).

The idea here is to make it increasingly harder to get people on board, the bigger your colony is, and in return have less of the pure try and error that recruitment used to be.


Quote from: infinitewarp on July 17, 2016, 06:26:41 PM
I think I've encountered a bug with A14 and the latest version of Hospitality. I only have Core, CCL (no vanilla additions), and Hospitality. I've isolated this issue specifically to having Hospitality enabled.
Thanks for taking the time for drilling down on this! I'm not using CCL myself, so my guess would be that there's the conflict. I couldn't reproduce it without. I'll look into this.

Orion

Changelog
1.14b - 18.07.2016
- fix: playing with tribals caused no joy + error
- fix: IsGuest() error

The worst offenders are fixed now. That should take care of most issues that were reported recently.

harpo99999

orion, the dropbox is still showing a 46 hour old version, have you updated the dropbox yet?

Orion

Silly. Everything updated and set up, but forgot to press build.

LustrousWolf

Some visitors are visiting and them standing still and never leave until downed by malnutrition and I have to rescue them, bug?

Orion

Quote from: LustrousWolf on July 18, 2016, 11:43:05 AM
Some visitors are visiting and them standing still and never leave until downed by malnutrition and I have to rescue them, bug?
Mod conflict. What other mods are you using?

Warforyou

Quote from: Orion on July 18, 2016, 12:59:35 PM
Quote from: LustrousWolf on July 18, 2016, 11:43:05 AM
Some visitors are visiting and them standing still and never leave until downed by malnutrition and I have to rescue them, bug?
Mod conflict. What other mods are you using?

I did have that bug back on alpha13 also!

infinitewarp

#852
Looks like 1.14b still didn't fix the issues around pawns and IsGuest. Following the same steps to reproduce (only Core, latest CCL, and latest Hospitality with new world), these exceptions are still raised constantly for each colonist once he spawns:

Exception ticking Jagerbomb: System.NullReferenceException: Object reference not set to an instance of an object
  at Hospitality.GuestUtility.IsGuest (Verse.Pawn pawn) [0x00000] in <filename unknown>:0
  at Hospitality.ThoughtWorker_Expectations.CurrentStateInternal (Verse.Pawn p) [0x00000] in <filename unknown>:0
  at RimWorld.ThoughtWorker.CurrentState (Verse.Pawn p) [0x00000] in <filename unknown>:0
  at RimWorld.SituationalThoughtHandler.TryCreateSituationalThought (RimWorld.ThoughtDef def) [0x00000] in <filename unknown>:0
  at RimWorld.SituationalThoughtHandler.CheckRecalculateSituationalThoughtsAffectingMoodState () [0x00000] in <filename unknown>:0
  at RimWorld.SituationalThoughtHandler.get_SituationalThoughtsAffectingMood () [0x00000] in <filename unknown>:0
  at RimWorld.ThoughtHandler.get_Thoughts () [0x00000] in <filename unknown>:0
  at RimWorld.ThoughtHandler.DistinctThoughtGroups () [0x00000] in <filename unknown>:0
  at RimWorld.ThoughtHandler.TotalMood () [0x00000] in <filename unknown>:0
  at RimWorld.Need_Mood.get_CurInstantLevel () [0x00000] in <filename unknown>:0
  at RimWorld.Need_Seeker.NeedInterval () [0x00000] in <filename unknown>:0
  at RimWorld.Need_Mood.NeedInterval () [0x00000] in <filename unknown>:0
  at RimWorld.Pawn_NeedsTracker.NeedsTrackerTick () [0x00000] in <filename unknown>:0
  at Verse.Pawn.Tick () [0x00000] in <filename unknown>:0
  at Verse.TickList.Tick () [0x00000] in <filename unknown>:0


I found your fix in the ThoughtWorker_Expectations class:
            if(p==null) return ThoughtState.Inactive;

That certainly looks like it should work...  :-\ Maybe something missed this change in your build process?

Orion

#853
It's quite strange. There isn't really anything left that still could be null. But I did notice that the mod conflicts with CCL. I'll have to see what I can do about this.

I've uploaded a recompile. I don't think it will help, but who knows.

123nick

hey, is it intentional that it is impossible too try too recruit people from escape pods? in the guest tab, it just looks like this: