Crime and Law [IMPLEMENTED]

Does "Crime and Law" sound like an interesting game feature?


  • Total voters
    19

raystuttgart

Civ4Col Modder
Joined
Jan 24, 2011
Messages
9,637
Location
Stuttgart, Germany
Foreword to this concept:
Spoiler :

Well ok, since we started working on the mod again I started working on old game concepts again as well.
This one here has actually been slumbering in the "concepts drawer" for years to wait until the mod was ready.

Most of the game concepts it should be built on (like "Happiness") have now been implemented.
Others that it has strong design relations to it (like "Upkeep") can follow in later stages without causing too much overhead effort.

----------

Game Concept Objectives:
Spoiler :

"Crime and Law" is like many others a "micro-management concept" that is supposed to:
  • pose a constant challenge to "perfectionist players" to optimize their nation during all game phases
  • still being easy enough fior "casual players" to play without too much problems to understand
  • nicely tie into the existing gameplay of the mod and interact with other features
  • add surpising gameplay elements and not become too predictable (events and a bit of randomness)
  • support balancing of the mod to prevent exploits and work against steam rolling AI in late game
  • add to immersiveness and realism of the mod without feeling tedious to extremes

----------

Technical Info:
Spoiler :

About the Algorithm:

It is again a complex non-linear algorithm, with "base values", "min and max thresholds", "linear percentage modifiers", "exponential percentage modifiers", ...
It will thus be extremely hard to really calculate exact values because that is how I design algorithms. Just like it already is is for "Learning by Doing", "Happiness", ...

About Display in the UI:

It will basically be displayed similar to "Happiness".
It is just another dimension of your society in the colony.

All Balancing in XML:

All of that stuff will be balanced in XML like always.
(Like all these complex algorithms you should understand though what you do.)
  • Detailed balancing of Yield Generation of Buildings in Civ4BuildingInfos.xml
  • Detailed balancing of Yield Generation of Professions in Civ4ProfessionInfos.xml
  • Detailed balancing of Yield Modifier of Experts in Civ4ProfessionInfos.xml
  • Global balancing modifiers to Crime Algorithm in GlobalDefinesAlt.xml
  • Consideration of GameSpeeds and Handicaps just like with all other features.

----------

Gameplay Concept: Crime and Law

What causes Crime in your Cities?
Spoiler :

Higher Population Size more or less automatically leads to increase in Crime Rate.
(Originally I had planned to differentiate Units but I figured out later that it would make no real sense.)

High Storage of Goods in your City will be an opportunity for thieves so if storage is full, more thieves.
  • Green Storage Threshold: No Addition to Crime Rate---> Crime Rate * 1
  • Yellow Storage Threshold: Medium Addition to Crime Rate ---> Crime Rate * 1,5
  • Red Storage Threshold: High Addition to Crime Rate --> Crime Rate * 2
Unhappiness also reflects in increase of Crime in that City. (as % modifier)
Thus vice versa, Happiness will reflect in decreased Crime in that City. (as % modifier)
Since those are however % modifiers they can not cause or prevent it totally.

For Health it will be similar, because it can be shown historially that diseases were correlated to crime.
Once people get sick and are refused appropriate help or simply are too sick to work they may need to become criminal.
And in those days the sick have really not been take care of like today but were often outcasts.

Then of course there are Unrests, and with this feature, they really have impact and it will be really costly.
Unrests will dramatically increase Crime Rate (bacially multiply it by X times).
In previous versions Unrests hardly mattered, because well, you just had a few turns of inactivity.
Now you should really rather prevent them because it will cost you lots of goods and money.

Last but not least we again consider Wars because they are also times of chaos.
Every single war you start will add 10% to your crime rate globally in all cities.
That is also true for War of Independence.
(Considering immersion there were also a lof of loyalists fighting the system which increased "crime rate".)
So it might be a good idea to be aware of Crime Rate in your strategic considerations for declaring WOI.

So great, lots of factors that cause crime, right?
So how can you prevent it? --> See next section of concept

Summary of Causes of Crime:
  • Popluation size of the City
  • Wealth and amounts of physical Goods
  • Social Aspects (e.g. Unhappiness)
  • Unrest (caused by other social issues) and Wars


What prevents or mitigates Crime in your Cities (Law)?
Spoiler :

Well, It should be easy to see that preventing the causes mentioned above should be a first start.
(Do not create giant cities without consideration of crime rate, keep your people happy and healthy, prevent storage overflow, try to avoid unrests and do not rush into wars too often.)

