DevSlog

Modability

My background in gamedev comes from modding games, which i’ve been doing for the past decade. With over half a million unique downloads the most popular modification being A World of Ice and Fire for Mount and Blade Warband. I could only dream for SpaceSlog to reach a similar amount of popularity. I do of course realise there are many factors as to why the mod was and still is so popular. Having been set within the Game of Thrones world being one of them and being created for an already well established game another.

But i didn’t write this post to talk about mods in other games. I wrote this post to talk specifically about mod support in SpaceSlog.

JSON

I decided to use JSON to hold all external data which is then imported into internal data structures on initial game load. All of the games data is contained in a folder aptly named DATA and can be accessed and changed by anyone brave enough to do so. You can also copy any data here and paste it into your own MODULES folder. Once this mod has been ticked in the ingame mod menu, you will be prompted to restart the game where all these files will be added to that internal data structure we previously mentioned.

Below you can see the current ingame module menu. I still need to add a few things here – an image preview the modder can add plus the ability to adjust mod load order. This will allow the player to decide which mods should or can overwrite other mods if they contain objects with the same ID’s.

Modification select menu

I wont go into the specifics on how modding actually works in this post. That will be for another time but here is a quick example of an item in SpaceSlog and how it looks like in the JSON file. It’s also worth noting that everything here can still change dramatically, though i think i have the basic architecture down for this now.

    "CryoPod": {
        "object_class": "Furniture",
        "object_name": "Cryo Pod",
        "description": "Freezes creatures in time, allowing them to rest for as long as this item has power.",
        "movement_cost": 0,
        "deterioration_rate": 10,
        "flammability": 40,
        "market_value": 200,
        "comfort": 1,
        "material_types": {
        	"primary_mats": ["Titanium", "Gold"],
        	"primary_mats_amount": 3,
        	"secondary_mats": ["Silicon"],
        	"secondary_mats_amount": 2,
        },
        "engineering_skill_required": 3,
        "work_to_build": 1,
        "work_to_uninstall": 1,
        "rotatable": true,
        "draw_width": 1,
        "draw_height": 2,
        "width": 1,
        "height": 2,
        "health": {
            "max_health": 100,
        },
        "graphics": {
            "graphics_class": "GraphicsMultiple",
            "shader_type": "ColourMask",
            "textures": {
                "texture_path": "Textures/Entities/Building/Furniture/CryoPod",
            },
        },
        "component_nodes": {
        	"PowerReceiver": {
        		"power_required": 50,
        	},
        	"Light": {
            	        "light_map_path": null,
        	},
        },
    },

You can see above there are lots of options for the modder to change, including being able to add any pre-built components to any object in the game. I hope to eventually allow the possibility to create new components too. This could mean endless possibilities for mod creation.

Conclusion

Mod support is something i am very passionate about and i have spent a lot of extra time to ensure good mod compatibility for SpaceSlog. I cannot wait to get the game out there and see what weird and wonderful things people can come up with. I expect to see strange new worlds and unthinkable alien races among other things! If you want to discuss further or have ideas for mod support, then please either head on over to our Forums or join our Discord.

2 thoughts on “Modability”

  1. hello produno,
    i have a request, I don’t use steam but I would like to try the last awoiaf v7.12
    on moddb is the last version 7.11.
    can you please upload the latest patch or version on moddb if you can arrange time ?

    thank you

Leave a Reply