Need help in Modifying Variables

Post your mods, mod information requests and suggestions here for the new version of the game (democracy 2)
Silent
Junior Line Supervisor
Junior Line Supervisor
Posts: 12
Joined: Mon Dec 18, 2006 5:43 pm

Need help in Modifying Variables

Postby Silent » Sat Jan 09, 2010 8:57 pm

I've been trying to add in new variables that the game can read, but all I gets when I boot up the game to test it out is:

"Policy data corrupted:.\SourceCode\SIM_Policy.cpp 300"

Reverting the changes get the game back to normal, so I'm strongly suspecting the changes are the problem. Here are the changes that I have currently.

Code: Select all

#,CrimeRate,Crime,"An indicator of the level of general crime in your nation. This includes crimes such as car crime, burglary, murder, rape, muggings, etc., but also covers fraud and other similar crimes.",LAWANDORDER,0.5,0,1,0,icons_crimerate.dds,#,"_All_,0-(0.13*x)","GDP,0-(0.08*x)","Retired,0-(0.18*x)",,
#,ViolentCrimeRate,Global Tension,"As the Cold War heats up, there is the potential for Mazula to get entangled with various confrontations with the Oriental Axis and the Holy Roman Empire. These confrontations always have the potential to turn violent, and a nuclear war may result.",FOREIGNPOLICY,0.5,0,1,0,icons_violentcrimerate.dds,#,"_All_,0-(0.16*x)","Parents,0-(0.18*x)",,,

#,ForeignRelations,Foreign Relations,"Foreign relations are important for two reasons, firstly as a way of preventing disputes escalating into wars or terrorism which may threaten our citizens, and secondly, as a way to ensure trade relation are good and that we benefit economically from trade and tourism with other nations.",FOREIGNPOLICY,0.5,0,1,1,icons_foreignrelations.dds,#,"InternationalTrade,0+(0.5*x),2","RacialTension,0.3-(0.6*x)","_Terrorism,0.24-(x*1)","Patriot_freq,0.2-(0.4*x)",,

#,InternetAccess,HRE Power,"The Holy Roman Empire is an ideological rival to the Islamic Republic of Mazula. While we promote democracy and freedom, the HRE promotes tyranny and repression. This rating measures how much power the Holy Roman Empire has, compared to ours. If they are weak, freedom is strong. If tyranny is strong, we are weak.",FOREIGNPOLICY,0.5,0,1,1,icons_internetaccess.dds,#,"Patriot,-0.4+(0.8*x)","InternationalRelations,0-(0.5*x),2","ViolentCrimeRate,0+(0.5*x)",,,,


I've modified the code for InternetAccess and ViolentCrimeRate due to the fact that the mod I am doing is an alternate history Cold War mod, and it's not focused on the internet. If you can please help me, cliffski, that would be great!
User avatar
cliffski
Positech Staff
Positech Staff
Posts: 7972
Joined: Sat Feb 11, 2006 10:27 am
Location: UK
Contact:

Re: Need help in Modifying Variables

Postby cliffski » Sun Jan 10, 2010 10:32 am

I think you have '#' where what you need there is '#Effects' instead? (Column S in Excel).
Silent
Junior Line Supervisor
Junior Line Supervisor
Posts: 12
Joined: Mon Dec 18, 2006 5:43 pm

Re: Need help in Modifying Variables

Postby Silent » Sun Jan 10, 2010 5:52 pm

That's...um, strange, since in vanilla, they don't have an #Effects. I added that #Effects to all of the different "simulation" objects to replace "#," but I still get the same error. (I added it at the second #, not the first #.)

I am using an older version of Democracy 2 though, maybe 1.05 at best. That could explain why there was no #Effects in vanilla. That may mean there might be a different solution to this problem? I don't want to update though.
User avatar
cliffski
Positech Staff
Positech Staff
Posts: 7972
Joined: Sat Feb 11, 2006 10:27 am
Location: UK
Contact:

Re: Need help in Modifying Variables

Postby cliffski » Sun Jan 10, 2010 6:24 pm

You need to update to the late st version to ensure I can give accurate tech support I'm afraid.
Silent
Junior Line Supervisor
Junior Line Supervisor
Posts: 12
Joined: Mon Dec 18, 2006 5:43 pm

Re: Need help in Modifying Variables

Postby Silent » Thu Jan 21, 2010 10:39 pm

I believe, altough I am not sure, that my main problem is that I placed the new "code" within the "main" "hardcoded" simulation data. That causes the game to crash. All 'new' variables may have to be placed underneath the "hardcoded" simulation data, underneath the row of commas.

Again, I am not sure if this is the answer, but doing it in this manner ensures that the game does not crash, so I might be onto something here. I hope you understand, Cliff.

Return to “Modding (democracy 2)”

Who is online

Users browsing this forum: No registered users and 1 guest