But of course there are more ways to counter Crime and those also have their benefits.
So Crime and Law is not a "onesided punishment" as some may fear already.

Town Guards and other Defensive Units will reduce crime rate.
So if you really do not care to prevent it in the beginning, you can later try to simply suppress it by force.
But stuffing all your cities by ever continuing amount of troops will get costly and not allow you to use them otherwise.
(Especially once we introduce "Upkeep" - originally planed to be introduced first before this concept.)

So what else could you do to fight the remaining "Crime" that is not suppressed yet by force?

Religion (Crosses) will reduce crime as well. People in those days were often more afraid of the consequences of crime because or religious aspects than because of law aspects.
So keep up the production of Crosses and it will reduce the Crime Rate.

Administration (Liberty Bells for the lack of a true Yield Administration) will also reduce crime as well,
but their effect is only about 50% of the effect of Crosses.
It is simply proven that a bit of order and regulation can help to reduce chaos and opportunity for crime.

But the big Champion is new "Yield Law" !
Law will fight Crime efficiently. But it will need investiment.
  • New Profession: Judge
  • New Buildingchain with Profession Slot: Village Court, City Courhouse, Regional Courthouse
  • New Buildingchaing without Profession Slots: Prison Station, City Prison, Regional Prison
  • New Expert: Honored Judge
Summary of preventing or mitigating Crime:
  • Prevent the causes by properly managin Population, Storage, Happiness, Health, ... (explained above)
  • Station Town Guards or other Units as "law enforcment"
  • Mitigate it by Religion (Crosses) and Administration (Liberty Bells - less effective though)
  • Counter it with the new Yield "Law" by Buildings, Professions, Experts


What are the effects of Crime and Law?
Spoiler :

First you need to understand that formula:
Total "Law Abidence" = Law Rate - Crime Rate

It exists on local level and on global level (as average).
(I will try to explain it below by taking a look at both of them separately.)

Crime > Law:
  • Local: Goods will be stolen from your cities (as percentage rate) every turn.
  • Local: It will negatively affect Happiness (causing a potential negative loop of Unhappiness affecting crime).
  • Local: It has a chance to cause Unrests (which again have crime rate skyrocket).
  • Global: Gold will be stolen from your gold stack every turn.
  • Global: It negatively affects the attitude of other Civs towards you (especially your King)
---> Better take this serious and once a city "goes wildly criminal", send troops to get it under control again.

Law > Crime:
  • Local: Adds a % bonus to Gold from Domestic Market and Gold from Entertainment.
  • Local: It will positively affect Happiness (causing a potential positive loop of Happiness affecting crime).
  • Local: It can prevent Unrests (potentially triggered by other features).
  • Global: It will positively affect Immigration rate (Reduce the Immigration Threshold as % modifier)
  • Global: It positively affects the attitude of other Civs towards you (especially your King)
---> Those positive aspects are just as strong as the potential negative and if played right can boost your Nation.


Additional Details:
Spoiler :

  • Like always there should also be a few Python Events added for this.
  • Like always this also needs potential changes to Founding Fathers and Civilization Traits.
  • Like always this needs to be consoderered in global difficulty balancing.
  • Like always this also needs an AI concept which I however already have fully done conceptionally.
  • Like always this ....
Summary:

Do not worry about that stuff, we do not implement concepts like this the first time and will consider all of that once the implementation of this concepts starts. :thumbsup:
(Right now discussing all these 1000 details makes lillte sense, because first the actual implementation needs to be started.)



Summary:

"Crime and Law" is a very impactful feature that should be taken serious.
However, it is balanced, both negative and positive aspects are equally strong.
Thus I am pretty sure it will add a lot of fun and challenge to the game.
  • Neglect it and you will suffer.
  • Take care of it and you will prosper.
---

FAQ:
Spoiler :

Question: "When is this going to be implemented?"
Answer: "Whenever I find enough time and motivation for it."

Questions: "What priority does this concept have?"
Answer: "It is not within the top 3 but still within the top 10 of about 50 major open concepts."

Question: "How much effort is it?"
Answer: "About as much as Happiness was". (About 2 weeks of implementation, test and balancing.)

Question: "I really like this concept. Is there any way I could support so it is implemented faster?".
Answer: "Sure, you could e.g. try to get the graphics collected or help get other stuff done, so I have more capacity for its implementation".

