How do you add a new build item for an existing race?

I have been trying to add more ships to the Taiidan but I don’t know why the build “Button” wont show up. I was told to add something to a .lua file but I don’t know where that file is? Most people have done it but I don’t know how.

Hi nathanielmattock;

First, be sure that the “BuildFamily” and “DisplayFamily” of the Ship you are going to build are also a family that the Builder Unit can build. If you are trying to build a Vagyr fighter for example you will see that it it has the following lines defining it’s family properties:

...    
NewShipType.BuildFamily = "Fighter_Vgr"
NewShipType.DisplayFamily = "Fighter"
...

Then make sure that the builder unit (say a carrier) has the ability to construct ships (and show the build menu) for this unit, for example:

addAbility(NewShipType, "CanBuildShips", 1, "Fighter_Vgr, Corvette_Vgr, "Fighter, Corvette")

Then, in the /scripts/races/[race_name]/scripts/def_build.lua, you’ll want to add the unit to the build{} list like so:

...
{   	Type = Ship, ThingToBuild = "Vgr_Interceptor",
		RequiredResearch =	"", RequiredShipSubSystems ="", DisplayPriority = 21,
		DisplayedName = "Vagyr Intereceptor",
		Description = "This is the pop-out description for the Vagyr Interceptor Unit in the build menu.",
	},
...

Following these steps will allow you have the unit be displayed in the build menu, and can be selected for construction in game. You can also tweak the unit build cost and time for construction in its respective ship file as well. Without a known dockpath for the unit’s DockFamily, the unit will likely spawn from hyperspace. I hope this is helpful;

Typh.

Where is that as i only have race.lua in my scripts folder but no race folder

You’ll need to unpack the latest Update.big from the August 20th patch. This supplants a lot of the base HW2.big from the initial release, and changed the way races work by adding the first round of tags, properties, etc all which GBX has been bringing in for the modding community. I hope this is helpful! Sincerely;

Typh.

Thanks