[1.3.0] Hospitality

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

Previous topic - Next topic

Orion

Guess I should play more with the latest version, haha.

I'll make sure animal beds won't count anymore. Excluding the warehouse will be harder - due to all the valuable stuff lying around, it can make for a very impressive room, which the visitors really like. Usually lack of beauty should counter it, but that depends on what you're storing, of course.

So yeah. I really need something that marks a room as a visitor room.

NuclearStudent

Quote from: Orion on September 30, 2015, 09:51:50 AM

It's true, and something like it is on the feature list for some time already. How about an object you can place that will increase visitor popularity for the particular spot/room?

Right now I have an algorithm that determines the most suitable room for the visitors, with their preference being large rooms, with lots of unassigned beds. I could (fairly easily) add a new object type that raises a room's suitability for visitors. Do you have an idea what such an object could be to fit the theme of RimWorld? Maybe something it would make sense to have multiple of. Something that would logically improve the quality of the visitors' stay. Something that players would intuitively associate with visitors.


Maybe a guest keycard holder? Graphic being a cabinet with a key on top. It's not an artistic solution, but it would do the job cheaply until something better is thought up.

Shadou

#317
In one of my games, I had an issue that I think I've tracked down to this mod. Colonists would perform actions they were incapable of. In particular, I had one colonist that was incapable of caring (no medicine skill), who seemed to have priority set to 1 on Doctoring even though he could not perform it and could not be given a Doctoring priority. It literally was the first thing he did when anyone got hurt, even though the work screen would not allow him to be given doctoring as a job. I had to draft him anytime I wanted to have any surgery done, so he wouldn't try to do it and maim the patient.

My current game, the only differences in my mod list from the game when I was having the issue are:
Added Edb's mod order
Added Edb's interface
Added Ykara's Expanded Prosthetics and Organ Engineering mod
Added Brunayla's Embrasures
Added Brunayla's Neurotrainer crafting
Removed Brunayla's bionic replacement production
Removed Brunayla's organ replacement production
Removed Hospitality

I really don't think any of the other mods I added or removed could be the cause or solution to this. I like the mod, but this is a rather potentially game-breaking bug. Please fix.

Edit: Just thought of something that might be a possible conflict. I have Wastelander's Mending mod installed, which adds a Mending job to the work list. By itself, Mending doesn't cause any issues, but with two mods messing with the priority list it may be a problem.

Orion


NuclearStudent

#319
EDIT: Never mind, I was loading a save incorrectly.

Something that isn't at all important, but I thought was mildly interesting.


Something that is now frustrating me.

I'm having difficulty with adding Hospitality into an already existing game. I have Rimworld version xxx906 and an outdated version of the Ultimate Mod Pack from the late Ninefinger. When I add Hospitality, load it in via the mod menu, and open up my save file, I get a black screen and see only the dev tools buttons on the top. The dev tool buttons do nothing when I click them.

Alright, so I figured my kludge of mods was incompatible. To test things out, I started a new world with Hospitality enabled and made a test colony. To my surprise, everything was bugfree.

I suspect the issue may have been that I was trying to load up a game with dev tools up, as the technobabble the error output log was saying something about something in unity engine missing or something.

I'm getting an endless loop of

(Filename:  Line: -1)

NullReferenceException: Object reference not set to an instance of an object
  at Verse.Find.get_WeatherManager () [0x00000] in <filename unknown>:0

  at Verse.CameraMap.OnPreCull () [0x00000] in <filename unknown>:0

(Filename:  Line: -1)

NullReferenceException: Object reference not set to an instance of an object
  at Verse.ThingOverlays.ThingOverlaysOnGUI () [0x00000] in <filename unknown>:0

  at RimWorld.UIRoot_Map.UIRootOnGUI () [0x00000] in <filename unknown>:0

  at Verse.Root.OnGUI () [0x00000] in <filename unknown>:0

(Filename:  Line: -1)

NullReferenceException: Object reference not set to an instance of an object
  at Verse.ThingOverlays.ThingOverlaysOnGUI () [0x00000] in <filename unknown>:0

  at RimWorld.UIRoot_Map.UIRootOnGUI () [0x00000] in <filename unknown>:0

  at Verse.Root.OnGUI () [0x00000] in <filename unknown>:0

