[Modding Question] Prisoner Punishments

Discussion about Mods for Prison Architect

Moderator: NBJeff

JASPer.Gamer.9.0
level3
level3
Posts: 380
Joined: Fri Sep 06, 2013 12:29 am

[Modding Question] Prisoner Punishments

Postby JASPer.Gamer.9.0 » Tue Oct 27, 2015 2:24 am

Is it possible to punish a prisoner using lua?

For example, would .punishment work?

Jasper
User avatar
aubergine18
level2
level2
Posts: 231
Joined: Sun Jul 05, 2015 3:24 pm

Re: [Modding Question] Prisoner Punishments

Postby aubergine18 » Tue Oct 27, 2015 4:11 am

Not in the usual sense; punishments can only be applied via prison policies set by end user.

However, you could potentially alter their .StatusEffects eg. to make them more suppressed or tazed.
JASPer.Gamer.9.0
level3
level3
Posts: 380
Joined: Fri Sep 06, 2013 12:29 am

Re: [Modding Question] Prisoner Punishments

Postby JASPer.Gamer.9.0 » Tue Oct 27, 2015 5:43 am

aubergine18 wrote:Not in the usual sense; punishments can only be applied via prison policies set by end user.

However, you could potentially alter their .StatusEffects eg. to make them more suppressed or tazed.

Oh. What about making them shackled?
.shackled is referenced in GitHub wiki, but setting it to 1 has no effect :(.

Jasper

EDIT: Also, do you know about .misbehaviour and what types can be applied?
User avatar
Brento666
level3
level3
Posts: 290
Joined: Wed Sep 02, 2015 9:23 pm

Re: [Modding Question] Prisoner Punishments

Postby Brento666 » Tue Oct 27, 2015 2:50 pm

Hey Jasper & Aubergine!

Havent gotten around to test misbehavior myself, but I've seen a riot mod out there which sets it on bunches of prisoners at a time...to get a riot (I think);
it's hoosdatguy's "Total Chaos" mod.. It also has interesting scripts setting equipment (and like I said, some others setting behavior)!

I have dl'd it and looked at scripts, but not tried the mod in a prison yet... but I imagine setting a single prisoners behavior to something 'bad' will get your guards in the area to respond and punish him!

Please let us know if you get something working, as punishment from script could be a good tool in all our toolboxes!!
User avatar
aubergine18
level2
level2
Posts: 231
Joined: Sun Jul 05, 2015 3:24 pm

Re: [Modding Question] Prisoner Punishments

Postby aubergine18 » Tue Oct 27, 2015 3:14 pm

.Shackled and many other properties are broken; their setter methods don't work.

Misbehavior property ( edit )
This property seems specific to Prisoner objects and defines how they are currently misbehaving.

When getting the value, it's either nil (if no misbehavior) or a string defining how the prisoner is misbehaving:

"Escaping"
"Spoiling"
"Rioting"

When setting the value, a numeric id must be used:

1. "Spoiling"
2. "Escaping"
3. "Destroying"
4. Seems to be a random mix of fighting, spoiling, and destroying
5. Also seems to be a mix of fighting, spoiling, and destroying
6. "Rioting"
7. Hostage Taking (they don't actually take hostages since this isn't implemented yet)
8. (Prisoners put their hands in fighting position but no misbehavior status is shown, they do not commit any acts of violence, but guards still attack them and they fight back)

A value of 0 likely clears any misbehavior. Anything 8 and higher does the same as 8.
User avatar
aubergine18
level2
level2
Posts: 231
Joined: Sun Jul 05, 2015 3:24 pm

Re: [Modding Question] Prisoner Punishments

Postby aubergine18 » Tue Oct 27, 2015 3:27 pm

If you're doing experimentations with .Misbehaviour, see if you can work out what the string values for 4, 5, 7 and 8 are.

Also, I've updated the github wiki with all the information I currently have about the property.

Another thing to look out for would be jobs when a guard is escorting a prisoner to solitary, etc. You can usually get some idea by looking at saves. If the job is simple format (ie. no additional properties that we're unable to pass in via lua script) then it might be possible to simply create jobs on prisoners to get certain things to happen.
JASPer.Gamer.9.0
level3
level3
Posts: 380
Joined: Fri Sep 06, 2013 12:29 am

Re: [Modding Question] Prisoner Punishments

Postby JASPer.Gamer.9.0 » Wed Oct 28, 2015 10:06 am

aubergine18 wrote:.Shackled and many other properties are broken; their setter methods don't work.

Misbehavior property ( edit )
This property seems specific to Prisoner objects and defines how they are currently misbehaving.

When getting the value, it's either nil (if no misbehavior) or a string defining how the prisoner is misbehaving:

"Escaping"
"Spoiling"
"Rioting"

When setting the value, a numeric id must be used:

1. "Spoiling"
2. "Escaping"
3. "Destroying"
4. Seems to be a random mix of fighting, spoiling, and destroying
5. Also seems to be a mix of fighting, spoiling, and destroying
6. "Rioting"
7. Hostage Taking (they don't actually take hostages since this isn't implemented yet)
8. (Prisoners put their hands in fighting position but no misbehavior status is shown, they do not commit any acts of violence, but guards still attack them and they fight back)

A value of 0 likely clears any misbehavior. Anything 8 and higher does the same as 8.

I tried using a script to set it to 2 (Escaping), but nothing happens.

Jasper

Return to “Modding”

Who is online

Users browsing this forum: No registered users and 6 guests