advanced modding : POLICIES IN DETAIL


#1

[size=70]After thicking about it for a while …
… a list being a highly time consuming task
… and will require maintenance on a regular basis
… which is both not good for the much-appreciated doer
Then, I came to this idea: [/size]

advanced modding : POLICIES IN DETAIL

SPOILER WARNING!
This will give you details of the game mechanics
you will like to figure out by just playing the game.
This is intended for advanced modders only, who need precise data
for balancing tasks and creating new (balanced) policies etc.
SPOILER WARNING!

Description and Code for Windows (any version) **1

  1. goto \D…3\data\simulation
    copy policies into a new/empty folder

  2. start Command Prompt / CMD.exe
    go to this new folder (cd path ENTER)

  3. copy-paste
    mark and copy ONE of these code lines
    paste into Command Prompt window (mouse over C-P-window, click right mouse button, insert).

[code]
type “policies - Copy.csv” | find “#,” | find /i “_MiddleIncome,” > file_MidInc.txt

type “policies - Copy.csv” | find “#,” | find /i “Motorist_income,” > file_MotInc.txt
[/code]for code details ____ **2 see below

  1. edit line
    perhaps changes to file_name.txt, etc

  2. press ENTER
    a new file was created this second

  3. Now, open/ double-click new txt-file
    Open in editor. (Notepad: make use of break-line feature ON or OFF)

You should receive this:
(sorted by me, cut by me) - SPOILER WARNING! - see above

MiddleIncome :: file_MidInc.txt

#,AirlineTax, ...
#,CarTax, ...
#,GraduateTax, ...
#,IncomeTax, ...
#,FlatTax, ...
#,InternetTax, ...
#,PropertyTax, ...
#,SalesTax, ...

#,MortgageTaxRelief, ...
#,RailSubsidies, ...
#,UniversityGrants, ...
#,HealthcareVouchers, ...
#,HealthTaxCredits, ...
#,SchoolTaxCredits,..,default,"...  ",,19,15,8,8,TAX,200,5000,,1,0,0,
,#Effects,"PrivateSchools,0+(0.4*x),2","_MiddleIncome,0+(0.08*x)","_HighIncome,0+(0.06*x)","Wealthy,0.02+(0.06*x)","MiddleIncome,0.04+(0.06*x)","Socialist,-0.01-(0.05*x)","Poor,-0.01-(0.05*x)","Capitalist,0.02+(0.04*x)",,,

Each line is one policy.
…,Inputs(sometimes) ,#Effects, Outputs/Effects (always),


2nd. You should receive this:
(cut/truncated by me)

Motorist_income :: file_MotInc.txt

#,CarEmmissionsLimits,[...]
#,CarTax,[...]
#,CleanFuelSubsidy,[...]
#,PetrolTax,[...]
#,SateliteRoadPricing,[...]
#,SpeedCameras,[...]
#,TollRoads,[...]
#,FuelEfficiency,[...]

Remark:
MiddleIncome is a voter type/group.
Normally you have Motorist_income, Capitalist_income, etc.

Exceptions:
_MiddleIncome is income of voter type MiddleIncome and is defined in simulation.csv
_LowIncome is income of voter type Poor and is defined in simulation.csv
_HighIncome is income of voter type Wealthy and is defined in simulation.csv

Note: This method will only show vanilla/basic game policies.
Any policies from activated Mods! will not be included/shown.

Adjust code line and generate result files for your needs.
Have fun creating good Mods, test and post them for all to share.
Cheers :slight_smile:


**1
Code for Windows (any version)

This is Batch Code, originating
from MS DOS times in the '80 '90
It works for all windows platforms
with only minor changes in parameters (/…) :slight_smile:

**2
type “policies - Copy.csv” | find “#,” | find /i “Motorist_income” > file_MotInc.txt
type == reads text-file
| == forwards the result (pipe operator)
find “#,” == finds any lines containing ‘#,’ == activated csv code line
| == forwards …
find /i “motorist_income” == finds any lines containing ‘motorist_income’
; /i == big/small letters don’t matter

== forwards / creates or overwrites a file with given name in this folder

for more details about FIND
type ‘find /?’ ENTER


#2

using a batch file to all the searching is pretty smart, though if you have gone through the files you know that just because it isn’t in policies doesn’t mean it won’t affect the category. here’s a more comprehensive code just for middle income:

type "policies.csv" | find "#," | find /i "MiddleIncome" > file_MidInc.txt type "simulation.csv" | find "#," | find /i "MiddleIncome" >> file_MidInc.txt type "situations.csv" | find "#," | find /i "MiddleIncome" >> file_MidInc.txt type "votertypes.csv" | find "#," | find /i "MiddleIncome" >> file_MidInc.txt

the down side is that it will find middle income group itself, and _middleincome is found in the list as well (which isn’t the same as middleincome). it also won’t tell you that you can use middleincome_freq for population, and middleincome_income for income (middleincome is for happiness, _middleincome is used in the game for middleincome_income though other groups use [group]_income for its income).


#3

Thanks jamoecw,

_MiddleIncome <–> MiddleIncome
I adjusted my code above
and added Remarks/Exceptions there.


Remarks:
MiddleIncome is a voter type/group.
Normally you have Motorist_income, Capitalist_income, etc.
[color=transparent]…
Exceptions:
_MiddleIncome [color=transparent].is income of voter type MiddleIncome and is defined in simulation.csv
_LowIncome [color=transparent]…is income of voter type Poor [color=transparent]…and is defined in simulation.csv
_HighIncome [color=transparent]…_is income of voter type Wealthy and is defined in simulation.csv
.