Pre-Order the Game!

Desura Digital Distribution

Tuesday, July 19, 2011

Data File Structures and Thoughts on Spying

I haven't had much chance to work on the game the past week due to personal/family events. However, I had some chances to think over how the saving/loading games should work. It should be readable by players, so they can edit it themselves if they want, without resorting to a third-party editor. It should be well-organized so I can verify the file integrity easily. Due to those two big reasons, I've decided on the XML file format for saving/loading.

I'm sure many of you are familiar with XML data structure. For those who aren't, it's a fairly simple structure that you can grasp within minutes. It'd probably look like this for example (After posting, it broke the stuff with > and <, so I'll replace them with () ):

(STAR_SYSTEMS)
(STAR_SYSTEM name="Beyaan" color="red" size="3")
(PLANET name="Beyaan I" type="TERRAN" maxPop="100" pop="78" owner="2" ... /)
...
(/STAR_SYSTEM)
...
(/STAR_SYSTEMS)
(EMPIRES)
(EMPIRE name="Roman" id="1" race="Humans" ...)
(TECHNOLOGIES)
(TECHNOLOGY type="particle" id="1" level="3" currentPoints="142" ... /)
(/TECHNOLOGIES)
(CONTACTS)
(CONTACT id="2" relation="43" spyEffort="24" spyDefense="10" ... /)
(/CONTACTS)
...
(/EMPIRE)
(EMPIRE name="Null and Void" id="2" race="Zero People" ... /)
...
(/EMPIRES)
(RACES)
(RACE name="Humans" beamResearch="1.0" particleResearch="1.2" ... /)
...
(/RACES)

As you can see, it's easy to read and modify. I also plan on changing all the current data files so it use XML. My goal is to make this game moddable so if I for some reason stop maintaining it, the users can modify it to suit their taste. So far, those fields are/will be moddable:

AI scripts
Technologies
Races (the types of perks are hard-coded however)
Artwork (I won't compile them into the exe, you will be able to see the artwork and replace them easily)
Starting Ships (this will be stored in technology file, since it relies on technologies from the same file)
Space Monsters/Sentinels/Other neutral ships that either is at a system, or roaming.

However, the gameplay mechanics won't be able to be modded. For example, you can't change how colonization works (you colonize by migration). I think the above fields should be sufficient to give the game high replayability.

Now on the subject of spies. I've been trying to think of a good system for this. I've finalized how spies will work, but not how to fund/finance them. How the spies will work is that they will be involved in espionage only. The game's elements is pretty simple, there's no infrastructure, so no sabotage. There's no unrest code, so spies can't incite revolts. Theoretically spies could plant bombs on ships and destroy them, but since there's no multi-racial population, the standard prodecure would be to bar any aliens from entering the military ships. So it'd be pretty impossible to do that. The only option left is stealing technologies. But that's not insignificant! You could be lacking in beam weapons, and you are in contact with a race that's proficient with beam weapons, they'd make an excellent target for your spy efforts.

Stealing technologies won't work like in other games, where if you're successful, you grab a new technology. If a spy is successful, he will grab "research points" and pass it onto you.

For example, if Plasma Cannon requires 1,000 research points, and Plasma Cannon II requires 2,500 research points, and a race you're spying on have both researched, your spy can grab up to 3,500 points (1,000 from first level, 2,500 from second level). It does not hurt their research, the spy merely copies research notes and passes it to you. However, more points requires more luck, so you'll be getting maybe 100 or so points on average. So you can steal technology, but not everything at once.

However, if you have 500 points in Plasma Cannon, and the race have 350, your spy won't be able to grab anything since you're ahead of the other race.

Another thing that spies can do is enable you to research new fields. If you're not at stage for plasma cannon, but your spies grab at least one point in this field, you now can start research on this weapon. So if a race recovers an artifact from Beyaan, or some other artifacts planet (they will be normally unresearchable), you can grab some notes on it, then start research on it.

Now, here's the hard part. I'm beginning to see why MoO 2 and 3 used spies as persons that you have to train first before sending them to spy. In MoO 1, if you slide the slider to full, it'd use up 10% of your total income per race, and 20% for defense, so the max you could spend on spy/defense would be 70% (5 races x 10% + 20% defense). However in Beyond Beyaan, a game may have more than 5 races. So what should the sliders represent? It can go from 0 to 100%, but 100% of what? Should it be based off of your income? Or the amount of population in your empire? Or their population? Or some random value? If I have 100% spy effort on Zero People, does that mean 100% chance of success, or 100% of possible funding for that empire? How much should "possible funding" be? 10 BC? 1000 BC? Etc etc. If you have any ideas for this problem, please post a comment!

5 comments:

  1. I wrote out a detailed and insightful post on the espionage topic, but it was swallowed by the dark forces of the internets. Contact me to talk about it.

    ReplyDelete
  2. I just thought I'd mention that the multi-race issue with spies is solvable by simple genetic engineering. You can literally clone or grow infiltrators. Think of the movie Imposter.

    Also, I'm not sure of a solution for spies, but I always wished someone had done an espionage race quite right - Darlocks came close in MoO, but were held back by coding issues in that game.

    ReplyDelete
  3. I do have an espionage race in mind. As soon as I get a website up with pre-order system, and get some pre-orders, then that race will be the next thing my artist will make.

    What do you wish from an espionage race? The spying system is open for some tweaks/changes. The ideas as posted in the blog post is my final design idea, unless people convince me of a good alternative.

    ReplyDelete
  4. Another thing, why not have sabotage? Instead of taking out actual infrastructure, just have them slow the target's research by soaking up X research points every turn or something.

    ReplyDelete
  5. That's actually a good idea! I could have two different events that can be triggered by spies: Espionage and Research Sabotage. Sabotage will actually destroy research points (by destroying prototypes, notes, deleting data, etc).

    Both events can allow you to frame another empire if your spies are real good or had a good dice roll.

    I also now have a good idea on how to manage the sliders for spying system, thanks to Suspense's suggestions.

    ReplyDelete