New Mod feature (restricted policies)

User avatar
cliffski
Positech Staff
Positech Staff
Posts: 7961
Joined: Sat Feb 11, 2006 10:27 am
Location: UK
Contact:

New Mod feature (restricted policies)

Postby cliffski » Fri Nov 15, 2013 7:10 pm

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.
User avatar
Elinor
Supreme Robot
Supreme Robot
Posts: 105
Joined: Sat Sep 14, 2013 12:59 pm

Re: New Mod feature (restricted policies)

Postby Elinor » Fri Nov 15, 2013 10:13 pm

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

-El
MarioishBeast
Line Supervisor
Line Supervisor
Posts: 16
Joined: Mon Oct 21, 2013 5:58 pm

Re: New Mod feature (restricted policies)

Postby MarioishBeast » Wed Nov 20, 2013 5:27 pm

cliffski wrote: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.


Thanks! Now Canada won't own the West Bank!
User avatar
cliffski
Positech Staff
Positech Staff
Posts: 7961
Joined: Sat Feb 11, 2006 10:27 am
Location: UK
Contact:

Re: New Mod feature (restricted policies)

Postby cliffski » Wed Nov 20, 2013 9:25 pm

yeah exactly, that was the phenomena that made me add that feature :D
Plankicorn
Senior Line Worker
Senior Line Worker
Posts: 6
Joined: Sun Nov 17, 2013 6:31 pm

Re: New Mod feature (restricted policies)

Postby Plankicorn » Thu Nov 28, 2013 4:40 am

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?
User avatar
cliffski
Positech Staff
Positech Staff
Posts: 7961
Joined: Sat Feb 11, 2006 10:27 am
Location: UK
Contact:

Re: New Mod feature (restricted policies)

Postby cliffski » Fri Nov 29, 2013 5:08 pm

Ahhh...sorry only policies so far...
User avatar
Thinker_Rus
Senior Line Worker
Senior Line Worker
Posts: 9
Joined: Mon Dec 23, 2013 1:58 am

Re: New Mod feature (restricted policies)

Postby Thinker_Rus » Tue Jan 07, 2014 7:43 am

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
Errare humanum est
Betino
Type II Robot
Type II Robot
Posts: 55
Joined: Sun Jul 27, 2014 11:39 pm
Location: Germany

Re: New Mod feature (restricted policies)

Postby Betino » Wed Aug 13, 2014 4:12 pm

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

http://www.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

Code: Select all

#,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

Code: Select all

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


Cheers
Auttheum
Junior Line Worker
Junior Line Worker
Posts: 4
Joined: Sun Sep 14, 2014 2:28 pm

Re: New Mod feature (restricted policies)

Postby Auttheum » Wed Sep 24, 2014 11:56 pm

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.
User avatar
dcosta
Type III Robot
Type III Robot
Posts: 72
Joined: Sat Oct 05, 2013 3:47 pm
Location: London

Re: New Mod feature (restricted policies)

Postby dcosta » Sun Oct 12, 2014 2:10 pm

cliffski wrote: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.


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?
luap
Senior Line Worker
Senior Line Worker
Posts: 6
Joined: Tue Aug 19, 2014 11:23 pm

Re: New Mod feature (restricted policies)

Postby luap » Sat Nov 08, 2014 1:38 am

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.015*x)","EthnicMinorities,+0.05+(0.015*x)","Socialist,+0.10+(0.015*x)","Conservatives,-0.05+(0.015*x)", #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
Betino
Type II Robot
Type II Robot
Posts: 55
Joined: Sun Jul 27, 2014 11:39 pm
Location: Germany

Re: New Mod feature (restricted policies)

Postby Betino » Sun Nov 09, 2014 5:03 pm

Auttheum, dcosta and luap wrote: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?

1.
Did you put it at the very end?


like:
,,,,,,,#restricted,Argentina

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


_______________________________________________________________________________________
2.
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).
Last edited by Betino on Sun Nov 09, 2014 6:16 pm, edited 1 time in total.
Betino
Type II Robot
Type II Robot
Posts: 55
Joined: Sun Jul 27, 2014 11:39 pm
Location: Germany

Re: New Mod feature (restricted policies)

Postby Betino » Sun Nov 09, 2014 5:47 pm

3.
!! 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: Select all

,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.11*x)","Young,+0.06+(0.06*x)","Capitalist,-0.04-(0.06*x)"
,"Socialist,+0.08+(0.08*x)",,,,,,,
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: Select all

,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.11*x)","Young,+0.06+(0.06*x)","Capitalist,-0.04-(0.06*x)"
,"Socialist,+0.08+(0.08*x)",,,,,,,#restricted,Argentina
29 commas + additional commas:


_______________________________________________________________________________________
4.
,,,,,,#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 :)
User avatar
dcosta
Type III Robot
Type III Robot
Posts: 72
Joined: Sat Oct 05, 2013 3:47 pm
Location: London

Re: New Mod feature (restricted policies)

Postby dcosta » Sat Jan 31, 2015 8:03 am

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?
abbeyroad.7
Junior Line Worker
Junior Line Worker
Posts: 1
Joined: Tue Feb 07, 2017 5:00 pm

Re: New Mod feature (restricted policies)

Postby abbeyroad.7 » Thu Feb 09, 2017 8:26 pm

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?

Return to “modding”

Who is online

Users browsing this forum: No registered users and 3 guests