(Filename:  Line: -1)

Exception in UIRootUpdate: System.NullReferenceException: Object reference not set to an instance of an object

  at Verse.Find.get_PlaySettings () [0x00000] in <filename unknown>:0

  at Verse.RoomStatsDrawer.get_ShouldShowRoomStats () [0x00000] in <filename unknown>:0

  at Verse.RoomStatsDrawer.DrawRoomOverlays () [0x00000] in <filename unknown>:0

  at RimWorld.UIRoot_Map.UIRootUpdate () [0x00000] in <filename unknown>:0

(Filename: C:/buildslave/unity/build/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56)

NullReferenceException: Object reference not set to an instance of an object
  at Verse.Find.get_WeatherManager () [0x00000] in <filename unknown>:0

  at Verse.SkyManager.CurrentSkyTarget () [0x00000] in <filename unknown>:0

  at Verse.SkyManager.SkyManagerUpdate () [0x00000] in <filename unknown>:0

  at Verse.RootMap.Update () [0x00000] in <filename unknown>:0

(Filename:  Line: -1)

NullReferenceException: Object reference not set to an instance of an object
  at Verse.CameraMap.Update () [0x00000] in <filename unknown>:0

(Filename:  Line: -1)

NullReferenceException: Object reference not set to an instance of an object
  at Verse.Find.get_WeatherManager () [0x00000] in <filename unknown>:0

  at Verse.CameraMap.OnPreCull () [0x00000] in <filename unknown>:0

(Filename:  Line: -1)

NullReferenceException: Object reference not set to an instance of an object
  at Verse.ThingOverlays.ThingOverlaysOnGUI () [0x00000] in <filename unknown>:0

  at RimWorld.UIRoot_Map.UIRootOnGUI () [0x00000] in <filename unknown>:0

  at Verse.Root.OnGUI () [0x00000] in <filename unknown>:0

(Filename:  Line: -1)

NullReferenceException: Object reference not set to an instance of an object
  at Verse.ThingOverlays.ThingOverlaysOnGUI () [0x00000] in <filename unknown>:0

  at RimWorld.UIRoot_Map.UIRootOnGUI () [0x00000] in <filename unknown>:0

  at Verse.Root.OnGUI () [0x00000] in <filename unknown>:0

(Filename:  Line: -1)

Exception in UIRootUpdate: System.NullReferenceException: Object reference not set to an instance of an object

  at Verse.Find.get_PlaySettings () [0x00000] in <filename unknown>:0

  at Verse.RoomStatsDrawer.get_ShouldShowRoomStats () [0x00000] in <filename unknown>:0

  at Verse.RoomStatsDrawer.DrawRoomOverlays () [0x00000] in <filename unknown>:0

  at RimWorld.UIRoot_Map.UIRootUpdate () [0x00000] in <filename unknown>:0

and similar messages in the output log, and my game now refuses to load my saves even with hospitality disabled and loading saves from before I started messing with anything. I have no idea what I've done.

Orion

NuclearStudent, are you still experiencing this problem? Maybe you can attach the output_log.txt then.
If the screen stays black and you only see some of the buttons, the save game did not load correctly. The errors you get in the console are usually not relevant anymore by then (half of the map is probably not loaded and thus missing). So the interesting errors are the ones you get while the save is being loaded, or even before, when your mods are loaded.

The latest Hospitality was made for version 916. So an older RimWorld version could cause problems. The ultimate mod pack is likely to conflict too. It has so many moving parts, I wouldn't know where to start looking.

NuclearStudent

Quote from: Orion on October 11, 2015, 04:44:50 AM
NuclearStudent, are you still experiencing this problem? Maybe you can attach the output_log.txt then.
If the screen stays black and you only see some of the buttons, the save game did not load correctly. The errors you get in the console are usually not relevant anymore by then (half of the map is probably not loaded and thus missing). So the interesting errors are the ones you get while the save is being loaded, or even before, when your mods are loaded.

The latest Hospitality was made for version 916. So an older RimWorld version could cause problems. The ultimate mod pack is likely to conflict too. It has so many moving parts, I wouldn't know where to start looking.

