Being slow...

It seems every time I grab some snippet for modding or a template or string edit, I end up with a depreciated string, incomplete or even incorrect/bugged example that doesn't get me working right.  Posts are scattered all over the boards and most are dated from 2008-9 making it hard to know which are still relevant.

I have the general concept and a non-experienced understanding of some basic modding elements but some things are unclear.  From the vanilla to the expansions, there are several entwined  areas and what in what version isn't always fully clear to me.

Could someone start in the area of world creation/addition for me (don't worry on creating custom textures, I'll use and dupe existing planet ones for now) and create a graphic type file tree for me?

So if I want to add a new planet called "Banana Plantation", diagram each file throughout the versions that must be altered so I know if I am touching all the ones that need editing to add in the "Banana Plantation".  I am working on modding (adding) planet types in Diplomacy--so that's my primary aim.  It would be nice to work them over all versions too.

If anyone wants to take a stab at this, it's appreciated.

I'm not asking someone to do the actual editing for me--just show me the file tree (though I'll take all the info offered).

 

5,099 views 3 replies
Reply #1 Top

I don't know what you mean by a file tree, but the new files you need to make for a new planet are...

1. A new planet entity file (just copy an existing one and make the needed changes)

2. New textures for it. At least two, one for when the planet is on the "Light side" and one on the "dark side".

3. Possibly a new mesh, if its not going to be your typical sphere

Files you need to edit are

1. GalaxySenarioDef.GalaxySenarioDef - defines galaxy creation. You need to add it to both to the section about "OrbitBodyType" and into at least one category in "PlanetType".

2. The String file, for things like its name and information.

3. The Icons_planets.tga texture, for the 2D elements like the HUD picture and icons.

4. The HUDIcon-Planet, InfoCardIcon-Planet, and PicturePlanet .brushes files, so the game can find the said 2D elements from the Icons_planets.tga file

 

+1 Loading…
Reply #2 Top

I understand the basics given here and am going to look them over tonight to see what questions I can come up with.  Textures I'll try after I get the basic adding planets done without error.

 

I'll play a bit then come back and post what I am thinking/trying.

 

Thanks so far ;)

Reply #3 Top

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  

 


+1 Loading…