Deep Space Settlement is a 4X real-time strategy game focused on empire building and grand-scale space battle.

Report article RSS Feed Modding DSS - Preview of what is possible

This article shows how DSS can be modded by adding a food resource and a population concept into the game.

Posted by StephanieRct on Feb 7th, 2013

I often say DSS is highly moddable. But just how moddable is that exactly? Let's see how it works.

The game data is run by Xml files that define almost everything in the game. From resources to ship components, galaxy generators, AIs, weapons, all of it. All that in a readable, thus modifiable, Xml format. So let's see what can actually be done. Here's a xml snippet describing a resource called "Food".


Things are pretty much self-explanatory. Id is an internal name for reference in other parts of the data file. Volume and mass are built-in attributes and "Ration" is a custom attribute. This custom attribute is itself described beforehand as:

All of these attributes are only for display purposes. They don't give any meaning to the game. The meaning of "Ration" will come later in how it will be used.

This resource must be produced somehow in the game. The process of creating a "Food" is at its turn described as:

This means it takes 30 seconds to create 1 unit of "Food" from nothing. These plants grow pretty fast!

Now, not surprisingly, food is produced in farm. Farms are components that can be built on a station hub.


The precompiled attribute refer to a 3d object file, our artist will discus it further down. Things inside the Job element are resources the component can produce. Cost is what the component needs to be built. And there's a couple of extra attributes.

Ok, so now we have a food resource and a farm to produce it. That's great but what purpose does food serve in the game? So far it has none, so we need to give it one. What I want it to do is sustain a population in a colony station. Every cycle of 5 minutes the population must consume food, or
more exactly rations. If there's not enough rations, the population will suffer and eventually die. The game does nothing of that sort yet, population and colony station will be added in the xml file. The colony station is basically another &lgComponent&gt so that is fine. Population is more tricky, it's an
extra logic not implemented in the game itself. That is why the game can be extended with dll files.

Dlls are extra bits of code that comes in several kind of flavors depending on their usage. Galaxy generators, AIs, traders, action buttons (e.g. move and attack commands) are all handled in separated dlls. Components can be extended as well with a dll. Thus, "pop.dll" was created with the specific logic for handling the colony population. The code essentially waits 5 minutes, then goes through the host station's resource storage for any resources that has a "Ration" attribute and consumes what it needs to sustain the current population count. It also adds the new population from births, deaths from starvation, compute moral and other population related stuff.

Here's a small subset of the API available to the dlls, it gives a good idea of what can be done with a unit (PUnit) and it's resource storage (PResourceStorage).

All entities: units, stations, fleets, players, sectors, etc have similar interfaces. What can be done with these dlls is pretty much endless.

The API will be available to players on day 1, along with some samples.

For anybody who is into 3D, adding custom 3d models is very simple well. We are currently using a modified ASE exporter for 3ds max + a tool to convert .ase to .cmp, which is what DSS reads. Both will be made available at day 1 as well. Once exported, an asset - the turret station hub in this case - is then described in .xml like this:

&ltCompSlot id="Hub0" category="Turret" pre="Point001" /&gt refers to a hardpoint, where turrets can be placed. These are placed using point helpers in Max:

And finally in the game:

We are looking forward to see what you will do to this game. :D

Post comment Comments
.JAS
.JAS Feb 7 2013, 10:31pm says:

I actually got into the modding community through modding XML in Star Wars: Empire At War, this excites me! :D

+3 votes     reply to comment
dssmathias
dssmathias Feb 8 2013, 3:48pm replied:

Sounds good! There's so much potential in the mod communities, it's insane. I'm sure you'll feel right at home with how DSS can be modified :)

+1 vote     reply to comment
StephanieRct
StephanieRct Feb 7 2013, 10:42pm says:

Glad you like! :)

+2 votes     reply to comment
dssmathias
dssmathias Feb 8 2013, 9:11am says:

I have added a tiny bit about adding 3d models in our forums: Stephanierct.com

+1 vote     reply to comment
Germanunkol
Germanunkol Feb 8 2013, 12:26pm says: Online

Amazing.
An Indie game that is so highly customizable - keep it up!

+1 vote     reply to comment
dssmathias
dssmathias Feb 8 2013, 3:49pm replied:

Thanks, we will!

+1 vote     reply to comment
Runemaster117
Runemaster117 Feb 11 2013, 4:17pm says:

I dont think the big leage game companies have anything on this aside from maybe Sierra with Homeworld 2. This is awesome!

+1 vote     reply to comment
dssmathias
dssmathias Feb 20 2013, 10:53pm replied:

Let's hope it stays like this, at least for a little while :)

+1 vote     reply to comment
b5cully
b5cully Feb 13 2013, 3:10pm says:

Very interesting...
one question though: doesn't the .xml format get unhandy for relatively large xml files, or are you effectively splitting up the data into multiple files?

+1 vote     reply to comment
StephanieRct
StephanieRct Feb 13 2013, 9:41pm replied:

I'm splitting it up into several files. Some of them are exported from excel sheets to make it easier to balance the game properly.

+1 vote     reply to comment
Post a Comment
click to sign in

You are not logged in, your comment will be anonymous unless you join the community today (totally free - or sign in with your social account on the right) which we encourage all contributors to do.

2000 characters limit; HTML formatting and smileys are not supported - text only

Icon
Deep Space Settlement
Platform
Windows
Developer & Publisher
Escape Velocity Studios
Engine
Custom Built
Contact
Send Message
Official Page
Dss.stephanierct.com
Release Date
TBD
Game Watch
Track this game
News
Browse
News
Report Abuse
Report article
Related Games
Deep Space Settlement
Deep Space Settlement Indie Single & Multiplayer 4X
Related Engines
Custom Built
Custom Built Commercial Released Sep 1, 2007