Rodina Guide

Ultimate Rodina Modding Guide for Rodina

Ultimate Rodina Modding Guide

Overview

This guide covers the basics for rodina modding: changing the ship model, adding planets/moons, vanguard chunks, and more.

1) Setting up

Intro

Everything we do will revolve around the game’s Mods folder, Steam>steamapps>common>Rodina>Mods, you may want to pin this directory to keep it handy.

To add a new mod to the game, simply add a new folder in the mods folder and name it to whatever you choose. In this folder we’re going to replicate the relevant folders and files from the game that we want to change; any files in here should overwrite the game’s files when you launch Rodina, so you don’t have to change anything in the original game’s folders.

To uninstall your mod at any point, simply withdraw your mod folder from Mods.

What you need:

  • You’ll want a code editor to open the game’s .lua files, e.g. Notepad++ (free) will do.
  • If you want to change/add in-game models, download the blender asset files and exporter here: [link]
  • For this you’ll need a version of blender 2.74-2.79, as unfortunately the exporter is not yet compatible with 2.8 (as of 27/04/2020)

Modding is very easy to pick up; it can simply involve resource-swapping or copying the original game’s files/script and fiddling with code until you find what you want. This guide will mostly serve to point you in the right direction, so you don’t have to spend ages trying to find relevant files. In the first sections I’ll go through laboriously in detail, but later in the guide I’ll stick to a more concise approach.

2) Changing the Music/Sounds

Lets start with something quite simple but beneficial. In your mod folder you’ll want to make some new folders, Data>Sounds, Music, in here place whatever audio file you wish to play in the game (obviously music into the music folder, sounds into the sound folder), formats .ogg, .wav will work (not mp3).
Now let’s say we want to change the title music when we load Rodina, make folders Scripts>Gameplay and then copy over the file “EGAudio.lua” (from the game’s folder of the same name) into your new Gameplay folder.
Opening this file, you’ll find many short paragraphs of code pertaining to all the different sounds in the game. We’re looking for “Music.RodinaTheme =” and here we’ll replace the “Rodina Main Titles” to whatever the file name of our audio file we want to play from the Music folder. Now when we boot up the game, it should play our new theme.

Its always good practice to mark out the code you’ve changed, which I’ve done here with some hashtags commented with a “–“. Here you can change other music, such as combat music, planetary music etc., as well as changing the game sounds for everything. enjoy!

3) Changing the Playership

This part of the guide assumes you have at least a basic knowledge of blender, if not there are some great tutorials on youtube or elsewhere.

Make sure you’ve downloaded the blender asset files and exporter. In Blender you need to add the exporter: go to File>User Preferences, hit Install from file and select the exporter BrendanExport.py. You can check this is enabled in User Preferences>Add-ons.

I would start by appending the default playership, ShipOpen, and its children InteriorRoot.001, GunBarrelRight, GunBarrelLeft, MissileBarrel.001 from Ship1.Blend (file you downloaded), into your new blender world, just to act as a reference when constructing your ship.

The important points are as follows:

  • InteriorRoot: where the ship’s airlock will spawn
  • GunBarrelLeft/Right: where your ship blaster projectiles will spawn
  • MissileBarrel: where your ship missile projectiles will spawn

Each of these empty meshes will need to be parented to your new ship object (Ctrl+P), either copy them over from the default ship file, or just add them in and name them appropriately (the auto number suffix, eg “.001”, shouldn’t matter)

Finished your model?

Once you’re happy with the shape of your object, you’re still going to need to add a rectangular hole for the airlock to spawn. The dimensions should be 4×3 (wxh). Place the InteriorRoot exactly in the middle along the base of the airlock entrance.
So there you go, that covers all the basics of that. There are a few things to be said about interiors, but we’ll come to those in the later sections.

Exporting your model

  • Make sure its facing the right way (front should point to +y direction)
  • Make sure rotation and scale for your object is set to 0,0,0 and scale 1,1,1. (Do this by selecting object>apply>Rotation&Scale without actually changing the dimensions of your model)
  • Make sure you’ve triangulated all the faces in your model; in edit mode select all faces with “a” then “ctrl+T” to triangulate.

To export, go to file>export>ExportBrendan(.egm), your object will be dumped where your .blend file is as a .egm file.

Physics model

Before I continue, you’ll need to create a physics model to match your new .egm file, otherwise the game will keep using the original ship’s physics (Ship1.ShipOpen.Physics.egm). For relatively low poly models, it shouldn’t be a problem to just duplicate/use the same .egm file for your ship model, however a high poly physics model will slow or crash the game, so you may need to make a separate lower poly one.

Adding it to the game

You’ll want to create some new folders in your mod folder, Data>Models, here place your .egm file(s). If you’re happy with just changing the model of the ship, you can simply name your files “Ship1.ShipOpen.egm” and “Ship1.ShipOpen.Physics.egm” and it will simply overwrite the game’s original files of the same name. If you’re planning to change the ship’s properties (speed,particles etc.), then I’d recommend keeping a unique file name.
Changing ship properties

The main files we’ll be concerned with are EGDataShipPlayer.lua and EGDataParticles.lua, both located in Rodina>Scripts>DataGameplay. As per usual, make a copy of each file and its folders in your mod folder.

