[A14][WIP] Prisoners & Slaves - Testing Release

Started by 1000101, June 19, 2016, 10:55:59 AM

Previous topic - Next topic

Codexehow

#60
Very slow (I know you've addressed this :P) but def one of the most significant mods to date. I can't wait to play an optimized release!

I have 8 gigs ram on this system if that helps. 3x speed is not choppy (starting with 4 colonists), but it isn't smooth either. Right on the edge of unplayable.

hendrikpfaff

Looks Great! Can't wait to play with it after the mod is no longer WIP.

Wisq

Working great!  A few issues:

1: One of my colonists did the pyromaniac thing, and the warden went and arrested him, took him to his room, and locked the door.  (Nifty!)  He went to bed and came out of the pyromania, so I unlocked the door, but now every time he leaves the room, the warden comes and drags him back.

2: When the warden drags him back, unless he needs to sleep, he makes a beeline for the door and leaves the room before the warden does, triggering an infinite loop of arrest-escape-arrest-escape.  (I guess it didn't expect me to manually unlock the door?)

3: After #2 (and after my attempts to draft the pyromaniac and/or the warden to solve this deadlock), the warden will often just stand still, with his activity listed as "standing".  He also doesn't seem to lock the door any more after the first time.

4: Also, the room is shared between the pyromaniac and his girlfriend, so locking him in is a bit awkward.  Prison might be better, or forcibly de-sharing the bed.

I'm guessing #1 is known and expected at this point, since you mention that the warden enforces laws, but releasing after sentence served isn't implemented yet, nor is the "Law" tab.

JT

#63
I've got a pretty large modset so I'll have to do a lot more debugging to find out if it's caused by one of those, but I receive the following error anytime I try to Release a prisoner from a hastily-built single-room "prison" with a locked door:

Shepherd threw exception in WorkGiver ReleasePrisoner: System.NullReferenceException: Object reference not set to an instance of an object
  at PrisonersAndSlaves.WorkGiver_Warden_ReleasePrisoner.JobOnThing (Verse.Pawn pawn, Verse.Thing t) [0x00000] in <filename unknown>:0
  at RimWorld.WorkGiver_Scanner.HasJobOnThing (Verse.Pawn pawn, Verse.Thing t) [0x00000] in <filename unknown>:0
  at RimWorld.JobGiver_Work+<TryGiveJob>c__AnonStorey22A.<>m__121 (Verse.Thing t) [0x00000] in <filename unknown>:0
  at Verse.GenClosest+<ClosestThingReachable>c__AnonStorey440.<>m__7F6 (Verse.Thing t) [0x00000] in <filename unknown>:0
  at Verse.GenClosest.ClosestThing_Global (IntVec3 center, IEnumerable searchSet, Single maxDistance, System.Predicate`1 validator) [0x00000] in <filename unknown>:0
  at Verse.GenClosest.ClosestThingReachable (IntVec3 root, ThingRequest thingReq, PathEndMode peMode, TraverseParms traverseParams, Single maxDistance, System.Predicate`1 validator, IEnumerable`1 customGlobalSearchSet, Int32 searchRegionsMax, Boolean forceGlobalSearch) [0x00000] in <filename unknown>:0
  at RimWorld.JobGiver_Work.TryGiveJob (Verse.Pawn pawn) [0x00000] in <filename unknown>:0

(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

[edit]Naturally, as is usually the case when I want to be helpful by posting a screenshot, my colony is in the middle of an eclipse with the darker nights mod... I'll post a screenshot as soon as conditions improve. ;-)

[edit2] https://dl.dropboxusercontent.com/u/58871752/Rimworld/PrisonerSituation.jpg

If it helps, the attacker was spawned from the "chased colonist" scenario, and I had set chatting on the prisoner before setting it to release, although I don't see how that will affect anything.  I haven't manually set a warden (I'm not sure it's possible to do so).  The Hot Box is marked for Prisoners allowed and Slaves disallowed.  The bed is my pallet mod and is marked as a prisoner bed.  The embrasure is there in case of... bad behaviour. ;-)  Grunka lunka dunkety d'armed guards...

[edit3] Misunderstood the "locked" designation... it's basically a cosmetic rename of the forbidden door?  Anyway, the same error pops up when the door is unlocked.

[edit4] Wait... when you mentioned that releasing drunks after being in the drunk tank isn't implemented, did that also apply to prisoners in general?  If so, carry on then. =P

JT

More feedback: It's only a logic error rather than anything crashy, but when someone suffers a mental break, they will be locked in their "bedroom"... which, if their bedroom just so happens to be a shared bedroom which just so happens to be the entrance to your underground base, means that their arrest will cause the complete lockdown of your facility.  You can manually flick the doors back to unlocked, waiting for someone to come unlock them, but your diligent self-appointed warden will automatically bring them back to "their" room, even when their illness has long since passed, until the many thousands of ticks have run out their course. =)

I'd suggest 1) a periodic timer that checks to see if their mental break is over, and if so, automatically cancels their house arrest, and of course 2) only allows house arrest in the first place if their bedroom contains no other beds.

There's one edge case that's hard to handle, and that's what to do if there's a shared bed in that room (i.e., lover or spouse): I would lean towards disallowing house arrest in that case, but it might be possible to give the spouse passthrough access while still preventing the ill person from leaving, which would be ideal.

1000101

Thanks for the feedback guys.  :)

Status update of development (as of a month ago which is the last time I worked on it, real life getting in the way, other mods, more excuses :P )...


  • Began work on Lord drivers for prison escapes and dealing with locked doors as well as restraints
  • Wardens will release prisoners after their arrest period is up
  • Per-door allowances for wardens and doctors to override other restrictions
  • Some bug fixes to certain toils and job drivers

Some clarifications regarding the last couple posts regarding locking:

Locking is different from forbidding.  Doors can be forbidden which pawns in mental states, etc will simply ignore.  Locking is a physical, mechanical lock which no pawn can pass through (except wardens, doctors, and drafted colonists as it is assumed they unlock-relock the door).

Further, unless a door is locked, anybody and anything can pass through it.  This means hostile invaders will simply open the door and walk through it as there is nothing there to stop them.  If the door is physically locked, however, then they must either pick the lock (prisoners/slaves) or bash the door down (prisoners/slaves/raiders).  This is where you will want auto-doors for the exterior of your colony and a warden monitoring a security station as they will remotely lock all auto-doors in the room (or outside) where a hostile is spotted as well as auto-designate regular doors to be locked.  Once the threat has passed, they will then remotely unlock the auto-doors and designate regular doors to be unlocked.
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

skellitor301

Oh neat, I like how in depth the warden works. I can't wait to try this mod out :)

Pokk720

Man I am so excited for this mod. I downloaded the pre-release to try it out and it's just as amazing as it sounds. I didn't put in the time to set up a real functional prison and figure out all the features though because of compatibility issues with my countless other mods and also the optimization thing but other than that it worked just about how I expected it to. When it's finished or at least playable it will add much needed complexity to not only the prison system but also the security system with your newest update. Having to manually lock exterior doors to prevent raiders just walking in sounds fun but I wonder about visitors.

JT

Quote from: 1000101 on August 16, 2016, 04:31:35 AM
Locking is different from forbidding.  Doors can be forbidden which pawns in mental states, etc will simply ignore.  Locking is a physical, mechanical lock which no pawn can pass through (except wardens, doctors, and drafted colonists as it is assumed they unlock-relock the door).

Further, unless a door is locked, anybody and anything can pass through it.  This means hostile invaders will simply open the door and walk through it as there is nothing there to stop them.  If the door is physically locked, however, then they must either pick the lock (prisoners/slaves) or bash the door down (prisoners/slaves/raiders).  This is where you will want auto-doors for the exterior of your colony and a warden monitoring a security station as they will remotely lock all auto-doors in the room (or outside) where a hostile is spotted as well as auto-designate regular doors to be locked.  Once the threat has passed, they will then remotely unlock the auto-doors and designate regular doors to be unlocked.

Oho, neat... way more sophisticated than I originally thought. =)

This falls under your plans for 're-evaluating conditions for escape' thing, obviously, but that makes it even funnier that the prisoners don't escape immediately when the doors are unlocked.  Sort of like, "Man, there's no way they'd be stupid enough not to lock my door.  I'm not going to try it because I'll just feel stupid." ;-)

gamedesign69

Man- this is absolutely amazing. It really hammers home just how powerful modding can be. Thank you for putting in the time and effort.

Miky2911

I ensalved a prisoner but he dont work... how i make him work?

Snaebjorn

Ok, so, I didn't read every post here, but I checked first 2 of them and they're the most important, right?

I have an idea for one thing in your mod.

Basically - ability to choose meals just like we can choose healthcare. I want to choose between no food, raw food, simple meals, etc. Also - maybe it is possible to even choose allowed ingredients? I mean - all those nasty bandits don't really deserve real food. I want to give them human meat to eat. I don't care if they like it or not. Sadly, I can't do that and I'm wasting my precious food on them.

drakemasta

#72
had a few problems tho i think most of them are cross mod compatability seems like a great mod and its got awesome additions to the game.

but i got spammed by an error after a prison break. managed to grab a screenie before i quit if you wanna check it out.


http://steamcommunity.com/sharedfiles/filedetails/?id=750366771

Mudder

So, I'm into this mod.

However I only really want the slave aspects rather than the warden jailing my regular colonists. Can there be a separate module for this or some other easier way for me to cherry-pick features without going in and re-writing your code?
I'm a freelance programmer/web developer that spends way too much time here rather than making money.

1000101

@drakemasta

I'm still working on that particular aspect of the code.  Remember, this is a WIP which will have bugs and prison breaks are not yet covered in the WIP which you are using.  ;)

@Mudder

That would fall under the list of things which have already been mentioned in the TODO in the original post.
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By