Question: "I really like the idea and would actually like to try to implement it myself. Is that ok for you?"
Answer: "Really? Awesome! It would be really great if some other modders were interested in implementing features as well."
 
Last edited:
Is the presence of Loyalists in a city not already simulated by the rebellion percentage? Too many loyalists and the city is far less productive which as far as understood it, meant that the loyalists not only passively make things harder but includes all forms of civil resistance by loyalists including theft or sabotage which all lower production of every good.
 
Is the presence of Loyalists in a city not already simulated by the rebellion percentage?
There is no direct effect of "loyalists" in that concept. I just mentioned it as one out of 100 explanations why "War" causes increase in "Crime" in this concept.
Otherwise this concept would conflict with the giant "War of Independence Overhaul" which will then really introduce "Loyalists".

Summary:
Forget "Loyalists" for now. There is no real technical logic impact for that in this concept, just impacts of "War" on "Crime" (with lots of immersive explanations for that). :thumbsup:
We will focus on "Loyalists" as a game concept that really matters, once I find time for the "War of Independence Overhaul" (which has "Loyalists" as a sub-concept).
 
Last edited:
Will this feature spawn petty criminals?
(or any other unit)
If question is too small detail do not consider it.
Maybe only if crime is quickly suppresed by units in city
Maybe only in big cities where it is difficult to control everything (so it isn't exploit)
Also what about criminals escaping from cities and destroying improvements/causing higher crime in another city?
Last : causing crime in other colony city by sending criminals as guerilla soldiers?
Idea is great:)
 
Last edited:
Will this feature spawn petty criminals?
Probalby not as a "repeating" / "regular" mechanism of the core feature, because it might get tedious or might even get exploited. (Funny the first time, annoying afterwards.)
But as I tried to explain, Random Python Events could be triggered using this feature as well and those could spawn Petty Criminals. (Just not all the time.)

----

Possible Random Events:
  • High Crime Rate + Full Storage: Citizen caugt stealing and gets a Petty Criminal
  • High Law Rate + Prison: Petty Criminal gets Normal Colonist again after years of Prison
  • High Crime Rate + Ship in Harbour: Harbour Master wants to get bribed
  • ...
Endless possiblities for interesting Python Events once the concept above is implemented.
None of them are however really part or the core implementation of the "Crime and Law" feature.
Technically they are more or less independent additions implemented on top in a later stage.

----

Summary:

Modders can use this feature to trigger various Random Python Events using our Python Event System. (It is really easy once you have done it a few times.)
Once the base implementation and balancing is set up there is no limit to a modder's imagination for immersive events he could script.

Idea is great:)
Thanks. :)
 
Last edited:
First screenshots of graphical work for the feature.
(Coloepdia Button and ingame Yield Icon of "Yield Law" and "Yield Crime")



 

Attachments

  • Law_Button_and_Icon.JPG
    Law_Button_and_Icon.JPG
    13.3 KB · Views: 811
  • Crime_Button_and_Yield_Images.JPG
    Crime_Button_and_Yield_Images.JPG
    13 KB · Views: 804
Last edited:
Found this pretty cool graphic for a "Courthouse" by accident in BTS.
(Comes with standard BTS graphics.)



@Community:
Does anybody know if in BTS or its mods there is also a "Prison" or something like that?
(I do not play any Civ4BTS so I really have no idea what great graphics may exist.)
 

Attachments

  • Court_House.JPG
    Court_House.JPG
    27.2 KB · Views: 771
Found this pretty cool graphic for a "Courthouse" by accident in BTS.
(Comes with standard BTS graphics.)



@Community:
Does anybody know if in BTS or its mods there is also a "Prison" or something like that?
(I do not play any Civ4BTS so I really have no idea what great graphics may exist.)

That looks like the City Hall building already in the mod.
 
That looks like the City Hall building already in the mod.
Thanks, I will check. :thumbsup:
Might in fact be possible that we already use it.
 
Last edited:
@Schmiddie
Could you maybe create Buildings for me at some point?

Something like:
  • Village Courthouse
  • Town Courthouse
  • City Courthouse
  • Supreme Court (National Wonder)
 
@Nightinggale is going to (hopefully one last time) fixing the GameFonts for the Billboard Icons.
However "Crime and Law" does also introduce new GameFont Icons for the 2 new Yields.

So I now implemented the 2 Yields so he does not need to work on the GameFonts a 2nd time later on.
Also since we have now
postponed the release I will have enough time to finish the feature without stress.

-----