Lets start by opening EGDataShipPlayer.lua. First make sure that the filenames in “EGShipPlayer.Path=” and under “EGShipPlayer.VehiclePhysics”,”Basis=” are the .egm filenames you added in your models folder. Here I’m using the same .egm file for both the graphics and physics of the ship.
In this file there are a ton of different constants you can change. You can fiddle with the ship’s movement for different gears, however be aware sometimes you may need to restart the game before any changes are implemented.

In the other file, EGDataParticles.lua, we can modify the particles of the ship’s engines, missiles, as well as player blasters, enemy blasters, etc. For example, here I’ve changed the main combat engine particles to red.
I’ll leave you to tinker with these settings; you may want to change the position of where the particles spawn to match your ship model. The third-person ship camera positioning can be changed back in EGDataShipPlayer.lua, in function “EGShipPlayer:SetMovementEffects”.

The ship walkway

The game will spawn the default airlock walkway where you placed your interior-root. If you want to change this, the game’s walkway model can be found in Ship1.blend (from the assets folder downloaded earlier). Like with any object, model it to your liking and export it as a .egm file the same way you would with the playership. Make sure it’s facing the right way and the origin of the object is where it will touch the airlock. Here it is simply easiest to rename your file “Ship1.ShipWalkway.egm”, to overwrite the game’s, and place it in your Models folder.

4) Adding Planets/Moons

  • Take a look at EGDataPlanets.lua in Scripts>DataGameplay
  • Here we see how to define a new planet/asteroid
  • You need not copy all the code to your mod folder, but I’d copy over the code for an existing planet as a reference.
  • Before we boot the game, we need to add it to the function “EGCreateDefaultZoricaScene” found in Scripts>DataGameplay>EGDataZoricaScene.
  • Here I’ve modified Zosia and made it a moon for Jarilo:
  • Once again there are bucketloads of constants to fiddle with; you can have moons whizzing and spinning around should you wish.
  • Unfortunately two planets won’t fully render simultaneously

5) Custom Interiors/Furniture

(for exporting models to .egm from blender, please refer back to section 3)

Custom Tilesets

  • Pick a tileset blend file (there is a template file) from the downloaded assets folder, copy and rename it to your choice, eg “TilesetExample.blend”.
  • Inside you’ll find all the components of the tileset, physics models labelled with “Physics” prefix.
  • When done with your changes, export all the objects as .egm files.
  • Move the files to your Models folder

Here I’ve changed the colour/wall-lining of the bridge tileset.

  • Take a look at “EGDataTilesets.lua” in Scripts>DataGameplay, make a copy for your mod.
  • To add a new tileset, refer back to the original file, you’ll see its quite simple:
  • (Make sure the FilePrefix=”” is set to the prefix of your .egm files)

Adding Furniture

  • You’ll find the game’s placeable items in Furniture/Machines blend files from the assets folder.
  • Create and export your model to your Models folder as a .egm as usual
  • Refer to “EGDataItems.lua” in Scripts>DataGameplay for how to add new items.
  • To add transparency you’ll need to add an extra line, setting “GlowAdd” to true (adjust the alpha in blender).

  • We can also attach particles to objects:

6) Custom Vanguard Chunks

This section of the guide is still a massive [WIP]! sorry about that!

Relevant files to look at:

  • EGDataZoricaScene.lua (Scripts>DataGameplay)
  • EGDataVanguardChunk.lua “
  • EGDataProgress.lua ”
  • EGVehicle.lua (Scripts>Gameplay) -(IMPORTANT: the dev has stated that object persistence will be handled in future updates 1.4.2< in a new file, “PersistenceProfile”)

Modelling

Modelling of your chunk is essentially the same to your ship, but w/ the empty meshes you only need worry about the interior-root; make a 4×3 hole for the airlock as usual.

Adding them in

See the paragraph on VanguardChunks in “EGDataZoricaScene.lua”. The positioning of the chunks is generated randomly. If adding a new class of chunks, don’t forget to create them in the function EGCreateDefaultZoricaScene().
V IMPORTANT: In file “EGVehicle.lua”, you need to add a little bit of code to ensure that your object doesn’t get deleted by the engine when the player is far away. Do a search for “vanguard chunk” and you’ll find the relevant line there. (-As mentioned earlier, this will be changed in a later update)

One final piece of info, if in story mode, the chronology for when the vanguard chunk markers appear is in “EGDataProgress.lua”, so you may want to add something there for your own class.

Chunk Properties

You can change all the different properties of the chunks, (e.g. Interior, exterior model, UI marker, xeno spawn rates etc.) in the “EGDataVanguardChunk.lua” file.

Other links

The rodina modding community has unfortunately been plagued with much inactivity for the past year or so. In spite of this, I’ve tried to contact some members to see if we can get the ball rolling again.

Here’s the rodina wiki page for modding: [link]

lowbudgetman also made a great video guide on playership modelling, though its quite outdated now:

This guide is largely inspired as an extension of “Prof. Kronos'” general steam guide for Rodina:
[link]

That’s it for now, but the info here is still being updated. If this guide helped you in any way, please give it an upvote! If you have any questions/advice comment below.

SteamSolo.com