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

Report RSS 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 on

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 - - 488 comments

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

Reply Good karma Bad karma+3 votes
explr
explr - - 266 comments

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 :)

Reply Good karma Bad karma+1 vote
StephanieRct Author
StephanieRct - - 47 comments

Glad you like! :)

Reply Good karma+2 votes
explr
explr - - 266 comments

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

Reply Good karma Bad karma+1 vote
Germanunkol
Germanunkol - - 153 comments

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

Reply Good karma Bad karma+1 vote
explr
explr - - 266 comments

Thanks, we will!

Reply Good karma Bad karma+1 vote
Runemaster117
Runemaster117 - - 197 comments

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

Reply Good karma Bad karma+1 vote
explr
explr - - 266 comments

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

Reply Good karma Bad karma+1 vote
neutronio
neutronio - - 199 comments

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?

Reply Good karma Bad karma+1 vote
StephanieRct Author
StephanieRct - - 47 comments

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.

Reply Good karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: