First of all you need Graphics for your new unit. You can simply extract one of the units and an icon from conquer.mix using xcc mixer or you create yourself some new gfx.
I extracted 3TNK.shp and gave it a new turret (3dsm+xcc+ps...) + 1tnkicon.shp.
Now you need to rename them. e.g. 5tnk.shp and 5tnkicon.shp
Place both files in "OpenRA\mods\ra\bits" folder.
Now open vehicles.yaml ("OpenRA\mods\ra\rules") and search for "1tnk".
Copy all the related code and paste it at the end of vehicles.yaml.
Now change this code to fit your needs and change 1tnk to 5tnk.
That´s what i got.
Code: Select all
5TNK:
Inherits: ^Tank
Buildable:
Queue: Vehicle
BuildPaletteOrder: 60
Prerequisites: weap
Owner: soviet
Valued:
Cost: 700
Tooltip:
Name: Light Tank
Description: Soviet Light Tank, good for scouting.\n Strong vs Light Vehicles\n Weak vs Tanks, Aircraft
Health:
HP: 350
Armor:
Type: Heavy
Mobile:
Speed: 7
RevealsShroud:
Range: 4
Turreted:
ROT: 5
AttackTurreted:
PrimaryWeapon: 25mm
Recoil: 2
RenderUnitTurreted:
AutoTarget:
Explodes:
Weapon: UnitExplodeSmall
EmptyWeapon: UnitExplodeSmall
LeavesHusk:
HuskActor: 5TNK.Husk
Selectable:
Bounds: 30,30
5TNK.Husk:
Inherits: ^Husk
Tooltip:
Name: Husk (Soviet Light Tank)
RenderUnit:
Image: 5tnk
ThrowsParticle@turret:
Anim: turret
Spread: 3,3
Speed: 6
AnimKey: turret
Open sequences.yaml from "OpenRA\mods\ra" and copy the code from 3TNK paste it and change the entry´s name to 5tnk.
Code: Select all
5tnk:
idle:
Start: 0
Facings: 32
turret:
Start: 32
Facings: 32