[1.1] Prison Labor

Started by Avius, July 16, 2017, 09:17:10 PM

Previous topic - Next topic

Avius

Quote from: minakurafto on January 24, 2018, 10:13:55 PM
since prisoner can go out if it the door is unlocked ,it seems take prisoner to bed job is not always available.
but sometime i open the door and the prisoner going out and working on far away hauling job, but i cant take prisoner to bed since so i'm forced to arrest then it will berserk and causing  unnnecesary damage.
is there any workaround to relocate prisoner easily ? (other than set the work time table to sleep because it too slow for chained pawn to walk)
You can lock the door temporarily

Avius

Quote from: Kori on January 31, 2018, 02:49:09 AM
On github you've added a note that you require the source code for Cleaning Area compatibility. Does that mean that it's not going to happen?
Sorry if that question is a bit stupid..  ;D

Quote from: Nightinggale on February 01, 2018, 11:05:20 PMConsidering that ILSpy can read not only vanilla assemblies, but also mod assemblies, lack of access to a mod source code shouldn't be an issue. Sure it will be easier to get the pre-compiled files (with comments!), but the mod dll file alone should be enough to fix incompatibility issues if that is what you got to work with.

Actually ILSpy has its limitations. It cannot reverse injected delegates, and that's the part where I need to look. Problem is that author of this mod implemented into delegate a "security condition" that will break and stop a cleaning activity if cleaner is a prisoner. He can just remove that condition which is kinda stupid, because it includes only a case when some pawn will magically become prisoner while performing some dust cleaning.

I use ILSpy very often to make mods compatible, and sometimes I go even further and reading code in CIL language. But at this case I just can't do anything, and if somebody feels good enough to prove me wrong, feel free to make fix by yourself and make a pull request, I'm always open to any form of help.

Kori

#47
Hello Avius,
I let my (forced to work) prisoners wander around freely in my base (using your Locks mod), doing cleaning and some crafting tasks which works great! One of them even formed a romantic relationship with one of my colonists, both having 100 for each other and want to marry soon!

One thing I have noticed though is that they sometimes just eat forbidden food, while other food that is not forbidden is available nearby. The Gets Food option is deactivated for them because they can take food from the same places where my colonists get it (which they usually do except for these rare occasions when they just steal forbidden stuff).
Could you please have a look at that? :)

Avius

Hey Kori,

Prisoner doesn't "see" what's forbidden or what's not. It's vanilla mechanics. I could make prisoners to respect that, but it needs some hours spend and I'm wondering if that's should be a thing? If you think about it, prisoners shouldn't respect this just because some enemy said he shouldn't touch that.

My mod reveals lot of not visible mechanics of vanilla RimWorld, and if you look in the code it really looks like author (Tynan, or some other programmer) placed those limitations intentionally.

Currently I'm thinking about making a chance that prisoner will "steal" some stuff, and eventually making it optional in  settings menu. What do you think about that?

Kori

#49
Hey Avius! :)

QuoteIf you think about it, prisoners shouldn't respect this just because some enemy said he shouldn't touch that.

Yes, I understand your point and in vanilla that seems reasonable, but with Prison Labor I get situations like this:

Hey Prisoner... - "Yeah?"

-clean the armory containing enough weapons to wipe out the whole Rimworld! - "Okay!"
-can you also craft some ammo later? - "Consider it done!"
-and repair that fusion generator, where one wrong step can blow up my whole base. - "Sure, no big deal!"
...
-oh and please don't eat these apples I need for some pies later, I got a bunch of lavish meals for you in the other room! - "NO WAY, I WON'T LET YOU TELL ME WHAT TO DO!"

See? ;) I know that many players keep their prisoners like slaves or for organ harvesting, but what I enjoy a lot when playing with your mods is that I can let them live among my colonists relatively freely, and when they even start to develop individual relationships to them, no matter if love or hate, these are those "omg this is so much better than vanilla!"-moments!
So the only thing that is a bit annoying is that they don't respect the forbidden-setting. :-\

Your idea with the optional "stealing" where they don't just ignore a plain game mechanic but instead steal different things (forbidden or not) on purpose, maybe depending on their long-term mood that depends on how you treat them (like revolts), sounds absolutely amazing! I would like that a lot! :)
It would add even more RP elements to the game, but it would also require that they respect the forbidden setting as long as they aren't stealing?


Speaking of RP, one of my prisoners fell in love with one of my colonists and I already got the message that they are going to marry soon. The problem is, that even if she gets a permanent mood debuff because she can't share a room with her fiancé, I just can't convince her to join my colony. So I wondered if it would be possible that in such or similar circumstances the difficulty for recruiting could drop a lot, because that would make much more sense?

