[GO BACK]

Weird Worlds mod tutorial: Creating an Alien Race

Last updated 2/25/2006

Overview

Creating an entirely new, fully fleshed-out alien race is quite an undertaking. Besides writing a description and creating a portrait graphic, you'll need to come up with new ships, a theme song and so on. Since we've already covered the creation of new ships in another tutorial, we're going to leave that part out and reuse existing ships so we can concentrate on all the other stuff.

Now, who would be using ships that are already in the game? Terran space pirates of course! We'll set up a basic "race" of pirates who you'll randomly run into during the game. Diplomacy will be kept to a minimum so there's less stuff to write. You can always look at other races for more advanced examples.

Setting Up

Follow the instructions in the Basics section and set up a new mod folder. Let's name the folder "pirate_race". Drop in a game.ini and the banner graphic so the game will run. Now we can start working on the actual mod.

Primary .ini file

Create a "races" folder in gamedata, and then make new file named pirate.ini in that folder: pirate_race/gamedata/races/pirate.ini. This is the new race's main .ini file that determines how they behave in the game. You could copy one of the existing ones and work off of that (like the Tchorak who are rather simple), but we're going to go through it line by line here.

NAM1 Terran Pirate
NAM2 Terran Pirates

The first two lines determine the name of the race in singular and plural. These are what's displayed in the game. Other .ini files will refer to this race by the filename of the race's .ini file, ie. "pirate".

FLAG hostile random simulator
The race flags determine the race's initial attitude towards the player, as well as how they behave in the game. These are the valid flags:
trader - Fleets of this race start with 10 random items
friendly - This race starts friendly to the player
hostile - This race starts hostile to the player
shroud - A special Primordius flag that's not used
always - This race is always on the map (e.g. the player's race)
random - This race appears as one of the random aliens
never - Never placed on the map except by quests
hometrade - Allows trade at the race's homeworld
unknown - Always displayed as "unknown" in radar
blowup - Doesn't move to starts that cannot be blown up
simulator - This race is included in the combat simulator
As you can see the pirates start hostile, appear randomly on the map and show up in the simulator.

PNAM Swamp Planet
PTYP none
SNAM Orbulon
STYP none

These describe the homeworld and star system of the race. Since the pirates don't have a homeworld these are a bit irrelevant but have to be included in the .ini file. The first one is the name of the planet, and the second one is its type. The third one is the star name, which is never displayed unless this is the player's race. Finally the fourth line is the star type. Planet and star types refer to the filenames in gamedata/planets and gamedata/stars, respectively (e.g. forest1, msq_orange).

GFXP races/pirate.jpg
This is the portrait of the race that'll be shown in the "first encounter" popup among other things. Every race needs one, there's no way around it. I got this one off a cereal box. The portrait should be 128x128 pixels in size and in jpeg format. Place it in graphics/races/ and make an .ini file (pirate.ini) for the jpg in the same folder. All you need to put in this file is: MASK races/racemask.png (You can just copy any one of the other races' portrait .ini's). This will load the correct alpha mask for the race portrait.

MUSC music/simulator.ogg
MUSV music/vidcast.ogg

These are the race's music settings. I'll use the simulator music for the "theme" and the regular vidcast music for messages.

COLR 0.8 1.0 0
This is the color the pirates' homeworld would appear on the starmap, if they had one. It's in RGB, with each component being a number between zero and one (This color is a greenish yellow).

NFLT 2
This is the number of fleets the race will have on the starmap. The number is actually ignored for random races (the number of fleets is based on the map size) and only useful for non-randoms.

NSTR 0
This is the number of stars the race will own at the start of the game. If set to 1, they'll have a homeworld (and the homeworld settings above must be something other than "none"). Multiple stars are also possible but the non-homeworld stars don't have any real effect.

SCRE 500 exploring
SCRF 500 strategic
SCRD 3 strategic

These lines set the scoring parameters for the race. In Weird Worlds all score values include the numeric value as well as the score category it goes in. The first is the reward for encountering this race, the second is the reward for making friends with them. The last one is the reward for destroying their ships. This is multiplied by the hull points of the ship, so a corvette will give you 35*3 = 105 points in the strategic category. (Listed as "diplomacy" in the end screen and the manual)

TEXT description
Freebooters are terran space pirates; ruthless corsairs who acquire saleable booty through less than scrupulous means. While some will act as escorts for a price, most just want to rob you.
END

This is the description of the race, shamelessly modified from the "moon marauder" mercenary. This will be shown in the first encounter message.

TEXT demeanor
???
END

This bit of text is currently not used, but is left in for completeness's sake.

TEXT trade
Items found
END

This is what's displayed on the race's homeworld if you find any items there (If it's a trading world, this is where you'd say it).

TEXT hometrade
<color=249>Pirates' Pile-o-Refuse<color=999>
END

This is the name of the "store" on their homeworld. If the "hometrade" flag is not set then you don't need to trade for the items but you can make up a colorful sounding location where you happen to find all this stuff. The color tag makes the name show up in light blue.

TEXT greetfriendly
<color=990>Shiver me timbers, it's cap'n <uvar=captname>! How you doing there? Have some tasty grog and enjoy your stay!<color=999>
END
This is the "greeting" vidcast you'd receive the first time you meet this race if they were friendly. The color tag turns the text yellow like all the other vidcasts in the game. The uvar tag inserts the player's (captain) name into the text. Since we're not planning to have friendly pirates this is just a placeholder.

TEXT greetneutral
<color=990>Arr, stay out of here you scurrilous knaves! Else we're going to keel-haul ye!<color=999>
END
This is the "greeting" vidcast you'd receive when you meet this race if they were neutral and gave you a choice to leave or fight. Since we're not planning to have neutral pirates this is just a placeholder.

TEXT greethostile
<color=990>Avast! Ye scurvy dogs have the black spot upon ye! Prepare to meet old Davey Jones himself, ye bilge- sucking blaggards, arr!<color=999>
END
This is the "greeting" vidcast you'll receive when you meet the pirates, as they start hostile (that's why this is the only greeting that was written by an actual professional pirate rather than myself). Note that you could have multiple versions of each greeting text within the TEXT block, separated by a line break.

