-
Notifications
You must be signed in to change notification settings - Fork 142
Pilots
This page describes the process for adding new pilots. This page assumes the ship has already been created.
The first step is to create a new Class for the Pilot. The pilots are located in Scripts/Model/Ships directory with a subdirectory for the ship the pilots fly.
The naming convention that must be used is the following:
- Remove All Spaces
- Capitalize Words
- Use the exact spelling (in English) of the Pilot Name.
- The file extension is ".cs"
The Epsilon Leader class should be created as: *Scripts/Model/Ships/TIE FO/EpsilonLeader.cs
This section provides a template that can be used for creating new pilots.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Ship
{
namespace TIEFO
{
public class EpsilonLeader : TIEFO
{
public EpsilonLeader () : base ()
{
PilotName = "Epsilon Leader";
ImageUrl = "https://raw.githubusercontent.com/guidokessels/xwing-data/master/images/pilots/First%20Order/TIE-fo%20Fighter/epsilon-leader.png";
IsUnique = true;
PilotSkill = 6;
Cost = 19;
}
}
}
}
The above example creates the Epsilon Leader unique pilot card. Make sure to adjust the following:
- Pilot Name - the name as its printed on the card.
- ImageUrl - use the following link to view the correct pilot. Once you found it, convert the link into the raw.githubusercontent.com format.
- IsUnique - true if its a unique pilot and false for a generic.
- PilotSkill - set the pilot skill.
- Cost - the cost of the pilot card.
The upgrade bar is covered in the Ship except for the Elite Pilot Talent. If the pilot has an EPT, use the following code in the constructor (just below Cost):
PrintedUpgradeIcons.Add(Upgrade.UpgradeType.Elite);
Note, the above example does not include the implementation for pilot ability.
Its recommended to look at other pilot classes to get an understanding of the work is required.
The ship template is the cardboard base that fits onto the plastic ship base. These are unique for each ship. A lot of cardboard bases are already added to the game, so use this section of guide only if your ship still doesn't have cardboard.
Its necessary to use texture assets. You can obtain these a number of way. The easiest is to use the following dropbox link which contains all pilots up to wave 11. However, its possible to scan the physical cardboard if you have a high resolution scanner.
The properties of the texture file are as follows:
- File Format: jpeg
- File Extension: .jpg
- File Name: Spaces replaced with underscores
-
Resolution:
- Small Base: 438 x 517
- Large Base: 858 x 953
The directory the texture can be found is: Assets/Resources/ShipStandInsert/
The subdirectory is the name of the ship. For example: Assets/Resources/ShipStandInsert/TIE FO Fighter. The texture file should be added to the root of the ship directory. For example: Assets/Resources/ShipStandInsert/TIE FO Fighter/Epsilon_Leader.jpg.
To create the texture, use a raster image processor such as gimp. Copy an existing template into a fresh layer. Copy the new texture into a new layer and set the transparency of the layer to 50%. Align the new texture such that it overlays exactly on the old texture. Once its perfectly aligned, set the transparency of the new layer to 100% and export to jpg.
This section requires Unity. Follow the instructions below.
- Open up unity
- Open 'Battle'
- Use the project Navigation and open the materials directory for the desired ship ** The path to the root of the ships is Assets/Resources/ShipStandInsert/"Desired Ship"/Materials ** Example TIE FO: Assets/Resources/ShipStandInsert/TIE FO Fighter/Materials
- In the menu, select: Assets/Create/Material
- Set the filename to the name of the pilot using underscores instead of spaces ** Example: Epsilon_Leader should be the name of the material for the Epsilon Leader.
- Double click on Albedo
- Navigate to the new texture file ** Example: Epsilon Leader's texture file path is Assets/Resources/ShipStandInsert/TIE FO Fighter/Epsilon_Leader.jpg
- Click the checkbox next to Emission
Once you have followed these steps, the texture is ready to be built.
After following this guide, a new ship is ready to be built. Run the unity build and run command to test out the newly added Pilot!