CodeCritter's Blog
Customize the look of the ships created by a Civilization
Published on October 20, 2006 By CodeCritter In GalCiv Journals
Intro
Hello. I've been been on the GalCiv2 team for over a year, but this is my first developer journal. I'd like to share with you one of the exciting new features of Dark Avatar that I've been working on. It's still a work in progress, so some of the screens and information may change from now to the release date.

As you may have heard, in Dark Avatar, you'll be able to customize the opponents you choose to play against. So if you want to play against the Triangle Union, Square Empire, and the Circle Republic, you can.

But wouldn't it be cool if you could make the Triangle Union use triangle shaped ship designs, Square Union use square ship designs, and the Circle Repulic use circle designs?
We thought so too, so, in Dark Avatar, you will have the ability to create "Custom Ship Styles."

A custom ship style consists of two parts. One part describes the ships that the civ makes when the human player plays as that civ. The other part describes the ships that the civ makes when the AI plays as that civ.

The Old Way
In the original GalCiv2, each civ had a "ShipStyle" number associated with it. For example, Terrans had a ship style 0. This corresponds to the S0_ prefix in Terran ship designs. When the human player played as that civ, the ship designs were prefixed with "S0_" and any core ships that had that prefix could be used by the Terrans. Any new designs created in the Ship Designer were also prefixed with "S0_."

When the AI played as the Terrans, it would use hard-coded ship templates, and prefix them with the ship style. For example, AI defender ships would use the S0_Defender1.shipcfg file, as a base template, and then add parts to it.

The New Way
In Dark Avatar, that will all change to a more flexible system. Each race will have a Ship Style associated with it, but these will not be a number. These will be actual ship style xml files in a subfolder of the data folder. You will be able to create your own styles in the game and save them. If you want to share them, you only need to send the ship style xml file to your friend and they can just put the file in the correct data folder.

Each style has a prefix included in it. For the default races, these are set to "S0", "S1", and so on, but there is no reason to keep to that convention. If you wanted you could make your style's prefix "Circle" and then the game would use ship designs that had that prefix, like Circle_Constructor.shipcfg. When you create new designs in the game, they will also get the prefix "Circle." This applies to the ship designs that both the human player uses and the AI. Each style also has a list of ship templates that the AI will use when using that style. It no longer uses hardcoded template names like "Defender1" and "Attacker1."

Using New Ship Styles
Any ship styles in the ship styles data folder will appear in the list of styles on the Race setup screen. You can then choose the style you want to use for your own race (or an opponent) from that list of ship styles.

Creating New Ship Styles
There is a button marked "Custom" which opens the Custom Ship Style screen. This screen allows you to choose which ship template designs you want the AI to use for its designs. The AI will use the designs you choose here and then add parts to them, like weapons, engines, etc. The list on the left is the list of ships that the AI will use, while the list on the right is a list of available templates. The template list shows all avaliable templates including ones you create yourself.

If you want the AI to use the design "Sky Fox" for its attacker ships, you would select "Attacker ship 1" from the list on the left, and then "Sky Fox" from the list on the right. Click the "Change" button and the AI will now use the "Sky Fox" design instead of the default "Attacker Template 1" design. There is a "Reset All" and "Default" button to return the designs to their default states.

There is also a button to save the style so you can use it in another game. If you don't save it, it will only be good for your current game.

Modding Possibilities
The new ship styles allow for new modding possibilities:
For example, let's say you created a bunch of ships for the Circle Republic, and want to upload them to the library. Your friend then downloads them onto his machine. In the old galciv2, the designs would have a set prefix like S0. Let's say he then downloads more Circle Republic ships from the library that were made by someone else. These might have a different prefix than the ones you designed. In Dark Avatar, your friend can rename all the ships to Circle_(ship_name_here).shipcfg and then modify the prefix in the Circle Ship Style.xml file to be Circle. Your friend can then use all of the Circle Ships he has downloaded when he chooses the Circle Ship Style in the race setup screen.

Conclusion
In the end, it's pretty neat to see the AI using the ship designs I've created. It adds some more customizability and variety to the game. Be sure to check out the screenshots below:

Thanks for reading. Stay tuned...

Screen Shot 1
This is the Appearances tab of the Race Setup screen. It lists all of the styles that I have in my data folder.
Free Image Hosting at www.ImageShack.us

Screen Shot 2
This is the Custom Ship Styles screen. It is used to tell the AI what ship templates to use for its ship designs.
Free Image Hosting at www.ImageShack.us

Comments (Page 1)
2 Pages1 2 
on Oct 20, 2006
I think that people in charge of the various total conversion projects will really love that feature
on Oct 20, 2006

This is going to be a BIG deal I thikn for modders especially.

One could upload their own new style of ships and others can download it and use it in the gme and then assign the computer opponents to use specific designs.

on Oct 20, 2006
That looks really cool. You're doing a great job.
on Oct 20, 2006

Looks great, now if we could only customize our ground troops   
Can't wait to start using this feature. 
on Oct 20, 2006
Sweet man I cant wait to get my hands on DA ahhh.... it just gets better and better.
on Oct 20, 2006
Codecritter its good to hear from you and thanks for the journal!

All i can say is WOW, this is going to change the way a lot of people use the ship designer. Thanks for putting so much time and effort into this for us
on Oct 20, 2006

Thanks for the support

Here's another screen shot of this feature in action.

In this shot, the AI is using the Sky Fox template specified in its Ship Style to create its scout ship.

 

Free Image Hosting at www.ImageShack.us
on Oct 20, 2006
This looks really cool and a vast improvement on what we have at the moment.  
on Oct 20, 2006
Happy Happy Joy Joy
on Oct 20, 2006
Will it be possible to open the Shipyard without starting a game? Or to have a standalone shipbuilder program? THAT would be a real boon to modding...

Great job!
on Oct 21, 2006
I'm not very excited about this.
Rather than specific "ship styles" I would like to see changes in possibilites of ship equipment.
(new looks are really cool, but additional strategic depth is mandatory, IMO)
on Oct 21, 2006
Ultra sweet!
on Oct 21, 2006
I'm not very excited about this


Don't listen to him! Believe me, this will be awesome!
on Oct 21, 2006
I'm not very excited about this.
Rather than specific "ship styles" I would like to see changes in possibilites of ship equipment.
(new looks are really cool, but additional strategic depth is mandatory, IMO)


While I agree that I would much, much rather have more and unique ship equipment, I'm still rather excited about this.
on Oct 21, 2006
As someone who has always wanted to settle the Enterprise vs. Star Destroyer debate on my own computer, this will be fun.
2 Pages1 2