NerfemTudo wrote:How do i make a working jail for the player
The map id of your jail map should look like as follows:
world id_
surface region id_jail
world id: The four-character identifier you gave your world when you were creating it
surface region id: The identifier of the surface map region the prison is attached to (usually a settlement). The id is the letter '
s' followed by 4 numbers that designate the coordinates of the region. Note the player won't be thrown into jail when there aren't any nearby.
Example: The map id of the prison of Matras is
base_s0303_jailThen pick a spot in the prison the player arrives at when (s)he gets imprisoned. The id of the position should be the same as your map id, just add 'entry' at the end (no space).
Example:
base_s0303_jailentryIf you want to make your prison the same way as it's in the base game, then the above position should behind a door with a keyhole that the player can unlock with a lockpick. Place a position past the door with the following code:
if(evtstepon())
{
if(player.isinjail())
{
player.clearjail();
message("You have managed to leave your cell.");
player.addcrime(
pick a value);
}
}
This way, the player won't be teleported out of prison once (s)he's taken 10 steps and will also get crime points for escaping.
I think that's it
You can also make an alternative exit out of prison for the player (not the main entrance, which should be guarded).