Sins of a Solar Empire : Real-Time Strategy. Unrivalled Scale.
© 2003-2016 Ironclad Games Corporation Vancouver, BC. All rights reserved.
© 2006-2016 Stardock Entertainment

[Tutorial] How to add a new race [Complete with Starter Race Mod for E and D]

By on December 9, 2010 12:32:47 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

ZombiesRus5

Join Date 02/2009
+321

How to add a race to Sins of a Solar Empire

By ZombiesRus5

Current Version

This should work with Diplomacy 1.34, however the envoy abilities for the race templates are all the old versions which still should work in my experience.

Races Mod for Entrenchment 1.051 and Diplomacy 1.34

Note: This is the stacking version only for Entrenchment and Diplomacy.
If you don't want the stacked version for Diplomacy simply copy the
Diplomacy files over the Entrenchment to make a single combined mod

 

Previous Versions

Races Mod for Entrenchment 1.051 and Diplomacy 1.32

Entrenchment Starter Races Mod

Races Mod (E) v0.4 (Download)
Patches a few references such as entry vehicles to existing races.
Races Mod (E) v0.3 (Download)

Diplomacy Starter Races Mod

Stack is meant to support Entrenchment and Diplomacy versions of your mod 
allowing you to only modify files necessary for Diplomacy.
Races Mod Stack (D 1.2) v0.3 (Download)
Races Mod Stack (D) v0.2 (Download)
Races Mod Stack (D) v0.1 (Download)

Full is a standalone version of the races mod and should be used when you
don't care about maintaining an Entrenchment release.
Races Mod Full (D 1.2) v0.3 (Download)
Races Mod Full (D) v0.2 (Download)
Races Mod Full (D) v0.1 (Download)


* Important Diplomacy 1.2 message * If you have already started your mod with these files you do not need to upgrade. Instead try adding the QuestEnded event (after QuestFailed) to your new Player[Race].entity files and regenerate the entity.manifest with any manifest generator such as Harpos. The Diplomacy 1.2 versions should really be considered as a resource for new mods only!


Introduction

