Quality of Life: A Modification for Civilization IV

The videogame Civilization IV rewards the player for expanding an empire and conquering neighbors. For example, in an Iraq War scenario, the Civilization IV scoring system incentivizes Iraq to conquer Kuwait. To rescore ethically, utilitarians suggest evaluating health and happiness. From medical ethics, the quality-adjusted life year (QALY) is extended by moral values to become an ethical calculus. In the Python programming language, moral values are scripted to reward making citizens healthy and happy. By such scoring of quality of life, diplomacy and art emerge as ideals. For example, starting from the same Iraq War scenario, the mod’s moral values for health and happiness incentivize Iraq to sign a peace treaty, stop building weapons and start building hospitals and theaters. Thus, in the mod, Civilization IV: Quality of Life, a code of ethics evaluates the player's public policy.

Installation Instructions

Download modification to Civilization IV: http://finegamedesign.com/qualityoflife/civilization4_qualityoflife.zip

This mod is made with the unpatched version of Civilization Complete (1.74).

  1. First, install Civilization IV.
  2. Run Civilization IV
  3. Start a new game.
  4. End the first turn.
  5. Exit the game and close Civilization IV.
  6. This created configuration and save file information.
  7. Unzip the modification package: civilization4_qualityoflife.zip
  8. In Windows Explorer, copy all of the files in the folder called "Quality of Life".
    The destination for the copy is something like:
    Your Documents / My Games / Sid Meier's Civilization 4 / MODS 
    Your exact folder names will vary.
  9. Paste all the folders and files from "Quality of Life" to here:
    Your Documents / My Games / Sid Meier's Civilization 4 / MODS / Quality of Life 
  10. Run Civilization IV. "Quality of Life" should appear in the loading messages.
  11. The game should start.
  12. There is a save game and a World Builder save in this directory for the Iraq War. These are not mine. They are referred to in my chapter, but were made by http://forums.civfanatics.com/downloads.php?do=file&id=13212

For more information, visit http://finegamedesign.com/qualityoflife

Installing for DEMO version of Civilization IV only:

If you have the full version, ignore this section. I have not tested the DEMO version since recently changing, so I cannot say that the demo is still compatible. You may only need Civilization IV demo version to play this mod. Demo version disables info screen (F9) and some score displays, so you won't see all the quality of life scores. If you have the full (unpatched) version, that is preferable, and do not continue these instructions.

  1. Download Civilization IV DEMO from FileFront, Cnet, or GamersHell.
  2. Install Civilization IV demo.
  3. Run Civilization IV demo once so that it will create default "My Games" folders. As soon as you start a new game, then exit.
  4. Demo does not support default CustomAssets or Mods folder. Only if you are using the DEMO version:
    1. In this mod, find "Quality of Life" folder, and "Assets" folder inside there.
    2. Find DEMO folder "CustomAssets". If you do not find it, then run the demo and exit and look again.
      C:\Documents and Settings\YOUR NAME\My Documents\My Games\Sid Meier's Civilization 4 Demo\CustomAssets
      		
    3. Open mod "Quality of Life\Assets" folder. Copy all these files (Python, XML), to the above My Games "CustomAssets" folder. You should be overwriting "Python" and "XML" folders.
  5. Also overwrite the "CivilizationIV.ini" file.
  6. Run the demo and play a game. Demo disables info screen (F9).

Advanced instructions

Editing your Moral Values

(only for computer experts)

Not everyone has the same moral values; not everyone cares about the same things, or cares about aspects of life equally. I believe some of these differences to be unsolvable, because those with differing moral values will not even agree on how their differences ought to be accounted. Therefore, I invite you to edit the moral values to quality of life and see how it affects strategy.

The moral values are stored in Mods\Quality of Life\Assets\Python\CvGameUtils.py

In case something goes wrong, make a backup copy of Mods\Quality of Life\Assets\Python\CvGameUtils.py

  1. Press (F1) to see Domestic Advisor. Observe the current moral values.
  2. Close Civilization IV.
  3. Open a text editor.
  4. Open the file Mods\Quality of Life\Assets\Python\CvGameUtils.py
  5. Read through the functions for quality.
  6. These are composed of simple weighted sums of parameters in Civilization. For example, hedonists only value happiness and puritans only value health.
  7. Edit the moral values in "get_moral_values"
  8. If you have Python installed on your computer, then you can run the file again to test that the functions are still correct:
         > python CvGameUtils.py
    
  9. Run Civilization IV. Press (F1) to see Domestic Advisor. Confirm that the moral values have been edited.

You can have heterogenous populations, such as 50% hedonists (who only value happiness), 50% puritans (who only value health).

Changelog

February 13, 2010
John Rawls minimum (leximin) coded and reconciled with the dilemma in Mosul.
Some doctest errors fixed.

January 28, 2010
Added calculation of fatalities.
Fixed distributed quality over time.
Added diminishing marginal value for each city attribute.
Changed value function from power to additive.
Balanced score somewhat to Civilization IV scale.
Added doctest examples from chapter of Ethics and Game Design 2 (under review).
Included Iraq War scenario, with examples in CvGameUtils.py.
Added logging of score.
Included help document to download.
Included multiple INI files.

October 2009
Exhibition at Mediateca Expandida Arcadia
Included auto-start INI file.

May 2009
Exhibition at Games for Change

January 2009
Demo to design advisor

Ethan Kennerly - September 25, 2009