Friday, July 27, 2007

Various distractions

Working for yourself rules... when its all going well. But you get easily distracted. A phonecall from a family member in the mid morning can waste half a day. They know you don't exactly have a boss who minds personal calls... and without a proper schedule, I can get easily sidetracked. I had to do the DRM for the retail copy of Democracy today, yet the machine with the democracy source code on is dying. garbled screen, blue screens of death, crashes.... i suspect a faulty video card. So I had to copy tons of data to my main machine before I could even start work on it.

But that's all done now, and I'm back In Democracy 2 coding mode. I started work on the fairly rudimentary scripting stuff yesterday. In the first game, a dilemma was limited to 2 options, and the effects were defined thus:

0 = "Capitalist,0.06"
1 = "Environmentalist,-0.10"
2 = "GDP,0.02"

That means the only effects are the creating of 'grudges, and they are specified in a list. The new system does this:

OnImplement = "CreateGrudge(AirportExpansion,Environmentalist,-0.08,1.0); CreateGrudge(GDP,0.02,1.0)"

Which I think is better, although stupidly it's still all on one line. The idea is that the code has a number of functions (createGrudge()) which take up to 10 parameters each. A little bit of script parsing separates out the variables and function names, and calls the right code.
This means I'll be free to add stuff like:


etc., so I can get some more customisation of each dilemma. Ideally, it's just a first step to making much more of the game 'open' so that modders can achieve more than they were able to under the original Democracy. Mod support is something I really believe in, but I never take it as far as I intend to.

Links to this post:

Create a Link

<< Home