Now that the race's text content is done it's time to set up some nice pirate ships for you to destroy. We'll use various Terran hulls to create a fighter and a few capital ships.

SHIP Pirate Fighter
HULL ter_rip

The ships are usually in order based on size, so the first ship is the fighter. Give it a name, "Pirate Fighter" and Pick a hull from gamedata/hulls. In this case we're using Ripcord O'Reilly's fighter.

FLAG simulator
This flag makes the ship available in the combat simulator. If you add "intro" it'll make the ship appear in the main menu background, but since this same hull already appears there (as the Terran fighter) we won't bother.

SYST wp_projrail
SYST th_fusion
SYST dr_fusion

These are the systems used by the ship. We just gave this fighter a Neptunium Railgun (wp_projrail.ini in gamedata/items), Fusion Tube thrusters and a Hydrogen Fusion stardrive.

END
This ends the SHIP entry so you can add another. Let's do three different capital ships since we have all these hulls to work with: a scout, a corvette and a frigate. We'll give them a slightly different set of systems than the standard Terran ships, to make them more interesting.

SHIP Pirate Scout
HULL ter_sco
FLAG simulator
SYST wp_gausscan
SYST th_fusion
SYST dr_fusion
SYST sy_shieldelmx
SYST sy_compmsq
END

SHIP Pirate Corvette
HULL ter_crv
FLAG simulator
SYST wp_gausscan
SYST wp_missfusr
SYST th_ionimp
SYST dr_fusion
SYST sy_shieldelmx
SYST sy_compmsq
END

SHIP Pirate Mothership
HULL ter_frg
FLAG simulator
SYST wp_gausscan
SYST wp_missfusr
SYST wp_projrail
SYST th_fusion
SYST dr_fusion
SYST sy_shieldelmx
SYST sy_compmsq
END

The final thing we need to do to finish the race is its fleet settings. This determines what kind of formation they use, and what combinations of ships will show up in each pirate fleet.

FLET
Begins the Fleet block.

FORM protcircle
This is the race's combat formation. Valid formation names are:
default - ships are arranged in a line
chevron - V-shaped formation (e.g. Garthans)
protcircle - Fighters are in a circle around the capital ships
ranks - Ships arranged in rectangles based on type
ambush - The fleet attempts to encircle the player flotilla

SHP0 Pirate Fighter
SHP1 Pirate Scout
SHP2 Pirate Corvette
SHP3 Pirate Mothership

This is a list of ships used by the race's fleets. This basically just gives each one of the ships a number from 0 to 9, excluding any ships that only appear as allies/mercenaries. These numbers are used below.

FLT0 100
FLT1 200
FLT2 21
FLT3 3
FLT4 2000000
FLT5 12100
FLT6 131
FLT7 121000000
FLT8 12321
FLT9 23200000000

These are the race's "normal" fleets, again numbered 0-9. Each FLT* line represents a fleet, and the numbers refer to the ship list above. For example, the first (zeroth?) fleet has a #1 Pirate Scout followed by two #0 "Pirate Fighters", while the last one has two corvettes and a mothership flanked by eight fighters. These fleets should generally be in the order from the easiest to the hardest.

HFL0 20000
HFL1 3000000
HFL2 121000000
HFL3 1121100000000
HFL4 1232100000000

These are special fleets you'll only encounter at the race's homeworld. There's one of these for each "difficulty level". There's five different levels from 0 (easy) to 4 (very hard), which the game picks based on the map size and number of enemies you select when you start a new game. On small map, levels 0-2 are used. On the medium one, 1-3, and on the large, 2-4.

DIF0 0001111222
DIF1 1122233344
DIF2 3344455566
DIF3 4556667778
DIF4 6677888999

The DIF0-4 are the difficulty settings for random fleet placement. It works much the same way as the FLT0-9, except the numbers refer to the fleets rather than ships and each DIF must have a ten-number string. Think of it as rolling a ten-sided die. On each side it has a number that determines which one of the fleets is placed. So on the lowest difficulty level, 3 out of 10 pirate fleets will be the fleet defined as FLT0 (one scout and two fighters), 4/10 will be fleet FLT1 and the last 3/10 will be FLT2. Each difficulty level should have at least three different fleets to avoid duplicates of the same fleet appearing on the map.

Update: From version 1.1 onward, you can make upto 16 "normal" fleets by defining FLTA through FLTF (after FLT9), and then in the DIF0-4 you simply write an uppercase A,B,C and so on rather than a number to use those fleets. The letters GHIJK are also allowed, and refer to the five homeworld fleets (for example, you could make a low-difficulty homeworld fleet appear as a randomly distributed fleet with a high difficulty setting). This allows a greater variety of encounters.

END
Ends the Fleet block. Now the race's primary .ini file is complete.

Open the game.ini in your mod's gamedata folder and find the RACES block. Add the filename of your race (pirate) somewhere after Terran (The Player's race must always be first on the list, and we're keeping the player as a Terran). Now the new race will be loaded when you run the mod, and you can go fight them...

Download the example mod (38K, unzip to Weird Worlds folder with subfolders)


[GO BACK]