Or even better: Add a chance for prisoners to ask if they can join your colony, the same way it works with refugees right now? I think it would make a lot of sense when a prisoner who gets really close to your colonists or enjoys his or her "stay" a lot, eventually wants to join your colony on his own initiative before you decide to release and send them back to that dirty cave where they came from.
But that's just an idea.

What do you think?

Nightinggale

Quote from: Kori on February 02, 2018, 02:39:54 PM-clean the armory containing enough weapons to wipe out the whole Rimworld! - "Okay!"
I did something like that and then at some point the prisoners decided to flee. The first thing they did was to arm themselves and then my colonists were outnumbered and outgunned, mainly due to their ability to seek out my colonists one or two at a time. That didn't end well.

Quote from: Kori on February 02, 2018, 02:39:54 PMOr even better: Add a chance for prisoners to ask if they can join your colony, the same way it works with refugees right now? I think it would make a lot of sense when a prisoner who gets really close to your colonists or enjoys his or her "stay" a lot, eventually wants to join your colony on his own initiative before you decide to release and send them back to that dirty cave where they came from.
I like the sound of this. Currently I tend to release all tribal captives because even if I would like them to join, the around 1% chance of recruitment makes it sort of pointless. Now if they can get nice rooms with the right temperature, lavish meals, entertainment etc and be recruited that way, then it might actually be possible to recruit those people. They might want to join even more if you treat their conditions, particularly chronic illnesses they had prior to attacking. Imagine having a tumor and you know it's the end in your tribal village, but some strangers removed it. You would love them for doing so.
ModCheck - boost your patch loading times and include patchmods in your main mod.

Kori

#51
Quote from: Nightinggale on February 02, 2018, 02:53:53 PM
I like the sound of this. Currently I tend to release all tribal captives because even if I would like them to join, the around 1% chance of recruitment makes it sort of pointless. Now if they can get nice rooms with the right temperature, lavish meals, entertainment etc and be recruited that way, then it might actually be possible to recruit those people. They might want to join even more if you treat their conditions, particularly chronic illnesses they had prior to attacking. Imagine having a tumor and you know it's the end in your tribal village, but some strangers removed it. You would love them for doing so.

Absolutely! I think there are many players who care a lot about their prisoners and really try to make them feel comfortable and happy, and this would be a great achievement to aim for! It would be their way to show their appreciation or gratitude for your efforts! Right now all we can do is imagine that they might be thankful for building them nice and shiny rooms instead of letting them sleep in a shoddy pit.

Kori

I noticed that when being forced to work, my prisoners almost never use the bathroom from Dub's Hygiene mod anymore, even when they don't have anything to do or free time and the bathroom is right next to their room and unlocked or open.
As far as I remember, it was working great in A17 after you have added compatibility for this mod. Could you please have a look if there was a small change in B18 that broke it again?

Also could you please tell me the radius for FTW prisoners to find a table when getting something to eat on their own?

Thank you! :)

Harry_Dicks

Quote from: Kori on February 05, 2018, 01:14:48 PM
Also could you please tell me the radius for FTW prisoners to find a table when getting something to eat on their own?

I'm not sure what "FTW prisoners" are, but about your question for tables: I am not 100% sure of the default radius, isn't it only like 15 cells or something small? I am using the mod that allows you to change the radius that tables have for pawns detecting them to use them to eat at. I've got mine up to 55 I believe. It's called Table Diner Configuration or something like that, you can change the radius tables have in your mod options with it. I would think it should work for prisoners too.

Avius

#54
Quote from: Harry_Dicks on February 05, 2018, 06:24:14 PM
Quote from: Kori on February 05, 2018, 01:14:48 PM
Also could you please tell me the radius for FTW prisoners to find a table when getting something to eat on their own?

I'm not sure what "FTW prisoners" are, but about your question for tables: I am not 100% sure of the default radius, isn't it only like 15 cells or something small? I am using the mod that allows you to change the radius that tables have for pawns detecting them to use them to eat at. I've got mine up to 55 I believe. It's called Table Diner Configuration or something like that, you can change the radius tables have in your mod options with it. I would think it should work for prisoners too.
Thank you for reporting. I think Dubs just changed priorities to lower so labor is now on higher priority i suppose

About finding meal i think it is 30 or 100 (for colonists) tiles.
Found this peace of code from vanilla library.