Weirdly enough, I loaded an earlier auto-save and everything is literally perfect. As in, none of the moving parts are colliding at all. It was just one set of saves that were inexplicably corrupted.

Orion

Sometimes, when you get an error message and save the game afterwards, your save can be corrupted. So when getting errors it's best not to save again.

irotsoma

I'm having some trouble with this mod.  I'm using the latest 1.08 version along with alpha 12d of rimworld. 

It triggers visitors fine, but I can never interact with those visitors.  I tried turning off all other work and the colonist refuse to interact.  They do interact with regular guests and prisoners, but not with visitors from this mod.  Also, when I right click on the visitor, I get no options.  I tried this with a clean install of rimworld and no other mods loaded to be sure it wasn't a conflict. 

I did some digging and found that the method ViableGuestTarget in the GuestUtility class is always returning false for these.  The offending object in the boolean statement seems to be Find.AreaHome[guest.Position].  This is always returning false.  I'm not sure exactly what this is meant to be doing, but to test it, I removed that from the boolean statement and loaded a game.  My colonists immediately started doing their thing, and I could also use the right click on the visitors to force a colonist to interact with the visitor.

I'm not sure if I should remove that object or if I should just remove the ! operator since I'm not sure exactly what this is checking for. I'm going to run it removed for now and see if I have any other problems, but I was wondering if anyone else had this problem and, if so, if this could be addressed in the mod.  Thanks!

Here's my code now with the original commented out for reference.

        public static bool ViableGuestTarget(Pawn guest, bool sleepingIsOk = false)
        {
            return !(guest == null || guest.Dead || guest.Destroyed || (!sleepingIsOk && !guest.Awake()) || !IsGuest(guest) || HasDismissiveThought(guest));
            //return !(guest==null || guest.Dead || guest.Destroyed || (!sleepingIsOk&&!guest.Awake()) || !IsGuest(guest) || !Find.AreaHome[guest.Position] || HasDismissiveThought(guest));
        }


BTW, thanks for an awesome mod.  This is one that I can't live without now.

TLHeart

Quote from: irotsoma on October 27, 2015, 09:13:32 PM
I'm having some trouble with this mod.  I'm using the latest 1.08 version along with alpha 12d of rimworld. 

It triggers visitors fine, but I can never interact with those visitors.  I tried turning off all other work and the colonist refuse to interact.  They do interact with regular guests and prisoners, but not with visitors from this mod.  Also, when I right click on the visitor, I get no options.  I tried this with a clean install of rimworld and no other mods loaded to be sure it wasn't a conflict. 

I did some digging and found that the method ViableGuestTarget in the GuestUtility class is always returning false for these.  The offending object in the boolean statement seems to be Find.AreaHome[guest.Position].  This is always returning false.  I'm not sure exactly what this is meant to be doing, but to test it, I removed that from the boolean statement and loaded a game.  My colonists immediately started doing their thing, and I could also use the right click on the visitors to force a colonist to interact with the visitor.

I'm not sure if I should remove that object or if I should just remove the ! operator since I'm not sure exactly what this is checking for. I'm going to run it removed for now and see if I have any other problems, but I was wondering if anyone else had this problem and, if so, if this could be addressed in the mod.  Thanks!

Here's my code now with the original commented out for reference.

        public static bool ViableGuestTarget(Pawn guest, bool sleepingIsOk = false)
        {
            return !(guest == null || guest.Dead || guest.Destroyed || (!sleepingIsOk && !guest.Awake()) || !IsGuest(guest) || HasDismissiveThought(guest));
            //return !(guest==null || guest.Dead || guest.Destroyed || (!sleepingIsOk&&!guest.Awake()) || !IsGuest(guest) || !Find.AreaHome[guest.Position] || HasDismissiveThought(guest));
        }


BTW, thanks for an awesome mod.  This is one that I can't live without now.
you interact with the visitors by left clicking on the visiting colonists, and then clicking on the guest tab in the pawn inspection window, then select, do you want to leave alone, recruit, or improve relations. You can set the default, for all if you want, you select each visitor and decide how you want to interact with them.

Orion

