Merge pull request #4371 from pchote/more-world-coords

Convert remaining yaml definitions to world coordinates
This commit is contained in:
Matthias Mailänder
2013-12-26 03:22:07 -08:00
207 changed files with 1637 additions and 1509 deletions

View File

@@ -1,3 +1,15 @@
NEW:
Engine:
Converted Aircraft CruiseAltitude to world coordinates.
Converted Health Radius to world coordinates.
Converted production exits to world coordinates.
Converted weapon projectiles to world coordinates.
Converted actor speed to world coordinates.
Mod / Custom map compatibility:
Altitude is no longer parsed from actor templates in maps. Specify CenterPosition instead.
Run `OpenRA.Utility.exe --upgrade-mod <mod> 20131223` to automatically upgrade mod rules.
Run `OpenRA.Utility.exe --upgrade-map <map path> 20131223` to automatically upgrade custom map rules.
20131223: 20131223:
All mods: All mods:
Fixed dead units sometimes exploding or leaving husks when they weren't in the world. Fixed dead units sometimes exploding or leaving husks when they weren't in the world.

View File

@@ -247,6 +247,18 @@ namespace OpenRA.FileFormats
return InvalidValueAction(value, fieldType, fieldName); return InvalidValueAction(value, fieldType, fieldName);
} }
else if (fieldType == typeof(CPos))
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
return new CPos(int.Parse(parts[0]), int.Parse(parts[1]));
}
else if (fieldType == typeof(CVec))
{
var parts = value.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
return new CVec(int.Parse(parts[0]), int.Parse(parts[1]));
}
else if (fieldType.IsEnum) else if (fieldType.IsEnum)
{ {
if (!Enum.GetNames(fieldType).Select(a => a.ToLower()).Contains(value.ToLower())) if (!Enum.GetNames(fieldType).Select(a => a.ToLower()).Contains(value.ToLower()))

View File

@@ -154,6 +154,8 @@
<Compile Include="Graphics\TmpTDReader.cs" /> <Compile Include="Graphics\TmpTDReader.cs" />
<Compile Include="Graphics\ShpD2Reader.cs" /> <Compile Include="Graphics\ShpD2Reader.cs" />
<Compile Include="FileSystem\Pak.cs" /> <Compile Include="FileSystem\Pak.cs" />
<Compile Include="CPos.cs" />
<Compile Include="CVec.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5"> <BootstrapperPackage Include="Microsoft.Net.Client.3.5">

View File

@@ -8,6 +8,7 @@
*/ */
#endregion #endregion
using System;
using System.Linq; using System.Linq;
namespace OpenRA namespace OpenRA
@@ -15,7 +16,7 @@ namespace OpenRA
/// <summary> /// <summary>
/// 1d world distance - 1024 units = 1 cell. /// 1d world distance - 1024 units = 1 cell.
/// </summary> /// </summary>
public struct WRange public struct WRange : IComparable
{ {
public readonly int Range; public readonly int Range;
@@ -82,6 +83,15 @@ namespace OpenRA
return o != null && o == this; return o != null && o == this;
} }
public int CompareTo(object obj)
{
var o = obj as WRange?;
if (o == null)
return 1;
return Range.CompareTo(o.Value.Range);
}
public override string ToString() { return "{0}".F(Range); } public override string ToString() { return "{0}".F(Range); }
} }
} }

View File

@@ -55,14 +55,6 @@ namespace OpenRA
public int Value( World world ) { return value; } public int Value( World world ) { return value; }
} }
public class AltitudeInit : IActorInit<int>
{
[FieldFromYamlKey] public readonly int value = 0;
public AltitudeInit() { }
public AltitudeInit( int init ) { value = init; }
public int Value( World world ) { return value; }
}
public class LocationInit : IActorInit<CPos> public class LocationInit : IActorInit<CPos>
{ {
[FieldFromYamlKey] public readonly int2 value = int2.Zero; [FieldFromYamlKey] public readonly int2 value = int2.Zero;

View File

@@ -18,8 +18,8 @@ namespace OpenRA.GameRules
{ {
public class WarheadInfo public class WarheadInfo
{ {
[Desc("Distance (in pixels) from the explosion center at which damage is 1/2.")] [Desc("Distance from the explosion center at which damage is 1/2.")]
public readonly int Spread = 1; public readonly WRange Spread = new WRange(43);
[FieldLoader.LoadUsing("LoadVersus")] [FieldLoader.LoadUsing("LoadVersus")]
[Desc("Damage vs each armortype. 0% = can't target.")] [Desc("Damage vs each armortype. 0% = can't target.")]
public readonly Dictionary<string, float> Versus; public readonly Dictionary<string, float> Versus;
@@ -99,7 +99,7 @@ namespace OpenRA.GameRules
public class WeaponInfo public class WeaponInfo
{ {
public readonly float Range = 0; public readonly WRange Range = WRange.Zero;
public readonly string[] Report = null; public readonly string[] Report = null;
[Desc("Rate of Fire")] [Desc("Rate of Fire")]
public readonly int ROF = 1; public readonly int ROF = 1;
@@ -109,7 +109,7 @@ namespace OpenRA.GameRules
public readonly string[] ValidTargets = { "Ground", "Water" }; public readonly string[] ValidTargets = { "Ground", "Water" };
public readonly string[] InvalidTargets = { }; public readonly string[] InvalidTargets = { };
public readonly int BurstDelay = 5; public readonly int BurstDelay = 5;
public readonly float MinRange = 0; public readonly WRange MinRange = WRange.Zero;
[FieldLoader.LoadUsing("LoadProjectile")] public IProjectileInfo Projectile; [FieldLoader.LoadUsing("LoadProjectile")] public IProjectileInfo Projectile;
[FieldLoader.LoadUsing("LoadWarheads")] public List<WarheadInfo> Warheads; [FieldLoader.LoadUsing("LoadWarheads")] public List<WarheadInfo> Warheads;

View File

@@ -30,12 +30,15 @@ namespace OpenRA.Graphics
int nv = 0; int nv = 0;
for (var j = map.Bounds.Top; j < map.Bounds.Bottom; j++) for (var j = map.Bounds.Top; j < map.Bounds.Bottom; j++)
{
for (var i = map.Bounds.Left; i < map.Bounds.Right; i++) for (var i = map.Bounds.Left; i < map.Bounds.Right; i++)
{ {
var tile = wr.Theater.TileSprite(map.MapTiles.Value[i, j]); var tile = wr.Theater.TileSprite(map.MapTiles.Value[i, j]);
Util.FastCreateQuad(vertices, Game.CellSize * new float2(i, j), tile, terrainPalette, nv, tile.size); var pos = wr.ScreenPosition(new CPos(i, j).CenterPosition) - 0.5f * tile.size;
Util.FastCreateQuad(vertices, pos, tile, terrainPalette, nv, tile.size);
nv += 4; nv += 4;
} }
}
vertexBuffer = Game.Renderer.Device.CreateVertexBuffer(vertices.Length); vertexBuffer = Game.Renderer.Device.CreateVertexBuffer(vertices.Length);
vertexBuffer.SetData(vertices, nv); vertexBuffer.SetData(vertices, nv);

View File

@@ -190,25 +190,25 @@ namespace OpenRA.Graphics
selectable.DrawRollover(this); selectable.DrawRollover(this);
} }
public void DrawRangeCircle(Color c, float2 location, float range) public void DrawRangeCircle(WPos pos, WRange range, Color c)
{ {
var offset = new WVec(range.Range, 0, 0);
for (var i = 0; i < 32; i++) for (var i = 0; i < 32; i++)
{ {
var start = location + Game.CellSize * range * float2.FromAngle((float)(Math.PI * i) / 16); var pa = pos + offset.Rotate(WRot.FromFacing(8 * i));
var end = location + Game.CellSize * range * float2.FromAngle((float)(Math.PI * (i + 0.7)) / 16); var pb = pos + offset.Rotate(WRot.FromFacing(8 * i + 6));
Game.Renderer.WorldLineRenderer.DrawLine(ScreenPosition(pa), ScreenPosition(pb), c, c);
Game.Renderer.WorldLineRenderer.DrawLine(start, end, c, c);
} }
} }
public void DrawRangeCircleWithContrast(Color fg, float2 location, float range, Color bg) public void DrawRangeCircleWithContrast(WPos pos, WRange range, Color fg, Color bg)
{ {
var wlr = Game.Renderer.WorldLineRenderer; var wlr = Game.Renderer.WorldLineRenderer;
var oldWidth = wlr.LineWidth; var oldWidth = wlr.LineWidth;
wlr.LineWidth = 3; wlr.LineWidth = 3;
DrawRangeCircle(bg, location, range); DrawRangeCircle(pos, range, bg);
wlr.LineWidth = 1; wlr.LineWidth = 1;
DrawRangeCircle(fg, location, range); DrawRangeCircle(pos, range, fg);
wlr.LineWidth = oldWidth; wlr.LineWidth = oldWidth;
} }

View File

@@ -146,7 +146,7 @@ namespace OpenRA
return map; return map;
} }
Dictionary<string, Map> FindMaps() public Dictionary<string, Map> FindMaps()
{ {
var paths = Manifest.MapFolders.SelectMany(f => FindMapsIn(f)); var paths = Manifest.MapFolders.SelectMany(f => FindMapsIn(f));
var ret = new Dictionary<string, Map>(); var ret = new Dictionary<string, Map>();

View File

@@ -120,8 +120,6 @@
<Compile Include="Graphics\WorldRenderer.cs" /> <Compile Include="Graphics\WorldRenderer.cs" />
<Compile Include="Group.cs" /> <Compile Include="Group.cs" />
<Compile Include="InputHandler.cs" /> <Compile Include="InputHandler.cs" />
<Compile Include="CVec.cs" />
<Compile Include="CPos.cs" />
<Compile Include="Map.cs" /> <Compile Include="Map.cs" />
<Compile Include="ModData.cs" /> <Compile Include="ModData.cs" />
<Compile Include="Network\Connection.cs" /> <Compile Include="Network\Connection.cs" />

View File

@@ -17,7 +17,8 @@ namespace OpenRA.Traits
public class HealthInfo : ITraitInfo, UsesInit<HealthInit> public class HealthInfo : ITraitInfo, UsesInit<HealthInit>
{ {
public readonly int HP = 0; public readonly int HP = 0;
public readonly float Radius = 10; [Desc("Physical size of the unit used for damage calculations. Impacts within this radius apply full damage")]
public readonly WRange Radius = new WRange(426);
public virtual object Create(ActorInitializer init) { return new Health(init, this); } public virtual object Create(ActorInitializer init) { return new Health(init, this); }
} }

View File

@@ -52,12 +52,12 @@ namespace OpenRA.Mods.Cnc
owner.World.AddFrameEndTask(w => owner.World.AddFrameEndTask(w =>
{ {
var altitude = Rules.Info[actorType].Traits.Get<PlaneInfo>().CruiseAltitude;
var a = w.CreateActor(actorType, new TypeDictionary var a = w.CreateActor(actorType, new TypeDictionary
{ {
new LocationInit(startPos), new CenterPositionInit(startPos.CenterPosition + new WVec(WRange.Zero, WRange.Zero, altitude)),
new OwnerInit(owner), new OwnerInit(owner),
new FacingInit(64), new FacingInit(64)
new AltitudeInit(Rules.Info[actorType].Traits.Get<PlaneInfo>().CruiseAltitude),
}); });
a.QueueActivity(Fly.ToCell(self.Location + new CVec(9, 0))); a.QueueActivity(Fly.ToCell(self.Location + new CVec(9, 0)));

View File

@@ -19,9 +19,9 @@ using OpenRA.Traits;
namespace OpenRA.Mods.RA.Air namespace OpenRA.Mods.RA.Air
{ {
public class AircraftInfo : ITraitInfo, IFacingInfo, IOccupySpaceInfo, UsesInit<AltitudeInit>, UsesInit<LocationInit>, UsesInit<FacingInit> public class AircraftInfo : ITraitInfo, IFacingInfo, IOccupySpaceInfo, UsesInit<LocationInit>, UsesInit<FacingInit>
{ {
public readonly int CruiseAltitude = 30; public readonly WRange CruiseAltitude = new WRange(1280);
[ActorReference] [ActorReference]
public readonly string[] RepairBuildings = { "fix" }; public readonly string[] RepairBuildings = { "fix" };
@@ -57,13 +57,6 @@ namespace OpenRA.Mods.RA.Air
if (init.Contains<LocationInit>()) if (init.Contains<LocationInit>())
SetPosition(self, init.Get<LocationInit, CPos>()); SetPosition(self, init.Get<LocationInit, CPos>());
if (init.Contains<AltitudeInit>())
{
var z = init.Get<AltitudeInit, int>() * 1024 / Game.CellSize;
SetPosition(self, CenterPosition + new WVec(0, 0, z - CenterPosition.Z));
}
if (init.Contains<CenterPositionInit>()) if (init.Contains<CenterPositionInit>())
SetPosition(self, init.Get<CenterPositionInit, WPos>()); SetPosition(self, init.Get<CenterPositionInit, WPos>());
@@ -161,7 +154,7 @@ namespace OpenRA.Mods.RA.Air
public WVec FlyStep(int facing) public WVec FlyStep(int facing)
{ {
var speed = MovementSpeed * 7 * 1024 / (Game.CellSize * 32); var speed = MovementSpeed;
var dir = new WVec(0, -1024, 0).Rotate(WRot.FromFacing(facing)); var dir = new WVec(0, -1024, 0).Rotate(WRot.FromFacing(facing));
return speed * dir / 1024; return speed * dir / 1024;
} }

View File

@@ -51,13 +51,12 @@ namespace OpenRA.Mods.RA.Air
var plane = self.Trait<Plane>(); var plane = self.Trait<Plane>();
var desiredFacing = Util.GetFacing(d, plane.Facing); var desiredFacing = Util.GetFacing(d, plane.Facing);
var cruiseAltitude = new WRange(plane.Info.CruiseAltitude * 1024 / Game.CellSize);
// Don't turn until we've reached the cruise altitude // Don't turn until we've reached the cruise altitude
if (plane.CenterPosition.Z < cruiseAltitude.Range) if (plane.CenterPosition.Z < plane.Info.CruiseAltitude.Range)
desiredFacing = plane.Facing; desiredFacing = plane.Facing;
FlyToward(self, plane, desiredFacing, cruiseAltitude); FlyToward(self, plane, desiredFacing, plane.Info.CruiseAltitude);
return this; return this;
} }

View File

@@ -23,8 +23,7 @@ namespace OpenRA.Mods.RA.Air
// We can't possibly turn this fast // We can't possibly turn this fast
var desiredFacing = plane.Facing + 64; var desiredFacing = plane.Facing + 64;
var cruiseAltitude = new WRange(plane.Info.CruiseAltitude * 1024 / Game.CellSize); Fly.FlyToward(self, plane, desiredFacing, plane.Info.CruiseAltitude);
Fly.FlyToward(self, plane, desiredFacing, cruiseAltitude);
return this; return this;
} }

View File

@@ -24,8 +24,7 @@ namespace OpenRA.Mods.RA.Air
return NextActivity; return NextActivity;
var plane = self.Trait<Plane>(); var plane = self.Trait<Plane>();
var cruiseAltitude = new WRange(plane.Info.CruiseAltitude * 1024 / Game.CellSize); Fly.FlyToward(self, plane, plane.Facing, plane.Info.CruiseAltitude);
Fly.FlyToward(self, plane, plane.Facing, cruiseAltitude);
return this; return this;
} }
@@ -39,8 +38,7 @@ namespace OpenRA.Mods.RA.Air
return NextActivity; return NextActivity;
var plane = self.Trait<Plane>(); var plane = self.Trait<Plane>();
var cruiseAltitude = new WRange(plane.Info.CruiseAltitude * 1024 / Game.CellSize); Fly.FlyToward(self, plane, plane.Facing, plane.Info.CruiseAltitude);
Fly.FlyToward(self, plane, plane.Facing, cruiseAltitude);
return this; return this;
} }

View File

@@ -35,8 +35,7 @@ namespace OpenRA.Mods.RA.Air
var desiredFacing = Util.GetFacing(dist, helicopter.Facing); var desiredFacing = Util.GetFacing(dist, helicopter.Facing);
helicopter.Facing = Util.TickFacing(helicopter.Facing, desiredFacing, helicopter.ROT); helicopter.Facing = Util.TickFacing(helicopter.Facing, desiredFacing, helicopter.ROT);
var cruiseAltitude = new WRange(helicopter.Info.CruiseAltitude * 1024 / Game.CellSize); if (HeliFly.AdjustAltitude(self, helicopter, helicopter.Info.CruiseAltitude))
if (HeliFly.AdjustAltitude(self, helicopter, cruiseAltitude))
return this; return this;
// Fly towards the target // Fly towards the target

View File

@@ -40,8 +40,7 @@ namespace OpenRA.Mods.RA.Air
var helicopter = self.Trait<Helicopter>(); var helicopter = self.Trait<Helicopter>();
var cruiseAltitude = new WRange(helicopter.Info.CruiseAltitude * 1024 / Game.CellSize); if (AdjustAltitude(self, helicopter, helicopter.Info.CruiseAltitude))
if (AdjustAltitude(self, helicopter, cruiseAltitude))
return this; return this;
// Rotate towards the target // Rotate towards the target
@@ -53,7 +52,7 @@ namespace OpenRA.Mods.RA.Air
var move = helicopter.FlyStep(desiredFacing); var move = helicopter.FlyStep(desiredFacing);
if (dist.HorizontalLengthSquared < move.HorizontalLengthSquared) if (dist.HorizontalLengthSquared < move.HorizontalLengthSquared)
{ {
helicopter.SetPosition(self, pos + new WVec(0, 0, cruiseAltitude.Range - pos.Z)); helicopter.SetPosition(self, pos + new WVec(0, 0, helicopter.Info.CruiseAltitude.Range - pos.Z));
return NextActivity; return NextActivity;
} }

View File

@@ -51,7 +51,7 @@ namespace OpenRA.Mods.RA.Air
heli.Reservation = res.Reserve(dest, self, heli); heli.Reservation = res.Reserve(dest, self, heli);
var exit = dest.Info.Traits.WithInterface<ExitInfo>().FirstOrDefault(); var exit = dest.Info.Traits.WithInterface<ExitInfo>().FirstOrDefault();
var offset = (exit != null) ? exit.SpawnOffsetVector : WVec.Zero; var offset = (exit != null) ? exit.SpawnOffset : WVec.Zero;
return Util.SequenceActivities( return Util.SequenceActivities(
new HeliFly(dest.CenterPosition + offset), new HeliFly(dest.CenterPosition + offset),

View File

@@ -73,7 +73,7 @@ namespace OpenRA.Mods.RA.Air
Reservation = res.Reserve(order.TargetActor, self, this); Reservation = res.Reserve(order.TargetActor, self, this);
var exit = order.TargetActor.Info.Traits.WithInterface<ExitInfo>().FirstOrDefault(); var exit = order.TargetActor.Info.Traits.WithInterface<ExitInfo>().FirstOrDefault();
var offset = (exit != null) ? exit.SpawnOffsetVector : WVec.Zero; var offset = (exit != null) ? exit.SpawnOffset : WVec.Zero;
self.SetTargetLine(Target.FromActor(order.TargetActor), Color.Green); self.SetTargetLine(Target.FromActor(order.TargetActor), Color.Green);
@@ -114,8 +114,7 @@ namespace OpenRA.Mods.RA.Air
// Repulsion only applies when we're flying! // Repulsion only applies when we're flying!
var altitude = CenterPosition.Z; var altitude = CenterPosition.Z;
var cruiseAltitude = Info.CruiseAltitude * 1024 / Game.CellSize; if (altitude != Info.CruiseAltitude.Range)
if (altitude != cruiseAltitude)
return; return;
var otherHelis = self.World.FindActorsInCircle(self.CenterPosition, Info.IdealSeparation) var otherHelis = self.World.FindActorsInCircle(self.CenterPosition, Info.IdealSeparation)

View File

@@ -49,16 +49,16 @@ namespace OpenRA.Mods.RA.Air
} }
var landPos = dest.CenterPosition; var landPos = dest.CenterPosition;
var altitude = planeInfo.CruiseAltitude.Range;
// Distance required for descent. // Distance required for descent.
var landDistance = planeInfo.CruiseAltitude * 1024 * 1024 / (Game.CellSize * plane.Info.MaximumPitch.Tan()); var landDistance = altitude * 1024 / plane.Info.MaximumPitch.Tan();
var altitude = planeInfo.CruiseAltitude * 1024 / Game.CellSize;
// Land towards the east // Land towards the east
var approachStart = landPos + new WVec(-landDistance, 0, altitude); var approachStart = landPos + new WVec(-landDistance, 0, altitude);
// Add 10% to the turning radius to ensure we have enough room // Add 10% to the turning radius to ensure we have enough room
var speed = plane.MovementSpeed * 1024 / (Game.CellSize * 5); var speed = plane.MovementSpeed * 32 / 35;
var turnRadius = (int)(141 * speed / planeInfo.ROT / (float)Math.PI); var turnRadius = (int)(141 * speed / planeInfo.ROT / (float)Math.PI);
// Find the center of the turning circles for clockwise and counterclockwise turns // Find the center of the turning circles for clockwise and counterclockwise turns

View File

@@ -107,13 +107,10 @@ namespace OpenRA.Mods.RA
if (limitedAmmo != null && !limitedAmmo.HasAmmo()) if (limitedAmmo != null && !limitedAmmo.HasAmmo())
return; return;
// TODO: Define weapon ranges as WRange if (!target.IsInRange(self.CenterPosition, Weapon.Range))
var range = new WRange((int)(1024*Weapon.Range));
var minRange = new WRange((int)(1024*Weapon.MinRange));
if (!target.IsInRange(self.CenterPosition, range))
return; return;
if (minRange != WRange.Zero && target.IsInRange(self.CenterPosition, minRange)) if (Weapon.MinRange != WRange.Zero && target.IsInRange(self.CenterPosition, Weapon.MinRange))
return; return;
if (!Weapon.IsValidAgainst(target, self.World)) if (!Weapon.IsValidAgainst(target, self.World))

View File

@@ -144,7 +144,7 @@ namespace OpenRA.Mods.RA
public abstract Activity GetAttackActivity(Actor self, Target newTarget, bool allowMove); public abstract Activity GetAttackActivity(Actor self, Target newTarget, bool allowMove);
public bool HasAnyValidWeapons(Target t) { return Armaments.Any(a => a.Weapon.IsValidAgainst(t, self.World)); } public bool HasAnyValidWeapons(Target t) { return Armaments.Any(a => a.Weapon.IsValidAgainst(t, self.World)); }
public WRange GetMaximumRange() { return new WRange((int)(1024 * Armaments.Max(a => a.Weapon.Range))); } public WRange GetMaximumRange() { return Armaments.Max(a => a.Weapon.Range); }
public Armament ChooseArmamentForTarget(Target t) { return Armaments.FirstOrDefault(a => a.Weapon.IsValidAgainst(t, self.World)); } public Armament ChooseArmamentForTarget(Target t) { return Armaments.FirstOrDefault(a => a.Weapon.IsValidAgainst(t, self.World)); }

View File

@@ -52,9 +52,7 @@ namespace OpenRA.Mods.RA
if (a == null) if (a == null)
return null; return null;
// TODO: Define weapon ranges as WRange return new Activities.Attack(newTarget, a.Weapon.Range, allowMove);
var range = new WRange(Math.Max(0,(int)(1024*a.Weapon.Range)));
return new Activities.Attack(newTarget, range, allowMove);
} }
} }
} }

