cnc fixes:

* Hardcoded audio crashes
	* Implemented remaining vehicles
	* Fix weapon stats
This commit is contained in:
Paul Chote
2010-03-05 19:57:20 +13:00
parent 5b359cc5b3
commit 5a42519422
12 changed files with 2520 additions and 89 deletions

View File

@@ -238,7 +238,6 @@
<Compile Include="Traits\Render\RenderBuildingTurreted.cs" />
<Compile Include="Traits\Render\RenderBuildingWarFactory.cs" />
<Compile Include="Traits\Render\RenderSimple.cs" />
<Compile Include="Traits\Modifiers\Cloak.cs" />
<Compile Include="Traits\Render\RenderUnit.cs" />
<Compile Include="Traits\Render\RenderUnitMuzzleFlash.cs" />
<Compile Include="Traits\Render\RenderUnitReload.cs" />

View File

@@ -51,7 +51,8 @@ namespace OpenRA.Traits
public readonly string[] BuildSounds = {"placbldg.aud", "build5.aud"};
public readonly string[] SellSounds = {"cashturn.aud"};
public readonly string DamagedSound = "kaboom1.aud";
public readonly string DestroyedSound = "kaboom22.aud";
public object Create(Actor self) { return new Building(self); }
}
@@ -95,7 +96,7 @@ namespace OpenRA.Traits
if (e.DamageState == DamageState.Dead)
{
self.World.WorldActor.traits.Get<ScreenShaker>().AddEffect(10, self.CenterLocation, 1);
Sound.Play("kaboom22.aud");
Sound.Play(Info.DestroyedSound);
}
}

View File

@@ -114,7 +114,7 @@ namespace OpenRA.Traits
break;
case DamageState.Half:
anim.ReplaceAnim("damaged-idle");
Sound.Play("kaboom1.aud");
Sound.Play(self.Info.Traits.Get<BuildingInfo>().DamagedSound);
break;
case DamageState.Dead:
DoBib(self, true);

View File

@@ -1,4 +1,4 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford.
* This file is part of OpenRA.
@@ -48,7 +48,7 @@ namespace OpenRA.Traits
break;
case DamageState.Half:
anim.Play( "damaged-idle" );
Sound.Play("kaboom1.aud");
Sound.Play(self.Info.Traits.Get<BuildingInfo>().DamagedSound);
break;
}
}

View File

@@ -57,13 +57,13 @@ namespace OpenRA.Traits
break;
case DamageState.Half:
seqName = "damaged-idle";
Sound.Play("kaboom1.aud");
Sound.Play(self.Info.Traits.Get<BuildingInfo>().DamagedSound);
break;
case DamageState.Quarter:
if (damageStates >= 3)
{
seqName = "critical-idle";
Sound.Play("kaboom1.aud");
Sound.Play(self.Info.Traits.Get<BuildingInfo>().DamagedSound);
}
break;
}

View File

