[Q&A] 3 Questions i need some help with

Iv almost finished my own race (basicly my favourite bits of the 3 races combined) but i need some help with final items please.

1. What is the file called the controls what units a player starts with (aka every in-built race has 2 constructors and factory)? The only files i could even find that sounded correct for this was the entryship files but i soon found these are about ship planet entry not game entry.

2. In a race file there is the line (using PlayerTech in this example)

capitalShipNameType "CapitalShipTech"

this somehow links the race file to the 46 capital ship name strings, So can somebody tell me the in which file this value is linked to the strings? So i can create my own link to my own strings.


3. Is there a guide or can anybody give me a basic guide of how to add a new picture set for a new race.

Any answers would be appreciated, these are the last thing stopping me from having finished race.


2,247 views 5 replies
Reply #1 Top
1) galaxyScenarioDef.galaxyScenarioDef has all the starting homeplanet templates. Note that you will have to define every single thing you need to use there. You'll need the player (since the template references that), units/structures (again, the template references that) and the template itself.

2) This was the first thing I tried to figure out, and failed. As far as I can tell, there's nothing else linking the capitalShipNameType to the strings that we have access to, so I was not able to create names for a new player entity. Adding some to existing races should still work.

3) Is a bit long, I'll answer in greater detail when I get home from work, don't have much time. The short version is, the Textures folder has tgas for all the player portraits, and the Window folder has a .brush file that splices the tga and define names for the images, which then the player .entity file uses. The brush files can be edited with notepad assuming you have the downloaded reference data, so it shouldn't be hard to figure out the links once you find the right TGA/corresponding brush file.
Reply #2 Top
Thank You, I now have the first part working perfectly because of your answer, i don't really get your other answer completely but since you said your going to post a better one later i'l wait until then.
Reply #3 Top
I won't write a tutorial for you for no.3, I'll leave that for Annatar ;)

But I can point you towards the Window folder, and the .BRUSHES files. Scan through them and get accustom to how they work. Each file lists all the locations and dimensions of certain images in-game. Buttons, Pictures, Logos, and I'd imagine the Player Portraits. They will have a texture file's name, and then 4 numbers. The first 2 number refer to the position in pixels of the top left corner of the icon/picture it is referring to. The last 2 numbers refer to the dimensions of the picture's 'box'.

That will sound like gibberish, but have a good look through those files and try to match pictures with .BRUSHES files. You should soon get to know how they work, and will definitely help you with player portraits, and any other new pictures you want to add in-game. Good luck.
Reply #4 Top
Okay, here's the clarified version:

In the Textures folder are several .tga files for player portraits. For the example, I'll use Player_Portrait_Large, the others function the same way.

In the Window folder are files for PlayerPsi/Phase/Tech.playerPictures.

Open up both the tga and the PlayerPsi.playerPictures and let's figure out how it works:

Since we're using Player_Portrait_Large.tga, only this section in the PlayerPsi file is relevant:

LargeScreenPicture
textureName "Player_Portrait_Large.tga"
startTopLeft [0,222]
width 195
height 219
rowItemCount 6
horizontalStride 198
verticalStride 222

This tells the game to open up the .tga file, sets the start point to x=0, y=222, sets the width/height of portraits to 195/219, splits the row into 6 items, and tells the game to splice up the row into pictures 198 long and 222 high.

You'll notice that all the pictures in the second row are for the Advent, so this one text block splices the Player_Portrait_Large.tga into 6 separate images for the race.

But the game only uses 1 image at any time, based on your selection in the player prefs, so how does it know? Well, that's where the columns in the file come in. Launch the game, and go into player setup where you can change your name and theme, and cycle through the themes. You'll notice that the portraits packs for TEC/Vasari/Advent correspond to the columns in the TGA.

Now, trying to fit a 4th race into that setup screen is going to be a hassle and while I have a "theory", I haven't done it so I'm not going to try going into it, but hopefully this should get you started.
Reply #5 Top
I see how it works now thanks and yes putting an extra race would be troublesome, so im going to use the 1 of unused 4 pirate slots for my new race picture it should cut down the difficulty a bit and besides pirates seem to only use one picture anyway i never realised they had 2.