New Mod feature (restricted policies)


#1

Ok, version 1.10 just included a new feature,
if you go to the end of the line for any policy in a new CSV file and add a #restricted
entry right at the end, any additional cells after that can include the Name (not the GUIName) of a country in which that policy is valid.
If you don’t have a #restricted cell, then the policy defaults to usable everywhere.


#2

This is exciting! I look forward to seeing how people make use of this for country mods.

-El


#3

Thanks! Now Canada won’t own the West Bank!


#4

yeah exactly, that was the phenomena that made me add that feature :smiley:


#5

I really like this feature! Just curious, can it also be used for simulations? For example, I want to add a simulation for a South Korea mod that I’m making called “K-Pop”. Obviously, only South Korea has K-Pop. So would this be possible?


#6

Ahhh…sorry only policies so far…


#7

Is it possible to restrict some original policies for individual countries by MOD? i wouldn’t like to change original file ‘policies.csv’ but i see it is only way


#8

Hello,
As I have discovered, read and learned today …

positech.co.uk/democracy3/mods.html
“Argentina by joaco335”

… contains the following sample / example.
( For file-path and details pls download and see there. )

This should explain implementation and use of
policy-name, … … … ,#restricted, (to) country


policies.txt

#,ChildStudies,Children Studies Program,default,"A Program that help the children with studies by giving them 
materials and tools for study.",,15,50,5,20,PUBLICSERVICES,500,5000,,5,0,0,
,#Effects,"Education,+0.08+(0.11*x)","Young,+0.06+(0.06*x)","Capitalist,-0.04-(0.06*x)"
,"Socialist,+0.08+(0.08*x)",,,,,,,#restricted,Argentina

… is matching with Mod and country name (name, path) = Argentina

Argentina.txt

name = "Argentina" path = "Argentina" guiname = "Argentina" author = "joaco335"

Cheers


#9

Can someone help me with this?

I’m putting the “#restricted” name in the cell immediately following the last effect (followed by the appropriate countries) in the “policies.csv” file inside “Democracy 3/Data/Simulation”, however, the policy remains unrestricted. Is there something I’m doing wrong?

I am using Version 1.14 and Windows 8, if that is important.


#10

I’m putting the “#restricted” name in the cell immediately following the last effect (followed by the appropriate countries) in the “policies.csv” file inside “Democracy 3/Data/Simulation”, however, the policy remains unrestricted. Is there something I’m doing wrong?


#11

In the wake of the Scottish Referenduym and Scottish Labour’s leadership crisis, I am modding a UK (called 'United Kingdom 2010 in all forms not only GUI and etc.) with extra policies - most specifically devolution,

I am trying to get the #restricted function to work

#,Scotland,Scottish Devolution,scotland,“The decision of the Parliament of Scotland to ratify the Treaty of Union in 1707 was not unanimous and from that time, individuals and organizations have advocated the reinstatement of a Scottish Parliament. Some have argued for devolution – a Scottish Parliament within the United Kingdom – while others have advocated complete independence. The people of Scotland first got the opportunity to vote in the unsuccessful referendum on proposals for devolution in 1979, A second referendum opportunity in 1997, this time on a strong proposal, resulted in an overwhelming ‘Yes’ victory, leading to the Scotland Act 1998 being passed and the Scottish Parliament being established in 1999.”,20,40,15,10,FOREIGNPOLICY,100,1000,1,0,0,#Effects,“Liberal,+0.05-(0.015x)","EthnicMinorities,+0.05+(0.015x)”,“Socialist,+0.10+(0.015x)","Conservatives,-0.05+(0.015x)”, #restricted,United Kingdom 2010,

Restricted Policies Defined in C:\GOG Games\Democracy 3\data\simulation\policies\csv
Mod defined in : C:\GOG Games\Democracy 3\data\mods\United Kingdom 2010

Surely this should fire correctly?

Thanks


#12

Did you put it at the very end?

like:
,#restricted,Argentina

See above! (post by Betino on Wed Aug 13, 2014).


Country name, here (in policies.csv)
is matching
with Mod and country name (name, path) = Argentina, there
( in \data\mods\Argentina.txt (ModDefinition file)
and in \data\mods\Argentina\data\missions\argentina\Argentina.txt (ModCountry file)
and Mod path \Argentina\ , \argentina\ .

See above! (post by Betino on Wed Aug 13, 2014).


#13

!! It is very important, meaning essential, that
the number of commas must remain the same!
That is 29 commas
for a default line.


policies.csv before:
29 commas for a standard policy code line:

[code]
,NAME,GUIname,slider,description
,flags,introduce,cancel,raise,lower
,department,mincost,maxcost,cost multiplier,implementation
,minincome,maxincome,incomemultiplier,

#,ChildStudies,Children Studies Program,default,“A Program that help the children with studies by giving them
materials and tools for study.”,15,50,5,20,PUBLICSERVICES,500,5000,5,0,0,
,#Effects,“Education,+0.08+(0.11x)","Young,+0.06+(0.06x)”,“Capitalist,-0.04-(0.06x)"
,"Socialist,+0.08+(0.08
x)”,
[/code]Before: 29 commas for a standard policy code line!

If you are not sure, you need to count them!
exeption: any comma inside " , " as in “Capitalist,-0.04-(0.06*x)”
: no, this comma does not count!


Now, if you want to add this #restricted,…
you need to add this BEHIND comma number29!

policies.csv after:
29 commas + additional commas:

[code]
,NAME,GUIname,slider,description
,flags,introduce,cancel,raise,lower
,department,mincost,maxcost,cost multiplier,implementation
,minincome,maxincome,incomemultiplier,#restricted,country1,country2,country3,country4

#,ChildStudies,Children Studies Program,default,“A Program that help the children with studies by giving them
materials and tools for study.”,15,50,5,20,PUBLICSERVICES,500,5000,5,0,0,
,#Effects,“Education,+0.08+(0.11x)","Young,+0.06+(0.06x)”,“Capitalist,-0.04-(0.06x)"
,"Socialist,+0.08+(0.08
x)”,#restricted,Argentina
[/code]29 commas + additional commas:


,#restricted,country1,country2,country3,country4
is ok, yes!

But:
,#restricted,Bolivarian Republic of Venezuela,Peoples Republic of China,Syrian Arab Republic,Kingdom of Spain
I don’t know if more than one word as a country name will work. Always.
Well, you need to check by youself!

Cheers :slight_smile:


#14

I’m putting the “#restricted” name in the cell immediately following the last effect (followed by the appropriate countries) in the “policies.csv” file inside “Democracy 3/Data/Simulation”, however, the policy remains unrestricted. Is there something I’m doing wrong?


#15

No matter what I do, I cannot get this feature to work. I’ve counted the commas, I’ve put #restricted at the end. Just doesn’t work?


#16

Would like to able to edit existing policies or even delete them. Would that be possible?