int searchRegionsMax = 30;
if (<BestFoodSourceOnMap>c__AnonStorey.getter.Faction == Faction.OfPlayer)
{
searchRegionsMax = 100;
}


EDIT: I've actually misunderstood your question. I believe it is 10 in real distance, but it's debugger hidden unfortunately.

EDIT2: Maybe when I'm back at coding I'll make some quick debugging to find out (1/2 weeks ahead)

Kori

#55
Quote from: Harry_Dicks on February 05, 2018, 06:24:14 PM
I'm not sure what "FTW prisoners" are..

Forced to work, the option that this mod adds.  :D  (so no, nothing to win for them)

Quote from: Harry_Dicks on February 05, 2018, 06:24:14 PM
...but about your question for tables: I am not 100% sure of the default radius, isn't it only like 15 cells or something small? I am using the mod that allows you to change the radius that tables have for pawns detecting them to use them to eat at. I've got mine up to 55 I believe. It's called Table Diner Configuration or something like that, you can change the radius tables have in your mod options with it. I would think it should work for prisoners too.

Thanks, I'm using this mod already! It's just that my FTW prisoners don't want to use tables..


Quote from: Avius on February 05, 2018, 07:27:47 PM
Thank you for reporting. I think Dubs just changed priorities to lower so labor is now on higher priority i suppose

About finding meal i think it is 30 or 100 (for colonists) tiles.
Found this peace of code from vanilla library.

int searchRegionsMax = 30;
if (<BestFoodSourceOnMap>c__AnonStorey.getter.Faction == Faction.OfPlayer)
{
searchRegionsMax = 100;
}


EDIT: I've actually misunderstood your question. I believe it is 10 in real distance, but it's debugger hidden unfortunately.

EDIT2: Maybe when I'm back at coding I'll make some quick debugging to find out (1/2 weeks ahead)

About the Hygiene mod, I'm glad that this will be an easy fix (at least it sounds like an easy one.. :D ).

About the table distance: That's weird. My colonists and prisoners all take their food from the very same shelf, with the next dining table being only 6 tiles away. While my colonists use the table, my prisoners always eat their meals right on the spot and get the debuff.
I am not 100% sure, but I think that only happens when they eat during their Anything/ Work time while being set to FTW, because when they have food in their room and eat during their Sleep time, they will use their table (that is only two tiles away).

Or maybe the difference is whether it is food that was delivered to their room or food they got themselves because of being hungry? I will do a few more tests!

EDIT: After running a few tests with different settings I can confirm that the difference is whether the dining table is in their own room or not. Even when it is right in front of their room (5 tiles away) with the door being unlocked they won't use it anymore and instead devour the good stuff I give them like some filthy savages.  :'(

Kori

I rescued some people from a crashed ship event and noticed they are in restraints. The tooltip in their healthtab says that they are affected by prisoners chains.
They are definitely guests, not prisoners.

Are there any updates about your Prison Extensions mod yet, that will allow them to use joy objects? If you need people to test it, I'd like to help. :)

Avius

Quote from: Kori on February 10, 2018, 05:19:29 AM
I rescued some people from a crashed ship event and noticed they are in restraints. The tooltip in their healthtab says that they are affected by prisoners chains.
They are definitely guests, not prisoners.

Are there any updates about your Prison Extensions mod yet, that will allow them to use joy objects? If you need people to test it, I'd like to help. :)

Prisoners chains are affecting only those pawns that are affected by vanila mechanics. So when "in restraints" label is not always visible, pawns will be slowed anyway even without Prison Labor mod. Prison Labor mod only shows this debuf as hediff, and adjuat some values of this slow (reducing manipulation as well)

About Prison Expansion mod I need to sadly say that there is A LOT to do, and I haven't done mych work yet on it. I need some free time and spark for programming to get this working. I'm sorry to say that, but I had very rough time last few months.

Harry_Dicks

Quote from: Avius on February 11, 2018, 02:58:03 AM
I'm sorry to say that, but I had very rough time last few months.

Hey man, tell me about it. Remember though that you do not owe anyone an apology for this. Life happens, and there' s always going to be something you didn't plan for. Either way, I hope you're doing better now, and I look forward to all of your future updates ;)

Kori

#59
Okay, I already suspected that it might be vanilla behavior, but wanted to report it anyway just in case. :)

Quote from: Avius on February 11, 2018, 02:58:03 AM
I'm sorry to say that, but I had very rough time last few months.

No, you don't have to be sorry, the real world is much more important than the Rimworld! I hope that whatever troubles you will be okay very soon.