View File

@@ -42,9 +42,7 @@ namespace OpenRA.Mods.RA
if (a == null) if (a == null)
return; return;
// TODO: Define weapon ranges as WRange if (!target.IsInRange(self.CenterPosition, a.Weapon.Range))
var range = new WRange((int)(1024*a.Weapon.Range));
if (!target.IsInRange(self.CenterPosition, range))
return; return;
self.CancelActivity(); self.CancelActivity();

View File

@@ -31,9 +31,7 @@ namespace OpenRA.Mods.RA
if (arm == null) if (arm == null)
return; return;
// TODO: Define weapon ranges as WRange if (!target.IsInRange(self.CenterPosition, arm.Weapon.Range))
var range = new WRange((int)(1024*arm.Weapon.Range));
if (!target.IsInRange(self.CenterPosition, range))
return; return;
var facing = self.TraitOrDefault<IFacing>(); var facing = self.TraitOrDefault<IFacing>();

View File

@@ -33,9 +33,7 @@ namespace OpenRA.Mods.RA
if (a == null) if (a == null)
return null; return null;
// TODO: Define weapon ranges as WRange return new Activities.Heal(newTarget, a.Weapon.Range, allowMove);
var range = new WRange(Math.Max(0, (int)(1024 * a.Weapon.Range)));
return new Activities.Heal(newTarget, range, allowMove);
} }
} }
} }

View File

@@ -96,7 +96,7 @@ namespace OpenRA.Mods.RA
if (weapon != null) if (weapon != null)
{ {
var range = WRange.FromCells(Math.Max(0, (int)weapon.Weapon.Range - RangeTolerance)); var range = WRange.FromCells(Math.Max(0, weapon.Weapon.Range.Range / 1024 - RangeTolerance));
attack.Target = target; attack.Target = target;
if (allowMove && self.HasTrait<Mobile>() && !self.Info.Traits.Get<MobileInfo>().OnRails) if (allowMove && self.HasTrait<Mobile>() && !self.Info.Traits.Get<MobileInfo>().OnRails)

View File

@@ -49,8 +49,7 @@ namespace OpenRA.Mods.RA
// Bombs drop anywhere in range // Bombs drop anywhere in range
foreach (var a in Armaments.Where(a => a.Info.Name == info.Bombs)) foreach (var a in Armaments.Where(a => a.Info.Name == info.Bombs))
{ {
var range = new WRange((int)(1024 * a.Weapon.Range)); if (!target.IsInRange(self.CenterPosition, a.Weapon.Range))
if (!target.IsInRange(self.CenterPosition, range))
continue; continue;
a.CheckFire(self, this, facing, bombTarget); a.CheckFire(self, this, facing, bombTarget);
@@ -63,11 +62,10 @@ namespace OpenRA.Mods.RA
foreach (var a in Armaments.Where(a => a.Info.Name == info.Guns)) foreach (var a in Armaments.Where(a => a.Info.Name == info.Guns))
{ {
var range = new WRange((int)(1024 * a.Weapon.Range)); if (!target.IsInRange(self.CenterPosition, a.Weapon.Range))
if (!target.IsInRange(self.CenterPosition, range))
continue; continue;
var t = Target.FromPos(cp - new WVec(0, range.Range / 2, cp.Z).Rotate(WRot.FromFacing(facing.Facing))); var t = Target.FromPos(cp - new WVec(0, a.Weapon.Range.Range / 2, cp.Z).Rotate(WRot.FromFacing(facing.Facing)));
a.CheckFire(self, this, facing, t); a.CheckFire(self, this, facing, t);
} }
} }

View File

@@ -69,9 +69,11 @@ namespace OpenRA.Mods.RA.Buildings
return; return;
wr.DrawRangeCircleWithContrast( wr.DrawRangeCircleWithContrast(
self.CenterPosition,
WRange.FromCells(Info.Range),
Color.FromArgb(128, Ready() ? Color.White : Color.Red), Color.FromArgb(128, Ready() ? Color.White : Color.Red),
wr.ScreenPxPosition(self.CenterPosition), Info.Range, Color.FromArgb(96, Color.Black)
Color.FromArgb(96, Color.Black)); );
} }
// Selection bar // Selection bar

View File

@@ -152,9 +152,12 @@ namespace OpenRA.Mods.RA
if (self.Owner != self.World.LocalPlayer) if (self.Owner != self.World.LocalPlayer)
return; return;
wr.DrawRangeCircle( wr.DrawRangeCircleWithContrast(
self.CenterPosition,
WRange.FromCells(self.Trait<ChronoshiftDeploy>().Info.JumpDistance),
Color.FromArgb(128, Color.DeepSkyBlue), Color.FromArgb(128, Color.DeepSkyBlue),
wr.ScreenPxPosition(self.CenterPosition), (int)self.Trait<ChronoshiftDeploy>().Info.JumpDistance); Color.FromArgb(96, Color.Black)
);
} }
} }
} }

