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

Can two races use the same ships?

By on January 6, 2014 12:42:36 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

powerhungry4

Join Date 07/2011
0

Is it possible for two or more races to use the same ship effects, entity files, strings, research, etc. without creating duplicates? I've got a mod idea that will replace the three (x2) old races with about ten but there is a lot of overlap and I'm worried about memory issues.

Locked Post 6 Replies
Search this post
Subscription Options


Reason for Karma (Optional)
Successfully updated karma reason!
January 6, 2014 1:13:45 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Each race would need its own entity for the ship that could call the same model/mesh

Make a copy of the entity for that ship eg 

GameInfo\CAPITALSHIP_PHASESIEGE.entity

reame with race you want 

GameInfo\CAPITALSHIP_TECSIEGE.entity

add the new entity to the manifest and the player entity, change the strings and icons and whatever else to suit. 3/4 down it calls the model used.

The entity can share strings and brushes if you want but eah race should have their own ships and structures entities, which is little to add resource wise. 

Sharing abilities is no problem unless you want custom strings and icons.

 

Reason for Karma (Optional)
Successfully updated karma reason!
January 6, 2014 1:34:05 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Yeah, just place the existing ship/research etc. into the player.entity file and it can be used by any number of races.

Reason for Karma (Optional)
Successfully updated karma reason!
January 6, 2014 4:33:54 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

The answer to the question is yes, seeing as the game already does it...loyalists and rebels for each race share 90% of their assets...

Reason for Karma (Optional)
Successfully updated karma reason!
January 6, 2014 6:08:01 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Alright, I'm getting a yes and no simultaneously so maybe a specific situation would help. Sorry if this is a bit long...


Say I want three factions to have the Vasari LRF. Two are the same "race", one is not, eg worm1, worm2, and space1.

I update the player entity files for all three to have FrigatePhaseLongRange.entity (if I'm keeping that name) and update the count within the player.entity file for each faction (assuming its being added and not replacing anything) but not the manifest (because the file itself already is in there once).

I keep the associated strings, models, meshes, effects, damage types, and abilities the same (since most are tied to that same entity file).

Each of the factions improves shields differently but there is a different entity for each of those researches as needed and they aren't directly linked to the ship.

I still use a single common research unlock for the ship that will have the same cost for the same ship in the same location of the research tree for each faction (and is in the player and manifest entity files once each as needed).

My questions then become:

1. Would this work at all? (as a base level)

2. Would it work well/efficiently? (what are the advantages/disadvantages if any)

3. Is it a poor practice? (like coding complicated parts without comments; it works but its a mess thats harder for others to follow)

 

Thanks again for the posts, sorry this got a bit long, enjoy the karma 

Reason for Karma (Optional)
Successfully updated karma reason!
January 6, 2014 6:35:41 PM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

Quoting powerhungry4,
1. Would this work at all? (as a base level)

2. Would it work well/efficiently? (what are the advantages/disadvantages if any)

3. Is it a poor practice? (like coding complicated parts without comments; it works but its a mess thats harder for others to follow)

Assuming I'm understanding what you're doing correctly, the only potential problem is that the frigate needs to be unlocked by a shared research subject, as you already noted. Normally this doesn't matter, but if you begin giving the factions radically different tech trees it gives you a bit less flexibility as the research must be in the same location on the tech tree for all factions that use it.

For the most part reusing as much stuff as possible is a good thing, safe the fact that if you eventually decide you need to change it down the line untangling things can be slightly more complicated than simply making them separate ships in the first place. But as long as you're smart about it, it shouldn't be a big deal.

Reason for Karma (Optional)
Successfully updated karma reason!
January 7, 2014 9:57:35 AM from Sins of a Solar Empire Forums Sins of a Solar Empire Forums

If your primary concern is memory issues, just make sure each of these "identical" ships use the same mesh, because as long as you do this memory will not be an issue even if you give each faction their own ship entity (lets you give each faction a unique research unlock, custom icons, etc). The reason this works is that the primary offenders when it comes to memory hogging, outside of pathfinding, are textures and meshes.

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