Welcome to the tutorial for adding races to Sins of a Solar Empire. This tutorial will go over some of the basics associated with adding new races to the existing game for Entrenchment and Diplomacy (Sorry, won't cover vanilla modding).

I plan on adding content to this tutorial as time permits (see list below).


References
http://soase.weebly.com/modding.html

http://soase.weebly.com/sins-mod-set.html

http://soase.weebly.com/research-button.html - Good for any picture manipulation in sins.

http://code.google.com/p/soaseplugin/wiki/Syntax

 


Adding a race
Ok, I've done most the work for you here. Start by downloading the starter race mod for the version you wish to mod. The starter races mod contains 3 addon races that you can modify and still keep the existing Tech, Advent and Vasari races in the game.

The three starter races are clones of the Tech, Advent and Vasari races having identical abiltiies, buffs, ships, structures, starbases and research. You can directly modify these files or copy them to meet your needs.

  

Optional step:

Also, all entries and file names follow Race1, Race2, Race3 making it possible to convert Race1 to Terran. For example: replace Race1 and RACE2 in file names with Terran and TERRAN (case sensitive). All references in the text files will also need Race1 and RACE2 changed to Terran and TERRAN as well.

Changing the name of files and associated references is recommended if you plan on making more than three races.

 

What are the key pieces to understand when working with a new Race? (click on subjects below)

Understanding the Player entity and Galaxy Scenario Def
How to add/edit a ship
How to add/edit a module
How to add/edit an ability and buff (tbd)
How to add/edit a research subject (tbd)
How to add/edit a fighter/squad (tbd)
How to add/edit a starbase and starbase upgrade  (tbd)

 

What the hell is a manifest and why do I need to change it?

Manifest files is Sins way of telling the engine it needs to load the file into memory. If you add a new entity, brush, player picture, player theme, or skybox to your mod you MUST add an entry for that file in it's associated manifest (or mini-dump).

  • brush.manifest
  • entity.manifest
  • galaxy.manifest
  • playerPictures.manifest
  • playerThemese.manifest
  • skybox.manifest

* After every Sins patch it's important to check these files to see if any new entries were added or removed so the same change can be applied in your mod.

Locked Post 78 Replies +3
Search this post
Subscription Options


Reason for Karma (Optional)
Successfully updated karma reason!
December 9, 2010 12:35:38 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Understanding the Player entity and Galaxy Scenario Def

Two key files you should know are the Player[Race].entity and GalaxyScenarioDef.galaxyScenarioDef file. Each are located in the GameInfo directory. These files also differ quite a bit between Entrenchment and Diplomacy. If you plan on maintaining your mod in both expansions now is the time to compare these files and check out the differences.

Player[Race].entity

To start with the Starter Race mod for both expansions contain PlayerRace1.entity, PlayerRace2.entity and PlayerRace3.entity templated off Tech,Psi and Phase respectively.

Open the PlayerRace1.entity file and notice the first few lines for raceNameStringID, randomCapitalShipNamePrefix and randomStarBaseNamePrefix. To change the values associated with these string ids open the English.str file and search for these three entries and change the values to support your mod.

entities

The next item of interest is the planetModuleInfo, capitalShipInfo, frigateInfo, researchInfo and starBaseInfo. This is how you wire ships, structures, research and starbases to your race (further sections will explain how to edit the files referenced). For example if you remove the PLANETMODULE_RACE1ORBITALTRADEPORT from planetModuleInfo/Page:0 and reduce the count from 9 to 8 then your race will no longer have access to build trade ports. You can also add additional modules and ships using the opposite approach, however, sins is currently limited to a max of 9 items per Page.

game events

The gameEventData has been pre-generated to support custom events for your race. All you will need to do is create your custom sound effect (audacity works good for ogg conversion) and name it to match your race file (for example EventRace1_AllyUnitUnderAttack.ogg).

musicThemeData

The musicThemeData has been pre-generated to support custom music for your race. All you will need to do is create your custom music (audacity) and name it to match your race's music file (for example, Race1 Theme.ogg)

hudSkinData

The hudSkinData is where you control what race picture displays during load time (loadScreenCharacterBrush). These are currently still pointed at the core race load screen character and can be changed to your custom character at anytime.

You should investigate the rest of the values but they are optional to change for your mod and currently point to core assets.

researchScreenData

The researchScreenData is the visual meat of the research trees. If you want to change the backdrop, research tree size, title or pictures displayed this all happens here. These are still pointing at core game assets so you will need to create brush entries or string info entries if you wish to change these values.

aiNameData

To change the AI names assigned to your race cross reference the names in this section with the corresponding entry in English.str.

numResearchFields

This is hardcoded to 5 in entrenchment and 6 in diplomacy. Not much to do here except link the research tree name with the value in English.str.

raceRelationsModifier (Diplomacy Only)

Defines the starting race relation modifier for all the races in your mod.

 

GalaxyScenarioDef.galaxyScenarioDef

The Galaxy Scenario Def is required for map making and giving your race the appropriate ships and strutures on Normal Start and Quick Start settings.

Open the GalaxyScenarioDef.galaxyScenarioDef and scroll to planetItemTypeCount. Here you will see the entries for Race1-Race3 defining the planet item's available for each race.

planetItemTypeCount 188
planetItemType
  designName "Race3:Module:Cannon"
  entityDefName "PLANETMODULE_RACE3ORBITALCANNON"
planetItemType
  designName "Race3:Module:CapitalShipFactory"
  entityDefName "PLANETMODULE_RACE3ORBITALCAPITALSHIPFACTORY"

Now scroll down to planetItemsTemplate to see the entries for NormalStart and QuickStart.

planetItemsTemplate
  templateName "Template:DefaultHomePlanetSetup"
  subTemplates 0
  groups 12 
    group
      condition
        type "PlanetOwnerIsRaceNormalStart" 
        param "Race1"
      owner "PlanetOwner"
      colonizeChance 1
      items 3
        item "Race1:Module:FrigateFactory"
        item "Race1:Frigate:Constructor"
        item "Race1:Frigate:Constructor"

Reason for Karma (Optional)
Successfully updated karma reason!
December 9, 2010 12:35:45 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

How to add/edit a ship    

Two entity types you should know for adding or editing a ship are CapitalShip and Frigate. The CapitalShip and Frigate are very similar in terms of content with a few structural differences we'll hit below.
 

CapitalShip (example CAPITALSHIP_RACE1BATTLESHIP.entity)

Frigate (example FrigateRace1Heavy.entity

How to change my ships description and icons?  

mainViewIcon - (Race_Unit_Main.tga)
This is the icon displayed in the gravity well when zoomed out far enough to make the ship mesh to small to see. These icons are typically 28x28 for ships and structures and 39x39 for star bases. To change an icon simply open the Race_Unit_Main.tga and place the 28x28 replacement icon in the same location for the entity modified.

picture - (Race_Unit_Picture.tga)
This picture displays in the bottom hud when entities are selected.

hudIcon - (Race_Unit_Hud_Normal.tga, Race_Unit_Hud_CursorOver.tga, Race_Unit_Hud_Disabled.tga, Race_Unit_Hud_Pressed.tga)
This is the icon displayed in the frigate factory, capital ship factory, module construction and tactical construction hud. The how to add a research button tutorial listed as a reference above goes into more details on how to add a new icon.

smallHudIcon - (Race_Unit_Main.tga)
This is the icon displayed in the empire tree.

infoCardIcon - (Race_Unit_Infocard.tga)
This is the icon displayed when hovering over planet summaries either from the empire tree or when zoomed out with planets. These icons are 22x22 pixels.

NameStringID and DescriptionStringID (English.str)
These entries are easily changed to reflect your new race by Searching for the Eglish.str entry and modifying the value associated.


Does my ship bomb?  

canBomb TRUE/FALSE

If you ship is a planet bombardment vessel this value should be set to true.
 

* note: The bombEffectsDef is the same as the WeaponEffectsDef.
 

* note: hasBombingLevels is used when frigates are created from abilities "createFrigate" allowing increased damage per level of ability. 


How much does my ship cost?
 
Configure ship cost is a combination of basePrice, slotCount and BuildTime. The basePrice follows the standard Cost structure. The slotCount for CapitalShips is generally set to 50 for base sins and the BuildTime is set to 75 seconds. Frigates are race dependant although there is some balance to the overall costs that you may wish to achieve.

* suggestion: Start with balancing cost/dps, cost/supply, cost/experience, cost/hull, etc for your new race with the TECH equivalent.


How do I set the base ships stats?

This is an area where CapitalShips and Frigates have obvious differences. For one CapitalShips support leveling by experience while Frigates do not. Most of the values are self explanatory, however CommandPoints and maxNumCommandPoints are used to determine the available amount of strikecraft squadrons supported by your ship.


CapitalShips support the following:

LevelIncrease

Frigates support the following:
 

hasLevels: Condition

hasWeaponLevels: Condition

note: hasLevels, hasWeaponLevels is similar to hasBombingLevels in that it only takes affect when the frigate is created from an ability with levels.


How to edit weapons?

NumWeapons is used to control the number of available weapons on the entity. It is constrained from 0-3 meaning you can have a MAX of 3 weapons on the entity.

I've debated how to best explain adding weapons and have decided on the following...

Don't over complicate it!

The best way to add a weapon is decide what type of weapon you want (i.e. weaponClassType) and copy the weapon and weaponEffectDef from an existing entity reference file matching what you want. The only values you should resonably have to change following this approach is the DamagePerBank, Range and PreBuffCooldownTime.

For example if I want to add a Missile to a frigate the easist way to make sure the values are right is to copy the Weapon and WeaponEffectsDef from either the TECH LRM or the Vasari Assailant (LRF). Some effects are scaled for the ship type so it would make sense to look in a similar class for the weapon type and effects you want.


How  to add squads?

All frigates, capital ships and hangar bays support a max of four types of squads. Squads typically require anti-matter to regenerate on frigates and hangar bays but require no anti-matter on capital ships and star bases.

CapitalShips

CommandPoints controls the base level of squads supported by the capital shipa and the additional squads per level. A per level growth of .5 would mean an additional squad every 2 levels.

Frigates

The maxNumCommandPoints controls the number of squads supported by the frigate.

* Note: Squads require at least one Hangar point be assigned to the mesh.
* Note: If squads are entered maxNumCommandPoints should be > 0 for frigates and CommandPoints should be greater than 0 for each level for capital ships but may start at less than one.


How to set abilities?

Abilities are set either at the top of the file for CapitalShips or near the bottom of the file for Frigates. How to create abilities will be covered in another section, but, be careful the ability is meant for your race as any research prerequisites referenced may prevent the ability from working if the research is not included with your race.

* Note: While five abilities are supported for each type, the fifth CapitalShip ability will be hidden by the upgrade button requiring it to be passive or set to always autocast.

Reason for Karma (Optional)
Successfully updated karma reason!
December 9, 2010 12:35:49 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

How to add/edit planet modules?

 

Understanding Planet Modules

PlanetModuleStandard can be used for most generic logistic and tactical structures.

 

What drives the AI?

In addition to entityType, planet modules support the following fields that help drive how the AI uses modules.


How to change my module's description and icons?

  • See similar section on how to add/edit ships.

 

How do I get weapons on my modules?

You have two options starting with Entrenchment using either the PlanetModuleHangarDefense or the PlanetModuleWeaponDefense. Both support Weapons while only the HangarDefense support strikecraft.

Do I have to use PlanetModuleTradePort for Trade Ports?

Yes, only the ModuleTradePort supports the necessary logic and lines affecting trade:

 

Do I have to use PlanetModuleRefinery for a Refinery?

Yes, only the ModuleRefinery supports the necessary logic and lines affecting refineries:

 

Can any Planet Module have culture output or does it need the CultureCenter role?

Yes, any module can spread culture. The following line needs to be set to a value higher than 0.0.

 

Can I add Weapons to non Hangar and Defense Modules?

No, you would need to use abilities to simulate weapons in this case.

 

Can modules have shields?

Yes, modules can start with shields or have the extended via abilities. You will want to set maxShieldMitigation in the entity file in either case (see Advent's modules).

Reason for Karma (Optional)
Successfully updated karma reason!
December 9, 2010 12:35:59 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

How to add/edit an ability and buff

Reason for Karma (Optional)
Successfully updated karma reason!
December 9, 2010 12:36:03 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

How to add/edit a research subject

Reason for Karma (Optional)
Successfully updated karma reason!
December 9, 2010 12:36:10 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

How to add/edit a fighter/squad

Reason for Karma (Optional)
Successfully updated karma reason!
December 9, 2010 12:36:14 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

How to add/edit a starbase and starbase upgrade

Reason for Karma (Optional)
Successfully updated karma reason!
December 9, 2010 3:35:46 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

thank god!!!!!

Reason for Karma (Optional)
Successfully updated karma reason!
December 9, 2010 3:45:04 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

thank god!!!!!

Don't thank god, thank ZombiesRus5  .

Reason for Karma (Optional)
Successfully updated karma reason!
December 9, 2010 4:22:45 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

I thought I would give myfist0 a break and not make him do this guide

Reason for Karma (Optional)
Successfully updated karma reason!
December 9, 2010 4:28:50 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

The starter race mods also have the pre-built six race selection in place for both the entrenchment and diplomacy version.

 

Reason for Karma (Optional)
Successfully updated karma reason!
December 9, 2010 4:31:03 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

And the RelationShip window has been updated to support this as well.

Reason for Karma (Optional)
Successfully updated karma reason!
December 9, 2010 8:27:19 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Don't thank god, thank ZombiesRus5 .

i said a brief prayer when i saw this its going to be so helpful

Reason for Karma (Optional)
Successfully updated karma reason!
December 15, 2010 3:45:58 AM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

This thread should be pinned.

Reason for Karma (Optional)
Successfully updated karma reason!
December 23, 2010 12:10:50 AM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Quoting derenek,
This thread should be pinned.

Thanks, I think this thread will ultimately end up useful if not just for the starter mod. I'm not sure though if the moderators are actively pinning and cleaning up pinned threads though based on the currently pinned items.

I'll try and bump this periodically for new people to see if they are interested in modding or just want to play around.

Also, I've updated the first two sections and upload some minor patches to the starter race mod fixing a few references for completeness sakes.

Reason for Karma (Optional)
Successfully updated karma reason!
January 2, 2011 3:59:41 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Started adding info to the weebly. Needs some tweaking as forum to html doesn't cross to well

http://soase.weebly.com/add-edit-ships.html

Also not sure weather to put this directly under modding section or the Add Race sub section.

Reason for Karma (Optional)
Successfully updated karma reason!
January 2, 2011 4:21:47 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Cool, I have very little time to do much of any hobby until recently, so I'm just trying to get kick started back up.

In regards to the section, it could be linked from both places as it would be valid from either.

Reason for Karma (Optional)
Successfully updated karma reason!
April 7, 2011 10:59:25 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Small bump to get this up to Diplomacy 1.2 compatibility. A couple small notes.

I did not change any cloned abilities to include the enhancements made by IC. This simply means the cloned abilities and buffs act as they did in the pre-diplomacy 1.2 fashion.

If you have already started a diplomacy mod using these resources I suggest you manually modify your mod to make it diplomacy 1.2 compatible. (see the following note)

* Important Diplomacy 1.2 message * If you have already started your mod with these files you do not need to upgrade. Instead try adding the QuestEnded event (after QuestFailed) to your new Player[Race].entity files and regenerate the entity.manifest with any manifest generator such as Harpos. The Diplomacy 1.2 versions should really be considered as a resource for new mods only!

Reason for Karma (Optional)
Successfully updated karma reason!
May 16, 2011 7:36:39 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Zombie, im going to post this question here and in my own thread.

Im using your Races Mod, ive now got Empire, starfleet & Stargate in.

How do i replace the Tec, advent & vasari to make the 6 sci-fi races?

 

 

Theo

Reason for Karma (Optional)
Successfully updated karma reason!
June 8, 2011 7:20:24 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Zombie, I'm trying your extra races mod but here's my complaint (for everyone): 

[rant] If you're using free file hosts and sharing, save the darn thing as a regular "zip" file.

I am a huge Open Source fan and have used and use 7zip but since using it in 64bit Win 7 I have had nothing but continual headaches with it and the files it creates.

In this case the file won't open in 7zip.  It might be a corrupted DL by the host but I have had a string of issues with 7zip requiring me to constantly "hand fix it" every other time I use it.

I'll try re-downloading it.  [/rant]

Very nice documentation in the post here--thanks!

Update:  Still getting the "can not open file as archive" error in 7z.

 

Reason for Karma (Optional)
Successfully updated karma reason!
June 8, 2011 9:08:12 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Quoting Sinperium,
Zombie, I'm trying your extra races mod but here's my complaint (for everyone)

Lets be reasonable here, the complaint is for you.

I just don't care for "zip" files personally. You appear to be one of the few having issues with 7z or atleast the only one publicly complaining. I can make a zip file for you if you would want, though but probably won't stop my use of 7z as it does a better job of compressing the files.

 

Reason for Karma (Optional)
Successfully updated karma reason!
June 8, 2011 9:49:22 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

"Better job" is a relative term--if the file isn't working it isn't better.   I'm not the only one.  The Forge site has several exact issues that I have and they are unresolved or unanswered at present.  I know that puts me in the minority but it is an issue for some and its particular to the 64bit version.  I can use it fine on my 32 bit machine and it is working fine on other 7z archives I DL right now.

By "everyone" I meant everyone using 7z to compress.

I've had 7z since the first beta along with Winrar and the many zip tools that came and went.  It was not untilo running the 64 bit verrsion of 7z that I had issues.  The defense of 7z is very reminiscent of arguments about why Apple mice don't need more buttons and their keyboards don't need a delete key.

I still can't open your v0.03 file (after several downloads).  Can you recheck it?

P.S.  Not griping about ppl using 7z when it's actually practical--just as a "default choice" because "that's the way we roll".

P.S.S.  Aren't you in that "Plants and Zombies" game too?

Reason for Karma (Optional)
Successfully updated karma reason!
June 13, 2011 8:14:11 AM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Zombie, same thing. I can not open the Races Version V0.3.

 I have Winrar and 7Z installed .

I want to do a Diplomacy 1.2 version of my mod.

 

Theo

 

Reason for Karma (Optional)
Successfully updated karma reason!
June 13, 2011 11:03:20 AM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

I'm putting together a new build. Just trying to find the free time to get it completed.

Reason for Karma (Optional)
Successfully updated karma reason!
June 13, 2011 11:30:56 AM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

No probs, i know how hard it is with RL in the way of Modding!

Reason for Karma (Optional)
Successfully updated karma reason!
Stardock Forums v1.0.0.0    #108432  walnut2   Server Load Time: 00:00:00.0001469   Page Render Time: