If you want the new planet to have new textures you will need a new .mesh file which tells the sphere model what texture set to use.
I think the file tree you need the folder placements?
Mods-Diplomacy v1.011\
My Planet Mod\ |
Mesh\Planet_New_0.mesh |
GameInfo\GalaxyScenarioDef.galaxyScenarioDef |
GameInfo\PlanetNew.entity.entity |
GameInfo\PlanetBonusNew.entity <-- optional |
String\English.str |
Textures\PlanetNew0-cl.dds |
Textures\PlanetNew0-da.dds |
Textures\Icons_Planets.tga |
Textures\PlanetBonuses.tga <-- optional |
Window\Planet_m0d.brushes <-- my new brush file, |
brush.manifest <-- I like to make a new brush file and add to the manifest |
entity.manifest |
|
|
|
GameInfo\PlanetNew.entity
Copy an existing planet and rename to suit, then add the new planets entity to the entity manifest and increase the count +1.
GameInfo\PlanetBonusNew.entity <-- optional
Copy an existing planetbonus and rename to suit, then add the new planetsbonus entity to the entity manifest and increase the count +1.
Planet bonuses are added to the planet entity. Each planet entity has the sections...
requiredPlanetBonusesCount 0
possibleRandomPlanetBonusesCount 0
If your planet has a speciality you may with to add the bonus to the requiredPlanetBonuses section and increase the requiredPlanetBonusesCount value +1.
requiredPlanetBonusesCount 1
bonus "PlanetBonusNew"
possibleRandomPlanetBonusesCount 0
If you wish to have the bonus as a maybe or maybe not then add it to the possibleRandomPlanetBonuses section and increase the possibleRandomPlanetBonusesCount value +1. To make it so there is a bigger chance of getting your new bonus rather than any others in the list just add more lines with the same bonus and increase the possibleRandomPlanetBonusesCount + 1 for each line.
requiredPlanetBonusesCount 0
possibleRandomPlanetBonusesCount 11
bonus "PlanetBonusNew"
bonus "PlanetBonusNew"
bonus "PlanetBonusNew"
bonus "PlanetBonusNew"
bonus "PlanetBonusHighGravity"
bonus "PlanetBonusSpiceTrade"
bonus "PlanetBonusThermalLift"
bonus "PlanetBonusStrictSecurity"
bonus "PlanetBonusToxicFallout"
bonus "PlanetBonusVacationCenter"
bonus "PlanetBonusWeaponTestGrounds"
with the above example the chances of the plant getting PlanetBonusNew are greatly increase over the other bonuses.
Also note that the Diplomacy planet bonuses brush file looks like it was never completed by the developers. I edited the Window\HUDIcon-Planet.brushes to use more of the icons included in Diplomacys PlanetBonuses.tga file. See [FIX] Planet Bonuses.
Mesh\Planet_New_0.mesh
If the new planet will have its own textures you need to link them to the mesh file. Copy an existing planet mesh and rename to suit. The easiest way is probably copy an existing texture set and rename to suit, then open the new planet mesh and connect the new textures.
Material
DiffuseTextureFileName "PlanetNew-cl.dds"
SelfIlluminationTextureFileName "PlanetNew-da.dds"
then link the the new mesh to the new planets entity.
meshName "Planet_New_0"
If you wish to resize your new planet to a moon or a giant, an easy way is to use the Resize Tool which will change the scale of SoaSE models directly from the TXT mesh.
Window\Planet_m0d.brushes <-- my new brush file,
Open the new planets entity and look at the section labelled meshInfo.
You will need to hook up the new icons for the planet here. These are links to the various brush files in the window folder. Almost every link has its own brush file but for modding I like to make my own brush file (Window\Planet_m0d.brushes) which makes it a lot easier to modify 1 file. Also porting to a new version or other mods is a breeze.
hudIcon "HUDICON_PLANET_NEW0"
smallHudIcon "HUDICONSMALL_PLANET_NEW0"
infoCardIcon "INFOCARDICON_PLANET_NEW0"
mainViewIcon "MAINVIEWICON_PLANET_NEW0"
undetectedMainViewIcon "MAINVIEWUNDETECTEDICON_PLANET_NEW0"
picture "PICTURE_PLANET_NEW0"
Here is a look at the Window\Planet_m0d.brushes with all the brushes for 1 new planet.
TXT
onlyLoadOnDemand FALSE
brushCount 6
brush
name "HUDICON_PLANET_NEW0"
content "Simple"
fileName "Icons_planets_m0d"
pixelBox [ 1210 , 85 , 50 , 50 ]
brush
name "HUDICONSMALL_PLANET_NEW0"
content "Simple"
fileName "Icons_planets_m0d"
pixelBox [ 1170 , 85 , 28 , 23 ]
brush
name "INFOCARDICON_PLANET_NEW0"
content "Simple"
fileName "Icons_planets_m0d"
pixelBox [ 1176 , 120 , 22 , 22 ]
brush
name "MAINVIEWICON_PLANET_NEW0"
content "Simple"
fileName "Icons_planets_m0d"
pixelBox [ 1210 , 85 , 50 , 50 ]
brush
name "MAINVIEWUNDETECTEDICON_PLANET_NEW0"
content "Simple"
fileName "Icons_planets_m0d"
pixelBox [ 1270 , 85 , 50 , 50 ]
brush
name "PICTURE_PLANET_NEW0"
content "Simple"
fileName "Icons_planets_m0d"
pixelBox [ 990 , 81 , 167 , 75 ]
fileName "Icons_planets_m0d" is a texture sheet I created in the Textures directory because Textures\Icons_Planets.tga would not fit all my new planet icons.
pixelBox [ 1210 , 85 , 50 , 50 ] refers to the location and size of the icon. 1210 , 50 is the x and y location on the specified texture sheet. 50 , 50 is the size of the icons box loaded in-game. The icon itself might not be 50 x 50 but the empty space around the icon is included so don't put the icons to close together.
brush.manifest
Add the line...
brushFile "Planet_m0d.brushes"
and increase the brushFileCount value + 1.
GameInfo\GalaxyScenarioDef
So you have done all that work and the planet is still not loading in the game, this is the monster that loads your SoaSE universe. Located in the GameInfo folder and its full name is "GalaxyScenarioDef.galaxyScenarioDef".
orbitBodyTypeCount 20 <-- increase count + 1 for very orbitBodyType added
orbitBodyType
typeName "MyNewPlanet" <-- create a new planet type name (eg Swamp)
entityDefName "PlanetNew" <-- your new planets entity name without the .entity extension.
defaultTemplateName "Template:DefaultStart_Terran" <-- 1 of the templates for planets forces
planetTypeCount 27 <-- increase count + 1 for very planetType added
planetType
designName "MyNewPlanet" <-- Name to show in the Map Designer or Galaxy Forge
designStringId "IDSGalaxyScenarioTypePlanetMyNewPlanet" <-- English.str name planet type.
orbitBodyTypeCount 1
orbitBodyType "MyNewPlanet" <-- Links to the orbitBodyType above.
Under the planetTypeCount you will notice designNames with lists of planet types. These are used in map making and generating random maps. To get your new planet to show up in-game when using Random Small to Random Huge you need to add the orbitBodyType "MyNewPlanet" to the designName "WeightedRandom" list and the designName "Random" list. Increase each orbitBodyTypeCount value + 1 for each new entry.
SoaSE Planet Types
Terran |
BlueStar |
TerranHome |
YellowStar |
Desert |
RedStar |
DesertHome |
GreenStar |
Volcanic |
|
Ice |
|
GasGiant |
|
Asteroid |
PirateBase |
AsteroidBelt |
|
AsteroidSpaceJunk |
|
PlasmaStorm |
|
MagneticCloud |
|
Wormhole |
|