Adding a Faction
Guest writer is The Undying Nephalim - creator of the total conversion, Sigma.
What to Keep in Mind
Creating a full fledged faction for Armada and ultimately Fleet Ops can be a big undertaking. Creating all the ships you want and all the features is work enough, but balancing is a very important factor too: especially if your faction is designed to fit in with Fleet Ops as a whole. Here are some important things to consider when making a full race / faction:
How Many Ships / Stations?
This one is almost a no-brainer. Generally a standard faction will need a starbase, a mining station, two yards, a tech center or two, turrets, and one or two special structures. For ships they'll need a constructor, mining ship, scout, several small, medium, and large ships, and a special / support ship or two. Granted this is not always necessary, especially if you want your new faction to play differently then stock factions, though this skeleton is usually the best place to start.
Avatars?
You'll need to decide if your faction will have avatars like those in Fleet Ops. It is necessary to consider what bonuses your avatars will give to your faction as a whole, what unique ships / stations / research they will grant, etc. Adding avatars will also mean your faction's ODF count will skyrocket, so that's also something that needs to be considered.
Can You Make Art?
You'll need to decide how the visual presentation of your faction will look, such as its User Interface (UI), how your avatars will look, what basic texture will be on your faction’s ships, etc. If you are not competent when it comes to artwork, there are several people on the Fleet Ops forums that might be willing to lend a hand.
How Will Your Faction Feel?
This tends to be more subtle, but becomes noticeable the more unique a faction is. Essentially, how does your faction play? Are they better at spamming and rushing with large numbers of smaller ships? Are they best sitting and turtling while they build up fewer larger ships? Do they focus on support rather than offense and defense? This area tends to be very difficult to figure out, as most people like the feel of standard factions from Armada II and Fleet Ops, and it's no surprise that they do. For good examples of how to make a faction feel reaaaally different and not a clone, look at Species 8472 in Armada II, or the Borg in Fleet Ops, and the upcoming Noxter faction.
Do You Have Time?
It may seem like a small factor, but you will find that if you are not able to constantly make progress at a steady rate, then interest tends to die down and the willingness to abandon a project rises. It is best to set aside a few hours a week to work on at least one thing for your faction so that something is getting done steadily.
Actually Making the Faction
Surprisingly (or not surprisingly), many people talk and never do. Be sure to actually start working on your faction once the ideas are laid down.
Setting Up a Faction
For the purpose of this tutorial we’ll create a simple non-playable faction (NPC) - originally called the Enpeesees.
Units
First off we'll run down the list of the units they will need.
- 1 Starbase
- 1 Constructor
- 1 mining dock
- 1 Mining ship
- 1 yard
- 2 small ships
- 1 medium ship
- 1 large ship
- 1 turret
That gives us roughly 9 ODFs we'll need for this stations and ships.
Since this is an NPC faction that will not be playable, there is no real need for a scout or any fancy tech.
Adding an Avatar
Next, you will decide if your faction needs avatars. If you decide to give the faction two avatar, they will need two more ODFs for every ship and station for each respective avatar (assuming that each avatar gives different bonuses to each unit), bumping the 9 ODFs to a whopping 21 (9 for each avatar, and 9 for the AI / general reference).
The Avatar ODFs
Path: Fleet Operations/Data/ODF/system
The first thing you will need to do when creating an avatar is to create the actual avatar weapon (indeed it is a weapon). The simplest way to create a new avatar ODF is to copy an existing one. The standard file name is: avatar_{faction name}_{avatar name}.odf .
Here is the weapon coding to create a basic avatar:
wpnname = "" // The name of the avatar
tooltip = "" // The tooltip shown to display the avatar name
verbosetooltip = "" // The tooltip to show the avatar benefits (which in Fleet Ops is a reference to the tooltip described Dynamic_Localized_Strings.h file)
buttonslot = X // The weapon order the avatars are shown in. Thus 1,2,3,4 etc. "0" indicates that the icon does not show up (as in if you want an AI only avatar to not show up for a player)
replacement0class0 = "" // The starbase / ship that the avatar changes it to
replacementevent = "" // The event played when the avatar is selected (a reference to the events.dat file)
replacementkeepname = 1
replacementdontremovefootprint = 1
overrideceasefire = 1
classlabel = "replaceweapon"
special = 1
replacementmaintainorders = 1
replacementregisterasnew = 0
replacementcreationtype = 1
speakonattack = 0
attackspeech = 0
If you want this avatar to be an AI avatar only, then you will also need to add
replacementinstantai = 1
The Starting Base
Path: Fleet Operations/Data/ODF/system
Now that the Avatar ODF has been set up, you will need to make them usable. The starting starbase is normally of the same name as the standard buildable starbase, but the ODF ends with an "S" in Fleet Ops. In other words: fed_outpostS.odf.
This starbase will need two lines of code that are not included in the other starbases. These are
showchoicedialog = 1 // Makes the avatar icons very large and in the center of the screen. They are shown even when nothing is selected
ignoreinterface = 1 // Makes the starbase unselectable
Now that you have your starbase set up for an avatar, you will need to actually add the avatars into the game. Do this simply by adding the avatars as weapons in the starbase ODF.
weaponX = "" // The avatar ODF name
weaponhardpointsX = "root"
Techtree Entries
Path: Fleet Operations/Data/techtree
As with all special weapons, you will need a Technology Tree entry for this, so simply add
{avatar ODF name}.odf 0
to the tech1.tt techtree to the Techtree folder
Sprites
Path: Fleet Operations/Data/sprites
Now you will need to edit the gui_global.spr located in the Sprites directory.
Once the file is open, look for
##############################
###### Avatar Buttons ######
##############################
You will thus add your avatar entries here:
b_<avatar ODF name> <avatar TGA name> 0 0 256 256
@reference=64
@tmaterial=interface
b_<avatar ODF name>S <avatar mini TGA name> 0 0 64 64
Graphical User Interface
Path: Fleet Operations/Data/misc
If you are not able to make textures and UI in Photoshop, you can just steal one of the User Interfaces from Fleet Ops for a quick and dirty method. Here you will use the Federation UI. To do this there are two ways:
- Simply copy the file "gui_federation" in your misc folder and rename it "gui_(your faction)." In this case it would be called "gui_enpeesee".
- Later on when you make your {faction}.odf, just have it reference "gui_federation".
The first method is better if you later want to go back and make a custom GUI for your faction, the second method is better if you don't / are lazy. Since this is an NPC faction, they won't even need a UI since the player will never play as them.
Faction Character
Since this is an NPC faction that won't really be played by the player, how they feel won't be as important from a gamplay perspective. To make NPC faction have a unique feel, the best way to do so is through visuals and the architecture of your faction.
Available Time
We'll automatically assume you have made time to make your faction if you are reading this tutorial.
Making the Faction
There are several things you'll need to do when making a faction. The first and most important aspect is creating a {faction}.odf for your faction. The best way to do this is copy an existing {faction}.odf, rename it to the faction you want, and edit values accordingly. This faction will use the Federation as a mold, so we’ll copy "federation.odf" in the Fleet Ops’ system folder and rename the copy "enpeesee.odf". It's best to keep ODFs lower case, as a lot of tools (Megadroid's Mission Mod for example) automatically track names and make them all lower case. Next open up our factions’ ODF and take a look inside.
If you copied the federation.odf, the first few lines should look something like this:
name = "unitedfederation"
repairstrength = 5.0f
boardingstrength = 1.00f
retreatstrength = 0.25
crewretreatratio = 0.1
displaykey = "Federation"
officerres = "GUI_RD_CREDITS_TOOLTIP"
officertooltip = "GUI_RD_CREDITS_TOOLTIP"
officerverbosetooltip = "GUI_RD_CREDITS_VTOOLTIP"
creationlabel = "ADM_COMMISSIONED"
recycledlabel = "ADM_DECOMMISSIONED"
insufficientofficersevent = "InsufficientCredits"
instantactionslot = 2
For now the most important lines are:
name = "unitedfederation"
displaykey = "Federation"
instantactionslot = 2
"name = " is a string that the engine reads when determining what faction a ship belongs to. We'll change that name to:
name = "enpeesee"
for the purpose of this tutorial.
"displaykey =" is what name will pop up when you select the faction in instant action, multiplayer, or any other location that visually shows information about the faction. We'll change this to:
displaykey = "Enpeesee"
for the purpose of this tutorial.
"instantactionslot =" is what place the faction will show up in when you select them in instant action and multiplayer. Since this faction will be added in Fleet Ops and will need to be tested by the player before going NPC, we will change it to:
instantactionslot = 5
This is because Borg = 0, Dominion = 1, Federation = 2, Klingons = 3, and Romulans = 4
If for some reason you put a value that is the same as one of the other factions, or a value that is too high, the game will crash the moment you enter Instant Action to test your NPC. If you do not put a value at all, the faction will not show up. If you put a negative value, the faction will become an NPC, will still register in the game, but will not be selectable by the player.
If you have your own GUI that you want to use for your faction, you'll need to change the line:
interfaceconfiguration = "gui_federation.cfg"
to
interfaceconfiguration = "gui_enpeesee.cfg"
or whatever name you named your faction.
Lower down in the ODF you'll need to choose your starting units, which is found with the line:
standardunits1 = "fed_outpostS.odf"
Since we will name this faction's starbase "enp_starbase.odf", change that line to:
standardunits1 = "enp_starbase.odf"
Your faction is still far from complete, so now we'll need to add the faction into the "races.odf" so that the engine will recognize the existence of the faction. Go into the Systems folder and open up a file called "races.odf"
When you open this file up, you'll see this:
numberofraces = 10
race0 = "norace.odf"
race1 = "npc_ferengi.odf"
race2 = "observer.odf"
race3 = "dominion.odf"
race4 = "borg.odf"
race5 = "federation.odf"
race6 = "klingon.odf"
race7 = "romulan.odf"
race8 = "npc_wreckage.odf"
race9 = "npc_breen.odf"
First, you'll want to change the line:
numberofraces = 10
to read:
numberofraces = 11
Next, after the last line, you'll want to add:
race10 = "enpeesee.odf"
Save the file, and now your faction will show up in-game. If you bring up the Instant Action game setup window, you'll notice that your faction now displays under the Romulans in Instant Action. If you start the game up though, you'll be met with a crash. Oops, forgot to make all the station and ship ODFs.
For the purpose of this tutorial, we'll just copy a bunch of Federation ships and stations, rename them, and if you have your own models, it is possible to change their model references.
We will copy and change these files:
"fed_outpostY.odf" --> "enp_starbase.odf"
"fed_mediterraneanY.odf" --> "enp_constructor.odf"
"fed_mandrill.odf" --> "enp_miner.odf"
"fed_storage_dock.odf" --> "enp_mining.odf"
"fed_antares_yardY.odf" --> "enp_yard.odf"
"fed_saberY.odf" --> "enp_small1.odf"
"fed_monsoonY.odf" --> "enp_small2.odf"
"fed_akiraY.odf" --> "enp_mediumship.odf"
"fed_sovereignY.odf" --> "enp_largeship.odf"
"fed_platform_pulse.odf" --> "enp_turret.odf"
Starting Resources
Found lower down in the {faction}.odf, these parameters allow you to set how many funds the faction will start with on normal and double resource settings.
normaldilithium = 4000 // The amount of dilithium
normalmetal = 0 // The amount of Collective Connections
normallatinum = 2000 // The amount of tritanium
normalcrew = 999999999 // Unlimited crew
normalbiomatter = 500 // The amount of supply
lotsdilithium = 8000 // The amount of dilithium on double settings
lotsmetal = 0 // The amount of Collective Connections on double settings
lotslatinum = 4000 // The amount of tritanium on double settings
lotscrew = 999999999 // Unlimited crew
lotsbiomatter = 500 // The amount of supply on double settings
Selection SOD
Every time you make a new faction, it will need a selection bubble .sod. If you don't make your own, the best way is to just copy the default Fleet Ops one and rename it. In the SOD folder there is a file called "select.sod" .Just copy it and rename it "select_{faction name}.sod".
Final ODF Checklist
Once all the vessels are set up - either by copying and editing or making them from scratch - there are a few things you must make sure each of your units (ships / stations) have in their respective ODFs.
Race Name References
In each ODF you'll find the line:
race = ""
You'll need to change that line to your faction. In this case it would be
race = "enpeesee"
Be sure to put the name of your faction, not the name that you used in "displaykey".
Build Item References
For your starbases, yards, and constructors, you'll need to make sure they are able to build the other stations and ships of your fleets. In each respective ODF you'll see:
builditem0 = ""
builditem1 = ""
builditemX = ""
These need to be set to whatever ships and stations you will want that ship or station to be able to build.
Weapon Referencing
You need to make sure all your ships have their weapons changed to any weapon files you made for your faction. For this tutorial we simple had the ships keep the weapons that the copied ships originally had.
Technology Tree References
You'll need to make sure your ships are put into the techtree files, otherwise they will not be buildable. See Technology Trees for more information about adding ships to the techtree files.
Final Faction Testing
After you are sure you have all the needed ODFs and the faction is set up properly with its entries put into the techtree files, you should be able to start an Instant Action game and test out your new faction. Since this is an NPC faction, after it has been tested out, you'll want to go back and set its "instantactionslot" equal to a negative number so that it can be placed in the Map Editor.
That is the basics for setting up a skeleton of a new faction. More advanced techniques and strategies (such as balancing) new factions will arrive here in the future.