View File

@@ -101,9 +101,8 @@ namespace OpenRA.Mods.RA
{ {
case DamageModel.Normal: case DamageModel.Normal:
{ {
var maxSpread = warhead.Spread * (float)Math.Log(Math.Abs(warhead.Damage), 2); var maxSpread = new WRange((int)(warhead.Spread.Range * (float)Math.Log(Math.Abs(warhead.Damage), 2)));
var range = new WRange((int)maxSpread * 1024 / Game.CellSize); var hitActors = world.FindActorsInCircle(pos, maxSpread);
var hitActors = world.FindActorsInCircle(pos, range);
foreach (var victim in hitActors) foreach (var victim in hitActors)
{ {
@@ -192,8 +191,8 @@ namespace OpenRA.Mods.RA
var rawDamage = (float)warhead.Damage; var rawDamage = (float)warhead.Damage;
if (withFalloff) if (withFalloff)
{ {
var distance = (int)Math.Max(0, (target.CenterPosition - pos).Length * Game.CellSize / 1024 - healthInfo.Radius); var distance = Math.Max(0, (target.CenterPosition - pos).Length - healthInfo.Radius.Range);
var falloff = (float)GetDamageFalloff(distance / warhead.Spread); var falloff = (float)GetDamageFalloff(distance * 1f / warhead.Spread.Range);
rawDamage = (float)(falloff * rawDamage); rawDamage = (float)(falloff * rawDamage);
} }
return (float)(rawDamage * modifier * (float)warhead.EffectivenessAgainst(target.Info)); return (float)(rawDamage * modifier * (float)warhead.EffectivenessAgainst(target.Info));

View File

@@ -42,7 +42,7 @@ namespace OpenRA.Mods.RA
return; return;
if (health.Value != null) if (health.Value != null)
wr.DrawRangeCircle(Color.Red, wr.ScreenPxPosition(self.CenterPosition), health.Value.Info.Radius / Game.CellSize); wr.DrawRangeCircle(self.CenterPosition, health.Value.Info.Radius, Color.Red);
var wlr = Game.Renderer.WorldLineRenderer; var wlr = Game.Renderer.WorldLineRenderer;
var c = Color.White; var c = Color.White;

View File

@@ -92,19 +92,19 @@ namespace OpenRA.Mods.RA
var pp = ChooseDropCell(self, inWater, 100); var pp = ChooseDropCell(self, inWater, 100);
if (pp == null) return; if (pp == null) return;
var p = pp.Value; // var p = pp.Value;
self.World.AddFrameEndTask(w => self.World.AddFrameEndTask(w =>
{ {
var crate = w.CreateActor(false, Info.CrateActor, new TypeDictionary { new OwnerInit(w.WorldActor.Owner) }); var crate = w.CreateActor(false, Info.CrateActor, new TypeDictionary { new OwnerInit(w.WorldActor.Owner) });
crates.Add(crate); crates.Add(crate);
var startPos = w.ChooseRandomEdgeCell(); var startPos = w.ChooseRandomEdgeCell();
var altitude = Rules.Info[Info.DeliveryAircraft].Traits.Get<PlaneInfo>().CruiseAltitude;
var plane = w.CreateActor(Info.DeliveryAircraft, new TypeDictionary var plane = w.CreateActor(Info.DeliveryAircraft, new TypeDictionary
{ {
new LocationInit( startPos ), new CenterPositionInit(startPos.CenterPosition + new WVec(WRange.Zero, WRange.Zero, altitude)),
new OwnerInit(w.WorldActor.Owner), new OwnerInit(w.WorldActor.Owner),
new FacingInit( Util.GetFacing(p - startPos, 0) ), new FacingInit(Util.GetFacing(p - startPos, 0))
new AltitudeInit( Rules.Info[Info.DeliveryAircraft].Traits.Get<AircraftInfo>().CruiseAltitude ),
}); });
plane.CancelActivity(); plane.CancelActivity();

View File

@@ -22,15 +22,16 @@ namespace OpenRA.Mods.RA.Effects
{ {
public class BulletInfo : IProjectileInfo public class BulletInfo : IProjectileInfo
{ {
public readonly int Speed = 1; [Desc("Projectile speed in WRange / tick")]
public readonly WRange Speed = new WRange(17);
public readonly string Trail = null; public readonly string Trail = null;
[Desc("Pixels at maximum range")] [Desc("Maximum offset at the maximum range")]
public readonly float Inaccuracy = 0; public readonly WRange Inaccuracy = WRange.Zero;
public readonly string Image = null; public readonly string Image = null;
[Desc("Check for whether an actor with Wall: trait blocks fire")] [Desc("Check for whether an actor with Wall: trait blocks fire")]
public readonly bool High = false; public readonly bool High = false;
public readonly bool Shadow = false; public readonly bool Shadow = false;
public readonly float Angle = 0; public readonly WAngle Angle = WAngle.Zero;
public readonly int TrailInterval = 2; public readonly int TrailInterval = 2;
public readonly int TrailDelay = 1; public readonly int TrailDelay = 1;
public readonly int ContrailLength = 0; public readonly int ContrailLength = 0;
@@ -49,7 +50,6 @@ namespace OpenRA.Mods.RA.Effects
ContrailRenderable trail; ContrailRenderable trail;
Animation anim; Animation anim;
[Sync] WAngle angle;
[Sync] WPos pos, target; [Sync] WPos pos, target;
[Sync] int length; [Sync] int length;
[Sync] int facing; [Sync] int facing;
@@ -63,22 +63,15 @@ namespace OpenRA.Mods.RA.Effects
this.args = args; this.args = args;
this.pos = args.Source; this.pos = args.Source;
// Convert ProjectileArg definitions to world coordinates
// TODO: Change the yaml definitions so we don't need this
var range = new WRange((int)(1024 * args.Weapon.Range)); // Range in world units
var inaccuracy = new WRange((int)(info.Inaccuracy * 1024 / Game.CellSize)); // Offset in world units at max range
var speed = (int)(info.Speed * 4 * 1024 / (10 * Game.CellSize)); // Speed in world units per tick
angle = WAngle.ArcTan((int)(info.Angle * 4 * 1024), 1024); // Angle in world angle
target = args.PassiveTarget; target = args.PassiveTarget;
if (info.Inaccuracy > 0) if (info.Inaccuracy.Range > 0)
{ {
var maxOffset = inaccuracy.Range * (target - pos).Length / range.Range; var maxOffset = info.Inaccuracy.Range * (target - pos).Length / args.Weapon.Range.Range;
target += WVec.FromPDF(args.SourceActor.World.SharedRandom, 2) * maxOffset / 1024; target += WVec.FromPDF(args.SourceActor.World.SharedRandom, 2) * maxOffset / 1024;
} }
facing = Traits.Util.GetFacing(target - pos, 0); facing = Traits.Util.GetFacing(target - pos, 0);
length = Math.Max((target - pos).Length / speed, 1); length = Math.Max((target - pos).Length / info.Speed.Range, 1);
if (info.Image != null) if (info.Image != null)
{ {
@@ -98,7 +91,7 @@ namespace OpenRA.Mods.RA.Effects
int GetEffectiveFacing() int GetEffectiveFacing()
{ {
var at = (float)ticks / (length - 1); var at = (float)ticks / (length - 1);
var attitude = angle.Tan() * (1 - 2 * at) / (4 * 1024); var attitude = info.Angle.Tan() * (1 - 2 * at) / (4 * 1024);
var u = (facing % 128) / 128f; var u = (facing % 128) / 128f;
var scale = 512 * u * (1 - u); var scale = 512 * u * (1 - u);
@@ -113,11 +106,11 @@ namespace OpenRA.Mods.RA.Effects
if (anim != null) if (anim != null)
anim.Tick(); anim.Tick();
pos = WPos.LerpQuadratic(args.Source, target, angle, ticks, length); pos = WPos.LerpQuadratic(args.Source, target, info.Angle, ticks, length);
if (info.Trail != null && --smokeTicks < 0) if (info.Trail != null && --smokeTicks < 0)
{ {
var delayedPos = WPos.LerpQuadratic(args.Source, target, angle, ticks - info.TrailDelay, length); var delayedPos = WPos.LerpQuadratic(args.Source, target, info.Angle, ticks - info.TrailDelay, length);
world.AddFrameEndTask(w => w.Add(new Smoke(w, delayedPos, info.Trail))); world.AddFrameEndTask(w => w.Add(new Smoke(w, delayedPos, info.Trail)));
smokeTicks = info.TrailInterval; smokeTicks = info.TrailInterval;
} }

View File

@@ -21,13 +21,15 @@ namespace OpenRA.Mods.RA.Effects
{ {
class MissileInfo : IProjectileInfo class MissileInfo : IProjectileInfo
{ {
public readonly int Speed = 1; [Desc("Projectile speed in WRange / tick")]
public readonly WRange Speed = new WRange(8);
public readonly WAngle MaximumPitch = WAngle.FromDegrees(30); public readonly WAngle MaximumPitch = WAngle.FromDegrees(30);
public readonly int Arm = 0; public readonly int Arm = 0;
[Desc("Check for whether an actor with Wall: trait blocks fire")] [Desc("Check for whether an actor with Wall: trait blocks fire")]
public readonly bool High = false; public readonly bool High = false;
public readonly string Trail = null; public readonly string Trail = null;
public readonly float Inaccuracy = 0; [Desc("Maximum offset at the maximum range")]
public readonly WRange Inaccuracy = WRange.Zero;
public readonly string Image = null; public readonly string Image = null;
[Desc("Rate of Turning")] [Desc("Rate of Turning")]
public readonly int ROT = 5; public readonly int ROT = 5;
@@ -46,12 +48,15 @@ namespace OpenRA.Mods.RA.Effects
class Missile : IEffect, ISync class Missile : IEffect, ISync
{ {
static readonly WRange MissileCloseEnough = new WRange(7 * 1024 / Game.CellSize); // HACK: the missile movement code isn't smart enough to explode
// when the projectile passes the actor. This defines an arbitrary
// proximity radius that they will explode within, which makes
// missiles difficult to consistently balance.
static readonly WRange MissileCloseEnough = new WRange(298);
readonly MissileInfo info; readonly MissileInfo info;
readonly ProjectileArgs args; readonly ProjectileArgs args;
readonly Animation anim; readonly Animation anim;
readonly int speed;
int ticksToNextSmoke; int ticksToNextSmoke;
ContrailRenderable trail; ContrailRenderable trail;
@@ -76,13 +81,8 @@ namespace OpenRA.Mods.RA.Effects
targetPosition = args.PassiveTarget; targetPosition = args.PassiveTarget;
// Convert ProjectileArg definitions to world coordinates if (info.Inaccuracy.Range > 0)
// TODO: Change the yaml definitions so we don't need this offset = WVec.FromPDF(args.SourceActor.World.SharedRandom, 2) * info.Inaccuracy.Range / 1024;
var inaccuracy = (int)(info.Inaccuracy * 1024 / Game.CellSize);
speed = info.Speed * 1024 / (5 * Game.CellSize);
if (info.Inaccuracy > 0)
offset = WVec.FromPDF(args.SourceActor.World.SharedRandom, 2) * inaccuracy / 1024;
if (info.Image != null) if (info.Image != null)
{ {
@@ -131,7 +131,7 @@ namespace OpenRA.Mods.RA.Effects
desiredFacing = facing; desiredFacing = facing;
facing = Traits.Util.TickFacing(facing, desiredFacing, info.ROT); facing = Traits.Util.TickFacing(facing, desiredFacing, info.ROT);
var move = new WVec(0, -1024, 0).Rotate(WRot.FromFacing(facing)) * speed / 1024; var move = new WVec(0, -1024, 0).Rotate(WRot.FromFacing(facing)) * info.Speed.Range / 1024;
if (targetPosition.Z > 0 && info.TurboBoost) if (targetPosition.Z > 0 && info.TurboBoost)
move = (move * 3) / 2; move = (move * 3) / 2;

View File

@@ -54,10 +54,6 @@ namespace OpenRA.Mods.RA
td.Add(new HuskSpeedInit(mobile.MovementSpeedForCell(self, self.Location))); td.Add(new HuskSpeedInit(mobile.MovementSpeedForCell(self, self.Location)));
} }
var aircraft = self.TraitOrDefault<Aircraft>();
if (aircraft != null)
td.Add(new AltitudeInit(aircraft.CenterPosition.Z * Game.CellSize / 1024));
var facing = self.TraitOrDefault<IFacing>(); var facing = self.TraitOrDefault<IFacing>();
if (facing != null) if (facing != null)
td.Add(new FacingInit(facing.Facing)); td.Add(new FacingInit(facing.Facing));

View File

@@ -267,12 +267,12 @@ namespace OpenRA.Mods.RA.Missions
{ {
if (yak == null) if (yak == null)
{ {
var altitude = Rules.Info[YakName].Traits.Get<PlaneInfo>().CruiseAltitude;
yak = world.CreateActor(YakName, new TypeDictionary yak = world.CreateActor(YakName, new TypeDictionary
{ {
new LocationInit(yakEntryPoint.Location), new CenterPositionInit(yakEntryPoint.CenterPosition + new WVec(WRange.Zero, WRange.Zero, altitude)),
new OwnerInit(soviets), new OwnerInit(soviets),
new FacingInit(Traits.Util.GetFacing(yakAttackPoint.Location - yakEntryPoint.Location, 0)), new FacingInit(Traits.Util.GetFacing(yakAttackPoint.Location - yakEntryPoint.Location, 0))
new AltitudeInit(Rules.Info[YakName].Traits.Get<PlaneInfo>().CruiseAltitude)
}); });
} }

View File

@@ -219,7 +219,7 @@ namespace OpenRA.Mods.RA.Missions
cargo.Load(chinook, world.CreateActor(false, ChinookCargo.Random(world.SharedRandom), allies, null, null)); cargo.Load(chinook, world.CreateActor(false, ChinookCargo.Random(world.SharedRandom), allies, null, null));
var exit = lz.Info.Traits.WithInterface<ExitInfo>().FirstOrDefault(); var exit = lz.Info.Traits.WithInterface<ExitInfo>().FirstOrDefault();
var offset = (exit != null) ? exit.SpawnOffsetVector : WVec.Zero; var offset = (exit != null) ? exit.SpawnOffset : WVec.Zero;
chinook.QueueActivity(new HeliFly(lz.CenterPosition + offset)); // no reservation of hpad but it's not needed chinook.QueueActivity(new HeliFly(lz.CenterPosition + offset)); // no reservation of hpad but it's not needed
chinook.QueueActivity(new Turn(0)); chinook.QueueActivity(new Turn(0));

View File

@@ -73,13 +73,14 @@ namespace OpenRA.Mods.RA.Missions
public static void Paradrop(World world, Player owner, IEnumerable<string> units, CPos entry, CPos location) public static void Paradrop(World world, Player owner, IEnumerable<string> units, CPos entry, CPos location)
{ {
var altitude = Rules.Info["badr"].Traits.Get<PlaneInfo>().CruiseAltitude;
var badger = world.CreateActor("badr", new TypeDictionary var badger = world.CreateActor("badr", new TypeDictionary
{ {
new LocationInit(entry), new CenterPositionInit(entry.CenterPosition + new WVec(WRange.Zero, WRange.Zero, altitude)),
new OwnerInit(owner), new OwnerInit(owner),
new FacingInit(Util.GetFacing(location - entry, 0)), new FacingInit(Util.GetFacing(location - entry, 0))
new AltitudeInit(Rules.Info["badr"].Traits.Get<PlaneInfo>().CruiseAltitude),
}); });
badger.QueueActivity(new FlyAttack(Target.FromCell(location))); badger.QueueActivity(new FlyAttack(Target.FromCell(location)));
badger.Trait<ParaDrop>().SetLZ(location); badger.Trait<ParaDrop>().SetLZ(location);
var cargo = badger.Trait<Cargo>(); var cargo = badger.Trait<Cargo>();
@@ -91,13 +92,14 @@ namespace OpenRA.Mods.RA.Missions
public static void Parabomb(World world, Player owner, CPos entry, CPos location) public static void Parabomb(World world, Player owner, CPos entry, CPos location)
{ {
var altitude = Rules.Info["badr.bomber"].Traits.Get<PlaneInfo>().CruiseAltitude;
var badger = world.CreateActor("badr.bomber", new TypeDictionary var badger = world.CreateActor("badr.bomber", new TypeDictionary
{ {
new LocationInit(entry), new CenterPositionInit(entry.CenterPosition + new WVec(WRange.Zero, WRange.Zero, altitude)),
new OwnerInit(owner), new OwnerInit(owner),
new FacingInit(Util.GetFacing(location - entry, 0)), new FacingInit(Util.GetFacing(location - entry, 0))
new AltitudeInit(Rules.Info["badr.bomber"].Traits.Get<PlaneInfo>().CruiseAltitude),
}); });
badger.Trait<AttackBomber>().SetTarget(location.CenterPosition); badger.Trait<AttackBomber>().SetTarget(location.CenterPosition);
badger.QueueActivity(Fly.ToCell(location)); badger.QueueActivity(Fly.ToCell(location));
badger.QueueActivity(new FlyOffMap()); badger.QueueActivity(new FlyOffMap());

View File

@@ -104,12 +104,12 @@ namespace OpenRA.Mods.RA.Missions
foreach (var airfield in airfields) foreach (var airfield in airfields)
{ {
var entry = airfield.Location - new CVec(10, 0); var entry = airfield.Location - new CVec(10, 0);
var altitude = Rules.Info["yak"].Traits.Get<PlaneInfo>().CruiseAltitude;
var yak = world.CreateActor("yak", new TypeDictionary var yak = world.CreateActor("yak", new TypeDictionary
{ {
new CenterPositionInit(entry.CenterPosition + new WVec(WRange.Zero, WRange.Zero, altitude)),
new OwnerInit(ussr), new OwnerInit(ussr),
new LocationInit(entry), new FacingInit(Traits.Util.GetFacing(airfield.Location - entry, 0))
new FacingInit(Traits.Util.GetFacing(airfield.Location - entry, 0)),
new AltitudeInit(Rules.Info["yak"].Traits.Get<PlaneInfo>().CruiseAltitude)
}); });
while (yak.Trait<LimitedAmmo>().TakeAmmo()) { } while (yak.Trait<LimitedAmmo>().TakeAmmo()) { }

View File

@@ -206,11 +206,10 @@ namespace OpenRA.Mods.RA.Move
this.Facing = init.Contains<FacingInit>() ? init.Get<FacingInit, int>() : info.InitialFacing; this.Facing = init.Contains<FacingInit>() ? init.Get<FacingInit, int>() : info.InitialFacing;
if (init.Contains<AltitudeInit>()) // Sets the visual position to WPos accuracy
{ // Use LocationInit if you want to insert the actor into the ActorMap!
var z = init.Get<AltitudeInit, int>() * 1024 / Game.CellSize; if (init.Contains<CenterPositionInit>())
SetVisualPosition(self, CenterPosition + new WVec(0, 0, z - CenterPosition.Z)); SetVisualPosition(self, init.Get<CenterPositionInit, WPos>());
}
} }
public void SetPosition(Actor self, CPos cell) public void SetPosition(Actor self, CPos cell)
@@ -445,7 +444,7 @@ namespace OpenRA.Mods.RA.Move
decimal speed = Info.Speed * Info.TerrainSpeeds[type].Speed; decimal speed = Info.Speed * Info.TerrainSpeeds[type].Speed;
foreach (var t in self.TraitsImplementing<ISpeedModifier>()) foreach (var t in self.TraitsImplementing<ISpeedModifier>())
speed *= t.GetSpeedModifier(); speed *= t.GetSpeedModifier();
return (int)(speed / 100) * 1024 / (3 * Game.CellSize); return (int)(speed / 100);
} }
public void AddInfluence() public void AddInfluence()

View File

@@ -28,13 +28,12 @@ namespace OpenRA.Mods.RA
[Desc("Where the unit should leave the building. Multiples are allowed if IDs are added: Exit@2, ...")] [Desc("Where the unit should leave the building. Multiples are allowed if IDs are added: Exit@2, ...")]
public class ExitInfo : TraitInfo<Exit> public class ExitInfo : TraitInfo<Exit>
{ {
public readonly int2 SpawnOffset = int2.Zero; // in px relative to CenterLocation [Desc("Offset at which that the exiting actor is spawned")]
public readonly int2 ExitCell = int2.Zero; // in cells relative to TopLeft public readonly WVec SpawnOffset = WVec.Zero;
public readonly int Facing = -1;
// TODO: Push this conversion into the yaml [Desc("Cell offset where the exiting actor enters the ActorMap")]
public WVec SpawnOffsetVector { get { return new WVec(SpawnOffset.X, SpawnOffset.Y, 0) * 1024 / Game.CellSize; } } public readonly CVec ExitCell = CVec.Zero;
public CVec ExitCellVector { get { return (CVec)ExitCell; } } public readonly int Facing = -1;
} }
public class Exit { } public class Exit { }
@@ -49,8 +48,8 @@ namespace OpenRA.Mods.RA
public void DoProduction(Actor self, ActorInfo producee, ExitInfo exitinfo) public void DoProduction(Actor self, ActorInfo producee, ExitInfo exitinfo)
{ {
var exit = self.Location + exitinfo.ExitCellVector; var exit = self.Location + exitinfo.ExitCell;
var spawn = self.CenterPosition + exitinfo.SpawnOffsetVector; var spawn = self.CenterPosition + exitinfo.SpawnOffset;
var to = exit.CenterPosition; var to = exit.CenterPosition;
var fi = producee.Traits.Get<IFacingInfo>(); var fi = producee.Traits.Get<IFacingInfo>();
@@ -126,7 +125,7 @@ namespace OpenRA.Mods.RA
var mobileInfo = producee.Traits.GetOrDefault<MobileInfo>(); var mobileInfo = producee.Traits.GetOrDefault<MobileInfo>();
return mobileInfo == null || return mobileInfo == null ||
mobileInfo.CanEnterCell(self.World, self, self.Location + s.ExitCellVector, self, true, true); mobileInfo.CanEnterCell(self.World, self, self.Location + s.ExitCell, self, true, true);
} }
} }
} }

View File

@@ -31,8 +31,9 @@ namespace OpenRA.Mods.RA
return; return;
wr.DrawRangeCircleWithContrast( wr.DrawRangeCircleWithContrast(
self.CenterPosition,
WRange.FromCells(self.Info.Traits.Get<DetectCloakedInfo>().Range),
Color.FromArgb(128, Color.LimeGreen), Color.FromArgb(128, Color.LimeGreen),
wr.ScreenPxPosition(self.CenterPosition), self.Info.Traits.Get<DetectCloakedInfo>().Range,
Color.FromArgb(96, Color.Black)); Color.FromArgb(96, Color.Black));
} }
} }

View File

@@ -58,10 +58,11 @@ namespace OpenRA.Mods.RA
public static void DrawRangeCircle(WorldRenderer wr, WPos pos, int range, Color color) public static void DrawRangeCircle(WorldRenderer wr, WPos pos, int range, Color color)
{ {
wr.DrawRangeCircleWithContrast( wr.DrawRangeCircleWithContrast(
pos,
WRange.FromCells(range),
Color.FromArgb(128, color), Color.FromArgb(128, color),
wr.ScreenPxPosition(pos), Color.FromArgb(96, Color.Black)
range, );
Color.FromArgb(96, Color.Black));
} }
} }
} }

View File

@@ -26,11 +26,16 @@ namespace OpenRA.Mods.RA
public void Render(WorldRenderer wr, World w, ActorInfo ai, WPos centerPosition) public void Render(WorldRenderer wr, World w, ActorInfo ai, WPos centerPosition)
{ {
var range = ai.Traits.WithInterface<ArmamentInfo>()
.Select(a => Rules.Weapons[a.Weapon.ToLowerInvariant()].Range)
.Max();
wr.DrawRangeCircleWithContrast( wr.DrawRangeCircleWithContrast(
Color.FromArgb(128, Color.Yellow), wr.ScreenPxPosition(centerPosition), centerPosition,
ai.Traits.WithInterface<ArmamentInfo>() range,
.Select(a => Rules.Weapons[a.Weapon.ToLowerInvariant()].Range).Max(), Color.FromArgb(128, Color.Yellow),
Color.FromArgb(96, Color.Black)); Color.FromArgb(96, Color.Black)
);
foreach (var a in w.ActorsWithTrait<RenderRangeCircle>()) foreach (var a in w.ActorsWithTrait<RenderRangeCircle>())
if (a.Actor.Owner == a.Actor.World.LocalPlayer) if (a.Actor.Owner == a.Actor.World.LocalPlayer)
@@ -52,12 +57,12 @@ namespace OpenRA.Mods.RA
if (self.Owner != self.World.LocalPlayer) if (self.Owner != self.World.LocalPlayer)
return; return;
// Hack: Convert world coords to cells
var pxRange = self.Trait<AttackBase>().GetMaximumRange().Range / 1024f;
wr.DrawRangeCircleWithContrast( wr.DrawRangeCircleWithContrast(
self.CenterPosition,
self.Trait<AttackBase>().GetMaximumRange(),
Color.FromArgb(128, Color.Yellow), Color.FromArgb(128, Color.Yellow),
wr.ScreenPxPosition(self.CenterPosition), pxRange, Color.FromArgb(96, Color.Black)
Color.FromArgb(96, Color.Black)); );
} }
} }
} }

View File

@@ -19,10 +19,11 @@ namespace OpenRA.Mods.RA
public void Render(WorldRenderer wr, World w, ActorInfo ai, WPos centerPosition) public void Render(WorldRenderer wr, World w, ActorInfo ai, WPos centerPosition)
{ {
wr.DrawRangeCircleWithContrast( wr.DrawRangeCircleWithContrast(
centerPosition,
WRange.FromCells(ai.Traits.Get<CreatesShroudInfo>().Range),
Color.FromArgb(128, Color.Cyan), Color.FromArgb(128, Color.Cyan),
wr.ScreenPxPosition(centerPosition), Color.FromArgb(96, Color.Black)
ai.Traits.Get<CreatesShroudInfo>().Range, );
Color.FromArgb(96, Color.Black));
foreach (var a in w.ActorsWithTrait<RenderShroudCircle>()) foreach (var a in w.ActorsWithTrait<RenderShroudCircle>())
if (a.Actor.Owner == a.Actor.World.LocalPlayer) if (a.Actor.Owner == a.Actor.World.LocalPlayer)
@@ -44,9 +45,11 @@ namespace OpenRA.Mods.RA
return; return;
wr.DrawRangeCircleWithContrast( wr.DrawRangeCircleWithContrast(
self.CenterPosition,
WRange.FromCells(self.Info.Traits.Get<CreatesShroudInfo>().Range),
Color.FromArgb(128, Color.Cyan), Color.FromArgb(128, Color.Cyan),
wr.ScreenPxPosition(self.CenterPosition), self.Info.Traits.Get<CreatesShroudInfo>().Range, Color.FromArgb(96, Color.Black)
Color.FromArgb(96, Color.Black)); );
} }
} }
} }

View File

@@ -46,7 +46,7 @@ namespace OpenRA.Mods.RA
var attackRotation = WRot.FromFacing(attackFacing); var attackRotation = WRot.FromFacing(attackFacing);
var delta = new WVec(0, -1024, 0).Rotate(attackRotation); var delta = new WVec(0, -1024, 0).Rotate(attackRotation);
var altitude = Rules.Info[info.UnitType].Traits.Get<PlaneInfo>().CruiseAltitude * 1024 / Game.CellSize; var altitude = Rules.Info[info.UnitType].Traits.Get<PlaneInfo>().CruiseAltitude.Range;
var target = order.TargetLocation.CenterPosition + new WVec(0, 0, altitude); var target = order.TargetLocation.CenterPosition + new WVec(0, 0, altitude);
var startEdge = target - (self.World.DistanceToMapEdge(target, -delta) + info.Cordon).Range * delta / 1024; var startEdge = target - (self.World.DistanceToMapEdge(target, -delta) + info.Cordon).Range * delta / 1024;
var finishEdge = target + (self.World.DistanceToMapEdge(target, delta) + info.Cordon).Range * delta / 1024; var finishEdge = target + (self.World.DistanceToMapEdge(target, delta) + info.Cordon).Range * delta / 1024;

View File

@@ -53,12 +53,12 @@ namespace OpenRA.Mods.RA
flare.QueueActivity(new RemoveSelf()); flare.QueueActivity(new RemoveSelf());
} }
var altitude = Rules.Info[info.UnitType].Traits.Get<PlaneInfo>().CruiseAltitude;
var a = w.CreateActor(info.UnitType, new TypeDictionary var a = w.CreateActor(info.UnitType, new TypeDictionary
{ {
new LocationInit( startPos ), new CenterPositionInit(startPos.CenterPosition + new WVec(WRange.Zero, WRange.Zero, altitude)),
new OwnerInit(self.Owner), new OwnerInit(self.Owner),
new FacingInit( Util.GetFacing(order.TargetLocation - startPos, 0) ), new FacingInit(Util.GetFacing(order.TargetLocation - startPos, 0))
new AltitudeInit( Rules.Info[info.UnitType].Traits.Get<PlaneInfo>().CruiseAltitude ),
}); });
a.CancelActivity(); a.CancelActivity();

View File

@@ -28,13 +28,13 @@ namespace OpenRA.Mods.RA
public override void Activate(Actor self, Order order) public override void Activate(Actor self, Order order)
{ {
var enterCell = self.World.ChooseRandomEdgeCell(); var enterCell = self.World.ChooseRandomEdgeCell();
var altitude = Rules.Info["u2"].Traits.Get<PlaneInfo>().CruiseAltitude;
var plane = self.World.CreateActor("u2", new TypeDictionary var plane = self.World.CreateActor("u2", new TypeDictionary
{ {
new LocationInit( enterCell ), new CenterPositionInit(enterCell.CenterPosition + new WVec(WRange.Zero, WRange.Zero, altitude)),
new OwnerInit(self.Owner), new OwnerInit(self.Owner),
new FacingInit( Util.GetFacing(order.TargetLocation - enterCell, 0) ), new FacingInit(Util.GetFacing(order.TargetLocation - enterCell, 0))
new AltitudeInit( Rules.Info["u2"].Traits.Get<PlaneInfo>().CruiseAltitude ),
}); });
plane.CancelActivity(); plane.CancelActivity();

View File

@@ -324,7 +324,7 @@ namespace OpenRA.Utility
} }
[Desc("MAPFILE", "MOD", "Upgrade a version 5 map to version 6.")] [Desc("MAPFILE", "MOD", "Upgrade a version 5 map to version 6.")]
public static void UpgradeMap(string[] args) public static void UpgradeV5Map(string[] args)
{ {
var map = args[1]; var map = args[1];
var mod = args[2]; var mod = args[2];

View File

@@ -76,6 +76,7 @@
<ItemGroup> <ItemGroup>
<Compile Include="Command.cs" /> <Compile Include="Command.cs" />
<Compile Include="Program.cs" /> <Compile Include="Program.cs" />
<Compile Include="UpgradeRules.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj"> <ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">

View File

@@ -29,7 +29,9 @@ namespace OpenRA.Utility
{ "--docs", Command.ExtractTraitDocs }, { "--docs", Command.ExtractTraitDocs },
{ "--map-hash", Command.GetMapHash }, { "--map-hash", Command.GetMapHash },
{ "--map-preview", Command.GenerateMinimap }, { "--map-preview", Command.GenerateMinimap },
{ "--map-upgrade", Command.UpgradeMap }, { "--map-upgrade-v5", Command.UpgradeV5Map },
{ "--upgrade-map", UpgradeRules.UpgradeMap },
{ "--upgrade-mod", UpgradeRules.UpgradeMod },
}; };
static void Main(string[] args) static void Main(string[] args)

View File

@@ -0,0 +1,212 @@
#region Copyright & License Information
/*
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation. For more information,
* see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
using OpenRA.FileFormats;
using OpenRA.FileFormats.Graphics;
using OpenRA.GameRules;
using OpenRA.Graphics;
using OpenRA.Traits;
namespace OpenRA.Utility
{
public static class UpgradeRules
{
static void ConvertFloatToRange(ref string input)
{
var value = float.Parse(input);
var cells = (int)value;
var subcells = (int)(1024 * value) - 1024 * cells;
input = "{0}c{1}".F(cells, subcells);
}
static void ConvertPxToRange(ref string input)
{
ConvertPxToRange(ref input, 1, 1);
}
static void ConvertPxToRange(ref string input, int scaleMult, int scaleDiv)
{
var value = int.Parse(input);
var world = value * 1024 * scaleMult / (scaleDiv * Game.CellSize);
var cells = world / 1024;
var subcells = world - 1024 * cells;
input = cells != 0 ? "{0}c{1}".F(cells, subcells) : subcells.ToString();
}
static void ConvertAngle(ref string input)
{
var value = float.Parse(input);
input = WAngle.ArcTan((int)(value * 4 * 1024), 1024).ToString();
}
static void ConvertInt2ToWVec(ref string input)
{
var offset = FieldLoader.GetValue<int2>("(value)", input);
var world = new WVec(offset.X * 1024 / Game.CellSize, offset.Y * 1024 / Game.CellSize, 0);
input = world.ToString();
}
static void UpgradeActorRules(int engineVersion, ref List<MiniYamlNode> nodes, MiniYamlNode parent, int depth)
{
var parentKey = parent != null ? parent.Key.Split('@').First() : null;
foreach (var node in nodes)
{
// Weapon definitions were converted to world coordinates
if (engineVersion < 20131226)
{
if (depth == 2 && parentKey == "Exit" && node.Key == "SpawnOffset")
ConvertInt2ToWVec(ref node.Value.Value);
if (depth == 2 && (parentKey == "Aircraft" || parentKey == "Helicopter" || parentKey == "Plane"))
{
if (node.Key == "CruiseAltitude")
ConvertPxToRange(ref node.Value.Value);
if (node.Key == "Speed")
ConvertPxToRange(ref node.Value.Value, 7, 32);
}
if (depth == 2 && parentKey == "Mobile" && node.Key == "Speed")
ConvertPxToRange(ref node.Value.Value, 1, 3);
if (depth == 2 && parentKey == "Health" && node.Key == "Radius")
ConvertPxToRange(ref node.Value.Value);
}
UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1);
}
}
static void UpgradeWeaponRules(int engineVersion, ref List<MiniYamlNode> nodes, MiniYamlNode parent, int depth)
{
var parentKey = parent != null ? parent.Key.Split('@').First() : null;
foreach (var node in nodes)
{
// Weapon definitions were converted to world coordinates
if (engineVersion < 20131226)
{
if (depth == 1)
{
switch (node.Key)
{
case "Range":
case "MinRange":
ConvertFloatToRange(ref node.Value.Value);
break;
default:
break;
}
}
if (depth == 2 && parentKey == "Projectile")
{
switch (node.Key)
{
case "Inaccuracy":
ConvertPxToRange(ref node.Value.Value);
break;
case "Angle":
ConvertAngle(ref node.Value.Value);
break;
case "Speed":
{
if (parent.Value.Value == "Missile")
ConvertPxToRange(ref node.Value.Value, 1, 5);
if (parent.Value.Value == "Bullet")
ConvertPxToRange(ref node.Value.Value, 2, 5);
break;
}
default:
break;
}
}
if (depth == 2 && parentKey == "Warhead")
{
switch (node.Key)
{
case "Spread":
ConvertPxToRange(ref node.Value.Value);
break;
default:
break;
}
}
}
UpgradeWeaponRules(engineVersion, ref node.Value.Nodes, node, depth + 1);
}
}
[Desc("MAP", "CURRENTENGINE", "Upgrade map rules to the latest engine version.")]
public static void UpgradeMap(string[] args)
{
var map = new Map(args[1]);
var engineDate = int.Parse(args[2]);
Game.modData = new ModData(map.RequiresMod);
UpgradeWeaponRules(engineDate, ref map.Weapons, null, 0);
UpgradeActorRules(engineDate, ref map.Rules, null, 0);
map.Save(args[1]);
}
[Desc("MOD", "CURRENTENGINE", "Upgrade mod rules to the latest engine version.")]
public static void UpgradeMod(string[] args)
{
var mod = args[1];
var engineDate = int.Parse(args[2]);
Game.modData = new ModData(mod);
Console.WriteLine("Processing Rules:");
foreach (var filename in Game.modData.Manifest.Rules)
{
Console.WriteLine("\t" + filename);
var yaml = MiniYaml.FromFile(filename);
UpgradeActorRules(engineDate, ref yaml, null, 0);
using (var file = new StreamWriter(filename))
file.WriteLine(yaml.WriteToString());
}
Console.WriteLine("Processing Weapons:");
foreach (var filename in Game.modData.Manifest.Weapons)
{
Console.WriteLine("\t" + filename);
var yaml = MiniYaml.FromFile(filename);
UpgradeWeaponRules(engineDate, ref yaml, null, 0);
using (var file = new StreamWriter(filename))
file.WriteLine(yaml.WriteToString());
}
Console.WriteLine("Processing Maps:");
foreach (var map in Game.modData.FindMaps().Values)
{
Console.WriteLine("\t" + map.Path);
UpgradeActorRules(engineDate, ref map.Rules, null, 0);
UpgradeWeaponRules(engineDate, ref map.Weapons, null, 0);
map.Save(map.Path);
}
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -999,10 +999,10 @@ Rules:
Widget: MENU_BACKGROUND Widget: MENU_BACKGROUND
LST: LST:
Mobile: Mobile:
Speed: 3 Speed: 42
BOAT: BOAT:
Mobile: Mobile:
Speed: 3 Speed: 42
Sequences: Sequences:

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -14,7 +14,7 @@ TRAN:
Helicopter: Helicopter:
LandWhenIdle: true LandWhenIdle: true
ROT: 5 ROT: 5
Speed: 15 Speed: 140
InitialFacing: 0 InitialFacing: 0
LandableTerrainTypes: Clear,Rough,Road,Ore,Beach LandableTerrainTypes: Clear,Rough,Road,Ore,Beach
Health: Health:
@@ -56,7 +56,7 @@ HELI:
Helicopter: Helicopter:
RearmBuildings: hpad RearmBuildings: hpad
ROT: 4 ROT: 4
Speed: 20 Speed: 186
Health: Health:
HP: 125 HP: 125
Armor: Armor:
@@ -108,7 +108,7 @@ ORCA:
Helicopter: Helicopter:
RearmBuildings: hpad RearmBuildings: hpad
ROT: 4 ROT: 4
Speed: 20 Speed: 186
Health: Health:
HP: 90 HP: 90
Armor: Armor:
@@ -149,7 +149,7 @@ C17:
Cost: 2000 Cost: 2000
Plane: Plane:
ROT: 5 ROT: 5
Speed: 35 Speed: 326
Health: Health:
HP: 25 HP: 25
Armor: Armor:
@@ -157,7 +157,6 @@ C17:
RenderUnit: RenderUnit:
WithShadow: WithShadow:
Cargo: Cargo:
# Types: Infantry, Vehicle
MaxWeight: 10 MaxWeight: 10
PipCount: 10 PipCount: 10
Invulnerable: Invulnerable:
@@ -188,7 +187,7 @@ A10:
Cost: 2000 Cost: 2000
Plane: Plane:
ROT: 4 ROT: 4
Speed: 40 Speed: 373
Health: Health:
HP: 150 HP: 150
Armor: Armor:
@@ -227,7 +226,7 @@ TRAN.Husk:
Name: Chinook Transport Name: Chinook Transport
Helicopter: Helicopter:
ROT: 5 ROT: 5
Speed: 15 Speed: 140
RevealsShroud: RevealsShroud:
Range: 8 Range: 8
WithRotor@PRIMARY: WithRotor@PRIMARY:
@@ -245,7 +244,7 @@ HELI.Husk:
Name: Apache Longbow Name: Apache Longbow
Helicopter: Helicopter:
ROT: 4 ROT: 4
Speed: 20 Speed: 186
RevealsShroud: RevealsShroud:
Range: 10 Range: 10
WithRotor: WithRotor:
@@ -260,9 +259,10 @@ ORCA.Husk:
Name: Orca Name: Orca
Helicopter: Helicopter:
ROT: 4 ROT: 4
Speed: 20 Speed: 186
RevealsShroud: RevealsShroud:
Range: 10 Range: 10
RenderUnit: RenderUnit:
Image: orca Image: orca
WithShadow: WithShadow:

View File

@@ -283,3 +283,4 @@ V37.Husk:
Dimensions: 5,2 Dimensions: 5,2
EditorTilesetFilter: EditorTilesetFilter:
RequireTilesets: DESERT RequireTilesets: DESERT

View File

@@ -410,14 +410,14 @@ C10:
VICE: VICE:
AppearsOnRadar: AppearsOnRadar:
Health: Health:
Radius: 3 Radius: 128
HP: 400 HP: 400
Armor: Armor:
Type: Wood Type: Wood
RevealsShroud: RevealsShroud:
Range: 6 Range: 6
Mobile: Mobile:
Speed: 5 Speed: 71
TerrainSpeeds: TerrainSpeeds:
Clear: 70 Clear: 70
Rough: 60 Rough: 60
@@ -455,3 +455,4 @@ VICE:
QuantizedFacings: 8 QuantizedFacings: 8
PoisonedByTiberium: PoisonedByTiberium:
Weapon: Heal Weapon: Heal

View File

@@ -123,7 +123,7 @@
^Infantry: ^Infantry:
AppearsOnRadar: AppearsOnRadar:
Health: Health:
Radius: 3 Radius: 128
Armor: Armor:
Type: None Type: None
RevealsShroud: RevealsShroud:
@@ -195,7 +195,7 @@
Tooltip: Tooltip:
Name: Civilian Name: Civilian
Mobile: Mobile:
Speed: 4 Speed: 56
Health: Health:
HP: 25 HP: 25
RevealsShroud: RevealsShroud:
@@ -215,7 +215,7 @@
^DINO: ^DINO:
AppearsOnRadar: AppearsOnRadar:
Health: Health:
Radius: 3 Radius: 128
HP: 1000 HP: 1000
Armor: Armor:
Type: Wood Type: Wood
@@ -230,7 +230,7 @@
RevealsShroud: RevealsShroud:
Range: 6 Range: 6
Mobile: Mobile:
Speed: 8 Speed: 113
TerrainSpeeds: TerrainSpeeds:
Clear: 90 Clear: 90
Rough: 80 Rough: 80
@@ -515,11 +515,6 @@
ForceHealthPercentage: 25 ForceHealthPercentage: 25
BelowUnits: BelowUnits:
BodyOrientation: BodyOrientation:
# Capturable:
# Type: husk
# AllowAllies: true
# AllowNeutral: true
# AllowEnemies: true
LuaScriptEvents: LuaScriptEvents:
^HelicopterHusk: ^HelicopterHusk:
@@ -547,3 +542,4 @@
DestroyedSound: xplobig4.aud DestroyedSound: xplobig4.aud
BodyOrientation: BodyOrientation:
LuaScriptEvents: LuaScriptEvents:

View File

@@ -22,7 +22,6 @@ APC.Husk:
RenderUnit: RenderUnit:
Image: apc Image: apc
FTNK.Husk: FTNK.Husk:
Inherits: ^Husk Inherits: ^Husk
Tooltip: Tooltip:
@@ -31,7 +30,6 @@ FTNK.Husk:
RenderUnit: RenderUnit:
Image: ftnk Image: ftnk
ARTY.Husk: ARTY.Husk:
Inherits: ^Husk Inherits: ^Husk
Tooltip: Tooltip:
@@ -121,3 +119,4 @@ STNK.Husk:
Icon: stnkicnh Icon: stnkicnh
RenderUnit: RenderUnit:
Image: stnk Image: stnk

View File

@@ -11,7 +11,7 @@ E1:
Selectable: Selectable:
Bounds: 12,17,0,-6 Bounds: 12,17,0,-6
Mobile: Mobile:
Speed: 4 Speed: 56
Health: Health:
HP: 50 HP: 50
Armament: Armament:
@@ -37,7 +37,7 @@ E2:
Selectable: Selectable:
Bounds: 12,17,0,-6 Bounds: 12,17,0,-6
Mobile: Mobile:
Speed: 5 Speed: 71
Health: Health:
HP: 50 HP: 50
Armament: Armament:
@@ -68,7 +68,7 @@ E3:
Selectable: Selectable:
Bounds: 12,17,0,-6 Bounds: 12,17,0,-6
Mobile: Mobile:
Speed: 3 Speed: 42
Health: Health:
HP: 45 HP: 45
Armament: Armament:
@@ -96,7 +96,7 @@ E4:
Selectable: Selectable:
Bounds: 12,17,0,-6 Bounds: 12,17,0,-6
Mobile: Mobile:
Speed: 5 Speed: 71
Health: Health:
HP: 90 HP: 90
Armament: Armament:
@@ -126,7 +126,7 @@ E5:
Selectable: Selectable:
Bounds: 12,17,0,-6 Bounds: 12,17,0,-6
Mobile: Mobile:
Speed: 4 Speed: 56
TerrainSpeeds: TerrainSpeeds:
Tiberium: 80 Tiberium: 80
PathingCost: 80 PathingCost: 80
@@ -161,7 +161,7 @@ E6:
Selectable: Selectable:
Bounds: 12,17,0,-6 Bounds: 12,17,0,-6
Mobile: Mobile:
Speed: 4 Speed: 56
Health: Health:
HP: 25 HP: 25
Passenger: Passenger:
@@ -193,7 +193,7 @@ RMBO:
Bounds: 12,17,0,-6 Bounds: 12,17,0,-6
Voice: CommandoVoice Voice: CommandoVoice
Mobile: Mobile:
Speed: 5 Speed: 71
Health: Health:
HP: 200 HP: 200
Passenger: Passenger:
@@ -261,3 +261,4 @@ RAPT:
Description: Bipedal with enlarged sickle-shaped claw on each hindfoot Description: Bipedal with enlarged sickle-shaped claw on each hindfoot
Armament: Armament:
Weapon: claw Weapon: claw

View File

@@ -11,7 +11,7 @@ BOAT:
Mobile: Mobile:
InitialFacing: 64 InitialFacing: 64
ROT: 4 ROT: 4
Speed: 2 Speed: 28
OnRails: true OnRails: true
RevealsShroud: RevealsShroud:
Range: 7 Range: 7
@@ -49,7 +49,7 @@ LST:
River: 100 River: 100
InitialFacing: 0 InitialFacing: 0
ROT: 4 ROT: 4
Speed: 10 Speed: 142
Health: Health:
HP: 400 HP: 400
Armor: Armor:
@@ -69,3 +69,4 @@ LST:
AttackMove: AttackMove:
JustMove: true JustMove: true
RejectsOrders: RejectsOrders:

View File

@@ -1,5 +1,3 @@
# Arranged structures in order, from basic to advanced: Buildings, Defenses, Walls, Misc.
FACT: FACT:
Inherits: ^Building Inherits: ^Building
Buildable: Buildable:
@@ -187,10 +185,10 @@ PYLE:
Bib: Bib:
RallyPoint: RallyPoint:
Exit@1: Exit@1:
SpawnOffset: -10,2 SpawnOffset: -426,85,0
ExitCell: 0,1 ExitCell: 0,1
Exit@2: Exit@2:
SpawnOffset: 7,7 SpawnOffset: 298,298,0
ExitCell: 1,1 ExitCell: 1,1
Production: Production:
Produces: Infantry Produces: Infantry
@@ -225,7 +223,7 @@ HAND:
Bib: Bib:
RallyPoint: RallyPoint:
Exit@1: Exit@1:
SpawnOffset: 12,24 SpawnOffset: 512,1024,0
ExitCell: 1,2 ExitCell: 1,2
Production: Production:
Produces: Infantry Produces: Infantry
@@ -261,7 +259,7 @@ AFLD:
RallyPoint: RallyPoint:
RallyPoint: 4,2 RallyPoint: 4,2
Exit@1: Exit@1:
SpawnOffset: -24,0 SpawnOffset: -1024,0,0
ExitCell: 3,1 ExitCell: 3,1
ProductionAirdrop: ProductionAirdrop:
Produces: Vehicle Produces: Vehicle
@@ -300,7 +298,7 @@ WEAP:
RallyPoint: RallyPoint:
RallyPoint: 0,3 RallyPoint: 0,3
Exit@1: Exit@1:
SpawnOffset: -8,-8 SpawnOffset: -341,-341,0
ExitCell: 0,2 ExitCell: 0,2
Production: Production:
Produces: Vehicle Produces: Vehicle
@@ -331,7 +329,7 @@ HPAD:
RevealsShroud: RevealsShroud:
Range: 5 Range: 5
Exit@1: Exit@1:
SpawnOffset: 0,-6 SpawnOffset: 0,-256,0
Production: Production:
Produces: Aircraft Produces: Aircraft
Reservable: Reservable:
@@ -733,7 +731,6 @@ BRIK:
SoundOnDamageTransition: SoundOnDamageTransition:
DestroyedSound: crumble.aud DestroyedSound: crumble.aud
# custom prerequisites:
BARRACKS: BARRACKS:
Tooltip: Tooltip:
Name: Infantry Production Name: Infantry Production
@@ -753,3 +750,4 @@ ANYHQ:
Tooltip: Tooltip:
Name: a communications center Name: a communications center
Description: a communications center Description: a communications center

View File

@@ -421,3 +421,4 @@ waypoint:
Waypoint: Waypoint:
RenderEditorOnly: RenderEditorOnly:
BodyOrientation: BodyOrientation:

View File

@@ -1,4 +1,3 @@
# Oil Derrick
V19: V19:
Inherits: ^TechBuilding Inherits: ^TechBuilding
CashTrickler: CashTrickler:
@@ -19,7 +18,6 @@ V19.Husk:
Tooltip: Tooltip:
Name: Oil Derrick (Destroyed) Name: Oil Derrick (Destroyed)
# Hospital
HOSP: HOSP:
Inherits: ^TechBuilding Inherits: ^TechBuilding
Selectable: Selectable:
@@ -44,7 +42,6 @@ HOSP.Husk:
Tooltip: Tooltip:
Name: Hospital (Destroyed) Name: Hospital (Destroyed)
# Bio Lab
BIO: BIO:
Inherits: ^TechBuilding Inherits: ^TechBuilding
Building: Building:
@@ -53,7 +50,7 @@ BIO:
Tooltip: Tooltip:
Name: Biological Lab Name: Biological Lab
Exit@1: Exit@1:
SpawnOffset: 0,-10 SpawnOffset: 0,-426,0
ExitCell: 0,-1 ExitCell: 0,-1
Production: Production:
Produces: Biolab Produces: Biolab
@@ -76,7 +73,6 @@ BIO.Husk:
Tooltip: Tooltip:
Name: Biological Lab (Destroyed) Name: Biological Lab (Destroyed)
# Prison / Tech Center
MISS: MISS:
Inherits: ^CivBuilding Inherits: ^CivBuilding
RenderBuilding: RenderBuilding:
@@ -91,3 +87,4 @@ MISS:
Owner: None Owner: None
Valued: Valued:
Cost: 2000 Cost: 2000

View File

@@ -45,16 +45,22 @@ SPLITBLUE:
ROCK1: ROCK1:
Inherits: ^Rock Inherits: ^Rock
ROCK2: ROCK2:
Inherits: ^Rock Inherits: ^Rock
ROCK3: ROCK3:
Inherits: ^Rock Inherits: ^Rock
ROCK4: ROCK4:
Inherits: ^Rock Inherits: ^Rock
ROCK5: ROCK5:
Inherits: ^Rock Inherits: ^Rock
ROCK6: ROCK6:
Inherits: ^Rock Inherits: ^Rock
ROCK7: ROCK7:
Inherits: ^Rock Inherits: ^Rock
@@ -95,6 +101,7 @@ T10:
Inherits: ^Tree Inherits: ^Tree
Building: Building:
Footprint: __ xx Footprint: __ xx
T11: T11:
Inherits: ^Tree Inherits: ^Tree
Building: Building:
@@ -126,6 +133,7 @@ T17:
Building: Building:
Footprint: ___ xx_ Footprint: ___ xx_
Dimensions: 3,2 Dimensions: 3,2
T18: T18:
Inherits: ^Tree Inherits: ^Tree
@@ -158,3 +166,4 @@ TC05:
Building: Building:
Footprint: __x_ xxx_ _xx_ Footprint: __x_ xxx_ _xx_
Dimensions: 4,3 Dimensions: 4,3

View File

@@ -12,7 +12,7 @@ MCV:
Selectable: Selectable:
Priority: 3 Priority: 3
Mobile: Mobile:
Speed: 5 Speed: 71
Health: Health:
HP: 750 HP: 750
Armor: Armor:
@@ -61,7 +61,7 @@ HARV:
SearchFromProcRadius: 24 SearchFromProcRadius: 24
SearchFromOrderRadius: 12 SearchFromOrderRadius: 12
Mobile: Mobile:
Speed: 6 Speed: 85
Health: Health:
HP: 600 HP: 600
Armor: Armor:
@@ -88,7 +88,7 @@ APC:
Owner: gdi Owner: gdi
Mobile: Mobile:
ROT: 8 ROT: 8
Speed: 9 Speed: 128
Health: Health:
HP: 200 HP: 200
Armor: Armor:
@@ -136,7 +136,7 @@ ARTY:
Owner: nod Owner: nod
Mobile: Mobile:
ROT: 2 ROT: 2
Speed: 6 Speed: 85
Health: Health:
HP: 75 HP: 75
Armor: Armor:
@@ -170,7 +170,7 @@ FTNK:
Owner: nod Owner: nod
Mobile: Mobile:
ROT: 7 ROT: 7
Speed: 8 Speed: 113
Health: Health:
HP: 350 HP: 350
Armor: Armor:
@@ -204,7 +204,7 @@ BGGY:
Owner: nod Owner: nod
Mobile: Mobile:
ROT: 12 ROT: 12
Speed: 12 Speed: 170
Health: Health:
HP: 120 HP: 120
Armor: Armor:
@@ -238,7 +238,7 @@ BIKE:
Owner: nod Owner: nod
Mobile: Mobile:
ROT: 12 ROT: 12
Speed: 15 Speed: 213
TerrainSpeeds: TerrainSpeeds:
Clear: 70 Clear: 70
Rough: 35 Rough: 35
@@ -275,7 +275,7 @@ JEEP:
Owner: gdi Owner: gdi
Mobile: Mobile:
ROT: 11 ROT: 11
Speed: 11 Speed: 156
Health: Health:
HP: 160 HP: 160
Armor: Armor:
@@ -309,7 +309,7 @@ LTNK:
Owner: nod Owner: nod
Mobile: Mobile:
ROT: 7 ROT: 7
Speed: 8 Speed: 113
Health: Health:
HP: 300 HP: 300
Armor: Armor:
@@ -346,7 +346,7 @@ MTNK:
Prerequisites: anyhq Prerequisites: anyhq
Owner: gdi Owner: gdi
Mobile: Mobile:
Speed: 6 Speed: 85
Health: Health:
HP: 400 HP: 400
Armor: Armor:
@@ -386,7 +386,7 @@ HTNK:
Owner: gdi Owner: gdi
Mobile: Mobile:
Crushes: wall, heavywall, crate, infantry Crushes: wall, heavywall, crate, infantry
Speed: 4 Speed: 56
ROT: 3 ROT: 3
Health: Health:
HP: 900 HP: 900
@@ -436,7 +436,7 @@ MSAM:
Prerequisites: anyhq Prerequisites: anyhq
Owner: gdi Owner: gdi
Mobile: Mobile:
Speed: 6 Speed: 85
ROT: 4 ROT: 4
Health: Health:
HP: 120 HP: 120
@@ -473,7 +473,7 @@ MLRS:
Prerequisites: anyhq Prerequisites: anyhq
Owner: nod Owner: nod
Mobile: Mobile:
Speed: 7 Speed: 99
ROT: 7 ROT: 7
Health: Health:
HP: 120 HP: 120
@@ -514,7 +514,7 @@ STNK:
Owner: nod Owner: nod
Mobile: Mobile:
ROT: 8 ROT: 8
Speed: 10 Speed: 142
Crushes: crate, infantry Crushes: crate, infantry
Health: Health:
HP: 150 HP: 150
@@ -551,7 +551,7 @@ MHQ:
Armor: Armor:
Type: Light Type: Light
Mobile: Mobile:
Speed: 6 Speed: 85
RevealsShroud: RevealsShroud:
Range: 6 Range: 6
RenderUnit: RenderUnit:
@@ -563,3 +563,4 @@ MHQ:
Explodes: Explodes:
Weapon: UnitExplodeSmall Weapon: UnitExplodeSmall
EmptyWeapon: UnitExplodeSmall EmptyWeapon: UnitExplodeSmall

View File

@@ -1,7 +1,7 @@
FlametankExplode: FlametankExplode:
Warhead: Warhead:
Damage: 100 Damage: 100
Spread: 24 Spread: 1c0
Explosion: big_napalm Explosion: big_napalm
InfDeath: 5 InfDeath: 5
ImpactSound: xplobig6.aud ImpactSound: xplobig6.aud
@@ -9,7 +9,7 @@ FlametankExplode:
HeliCrash: HeliCrash:
Warhead: Warhead:
Damage: 40 Damage: 40
Spread: 10 Spread: 426
Explosion: poof Explosion: poof
InfDeath: 4 InfDeath: 4
ImpactSound: xplos.aud ImpactSound: xplos.aud
@@ -23,7 +23,7 @@ HeliExplode:
UnitExplode: UnitExplode:
Warhead: Warhead:
Damage: 500 Damage: 500
Spread: 10 Spread: 426
Versus: Versus:
None: 90% None: 90%
Wood: 75% Wood: 75%
@@ -36,7 +36,7 @@ UnitExplode:
UnitExplodeSmall: UnitExplodeSmall:
Warhead: Warhead:
Damage: 40 Damage: 40
Spread: 10 Spread: 426
Versus: Versus:
None: 90% None: 90%
Wood: 75% Wood: 75%
@@ -49,7 +49,7 @@ UnitExplodeSmall:
GrenadierExplode: GrenadierExplode:
Warhead: Warhead:
Damage: 10 Damage: 10
Spread: 9 Spread: 384
Versus: Versus:
None: 90% None: 90%
Wood: 75% Wood: 75%
@@ -64,7 +64,7 @@ Atomic:
Report: nukemisl.aud Report: nukemisl.aud
Warhead@impact: Warhead@impact:
Damage: 1000 Damage: 1000
Spread:15 Spread: 640
Versus: Versus:
None: 90% None: 90%
Wood: 60% Wood: 60%
@@ -76,7 +76,7 @@ Atomic:
Warhead@areanukea: Warhead@areanukea:
Damage: 200 Damage: 200
SmudgeType: Scorch SmudgeType: Scorch
Spread: 60 Spread: 2c512
Size: 3 Size: 3
Ore: true Ore: true
Versus: Versus:
@@ -90,7 +90,7 @@ Atomic:
Warhead@areanukeb: Warhead@areanukeb:
Damage: 200 Damage: 200
SmudgeType: Scorch SmudgeType: Scorch
Spread:90 Spread: 3c768
Size: 4 Size: 4
Ore: true Ore: true
Versus: Versus:
@@ -103,7 +103,7 @@ Atomic:
Warhead@areanukec: Warhead@areanukec:
Damage: 200 Damage: 200
SmudgeType: Scorch SmudgeType: Scorch
Spread: 120 Spread: 5c0
Size: 5 Size: 5
Ore: true Ore: true
Versus: Versus:
@@ -116,7 +116,7 @@ Atomic:
Warhead@areanuke: Warhead@areanuke:
Damage: 200 Damage: 200
SmudgeType: Scorch SmudgeType: Scorch
Spread: 150 Spread: 6c256
Size: 6 Size: 6
Ore: true Ore: true
Versus: Versus:
@@ -131,7 +131,7 @@ IonCannon:
ValidTargets: Ground, Air ValidTargets: Ground, Air
Warhead@impact: Warhead@impact:
Damage: 900 Damage: 900
Spread: 16 Spread: 682
Ore: true Ore: true
Versus: Versus:
None: 100% None: 100%
@@ -151,12 +151,12 @@ IonCannon:
Sniper: Sniper:
Report: RAMGUN2.AUD Report: RAMGUN2.AUD
ROF: 40 ROF: 40
Range: 6 Range: 6c0
Projectile: Bullet Projectile: Bullet
Speed: 100 Speed: 1c682
Warhead: Warhead:
Damage: 100 Damage: 100
Spread: 1 Spread: 42
Versus: Versus:
None: 100% None: 100%
Wood: 5% Wood: 5%
@@ -166,13 +166,13 @@ Sniper:
HighV: HighV:
ROF: 30 ROF: 30
Range: 6 Range: 6c0
Report: GUN8.AUD Report: GUN8.AUD
Projectile: Bullet Projectile: Bullet
Speed: 100 Speed: 1c682
Warhead: Warhead:
Damage: 50 Damage: 50
Spread: 3 Spread: 128
Versus: Versus:
None: 100% None: 100%
Wood: 50% Wood: 50%
@@ -185,14 +185,14 @@ HeliAGGun:
ROF: 20 ROF: 20
Burst: 2 Burst: 2
BurstDelay: 0 BurstDelay: 0
Range: 4 Range: 4c0
ValidTargets: Ground ValidTargets: Ground
Report: gun5.aud Report: gun5.aud
Projectile: Bullet Projectile: Bullet
Speed: 100 Speed: 1c682
Warhead: Warhead:
Damage: 20 Damage: 20
Spread: 6 Spread: 256
Versus: Versus:
None: 100% None: 100%
Wood: 50% Wood: 50%
@@ -205,14 +205,14 @@ HeliAAGun:
ROF: 20 ROF: 20
Burst: 2 Burst: 2
BurstDelay: 0 BurstDelay: 0
Range: 4 Range: 4c0
ValidTargets: Air ValidTargets: Air
Report: gun5.aud Report: gun5.aud
Projectile: Bullet Projectile: Bullet
Speed: 100 Speed: 1c682
Warhead: Warhead:
Damage: 20 Damage: 20
Spread: 3 Spread: 128
Versus: Versus:
None: 100% None: 100%
Wood: 50% Wood: 50%
@@ -223,12 +223,12 @@ HeliAAGun:
Pistol: Pistol:
ROF: 7 ROF: 7
Range: 3 Range: 3c0
Report: GUN18.AUD Report: GUN18.AUD
Projectile: Bullet Projectile: Bullet
Speed: 100 Speed: 1c682
Warhead: Warhead:
Spread: 3 Spread: 128
Versus: Versus:
None: 100% None: 100%
Wood: 50% Wood: 50%
@@ -240,12 +240,12 @@ Pistol:
M16: M16:
ROF: 20 ROF: 20
Range: 4 Range: 4c0
Report: MGUN2.AUD Report: MGUN2.AUD
Projectile: Bullet Projectile: Bullet
Speed: 100 Speed: 1c682
Warhead: Warhead:
Spread: 3 Spread: 128
Versus: Versus:
None: 100% None: 100%
Wood: 25% Wood: 25%
@@ -257,22 +257,22 @@ M16:
Rockets: Rockets:
ROF: 50 ROF: 50
Range: 6 Range: 6c0
Report: BAZOOK1.AUD Report: BAZOOK1.AUD
ValidTargets: Ground, Air ValidTargets: Ground, Air
Projectile: Missile Projectile: Missile
Arm: 0 Arm: 0
High: yes High: yes
Shadow: no Shadow: no
Inaccuracy: 3 Inaccuracy: 128
Image: DRAGON Image: DRAGON
ROT: 15 ROT: 15
Trail: smokey Trail: smokey
ContrailLength: 8 ContrailLength: 8
Speed: 35 Speed: 298
RangeLimit: 30 RangeLimit: 30
Warhead: Warhead:
Spread: 3 Spread: 128
Versus: Versus:
None: 50% None: 50%
Wood: 85% Wood: 85%
@@ -287,7 +287,7 @@ Rockets:
BikeRockets: BikeRockets:
ROF: 50 ROF: 50
Range: 6 Range: 6c0
Report: BAZOOK1.AUD Report: BAZOOK1.AUD
ValidTargets: Ground, Air ValidTargets: Ground, Air
Burst: 2 Burst: 2
@@ -296,15 +296,15 @@ BikeRockets:
Arm: 0 Arm: 0
High: yes High: yes
Shadow: no Shadow: no
Inaccuracy: 3 Inaccuracy: 128
Image: DRAGON Image: DRAGON
ROT: 10 ROT: 10
Trail: smokey Trail: smokey
ContrailLength: 8 ContrailLength: 8
Speed: 35 Speed: 298
RangeLimit: 40 RangeLimit: 40
Warhead: Warhead:
Spread: 3 Spread: 128
Versus: Versus:
None: 65% None: 65%
Wood: 50% Wood: 50%
@@ -321,22 +321,22 @@ OrcaAGMissiles:
ROF: 15 ROF: 15
Burst: 2 Burst: 2
BurstDelay: 15 BurstDelay: 15
Range: 5 Range: 5c0
Report: BAZOOK1.AUD Report: BAZOOK1.AUD
ValidTargets: Ground ValidTargets: Ground
Projectile: Missile Projectile: Missile
Arm: 0 Arm: 0
High: yes High: yes
Shadow: no Shadow: no
Inaccuracy: 3 Inaccuracy: 128
Image: DRAGON Image: DRAGON
ROT: 10 ROT: 10
Trail: smokey Trail: smokey
ContrailLength: 8 ContrailLength: 8
Speed: 25 Speed: 213
RangeLimit: 30 RangeLimit: 30
Warhead: Warhead:
Spread: 3 Spread: 128
Versus: Versus:
None: 50% None: 50%
Wood: 100% Wood: 100%
@@ -352,22 +352,22 @@ OrcaAAMissiles:
ROF: 15 ROF: 15
Burst: 2 Burst: 2
BurstDelay: 15 BurstDelay: 15
Range: 5 Range: 5c0
Report: BAZOOK1.AUD Report: BAZOOK1.AUD
ValidTargets: Air ValidTargets: Air
Projectile: Missile Projectile: Missile
Arm: 0 Arm: 0
High: yes High: yes
Shadow: no Shadow: no
Inaccuracy: 3 Inaccuracy: 128
Image: DRAGON Image: DRAGON
ROT: 10 ROT: 10
Trail: smokey Trail: smokey
ContrailLength: 8 ContrailLength: 8
Speed: 25 Speed: 213
RangeLimit: 30 RangeLimit: 30
Warhead: Warhead:
Spread: 3 Spread: 128
Versus: Versus:
None: 50% None: 50%
Wood: 100% Wood: 100%
@@ -381,12 +381,12 @@ OrcaAAMissiles:
Flamethrower: Flamethrower:
ROF: 50 ROF: 50
Range: 2.5 Range: 2c512
Report: FLAMER2.AUD Report: FLAMER2.AUD
Projectile: Bullet Projectile: Bullet
Speed: 100 Speed: 1c682
Warhead: Warhead:
Spread: 8 Spread: 341
Versus: Versus:
None: 90% None: 90%
Wood: 100% Wood: 100%
@@ -400,14 +400,14 @@ Flamethrower:
BigFlamer: BigFlamer:
ROF: 50 ROF: 50
Range: 3.5 Range: 3c512
Report: FLAMER2.AUD Report: FLAMER2.AUD
Projectile: Bullet Projectile: Bullet
Speed: 20 Speed: 341
Burst: 2 Burst: 2
BurstDelay: 25 BurstDelay: 25
Warhead: Warhead:
Spread: 8 Spread: 341
Versus: Versus:
None: 100% None: 100%
Wood: 100% Wood: 100%
@@ -421,13 +421,13 @@ BigFlamer:
Chemspray: Chemspray:
ROF: 70 ROF: 70
Range: 3 Range: 3c0
Report: FLAMER2.AUD Report: FLAMER2.AUD
Projectile: Bullet Projectile: Bullet
Speed: 100 Speed: 1c682
Warhead: Warhead:
Damage: 80 Damage: 80
Spread: 6 Spread: 256
Versus: Versus:
None: 100% None: 100%
Wood: 75% Wood: 75%
@@ -440,16 +440,16 @@ Chemspray:
Grenade: Grenade:
ROF: 50 ROF: 50
Range: 5 Range: 5c0
Report: toss1.aud Report: toss1.aud
Projectile: Bullet Projectile: Bullet
Speed: 12 Speed: 204
High: yes High: yes
Angle: .1 Angle: 62
Inaccuracy: 5 Inaccuracy: 213
Image: BOMB Image: BOMB
Warhead: Warhead:
Spread: 6 Spread: 256
Versus: Versus:
None: 90% None: 90%
Wood: 75% Wood: 75%
@@ -463,13 +463,13 @@ Grenade:
70mm: 70mm:
ROF: 38 ROF: 38
Range: 4 Range: 4c0
Report: TNKFIRE3.AUD Report: TNKFIRE3.AUD
Projectile: Bullet Projectile: Bullet
Image: 120MM Image: 120MM
Speed: 60 Speed: 1c0
Warhead: Warhead:
Spread: 3 Spread: 128
Versus: Versus:
None: 30% None: 30%
Wood: 75% Wood: 75%
@@ -484,13 +484,13 @@ Grenade:
105mm: 105mm:
ROF: 50 ROF: 50
Range: 4.75 Range: 4c768
Report: TNKFIRE4.AUD Report: TNKFIRE4.AUD
Projectile: Bullet Projectile: Bullet
Image: 120MM Image: 120MM
Speed: 40 Speed: 682
Warhead: Warhead:
Spread: 3 Spread: 128
Versus: Versus:
None: 30% None: 30%
Wood: 75% Wood: 75%
@@ -504,13 +504,13 @@ Grenade:
120mm: 120mm:
ROF: 50 ROF: 50
Range: 4.75 Range: 4c768
Report: TNKFIRE6.AUD Report: TNKFIRE6.AUD
Projectile: Bullet Projectile: Bullet
Image: 120MM Image: 120MM
Speed: 40 Speed: 682
Warhead: Warhead:
Spread: 3 Spread: 128
Versus: Versus:
None: 30% None: 30%
Wood: 75% Wood: 75%
@@ -525,15 +525,15 @@ Grenade:
120mmDual: 120mmDual:
ROF: 60 ROF: 60
Range: 4.75 Range: 4c768
Report: TNKFIRE6.AUD Report: TNKFIRE6.AUD
Burst: 2 Burst: 2
BurstDelay: 5 BurstDelay: 5
Projectile: Bullet Projectile: Bullet
Image: 120MM Image: 120MM
Speed: 40 Speed: 682
Warhead: Warhead:
Spread: 3 Spread: 128
Versus: Versus:
None: 30% None: 30%
Wood: 75% Wood: 75%
@@ -548,13 +548,13 @@ Grenade:
TurretGun: TurretGun:
ROF: 25 ROF: 25
Range: 6 Range: 6c0
Report: TNKFIRE6.AUD Report: TNKFIRE6.AUD
Projectile: Bullet Projectile: Bullet
Image: 120MM Image: 120MM
Speed: 50 Speed: 853
Warhead: Warhead:
Spread: 3 Spread: 128
Versus: Versus:
None: 25% None: 25%
Wood: 25% Wood: 25%
@@ -568,7 +568,7 @@ TurretGun:
MammothMissiles: MammothMissiles:
ROF: 100 ROF: 100
Range: 5 Range: 5c0
Report: ROCKET1.AUD Report: ROCKET1.AUD
ValidTargets: Ground, Air ValidTargets: Ground, Air
Burst: 2 Burst: 2
@@ -576,15 +576,15 @@ MammothMissiles:
Arm: 0 Arm: 0
High: yes High: yes
Shadow: no Shadow: no
Inaccuracy: 3 Inaccuracy: 128
Image: DRAGON Image: DRAGON
ROT: 10 ROT: 10
Trail: smokey Trail: smokey
ContrailLength: 8 ContrailLength: 8
Speed: 25 Speed: 213
RangeLimit: 35 RangeLimit: 35
Warhead: Warhead:
Spread: 6 Spread: 256
Versus: Versus:
None: 40% None: 40%
Wood: 75% Wood: 75%
@@ -598,8 +598,8 @@ MammothMissiles:
227mm: 227mm:
ROF: 140 ROF: 140
Range: 12 Range: 12c0
MinRange: 3 MinRange: 3c0
Burst: 4 Burst: 4
BurstDelay: 4 BurstDelay: 4
Report: ROCKET1.AUD Report: ROCKET1.AUD
@@ -608,15 +608,15 @@ MammothMissiles:
Arm: 5 Arm: 5
High: yes High: yes
Shadow: yes Shadow: yes
Inaccuracy: 20 Inaccuracy: 853
Angle: 0.1 Angle: 62
Image: DRAGON Image: DRAGON
ROT: 2 ROT: 2
ContrailLength: 10 ContrailLength: 10
Trail: smokey Trail: smokey
Speed: 20 Speed: 341
Warhead: Warhead:
Spread: 15 Spread: 640
Versus: Versus:
None: 25% None: 25%
Wood: 30% Wood: 30%
@@ -630,7 +630,7 @@ MammothMissiles:
227mm.stnk: 227mm.stnk:
ROF: 70 ROF: 70
Range: 7 Range: 7c0
Report: ROCKET1.AUD Report: ROCKET1.AUD
Burst: 2 Burst: 2
BurstDelay: 10 BurstDelay: 10
@@ -639,15 +639,15 @@ MammothMissiles:
Arm: 0 Arm: 0
High: yes High: yes
Shadow: yes Shadow: yes
Inaccuracy: 5 Inaccuracy: 213
Image: DRAGON Image: DRAGON
ROT: 10 ROT: 10
Trail: smokey Trail: smokey
ContrailLength: 8 ContrailLength: 8
Speed: 25 Speed: 213
RangeLimit: 55 RangeLimit: 55
Warhead: Warhead:
Spread: 3 Spread: 128
Versus: Versus:
None: 35% None: 35%
Wood: 50% Wood: 50%
@@ -661,19 +661,19 @@ MammothMissiles:
ArtilleryShell: ArtilleryShell:
ROF: 65 ROF: 65
Range: 11 Range: 11c0
MinRange: 2 MinRange: 2c0
Report: TNKFIRE2.AUD Report: TNKFIRE2.AUD
Projectile: Bullet Projectile: Bullet
Speed: 12 Speed: 204
High: yes High: yes
Angle: .09 Angle: 56
Inaccuracy: 30 Inaccuracy: 1c256
ContrailLength: 30 ContrailLength: 30
Image: 120MM Image: 120MM
Warhead: Warhead:
Damage: 150 Damage: 150
Spread: 6 Spread: 256
Versus: Versus:
None: 90% None: 90%
Wood: 50% Wood: 50%
@@ -687,12 +687,12 @@ ArtilleryShell:
MachineGun: MachineGun:
ROF: 20 ROF: 20
Burst: 4 Burst: 4
Range: 4 Range: 4c0
Report: MGUN11.AUD Report: MGUN11.AUD
Projectile: Bullet Projectile: Bullet
Speed: 100 Speed: 1c682
Warhead: Warhead:
Spread: 3 Spread: 128
Versus: Versus:
None: 100% None: 100%
Wood: 25% Wood: 25%
@@ -705,7 +705,7 @@ MachineGun:
BoatMissile: BoatMissile:
ROF: 35 ROF: 35
Range: 8 Range: 8c0
Burst: 2 Burst: 2
BurstDelay: 7 BurstDelay: 7
Report: ROCKET2.AUD Report: ROCKET2.AUD
@@ -713,15 +713,15 @@ BoatMissile:
Arm: 0 Arm: 0
High: yes High: yes
Shadow: no Shadow: no
Inaccuracy: 5 Inaccuracy: 213
Image: DRAGON Image: DRAGON
ROT: 10 ROT: 10
Trail: smokey Trail: smokey
ContrailLength: 8 ContrailLength: 8
Speed: 20 Speed: 170
RangeLimit: 60 RangeLimit: 60
Warhead: Warhead:
Spread: 6 Spread: 256
Versus: Versus:
None: 90% None: 90%
Wood: 75% Wood: 75%
@@ -735,7 +735,7 @@ BoatMissile:
TowerMissle: TowerMissle:
ROF: 24 ROF: 24
Range: 8 Range: 8c0
Report: ROCKET2.AUD Report: ROCKET2.AUD
ValidTargets: Ground, Air ValidTargets: Ground, Air
Burst: 2 Burst: 2
@@ -744,15 +744,15 @@ TowerMissle:
Arm: 0 Arm: 0
High: yes High: yes
Shadow: no Shadow: no
Inaccuracy: 3 Inaccuracy: 128
Image: DRAGON Image: DRAGON
ROT: 20 ROT: 20
Trail: smokey Trail: smokey
ContrailLength: 8 ContrailLength: 8
Speed: 35 Speed: 298
RangeLimit: 40 RangeLimit: 40
Warhead: Warhead:
Spread: 12 Spread: 512
Versus: Versus:
None: 25% None: 25%
Wood: 25% Wood: 25%
@@ -767,13 +767,13 @@ TowerMissle:
Vulcan: Vulcan:
ValidTargets: Ground, Water ValidTargets: Ground, Water
ROF: 2 ROF: 2
Range: 6 Range: 6c0
Report: gun5.aud Report: gun5.aud
Projectile: Bullet Projectile: Bullet
Speed: 100 Speed: 1c682
Warhead: Warhead:
Damage: 75 Damage: 75
Spread: 10 Spread: 426
Versus: Versus:
None: 100% None: 100%
Wood: 50% Wood: 50%
@@ -785,13 +785,13 @@ Vulcan:
Napalm: Napalm:
ValidTargets: Ground, Water ValidTargets: Ground, Water
ROF: 4 ROF: 4
Range: 2 Range: 2c0
Burst: 2 Burst: 2
BurstDelay: 2 BurstDelay: 2
Projectile: GravityBomb Projectile: GravityBomb
Image: BOMBLET Image: BOMBLET
Warhead: Warhead:
Spread: 20 Spread: 853
Versus: Versus:
None: 90% None: 90%
Wood: 100% Wood: 100%
@@ -806,7 +806,7 @@ Napalm:
Napalm.Crate: Napalm.Crate:
Warhead: Warhead:
Spread: 4 Spread: 170
Versus: Versus:
None: 90% None: 90%
Wood: 100% Wood: 100%
@@ -820,14 +820,14 @@ Napalm.Crate:
Laser: Laser:
ROF: 90 ROF: 90
Range: 8.5 Range: 8c512
Charges: true Charges: true
Report: OBELRAY1.AUD Report: OBELRAY1.AUD
Projectile: LaserZap Projectile: LaserZap
BeamWidth: 2 BeamWidth: 2
HitAnim: laserfire HitAnim: laserfire
Warhead: Warhead:
Spread: 1 Spread: 42
Versus: Versus:
Wood: 50% Wood: 50%
InfDeath: 5 InfDeath: 5
@@ -836,7 +836,7 @@ Laser:
SAMMissile: SAMMissile:
ROF: 15 ROF: 15
Range: 10 Range: 10c0
Report: ROCKET2.AUD Report: ROCKET2.AUD
ValidTargets: Air ValidTargets: Air
Projectile: Missile Projectile: Missile
@@ -845,12 +845,12 @@ SAMMissile:
Shadow: no Shadow: no
Image: MISSILE Image: MISSILE
ROT: 20 ROT: 20
Speed: 50 Speed: 426
RangeLimit: 35 RangeLimit: 35
Trail: smokey Trail: smokey
ContrailLength: 8 ContrailLength: 8
Warhead: AP Warhead: AP
Spread: 16 Spread: 682
Versus: Versus:
None: 100% None: 100%
Wood: 100% Wood: 100%
@@ -864,20 +864,20 @@ SAMMissile:
HonestJohn: HonestJohn:
ROF: 200 ROF: 200
Range: 10 Range: 10c0
Report: ROCKET1.AUD Report: ROCKET1.AUD
Projectile: Bullet Projectile: Bullet
Arm: 10 Arm: 10
High: yes High: yes
Shadow: yes Shadow: yes
Inaccuracy: 5 Inaccuracy: 213
Image: patriot Image: patriot
Trail: smokey Trail: smokey
Speed: 11 Speed: 187
RangeLimit: 35 RangeLimit: 35
Angle: .15 Angle: 88
Warhead: Warhead:
Spread: 6 Spread: 256
Versus: Versus:
None: 90% None: 90%
Wood: 75% Wood: 75%
@@ -892,7 +892,7 @@ HonestJohn:
Tiberium: Tiberium:
ROF: 4 ROF: 4
Warhead: Warhead:
Spread: 1 Spread: 42
InfDeath: 6 InfDeath: 6
Damage: 1 Damage: 1
PreventProne: yes PreventProne: yes
@@ -900,19 +900,19 @@ Tiberium:
Heal: Heal:
ROF: 4 ROF: 4
Warhead: Warhead:
Spread: 1 Spread: 42
Damage: -1 Damage: -1
PreventProne: yes PreventProne: yes
APCGun: APCGun:
ROF: 12 ROF: 12
Range: 5 Range: 5c0
Report: gun20.aud Report: gun20.aud
ValidTargets: Ground ValidTargets: Ground
Projectile: Bullet Projectile: Bullet
Speed: 100 Speed: 1c682
Warhead: Warhead:
Spread: 3 Spread: 128
Versus: Versus:
None: 35% None: 35%
Wood: 50% Wood: 50%
@@ -923,14 +923,14 @@ APCGun:
APCGun.AA: APCGun.AA:
ROF: 12 ROF: 12
Range: 7 Range: 7c0
Report: gun20.aud Report: gun20.aud
ValidTargets: Air ValidTargets: Air
Projectile: Bullet Projectile: Bullet
Speed: 100 Speed: 1c682
High: true High: true
Warhead: Warhead:
Spread: 3 Spread: 128
Versus: Versus:
Heavy: 50% Heavy: 50%
Explosion: small_poof Explosion: small_poof
@@ -938,8 +938,8 @@ APCGun.AA:
Patriot: Patriot:
ROF: 30 ROF: 30
Range: 10 Range: 10c0
MinRange: 1 MinRange: 1c0
Burst: 2 Burst: 2
BurstDelay: 15 BurstDelay: 15
Report: ROCKET2.AUD Report: ROCKET2.AUD
@@ -951,11 +951,11 @@ Patriot:
Trail: smokey Trail: smokey
ContrailLength: 8 ContrailLength: 8
ROT: 20 ROT: 20
Speed: 50 Speed: 426
RangeLimit: 30 RangeLimit: 30
Angle: .15 Angle: 88
Warhead: AP Warhead: AP
Spread: 16 Spread: 682
Versus: Versus:
None: 100% None: 100%
Wood: 100% Wood: 100%
@@ -969,10 +969,10 @@ Patriot:
Tail: Tail:
ROF: 30 ROF: 30
Range: 1 Range: 1c0
Projectile: Bullet Projectile: Bullet
Warhead: Warhead:
Spread: 5 Spread: 213
Versus: Versus:
None: 90% None: 90%
Wood: 10% Wood: 10%
@@ -984,10 +984,10 @@ Tail:
Horn: Horn:
ROF: 20 ROF: 20
Range: 1 Range: 1c0
Projectile: Bullet Projectile: Bullet
Warhead: Warhead:
Spread: 5 Spread: 213
Versus: Versus:
None: 90% None: 90%
Wood: 10% Wood: 10%
@@ -999,10 +999,10 @@ Horn:
Teeth: Teeth:
ROF: 30 ROF: 30
Range: 1 Range: 1c0
Projectile: Bullet Projectile: Bullet
Warhead: Warhead:
Spread: 5 Spread: 213
Versus: Versus:
None: 90% None: 90%
Wood: 10% Wood: 10%
@@ -1014,10 +1014,10 @@ Teeth:
Claw: Claw:
ROF: 10 ROF: 10
Range: 1 Range: 1c0
Projectile: Bullet Projectile: Bullet
Warhead: Warhead:
Spread: 5 Spread: 213
Versus: Versus:
None: 90% None: 90%
Wood: 10% Wood: 10%
@@ -1026,3 +1026,4 @@ Claw:
Concrete: 10% Concrete: 10%
InfDeath: 1 InfDeath: 1
Damage: 60 Damage: 60

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More