Quote from: irotsoma on October 27, 2015, 09:13:32 PM
The offending object in the boolean statement seems to be Find.AreaHome[guest.Position].  This is always returning false.  I'm not sure exactly what this is meant to be doing, but to test it, I removed that from the boolean statement and loaded a game.  My colonists immediately started doing their thing, and I could also use the right click on the visitors to force a colonist to interact with the visitor.
What Find.AreaHome[guest.Position] is for is that your colonists will / can not interact with them, while they are not in your home area. Maybe you removed your home area, or they never enter it, etc. Without this, your colonists will run across half the map to follow the visitors around.
So check your home area and make sure when the visitors arrive, that they are in that area.

irotsoma

Quote from: Orion on October 28, 2015, 05:28:33 AM
Quote from: irotsoma on October 27, 2015, 09:13:32 PM
The offending object in the boolean statement seems to be Find.AreaHome[guest.Position].  This is always returning false.  I'm not sure exactly what this is meant to be doing, but to test it, I removed that from the boolean statement and loaded a game.  My colonists immediately started doing their thing, and I could also use the right click on the visitors to force a colonist to interact with the visitor.
What Find.AreaHome[guest.Position] is for is that your colonists will / can not interact with them, while they are not in your home area. Maybe you removed your home area, or they never enter it, etc. Without this, your colonists will run across half the map to follow the visitors around.
So check your home area and make sure when the visitors arrive, that they are in that area.

Awesome, thanks, that explains it.  I wonder why my visitors are hanging out outside of my home area so often? 

Anyway, I tried playing around with it so that you could still force a colonist to go and talk to a visitor.  That worked fine once.  They would go and finish the job, but then they won't initiate the job on their own afterward and instead either go back to a different, lower priority job or just stand around if there are none active.  Maybe I'll play around with some kind of custom state to allow for checking if the previous job was forced by the player, not just the current one or something of that nature.

For now, I think I'll leave mine changed to allow for interaction outside of the home area.  Colonists pick up other jobs outside of the home area, so I think it's fine for me.  If I want them to stay close to home, I usually just restrict them to an area anyway and that seems to work still.

Anyway, thanks for your help, and thanks again for a great mod!

Orion

Maybe you could look into why they're staying outside. I made them pick the most fancy room that is not someone's bedroom. So chances are if you have an enclosed outside area stock-full with gold and uranium that it they would go there. Usually it's not an issue, since other trading items make the room ugly.

Eventually I'll add some form of marker to specify more clearly which room(s) are meant for visitors, but for now this seemed fine for most cases.

Shadou

#328
Quote from: Orion on October 30, 2015, 04:23:11 AM
Maybe you could look into why they're staying outside. I made them pick the most fancy room that is not someone's bedroom.

In one of my games, I had one faction that would always want to hang around in the animals' area, where I have all my animal sleeping boxes, and another faction wanted to hang around in my hospital (and all squeezed into that 6x6 room and complained about how cramped it was). And unless there's been an update, I'm pretty sure this mod is still incompatible with Mending.

Just an idea here: Maybe you could set up weights for objects for visitor preference on where to hang out? Maybe something like:

5 points: Each unclaimed, non-animal, non-hospital, non-prisoner bed
3 points: Each chair
2 points: Small table
4 points: Large table
4 points: Joy object

Have the visitors compare each room and decide which room has the best amenities as listed above, and all gather there. This would allow the player to build a sort of guest room for visitors.

By this point system, a room with a large table with 8 chairs (28 points) would outweigh a hospital with 3 beds (15 points) even if you didn't exclude hospital beds. It still wouldn't outweigh a barn with a dozen doggie beds though (60 points), so I really do think you need to set exclusions for animal, hospital, and prisoner beds, or just exclude room types Jail, Barn, and Hospital.

LanMc

We can assign beds to colonists and prisoners... how difficult would it be to assign beds to "visitors" and "guests" too?  Couldn't it work similar to how the prison assignments happen?  Couldn't the bed assignments create an area, much like the prison beds do, where guests/visitors would be flagged to go?

The game does add Room Roles... but I am not sure how everything connects.  So excluding specific rooms, could work too, I suppose.
Hi, my name is Lan and I am a Rimworld addict...