Repost: Editing Policies

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 example…

GDP,0.5-(0.05*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:

download.nvidia.com/developer/NV … 5.1320.exe

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

Could you explain this in a little more detail?

I mean basically what happens if I change the numbers from 0,5 to something else?

GDP,0.5-(0.05*x)

translates to

the effect on GDP is to boost it by 0.5 then subtract 0.05 times the value of X, where X is whatever you are editing, such as a policy

In most cases the initial value will be 0 so for this:

GDP,0+(0.1*x)

we are basically saying this policy will have no effect on GDP at all when x is zero (which means the policy is implemented but its slider is at zero), and a +0.1 (10%) change to GDP when the policy slider is at maximum.
The reason there is that stareting value, is you can have a policy that has a certain effect regardless of the slider. So if you want a policy to have an effect of between 30 to 40% rise in GDp accross its slider you would use this:

GDP,0.3+(0.1*x)

Make sense?

Much clearer! Thanks… [Am working on new policies at the moment]

Trying to create a policy here. However, the game won’t even start a game or load a game because of my policy. I’m not sure what is wrong with it (however: i am very bad with these things). So, I can’t even test it (the effects put there are just to experiment with)

Some help please?

This is my policy, which is in the mods/policies folder.

#, mino, Visible Minorities, default, “This stipulates how visible minorities, whether they are religous, ethnic, etc, are treated and respected in society. Liberals argue that to show tolerance to these groups will allow them to better integrate society. However, Patriots claim that to much liberty to express their difference will only push them to break the national spirit apart.”, TRUE, WELFARE, 100, 700, 10, 0, 0, #Effects, “Liberal, 0.5+(0.20x)", "Patriot, -0.5-(0.20x)”,

As far as I can see, its the space in front of ‘default’, and the spaces elsewhere in the data. You cant have a space after the commas, the spaces screw it up. They shouldnt do, thats poor coding by me, but remove them and it loads fine :smiley:

thanks
that was indeed the problem

I have a question about the exact format and limits of setting policy effects.
I know that both * and ^ symbols can be used,but what about other arithmetic operations? Is there any way ,for example,to make policy effects regarding something very positive when it is set 0.5+ but only a little negative when 0.5- without using ^ symbol? (if i use the ^ symbol the max or min value will have to be 1.0,wchich i would like to avoid).

How do you use the ‘everyone’ voter group? I tried using it like any other, as in:

Everyone,-0.03-(0.03*x)

But it doesn’t work.

Also, is there a way to increase cynism in the public as a result of a policy?
And come to think of it, what is cynism (or the lack of it)?

And what does this mean:

_security_,0+(0.15*x)

security is the value that decide if a terrorist attack works. Everyone is actually called All as I recall (have a look in the voters group spreadsheet.