Skip to content
Slashscreen edited this page May 21, 2023 · 2 revisions

Crime System

The built-in crime system works hand-in-hand with the Coven system. Crimes work by tracking Crime objects for each Coven they are committed against. These can be used to influence the behavior of NPCs towards you - whether to try to arrest you, kill you, say mean things, etc.

They are organized in "punished" and "unpunished" lists - when jail time is served, all crimes from the "punished" list to the "unpunished" list. This seems unnecessary, but this allows for mechanics or dialogue to change if the player Has served time for the crime, but the NPCs won't forget what you did. The crime master can total up "bounty" put on your head by a coven, which is the amount of currency one must pay to be rid of all crimes. These amounts can be adjusted how you see fit. You can also get the max "crime severity" against a given coven.

The Crime Object and Reporting Crimes

To create a crime, simply create a Crime object with the victim, the perpetrator, and the "crime type". The crime will automatically be applied to all of the victim's crime-tracking covens when added to the CrimeMaster. Crimes have Crime Types with associated Severity Levels. This list is defined in the Crimes class, and can be adjusted to suit your needs. By default, it looks like this:

const CRIMES:Dictionary = {
	&"assault": 2, # Beating someone up
	&"theft": 1, # Stealing, pickpocketing
	&"murder": 5, # Killing someone
	&"tomfoolery":1 # Mischeif
}

Severity levels can be used for dialogue reactions, to influence NPC behavior, and they work to calculate bounties.
To report a crime, construct a new crime object and pass it in to CrimeMaster.add_crime(crime). Everything else will be handled for you.

The rest of Crime Master's functionality is described in the in-editor documentation.

Clone this wiki locally