Adding Simulations

Post your mods, mod information requests and suggestions here for the new version of the game (democracy 2)
User avatar
jeffryfisher
Type III Robot
Type III Robot
Posts: 72
Joined: Wed Nov 07, 2012 11:58 pm

Adding Simulations

Postby jeffryfisher » Sat Nov 10, 2012 1:20 am

This has probably been asked before but I can't find it...

I want to create some new policies that will feed into and from a new simulation. The modding pages don't tell how to add a new simulation. I've tried adding to the end of simulation.csv, and I've tried adding a txt or csv file in the mydocuments area, and I've tried adding to the end of simulations.csv and putting the new file into the mydocuments area.

No matter what I do, I get an error "Can't find <simulation name> in <policy name>... policies.cpp line..." 500-something.

Modding is absolutely necessary to make the game reasonable, yet modding is devilishly tricky and fragile with scant feedback.

How do I add a new "simulation"?

EDIT: I have since discovered the debugdata folder and will look there next time I trigger a crash... If you do another patch, please add more error detection / feedback. If my simulation is rejected for having the wrong number of commas or something, I'd like to know what I did wrong instead of simply seeing "not found".

BTW, many of my other attempted mods generate a "Cant find LiteracyRate in AdultEducationSubsidies..." error message. Since adult ed is the very first policy, I surmise that the entire simulations.csv file was rejected for some reason, but I have no idea why. I suspect that open office does a poor job of exporting to CSV (it surrounds EVERY cell entry with double-quotes, even the '#' entries).

I have backed up all of the way to the installation versions of the CSV files, and I won't expose them to Open Office again. However, I am still flummoxed when it comes to creating a new simulation entity. For some reason, there seems to be absolutely no way for the game to find it. What's the secret handshake?
User avatar
jeffryfisher
Type III Robot
Type III Robot
Posts: 72
Joined: Wed Nov 07, 2012 11:58 pm

Re: Adding Simulations

Postby jeffryfisher » Sat Nov 10, 2012 7:51 pm

While waiting to be noticed, I'll add a couple details:

I want to add the nuclear power controversy to my game. I would start with two new sims, "NuclearPower" and "NuclearWaste". The power is just electricity (carbon free, and cheap until litigated). The waste is the dark side.

There would then be several policies, dilemmas, events and their consequences: Uranium reactor licensing, nuclear weapons program, thorium breeder reactors (actually reduces waste), nuclear waste disposal site, minor meltdown, not so minor meltdown...

I'm hung up on the first policy. It can't find the new NuclearPower simulation.
User avatar
cliffski
Positech Staff
Positech Staff
Posts: 7975
Joined: Sat Feb 11, 2006 10:27 am
Location: UK
Contact:

Re: Adding Simulations

Postby cliffski » Wed Nov 14, 2012 4:25 pm

Hi, adding a new simulation value is simply a matter of adding a line to that file, but be absolutely sure it is just being saved out as a plain csv format, almost all office software tries to be 'helpful' by screwing it up. You can always open the file in notepad or textpad to make sure it's looking as it should do.

Make sure any line does include the '#' lines without that get ignored.
User avatar
jeffryfisher
Type III Robot
Type III Robot
Posts: 72
Joined: Wed Nov 07, 2012 11:58 pm

Re: Adding Simulations

Postby jeffryfisher » Fri Nov 16, 2012 10:09 pm

Well I'll be -- I had tried that and failed. Maybe I left out a comma or tried to affect a situation (I have since learned that situations can only list their own influences).

In D3, please implement the reading of extra simulations from the MyDocuments area. It will make the addition and removal of mods easier (it's possible but might be awkward to deliver lines to be appended to simulations.csv)

Return to “Modding (democracy 2)”

Who is online

Users browsing this forum: No registered users and 1 guest