In other words:
Implementation on
"Crime and Law" has started. :)
Since it is a
pretty big feature I may need about 1 weeks to finish all details.

First step was to implement the
Yields "Crime" and "Law".
(So @Nightinggale can continue working on GameFonts without conflicts.)

Now I can build the
feature logic on top of it.
Also the
Building, Expert and Profession can be implemented.

Of course there will later also be a
Founding Father.
(I selected "Benjamin Kissam" for this.)

Civ4ScreenShot0002.JPG
Civ4ScreenShot0003.JPG
 
Last edited:
After working like 8 hours plus today, the complete DLL implementation of "Crime and Law" is done. :)
(Also most of the texts that are needed for e.g. Helper messages or other Mouse Overs.)

I have already commited it to GIT (here) to save it even though it is not fully complete yet.
(It should not disturb gameplay much and it felt just too risky too mess up without having saved.)

With a bit of luck I will get it finished the next few days.
(However I may use dummies for e.g. the Building graphics.)

The only things that still need to be done:
  • Buildings (Court Buildings)
  • Expert (Honored Judge)
  • Profession (Judge)
  • CityScreen (To display it like for Happiness)
  • Crime Advisor Screen
  • Founding Father
-----

But again, I made good progress and I think it will be a fun feature comparable to "Happiness" - although a tiny bit simpler. :mischief:
It is nicely interwined with Happiness, Religion, Domestic Market, Entertainment, Founding Father Points ... and many other features.

In case you want to read and understand what it does, this explain it quite well:
Spoiler :

Law higher than Crime:
  • Immigration from Europe increases
  • Happiness is increased
  • Domestic Market profits increase
  • Entertainment profits increase
  • Severe effects of crime prevented (no Gold stolen / no Revolts)
  • Additional Founding Father Points are generated
Crime higher than Law:
  • Immigration from Europe decreases
  • Happiness is decreased
  • Domestic Market profits decrease
  • Entertainment profits decrease
  • High Crime can cause Unrest
  • Gold is being stolen from cities


Simply keep "Law" higher than "Crime" all the time and everything will be good. :)
 
Last edited:
By the way:
One thing which was properly not that clear is that "Crime and Law" is supposed to influence "Upkeep and City Taxes" in a City.
Since
"Upkeep and City Taxes" however is not yet implemented of course that connection also is not yet made.

That kind of explains why
"Crime & Law" currently does have a few less effects on minor features than "Happiness" does.
(i.e.
"Happiness" also influences e.g. "Learning by Doing" or "Becoming Free" or "Slaves Running away" or "Growth".)

So the plan in final implementation is:

"Crime & Law" influences "Upkeep and City Taxes" (also a major feature)
Once that has happened both features ("Happiness" and "Crime and Law") will be equally important.

At the moment:
"Happiness"
has a few more small effects and is still the more important feature considerig gameplay.
"Law" is mostly needed to prevent the effects of "Crime" but does still generate additional FF Points.
 
Last edited:
@Schmiddie
I played a bit with one of your graphics and created this as "Honorable Judge".
What do you think of it? I think it is not that bad for a start. :)

A few minor things might potentially still be improved though. :think:
  • A Judge Hammer in his hand would be cool.
  • He could have a bit more of a belly - he is too thin for a judge.
Well, I let you do your magic again. :hug:
But maybe the graphic I attached might be used as a base for your work.

Honorable_Judge.JPG
 

Attachments

  • Judge.rar
    1.6 MB · Views: 11
Last edited:
Hi guys, I have now implemented all base XML config that is necessary for the feature.
(And I have also adjusted the City Screen of course so it properly places the new "Court House".)

1) Buildings for "Courthouses" --> use dummy graphics of "medic buildings"
2) Expert "Judge" --> uses dummy graphic of "Doctor"

3) Profession "Judge" --> Button done


However I have at the moment just used dummy graphics fur the Buildings and Experts.
(I have simply assigned them existing ArtDefs just to test that everything is working.)

----

So the feature is slowly but surely getting fully functional. :)
Just proper graphics need to be created / configured.

Here you can see where it is placed in City Screen:

Civ4ScreenShot0007.JPG
 
Ok guys, I have now also fully implemented the City Screen for "Crime and Law". :)
(Just like with "Happiness" the Mouse Overs give explanations of what causes Crime / Law and how it affects gameplay.)

Civ4ScreenShot0002.JPG

Civ4ScreenShot0003.JPG
 
Last edited:
Top Bottom