Coffeemud/SetupLegal

From CoffeeMud Wiki
Jump to navigation Jump to search

Make the 'Long Arm of the Law' Reach

Introduction

The general idea of the Arrest behavior is that you have mobs who enforce a setup of rules and regulations with punishments for those who fail to comply. The rules can include:

  • Trespassing (Being in the area where you shouldn't be)
  • Nudity (underdressed), Carrying arms (overdressed)
  • Assault & Murder
  • Thievery (of persons) and Robbery (taking things from owned properties)
  • Tax Evasion
  • Resisting Arrest
  • Any Ability
  • Any socials
  • Banned substances (items by name or material)

The standard concept most used is to have Cityguards who wander the city, making sure folks aren't commiting henious acts. When the Cityguards capture the miscreants, they are arrested and taken to a Judge, who sentences them to various punishments, broken out into some general categories:

  • Parole - the brigand is not allowed to leave the city for a duration of time
  • Jail Time - the criminal is locked up for a duration of time
  • Execution - The foul villain is slain on the spot by the residing Justice, either through combat or by special options (such as beheadings and stonings).

Cityguards are also able, for minor offenses, to issue warnings. The system also keeps track of repeat offenders, so an obnoxious thug may find themselves executed for something their new lackey is only warned about.

Overview Steps

In your world, you need to have:

  1. Legal System Enforcing Mobs (i.e. Cityguards)
  2. Some Judge type Mob
  3. A jail room
  4. (Optional) A treasury room to collect taxes into

Once you have that setup, you setup an INI file. That INI file is the parameter for the Arrest Behavior, which you put on an area. The default CoffeeMUD installation comes with a presetup laws.ini file for general use which is the best starting point (copy to a new INI file). Often, an INI file for each city is a good idea, as the Jail Room ID would be different for each city.

Special Note: Instead of supplying an INI file in the parameters, you can enter 'CUSTOM' which will allow you to use an in-game editor on most (not all) of the same options an INI file has via an Item called a GenLawBook. More on the GenLawBook under "Other Considerations".

Setting up your world

Enforcers

What most people do is just create mobs (of the appropriate race) and name them something like 'a [Town] Cityguard'. The important thing is to have a set of keywords in their names that allows the Arrest behavior to find them. They also must be Mobile.

Something also very commonly done is to setup one cityguard (of each type you'll have), export them to a file, and then use the RandomMonsters behavior to keep the laws properly populated throughout the whole city.

Sidenote: By having keyword matching, you can be as detailed as you'd like. For example, you could have ranks, such as Monteforte Patrolman, Monteforte Sergeant, and Monteforte Lieutenant. Then you can set OFFICERS=patrolman sergeant lieutenant.

Judges

This Mob is like the cityguards in that there must be a key word the system can find them by. However, this mob must not be Mobile, as the Enforcers will try to using 'Track' to find their way to the Judge. The Judge does not have to be setup in any special way at all, although it should be setup to take on an arrested player in case of executions. For some flair, see under Considerations: Cruel and Unusual Punishment - It Works!

Jail Room

This room simply must be somewhere that has a locked door (if it's unlocked, how is it a jail?). But, you can be as imaginitive as you want. For example, you could make the 'Jail Room' be an entrance to a huge maze with some overgrown bull stampeding the evil doers of your world into paste. Again, for some flair, see under Considerations: Cruel and Unusual Punishment - It Works! One key note (pun intended) - even though the jail door should be locked, you don't have to equip Enforcers with keys if you don't want to. They'll mystically generate them when they use them. However, having the Jail Key on some of the Enforcers can give some enterprising thieves a lucrative opportunity.

Treasury

Treasuries are even simpler than the Jails. You may make it simply be a room where guards dump money (recalling to players visions of Scrooge McDuck swimming in his vault) or a safe (locked container) in the Mayor's office.

Setting up your INI file

Now let's look at the default INI law file (resources/laws.ini), which includes some detailed help commentary:

#Denotes the name of the mob in your area who may serve as enforment officers # This field is a space-delimited list of key words to search mob names for. # Remember that these mobs must be MOBILE in order to do their duty. OFFICERS=cityguard #Denotes the name of the mob who serves as a judge for this area. # This field is a space-delimited list of key words to search mob names for. #This mob may NOT be mobile! JUDGE=justice #A list, separated by semicolons, of rooms which may serve as jails. The list # may include room numbers, or display descriptions. JAIL=The Jail$ #The room into which a prisoner previously in jail is released. This may be # a room number, or display description. Like the JAIL entry, this may also # be a list separated by semicolons. RELEASEROOM=Market Square$ #These are the warning and threat messages said by the officer delivering those # punishments. WARNINGMSG=Your behavior is unacceptable. Do not repeat this offense. You may go. THREATMSG=That behavior is NOT tolerated here. Keep your nose clean, or next time I may not be so lenient. You may go. #These are the jail sentencing messages delivered by the judge JAIL1MSG=You are hereby sentenced to minimum jail time. Take away the prisoner! JAIL2MSG=You are hereby sentenced to jail time. Take away the prisoner! JAIL3MSG=You are hereby sentenced to hard jail time. Take away the prisoner! JAIL4MSG=You are hereby sentenced to rot in jail. Take away the prisoner! #These are the parole sentencing messages delivered by the judge PAROLE1MSG=You are hereby sentenced to a short period under the prisoner's geas. Perhaps that will make you think! PAROLE2MSG=You are hereby sentenced to a period under the prisoner's geas. That will teach you, I think. PAROLE3MSG=You are hereby sentenced to hard time under the prisoner's geas! That will teach you! PAROLE4MSG=You are hereby sentenced to rot under the prisoner's geas! Don't let me see you again! PAROLEDISMISS=Now, get out of my sight! #This message is said by both the judge and officer if the offense is repeated. PREVOFFMSG=You have been warned about this behavior before. #This message is said by the judge just before execution EXECUTEMSG=You are hereby sentenced to a brutal death. Sentence to be carried out IMMEDIATELY! #This message is said by the officer after releasing a prisoner from jail. LAWFREE=You are free to go. #Space-delimited list of messages said by an officer during delivery # to the judge. CHITCHAT="You didn't really think you could get away with it did you?" "You are REALLY in for it!" "Convicts like you are a dime a dozen." "MAKE WAY! DEAD MAN WALKING!" "You are gonna GET it." "I love my job." #Space-delimited list of messages said by an officer during delivery # to the jail. CHITCHAT2="You didn't really think you would get away with it did you?" "I hope you aren't claustrophobic!" "Remember not to drop your soap in there." "MAKE WAY! DEAD MAN WALKING!" "I recommend you hold your breathe while you're in there -- I always do. It stinks!" "Putting away scum like you makes it all worthwhile" #Messages said during the arrest procedure by the officer. RESISTWARNMSG=I said SIT DOWN! NOW! NORESISTMSG=Good. Now hold still. RESISTFIGHTMSG=Resisting arrest?! How DARE you! RESISTMSG=Resisting arrest eh? Well, have it your way. #Mask of mobs who qualify as victims of crime. All others are # not protected. This mask is defined by the standard "Zapper" # mask. Use AHELP HAVEZAPPER from the Archon command line for # more information on how to use this mask. PROTECTED=-RACECAT +Human +Elf "+Half Elf" +Dwarf +Halfling +Gnome "+Giant-kin" #Whether or not mobs may commit crimes (except nudity and armed citizen) ARRESTMOBS=true #Mask of mobs who qualify as trespassers to the area. All others are # allowed. This mask is defined by the standard "Zapper" # mask. Use AHELP HAVEZAPPER from the Archon command line for # more information on how to use this mask. TRESPASSERS=-RACE +Undead #List of durations in ticks (4 second periods) for the parole punishments PAROLE1TIME=40 PAROLE2TIME=80 PAROLE3TIME=160 PAROLE4TIME=320 #List of durations in ticks (4 second periods) for the jail punishments JAIL1TIME=20 JAIL2TIME=40 JAIL3TIME=80 JAIL4TIME=160 #A room ID followed by an optional semicolon and the name of a container in # that room. An * may be used for the room ID if a container is specified # and the container may be moved. TREASURY= #The percentage of the purchase price of property owned # which is charged to the owner every mud month. # The money collected in this way is paid to the treasury. This # number may be an integer or double. PROPERTYTAX=0 #The percentage of every purchase price added to the price as tax # The money collected in this way is paid to the treasury. This # number may be an integer or double. SALESTAX=0 #The percentage of a mobs carrying-around money which is charged #whenever a mob from the area with the TaxCollector behavior is #encountered. Default is 10 (10%). CITTAX=10 #Here are the actual laws of the land. # The base laws have the following form: # <BASIC CRIME NAME>=<LOCATION RESTRICTIONS>;<FLAGS>;<NAME>;<PUNISHMENT>;<MESSAGE> # Keys to the above: # <LOCATION RESTRICTIONS> - home (only a crime at home) # - !home (only a crime away from home) # - indoors (only a crime indoors) # - !indoors (only a crime outdoors) # - KEYWORD (only a crime while in a room with that key word) # - !KEYWORD (only a crime while not in a room with that key word) # <FLAGS> - !recently (only a crime if not caught recently for it) # - witness (only a crime if witness in the same room) # - !witness (a crime regardless of whether witnessed) # - combat (only a crime while in combat) # - !combat (only a crime while not in combat) # <NAME> - the short description of the crime # <PUNISHMENT> - warning, threat, parole1, parole2, parole3, parole4 # - jail1, jail2, jail3, jail4, death # <MESSAGE> - RESISTINGARREST=;;resisting arrest;jail1;Resisting arrest by a lawful officer is a serious crime. TRESPASSING=!home !indoors;!recently;trespassing;jail3;Your kind are not allowed here. NUDITY=!home !indoors;witness !recently;indecent exposure;warning;Nudity below the waist violates our high moral code. Use the 'outfit' command if you need clothes! ARMED=!home;!recently !combat witness;violating the armed citizen law;warning;Walking around armed makes you look like a trouble-maker. Sheath your weapon, or 'remove' the weapon until you need it. ASSAULT=;;assaulting <T-NAME>;jail1;Assault is a hideous offense. MURDER=;;murdering <T-NAME>;jail1;Murder is a barbarous offense. PROPERTYROB=;!witness;robbing the property of <T-NAME>;jail3;Robbery violates our high moral code. TAXEVASION=;!witness;evading taxes;jail1;Paying taxes and dieing are our solemn duties to the state. # The illegal skill-use laws have the following form: # <SKILL/ABILITY NAME>=<LOCATION RESTRICTIONS>;<FLAGS>;<NAME>;<PUNISHMENT>;<MESSAGE> # Keys are same as under base laws above. THIEF_SWIPE=;;robbing <T-NAME>;jail2;Swiping violates our high moral code. THIEF_STEAL=;;robbing <T-NAME>;jail3;Stealing violates our high moral code. THIEF_ARSONRY=;;arsonry;jail2;Playing with fire is very dangerous. THIEF_TRAP=!home;;setting traps in city limits;jail3;Trapping puts us all in mortal danger. THIEF_BRIBE=;;bribing <T-NAME>;jail2;Bribing is a violation of our moral code. THIEF_CON=;;conning <T-NAME>;jail2;Conning and deception is a violation of our moral code. THIEF_EMBEZZLE=;;embezzling <T-NAME>;jail4;Embezzling money is a form of vicious theft! THIEF_CONTRACTHIT=;;;taking out contract on <T-NAME>'s life;death;Murder by contract is a barbarous offense. THIEF_DEATHTRAP=;;setting a death trap;death;Murder by trapping is a barbarous offense. THIEF_FORGERY=;;forgery;jail2;Forgery is deceptive and quite illegal. THIEF_RACKETEER=;;racketeering <T-NAME>;jail3;Racketeering is a form of vicious theft. THIEF_ROBBERY=;;robbing <T-NAME>;jail3;Robbery violates our high moral code. INEBRIATION=!indoors !home !pub !tavern !inn !bar;!recently;public intoxication;parole1;Drunkenness is a demeaning and intolerable state. POISON_ALCOHOL=!indoors !home !pub !tavern !inn !bar;!recently;public intoxication;parole1;Drunkenness is a demeaning and intolerable state. POISON_FIREBREATHER=!indoors !home !pub !tavern !inn !bar;!recently;public intoxication;parole1;Drunkenness is a demeaning and intolerable state. POISON_LIQUOR=!indoors !home !pub !tavern !inn !bar;!recently;public intoxication;parole1;Drunkenness is a demeaning and intolerable state. # The illegal influence laws have the following form: # $<SKILL/ABILITY NAME>=<LOCATION RESTRICTIONS>;<FLAGS>;<NAME>;<PUNISHMENT>;<MESSAGE> # Keys are same as under base laws above. #The following are emote/social/other crimes. The form is as follows: # CRIME<NUMBER>=<EMOTE STRINGS>;<LOCATION RESTRICTIONS>;<FLAGS>;<NAME>;<PUNISHMENT>;<MESSAGE> # Most of the parameters are the same as the base crimes, the new one (EMOTE STRINGS) # is a space-delimited list of strings which occur in the emote or social or activity. # Each entry may be surrounded by quotes to group words into phrases. CRIME1=spit(s) spits;;witness;spitting in city limits;warning;Spitting is a dirty habit. CRIME2=wiggies wiggy wiggie;!home;witness;wiggying in public;warning;Wiggying is considered indecent. CRIME3=throttle "grabs for your";!home;witness;throttling in public;warning;Throttling is considered unacceptable behavior, as it violates the peace. CRIME4="barks at" "barks loudly at";!indoors;witness;creating a disturbance;warning;We do not take kindly to people creating a nuisance of themselves. CRIME5="flicks a bird" "gives you the bird";!indoors;witness recently;indecent public behavior;warning;'Flicking the bird' is considered unnacceptable behavior. CRIME6="flicks his whip across" "flicks her whip across" "his tongue over" "her tongue over" "tongue around you" bites slaps "vague stroking motions" "and ties his to a four" "and ties her to a four" "and ties you securely to a";!indoors;witness recently;inappropriate public behavior;warning;If you need to do that, we kindly ask that you take it inside. CRIME7="ducks down low, charges forward" "head into your stomach" "doubles over in pain" "suddenly knees you" "rips out" "With a resounding WHAP" "to the floor, pinning";!indoors;witness recently;public fighting;warning;Do NOT violate our peace. CRIME8="swears at";!indoors;witness recently;inappropriate public language;warning;If you need to curse, go somewhere more private. CRIME9="stripping away" "has started to strip you" "clothes off and parades" "is exposing" "has just revealed" "pants and rudely moons" "bends over and gives you";!indoors;witness;indecent exposure;warning;Nudity violates our high moral code. Use the 'outfit' command if you need clothes! CRIME10="pukes on" "spews vomit and pukes all over your";!indoors;witness recently;desecrating our streets;parole1;If you need to be sick, DO NOT do it on our streets. CRIME11="while stabbing a pin into a voodoo doll";;witness;practicing voodoo;jail2;Voodoo is NOT tolerated here. #The following are banned substance crimes. The form is as follows: # BANNED<NUMBER>=<RESOURCE NAME, ITEM NAME>;<LOCATION RESTRICTIONS>;<FLAGS>;<NAME>;<PUNISHMENT>;<MESSAGE> # Most of the parameters are the same as the base crimes, the new one (RESOURCE NAME, ITEM NAME) # is a space-delimited list of strings which are either contained in the items name, or # are equal to the name of the resource the item is made of. # Each entry may be surrounded by quotes to group words into phrases.

Other Considerations

'CUSTOM' and the GenLawBook

If you setup the Arrest behavior with the CUSTOM parameter, then your next step to having it work is to 'CREATE GENLAWBOOK'. Modify the law book's Readable Text to be the area Name. Go ahead and read the book - it's full of wonderful amounts of instructions to help get you started using Arrest.

Cityguards - Skills and Extras

Most times, when you're setting up cityguards, it's to enforce the laws on players. Therefore it's important that your cityguards can hold their own in battle, because might can equal right. For example, if you setup your cityguards as level 5 with no skills, most players will find themselves at some point hunting them for experience.

As mentioned under Enforcers, sometimes it's a good idea to have a variety of guards of varying level. In one of our cities at False Realities, we had 3 tiers of guards: some around 11, some around 17 and a few heavyweights of level 26 (levels were higher, but translated our versions to the 30 level max system). This meant that while a level 14 player could fend off the arrest by a level 11 cityguard, the other guards could surely assist (and press charges for Resisting Arrest).

You should also either manually assign an array of relevant skills (or give them a Fighterness type behavior). Some useful skills could include:

  • Skill_Dodge
  • Skill_Parry
  • Skill_Trip
  • Fighter_Endurance
  • Fighter_Kick
  • Fighter_Tumble
  • Skill_Disarm
  • Prayer_CureSerious / CureCritical / Heal
  • Prayer_CauseSerious / CauseCritical / Harm

(The latter two caused our player no end of trouble. Cityguards who heal themselves are much harder foes.)

Other things to think about are what behaviors to grant your Enforcers. Since our example uses Cityguards, we made them act like Cityguards. We had:

  • CommonSpeaker (to ensure they always speak Common)
  • CombatAbilities
  • AntiVagrant
  • Mobile (params: "min=4 max=16 chance=75 -all +city" This made sure they patrolled the streets, not wandered into player homes)
  • MOBHelper (This made them always help other MOBs from Player attacks)
  • Scavenger ("min=4 max=50 chance=25" to make them sometimes pick up 'litter')
  • MUDChat (more on that later)
  • Emoter (params: "min=5 max=20 chance=35~;nods in your general direction.~;glances at the sky.~;polishes the armor on their leg.~;streches their arms.~;streches their legs.~;sound whistles a little tune slightly off-key.~;hums what sounds like a marching song under their breath.~;coughs lightly.")

Also, ProtectedCitizens on the area they are patrolling can encourage cityguards to run to help each other out.

Cityguards - MUDChat

One thing that should be noted. In our setup, we had MUDChat setup to be very verbose and knowledgable. There will be more information on that in the MUDChat Guide. But, information our cityguards all had was:

  • Explanations of the laws of the city
  • Directions to local streets and shops
  • Generic Cityguard Chatter

This added to the realism of the environment so much that players often had a hard time distinguishing a NPC from a possessed NPC.

The Captain

An important tip that I would give to anyone setting up an area with Enforcers: Setup an archon only room (More info soon under Building) and create a very high level, highly skilled, and massively equipped MOB that represents the ultimate version of the Enforcer. Make sure it is not Mobile!

Then, whenever you discover players doing something particularly deserving of a smack-down, you can possess this super Enforcer and RP their beatings.

Cruel and Unusual Punishment - It Works!

Judges & Execution:

By default, judges will execute by simply attacking the criminal. However, there are two special cases setup within the Arrest system. If the judge has either of the two abilities, they will try to use them as means to execute:

  1. Fighter_Behead
  2. Prayer_Stoning

Making your jail 'jaily': Making a room that players are locked in is all well and good, but if that's all you do, it's not very, well, jail like. Here's how we made sure the player *really* suffered their jail time:

  • Make the door high enough level that the player can't just pick the lock easily at lower levels
  • As a matter of fact, put Spell_WizardLock on it too

On the room, you might also wish to put any combination of the following Effects:

  • Prop_NoTeleport - Nobody can get in mystically
  • Prop_NoTeleportOut - Nobody can get out mystically
  • Prop_NoSummon - Nobody can be pulled out mystically
  • Prop_NoRecall - Nobody can recall
  • Prop_MagicFreedom - No spells can be cast at all, as a matter of fact
  • Prop_PeaceMaker - No fighting while you're in there, tough guys
  • Spell_Ghostsound - What good is being in jail unless it's spooky?
  • Prop_NoChannel - Being able to talk on channels doesn't make it very strict punishment. Shut their yaps with this little Prop.

Law != Good

Most of the time, the Arrest Behavior is used to uphold the law, the freedom of others and sanctity of life. While it is remarkably well executed to do just that, it can do more! With the ability to really change huge amounts of the file, you could have a 'City of the Dead' where all forms of healing are offences punishable by death. You could have a local organized crime who charge 'protection' money as taxes (and execute people for Racketeering!). With Parent/Child Area Setups, you can have many layers of 'interested parties' who each have their own 'laws'.