@@ -1,4 +1,4 @@
#region Copyright & License Information
#region Copyright & License Information
/*
* Copyright 2007,2009,2010 Chris Forbes, Robert Pepperell, Matthew Bowra-Dean, Paul Chote, Alli Witheford.
* This file is part of OpenRA.
@@ -20,14 +20,16 @@
using System.Collections.Generic;
using System.Linq;
using OpenRA.Traits;
namespace OpenRA.Traits
namespace OpenRA.Mods.Cnc
{
class CloakInfo : ITraitInfo
{
public readonly float CloakDelay = 1.2f; // Seconds
public readonly string CloakSound = "ironcur9.aud";
public readonly string UncloakSound = "ironcur9.aud";
public readonly string CloakSound = "appear1.aud";
public readonly string UncloakSound = "appear1.aud";
public object Create(Actor self) { return new Cloak(self); }
}

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -48,6 +48,7 @@
<Compile Include="ProductionAirdrop.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TiberiumRefinery.cs" />
<Compile Include="Cloak.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">
@@ -63,7 +64,7 @@
<Name>OpenRA.Mods.RA</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">

2064
doc/cncrules.ini Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -45,8 +45,9 @@
Footprint: x
BuildSounds: constru2.aud, hvydoor1.aud
SellSounds: cashturn.aud
DamagedSound: xplos.aud
DestroyedSound: xplobig4.aud
RenderBuilding:
^Tree:
Category: Building
RenderBuilding:
@@ -66,6 +67,8 @@
BaseNormal: no
Crewed: no
Sight: 0
DamagedSound: xplos.aud
DestroyedSound: xplobig4.aud
Wall:
LineBuild:
Selectable:

View File

@@ -92,7 +92,7 @@
<!-- Rocket Launcher -->
<unit name="msam">
<sequence name="idle" start="0" facings="32" />
<sequence name="turret-1" start="32" facings="16" />
<sequence name="turret" start="32" facings="16" />
<sequence name="turret-2" start="48" facings="16" />
<sequence name="turret-3" start="64" facings="32" />
</unit>
@@ -100,7 +100,7 @@
<!-- SSM Launcher -->
<unit name="mlrs">
<sequence name="idle" start="0" facings="32" />
<sequence name="turret-1" start="32" facings="32" />
<sequence name="turret" start="32" facings="32" />
<sequence name="turret-2" start="64" facings="32" />
<sequence name="turret-3" start="96" facings="32" />
</unit>
@@ -136,5 +136,5 @@
<sequence name="right" start="96" length="32" />
<sequence name="right-damaged" start="128" length="32" />
<sequence name="right-critical" start="160" length="32" />
</unit>-->
</sequences>
</unit>
</sequences>

View File

@@ -256,6 +256,110 @@ MTNK:
RenderUnitTurreted:
AutoTarget:
HTNK:
Inherits: ^Vehicle
Buildable:
Icon: htnkicnh
TechLevel: 5
Prerequisites: weap, fix
Owner: gdi
Cost: 1500
Description: Mammoth Tank
LongDesc: Heavily armored GDI Tank.\n Strong vs Everything
Unit:
HP: 600
Armor: heavy
Crewed: yes
Sight: 4
Speed: 12
Mobile:
MovementType: Track
Turreted:
ROT: 5
AttackTurreted:
PrimaryWeapon: 120mmAPR
SecondaryWeapon: MissilePack
Recoil: 3
RenderUnitTurreted:
AutoTarget:
MSAM:
Inherits: ^Vehicle
Buildable:
Icon: msamicnh
TechLevel: 7
Prerequisites: weap, eye
Owner: gdi
Cost: 800
Description: Rocket Launcher
LongDesc: Long range artillery.\n Strong vs Infantry, Buildings\n Weak vs Tanks, Aircraft
Unit:
HP: 100
Armor: light
Crewed: yes
Sight: 4
Speed: 18
Mobile:
MovementType: Track
Turreted:
ROT: 5
AttackTurreted:
PrimaryWeapon: 227mm
PrimaryOffset: 0,5,0,0
Recoil: 3
RenderUnitTurreted:
AutoTarget:
MLRS:
Inherits: ^Vehicle
Buildable:
Icon: mlrsicnh
TechLevel: 7
# Prerequisites: afld, atwr
Owner: nod
Cost: 750
Description: SSM Launcher
LongDesc: Long range artillery.\n Strong vs Infantry, Buildings\n Weak vs Tanks, Aircraft
Unit:
HP: 120
Armor: light
Crewed: yes
Sight: 4
Speed: 18
Mobile:
MovementType: Track
Turreted:
ROT: 5
AttackTurreted:
PrimaryWeapon: HonestJohn
PrimaryOffset: 0,5,0,0
RenderUnitTurreted:
AutoTarget:
STNK:
Inherits: ^Vehicle
Buildable:
Icon: stnkicnh
TechLevel: 5
Prerequisites: afld, hq
Owner: nod
Cost: 900
Description: Stealth Tank
LongDesc: TODO
Unit:
HP: 110
Armor: light
Crewed: yes
Sight: 4
Speed: 30
Cloak:
Mobile:
MovementType: Track
AttackBase:
PrimaryWeapon: Rockets
RenderUnit:
AutoTarget:
TRAN:
Inherits: ^Plane
Buildable:

View File

@@ -1,14 +1,31 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[WeaponTypes]
UnitExplode
MachineGun
Laser
Sniper
HighV
120mm
70mm
Pistol
M16
Rockets
Ballistic
Flamethrower
BigFlamer
Chemspray
Grenade
70mm
105mm
120mmAPR
TurretGun
MissilePack
227mm
Ballistic
MachineGun
BoatMissile
Tomahawk
Napalm
Laser
Nike
HonestJohn
[UnitExplode]
Damage=500
@@ -16,67 +33,173 @@ Speed=100
Projectile=Invisible
Warhead=UnitExplodeWarhead
; NOTE: WEAPON PROPERTIES ARE NOT EXPOSED BY TIBED; THESE ARE ALL MADE UP
[MachineGun]
Damage=40
; sniper rifle
[Sniper]
Damage=100
ROF=40
Range=5
Range=5.5
Projectile=Invisible
Speed=100
Warhead=HollowPoint
Report=RAMGUN2
;Explosion=1
; rapid fire machine gun
[HighV]
Damage=25
ROF=50
Range=4
Projectile=Invisible
Speed=100
Warhead=HE
Report=GUN8
;Explosion=2
;Anim=MINIGUN
; civilian pistol
[Pistol]
Damage=1
ROF=7
Range=1.75
Projectile=Invisible
Speed=100
Warhead=SA
Report=GUN13
Report=GUN18
;Explosion=2
[Laser]
Damage=100
ROF=120
Range=8.5
; rifle soldier weapons (multiple shots)
[M16]
Damage=15
ROF=20
Range=2
Projectile=Invisible
Speed=100
Warhead=Super
Report=obelray1
Charges=yes
RenderAsLaser=true
BeamRadius=1
UsePlayerColor=true
Warhead=SA
Report=MGUN2
;Explosion=2
[HighV]
Damage=40
; man-packed anti-tank missile (bazooka type)
[Rockets]
Damage=30
ROF=60
Range=4
Projectile=HeatSeeker
Speed=30
Speed=25
Warhead=AP
Report=rocket2
Report=BAZOOK1
;Explosion=5
[Rockets]
Damage=30
; hand-held flame thrower type
[Flamethrower]
Damage=35
ROF=50
Range=2
Projectile=Invisible
Speed=100
Warhead=Fire
Report=FLAMER2
; tank flame thrower
[BigFlamer]
Damage=50
ROF=50
Range=2
Projectile=Invisible
Speed=100
Warhead=Fire
Report=FLAMER2
; hand-held chemical spray
[Chemspray]
Damage=80
ROF=70
Range=4
Projectile=HeatSeeker
Speed=30
Warhead=AP
Report=rocket2
Burst=2
Range=2
Projectile=Invisible
Speed=100
Warhead=HE
Report=FLAMER2
; hand grenade
[Grenade]
Damage=50
ROF=50
Range=3.25
Projectile=Lobbed
Speed=5
Warhead=HE
;Explosion=5
; small anti-armor cannon
[70mm]
Damage=25
ROF=40
ROF=60
Range=4
Projectile=Cannon
Speed=40
Warhead=AP
Report=CANNON2
Report=TNKFIRE3
;Explosion=4
;Anim=GUNFIRE
[120mm]
; medium anti-armor cannon
[105mm]
Damage=30
ROF=50
Range=4.75
Projectile=Cannon
Speed=40
Warhead=AP
Report=TNKFIRE4
;Explosion=4
;Anim=GUNFIRE
; large anti-armor cannon
[120mmAPR]
Damage=40
ROF=80
Range=4.75
Projectile=Cannon
Speed=40
Warhead=AP
Report=CANNON1
Burst=2
Report=TNKFIRE6
;Explosion=4
;Anim=GUNFIRE
; turret cannon
[TurretGun]
Damage=40
ROF=60
Range=6
Projectile=Cannon
Speed=40
Warhead=AP
Report=TNKFIRE6
;Explosion=4
;Anim=GUNFIRE
; Vehicle carried anti-tank missile
[MissilePack]
Damage=75
ROF=80
Range=5
Projectile=HeatSeeker
Speed=30
Warhead=HE
Report=ROCKET1
;Explosion=4
; long-range missile
[227mm]
Damage=75
ROF=80
Range=6
Projectile=HeatSeeker
Speed=20
Warhead=HE
Report=ROCKET1
;Explosion=4
; artillery cannon
[Ballistic]
Damage=150
ROF=65
@@ -84,92 +207,226 @@ Range=6
Projectile=BallisticP
Speed=12
Warhead=HE
Report=TANK5
Report=TNKFIRE2
;Explosion=5
;Anim=GUNFIRE
[BigFlamer]
Damage=125
ROF=50
; vehicle mounted machine gun
[MachineGun]
Damage=15
ROF=30
Range=4
Projectile=Invisible
Speed=12
Speed=100
Warhead=SA
Report=MGUN11
;Explosion=2
;Anim=MINIGUN
; long range missile for gunboat
[BoatMissile]
Damage=60
ROF=35
Range=8
Projectile=HeatSeeker
Speed=20
Warhead=HE
Report=ROCKET2
;Explosion=4
; long range missile for guard tower
[Tomahawk]
Damage=60
ROF=40
Range=6
Projectile=HeatSeeker
Speed=25
Warhead=HE
Report=ROCKET2
;Explosion=4
;Anim=GUNFIRE
; napalm bomblets (dropped from plane)
[Napalm]
Damage=100
ROF=5
Range=4.5
Projectile=Bomblet
Speed=5
Warhead=Fire
;Explosion=3
; obelisk laser
[Laser]
Damage=200
ROF=90
Range=7.5
Projectile=Invisible
Speed=100
Warhead=Super
Report=OBELRAY1
Charges=yes
RenderAsLaser=true
BeamRadius=1
UsePlayerColor=true
; anti-aircraft missile (fired from SAM site)
[Nike]
Damage=50
ROF=50
Range=15
Projectile=AAMissile
Speed=40
Warhead=AP
Report=ROCKET2
;Explosion=6
;Anim=SAMFIRE
; extreme-range napalm rocket
[HonestJohn]
Damage=100
ROF=200
Range=10
Projectile=FROG
Speed=15
Warhead=Fire
Report=ROCKET1
;Explosion=3
[ProjectileTypes]
Invisible
HeatSeeker
Cannon
FROG
HeatSeeker
AAMissile
Lobbed
Bomblet
BallisticP
; invisible flight to target
[Invisible]
; straight high-speed ballistic shot
[Cannon]
Image=120MM
; Free Rocket Over Ground
[FROG]
Arm=10
High=yes
Shadow=no
Proximity=yes
;Animates=yes
;Ranged=yes
Inaccurate=yes
Image=MISSILE
Rotates=yes
; small homing missile (targets vehicles best)
[HeatSeeker]
Arm=2
High=yes
Shadow=no
Proximity=yes
Trail=smokey
;Animates=yes
;Ranged=yes
Inaccurate=yes
AA=yes
Image=DRAGON
ROT=5
Rotates=yes
RangeLimit=20
[Cannon]
Image=120MM
; anti aircraft missile
[AAMissile]
Arm=3
High=yes
Shadow=no
Proximity=yes
;Animates=yes
;Ranged=yes
AA=yes
Image=MISSILE
ROT=20
Rotates=yes
; lobbed tumbling grenade
[Lobbed]
High=yes
Arcing=yes
Inaccurate=yes
Image=BOMB
;Frames=8
; dropped from plane tumbling object
[Bomblet]
Arm=24
RangeLimit=24
High=yes
;Dropping=yes
Image=BOMBLET
;Frames=7
; arcing ballistic projectile
[BallisticP]
High=yes
Arcing=yes
Inaccurate=yes
Image=120MM
[WarheadTypes]
UnitExplodeWarhead
SA
Super
AP
HE
AP
Fire
HollowPoint
Super
[UnitExplodeWarhead]
Spread=10
Verses=90%,75%,60%,25%,100%
Explosion=8
;Explosion=8
InfDeath=3
ImpactSound=kaboom15
ImpactSound=xplos
; general multiple small arms fire
[SA]
Spread=3
Verses=100%,50%,60%,25%,25%
Explosion=2
Verses=100%,50%,50%,25%,25%
InfDeath=1
[Super]
Spread=1
Verses=100%,100%,100%,100%,100%
InfDeath=5
[AP]
Spread=3
Wall=yes
Wood=yes
Verses=30%,75%,75%,100%,50%
Explosion=4
InfDeath=3
; high explosive (shrapnel)
[HE]
Spread=6
Wall=yes
Wood=yes
Verses=90%,75%,60%,25%,100%
Explosion=5
InfDeath=2
; armor piercing (discarding sabot, narrow effect)
[AP]
Spread=3
Wall=yes
Wood=yes
Verses=30%,75%,75%,100%,50%
InfDeath=3
; napalm and fire in general
[Fire]
Spread=8
Wood=yes
Verses=90%,100%,60%,25%,50%
Explosion=3
InfDeath=4
InfDeath=4
; anti-infantry rifle bullet (single shot -- very effective verses infantry)
[HollowPoint]
Spread=1
Verses=100%,5%,5%,5%,5%
InfDeath=1
; special case damage effect (do not use for regular weapons)
[Super]
Spread=1
Verses=100%,100%,100%,100%,100%
InfDeath=4