If you’re wondering how I created my recent Financial Auditing mod, here’s a nice tutorial for creating your own policy…
First, let’s take the first step: Open your policies.csv file in the data\simulation folder. If you have excel, it will be easier.
Read the “Adding new events” post for an explanation on how CSV files work.
The values come in the following format:
#,PolicyName,GUI Name,slidername,description,CANCELLABLE?,TYPE,minexp,maxep, CostModifier,timetochange,minincome,maxincome,IncModifier,#Effects,effect…
= this is the first value. it has to be # and that indicates that this is a valid line in the file
PolicyName = this is a unique name given to the policy, and is referenced in other CSV files or policies
GUI Name = this is the name the player will see, and is (usually) gramatically correct
description = this is shown to the player in the policy details box
CANCELLABLE? = either TRUE or FALSE (case sensitive), this determines whether the player can cancel the policy
TYPE = the type of policy, must be written in all caps (TAX, LAW & ORDER, ECONOMY, WELFARE, FOREIGN POLICY, PUBLIC SERVICE, TRANSPORT)
CostModifier = when set as an object name, the cost is increased or decreased by the value of the object
minexp = the minimum cost of the policy
maxexp = the maximum cost of the policy
timetochange = this number dictates how many turns it takes for a policy to change
minincome = the minimum amount of income generated by the policy
maxincome = the maximum amount of income generated by the policy
IncModifier = same as CostModifier, but for income
#Effects = separates effects from the rest of the data
effect = effect it has on a voter group or national attribute
The format for effects is…
Object,modifier 1[operator](modifier 2 [operator] x)
For every increment on the slider put into a policy (and there are a lot of increments), the GDP will go down by 0.5 less than 5%. This is because the parenthetical dictates getting 5% of the GDP (represented by x), which the minus sign shows is being subtracted from it. However, the 0.5’s presence shows that 0.5 is being added to the GDP first. This makes the effect:
GDP - (0.5-(5% of GDP))
Now that you have your policy, you’ll need to create an icon. If you don’t have Photoshop, you’ll have to recycle one of the current icons, ask someone to make one for you, or simply do without an icon. For the first method:
Go to the data\bitmaps folder. Scroll down until you see the “icons_policyname.dds” files. Copy the one that corresponds to your icon of choice, and rename it “icons_yourpolicyname.dds”. Replace yourpolicyname with the PolicyName value in the Policies.csv file.
However, if you have Photoshop, you’ll need to download this plugin:
With the plugin installed, open Photoshop and create a 64x64 pixel image. Fill the background with white. Click the Channels tab on the layers pallette, and click the arrow on the toolbar of that pallete. On the drop-down menu, select Create new channel.
On your new channel, draw your image, making sure not to switch to the RGB channel. Preferrably use white to remain consistent with the other icons. When you’re done, save the file with the naming scheme described above, but make sure that when the File Settings box with the Nvidia logo appears, select “No Mip Maps,” and in the drop down menu on the left select “DXT3 ARGB (Explicit Alpha).”
Congratulations! You’ve created your first policy.
Tommorrow’s lesson: Situations