Using specific doors and materials in rooms

Discussion about Mods for Prison Architect

Moderator: NBJeff

jnrironside
level0
Posts: 5
Joined: Wed Jan 21, 2015 11:47 am

Using specific doors and materials in rooms

Postby jnrironside » Sun Feb 22, 2015 12:53 pm

I want to force a new room I have created to use a Staff Door and have used the BEGIN REQUIREMENT code but that only means you need one inside the room. Is there a way to achieve this?

Also I have an outdoor "room" I want to force to be grass how could I code this please?

Thanks
User avatar
Chad
level3
level3
Posts: 255
Joined: Wed Sep 26, 2012 8:00 pm

Re: Using specific doors and materials in rooms

Postby Chad » Sun Feb 22, 2015 3:40 pm

Hello and welcome to the modding forums!

As far as I know there is no way to define a material needed for rooms.

For the door I'm not know exactly what you mean.You say your room should require the staff door. And you did that into the room block. So I don't see your problem with that sorry.
GamingBud
level2
level2
Posts: 194
Joined: Mon Dec 29, 2014 8:33 pm

Re: Using specific doors and materials in rooms

Postby GamingBud » Sun Feb 22, 2015 3:52 pm

Chad wrote:Hello and welcome to the modding forums!

As far as I know there is no way to define a material needed for rooms.

For the door I'm not know exactly what you mean.You say your room should require the staff door. And you did that into the room block. So I don't see your problem with that sorry.

He is saying, he can put it IN the room, but it won't register that it is in the wall surrounding it.
jnrironside
level0
Posts: 5
Joined: Wed Jan 21, 2015 11:47 am

Re: Using specific doors and materials in rooms

Postby jnrironside » Sun Feb 22, 2015 3:56 pm

Thanks for the reply. Guessed that was probably the case with the grass. As for the door, if I use the BEGIN REQUIREMENT code the room requires a staff door inside the room the same way a kitchen uses a fridge or cooker. I need to have a door requirement similar to a solitary cell which requires the solitary door as an entrance to be a functioning room.
JASPer.Gamer.9.0
level3
level3
Posts: 380
Joined: Fri Sep 06, 2013 12:29 am

Re: Using specific doors and materials in rooms

Postby JASPer.Gamer.9.0 » Mon Feb 23, 2015 8:12 am

jnrironside wrote:Thanks for the reply. Guessed that was probably the case with the grass. As for the door, if I use the BEGIN REQUIREMENT code the room requires a staff door inside the room the same way a kitchen uses a fridge or cooker. I need to have a door requirement similar to a solitary cell which requires the solitary door as an entrance to be a functioning room.

Code: Select all

BEGIN REQUIREMENT    ENCLOSED

But that allows the player to place any door.
There is no way to set that and put a staffdoor property to it.
muahaa_the_french
level1
level1
Posts: 49
Joined: Thu Aug 15, 2013 6:16 pm

Re: Using specific doors and materials in rooms

Postby muahaa_the_french » Fri Feb 27, 2015 12:17 am

Zone the tile containing the door as part of the room. Done.
Mercury002
level1
level1
Posts: 19
Joined: Wed Feb 11, 2015 11:25 pm

Re: Using specific doors and materials in rooms

Postby Mercury002 » Sat Feb 28, 2015 3:43 pm

I would aggree with muahaa with that option;
muahaa_the_french wrote:Zone the tile containing the door as part of the room. Done.


The only alternative would be to create a lua code that takes the room dimensions and includes checks X+1, X-1, Y+1, Y-1 to scan around the room looking for nearby objects that match the desired door, this would be resource intensive (as it would probably check every square in the room) and it could be difficult to call upon the room dimensions (I have never tried it).

It is surprising that they did not include the door type requirement within the game as they do with foundations.
User avatar
Chad
level3
level3
Posts: 255
Joined: Wed Sep 26, 2012 8:00 pm

Re: Using specific doors and materials in rooms

Postby Chad » Sat Feb 28, 2015 5:11 pm

Mercury002 wrote:I would aggree with muahaa with that option;
muahaa_the_french wrote:Zone the tile containing the door as part of the room. Done.


The only alternative would be to create a lua code that takes the room dimensions and includes checks X+1, X-1, Y+1, Y-1 to scan around the room looking for nearby objects that match the desired door, this would be resource intensive (as it would probably check every square in the room) and it could be difficult to call upon the room dimensions (I have never tried it).

It is surprising that they did not include the door type requirement within the game as they do with foundations.

Maybe that's worth a bug report over at mantis.

The problem is, that you can't tell the game: "hey there is something missing", so searching for it in a lua script wouldn't help anything.
Mercury002
level1
level1
Posts: 19
Joined: Wed Feb 11, 2015 11:25 pm

Re: Using specific doors and materials in rooms

Postby Mercury002 » Tue Mar 03, 2015 10:16 pm

you can search for something that isnt their by setting a value ie
a=1
while get nearby objects ( door, 1 )
a=2
end
if a=1 then ... dont allow room
if a=2 then ... do allow room
else ...
end
This is just a basic concept but you could tell it to spawn an invisible, un-usable, non blocking object (possibly in front of the door, nothing else would be there) that cannot be purchased but is required by the room.
An issue with this is that you could only have one room or it might conflict with other rooms of the same name.
User avatar
Chad
level3
level3
Posts: 255
Joined: Wed Sep 26, 2012 8:00 pm

Re: Using specific doors and materials in rooms

Postby Chad » Wed Mar 04, 2015 8:22 am

Mercury002 wrote:you can search for something that isnt their by setting a value ie
a=1
while get nearby objects ( door, 1 )
a=2
end
if a=1 then ... dont allow room
if a=2 then ... do allow room
else ...
end
This is just a basic concept but you could tell it to spawn an invisible, un-usable, non blocking object (possibly in front of the door, nothing else would be there) that cannot be purchased but is required by the room.
An issue with this is that you could only have one room or it might conflict with other rooms of the same name.


That COULD work, but I've noticed, that a room that doesn't match its requirements, works anyhow...

Return to “Modding”

Who is online

Users browsing this forum: No registered users and 1 guest