fixed wall, silo; add ornithocopter, sonic tank, infantry

orni does not flap, no sonic wave weapon, infantry frames broken
This commit is contained in:
Matthias Mailänder
2012-05-25 17:46:58 +02:00
parent 72b2e03dd0
commit 4362a215d9
11 changed files with 489 additions and 84 deletions

View File

@@ -151,13 +151,41 @@ namespace OpenRA.Utility
frame = srcImage[f];
}
}
else if (args.Contains("--wall")) //complex resorting to RA/CnC compatible frame order
{
int[] D2kBrikFrameOrder = {1, 4, 2, 12, 5, 6, 16, 9, 3, 13, 7, 8, 14, 10, 11, 15, 17, 20, 18, 28, 21, 22, 32, 25, 19, 29, 23, 24, 30, 26, 27, 31};
foreach (int o in D2kBrikFrameOrder)
{
int f = startFrame -1 + o;
frame = srcImage[f];
if (frame.OffsetX < 0) { frame.OffsetX = 0 - frame.OffsetX; }
if (frame.OffsetY < 0) { frame.OffsetY = 0 - frame.OffsetY; }
OffsetX = 0 + frame.OffsetX;
OffsetY = frame.FrameHeight - frame.OffsetY;
Console.WriteLine("calculated OffsetX: {0}", OffsetX);
Console.WriteLine("calculated OffsetY: {0}", OffsetY);
var data = bitmap.LockBits(new Rectangle(x+OffsetX, 0+OffsetY, frame.Width, frame.Height), ImageLockMode.WriteOnly,
PixelFormat.Format8bppIndexed);
for (var i = 0; i < frame.Height; i++)
Marshal.Copy(frame.Image, i * frame.Width,
new IntPtr(data.Scan0.ToInt64() + i * data.Stride), frame.Width);
bitmap.UnlockBits(data);
x += frame.FrameWidth;
}
}
else
{
for (int f = startFrame; f < endFrame; f++)
{
frame = srcImage[f];
if (args.Contains("--infrantry"))
if (args.Contains("--infantry"))
{
OffsetX = frame.FrameWidth/2 - frame.Width/2;
OffsetY = frame.FrameHeight/2 - frame.Height/2;

View File

@@ -1,8 +1,6 @@
# make R8Reader not always scan the whole file on load
# brick walls don't fit, requires updated RenderBuildingWall
# factories and refinery require overlays (something like RenderWeaponFactory)
# make structures appear earlier when errecting from ground
# silo frames don't fit, requires updated RenderSilo
# harvester unload frames missing (too few DATA.R8 frames in general)
# carryalls should automatically transport harvesters (needs complex logic)
# windtrap animations missing
@@ -11,15 +9,15 @@
# Arrakis tileset crashes the game
# create a tileset extractor for gamefiles to remove copyrighted content from distribution
# replace ore with spice and mines with spice blooms
# add game logic for concrete plates
# add game logic for concrete plates (use terrain overlay from bridges/ressources)
# allow placing turrets on walls
# support separate turret sequence with RenderBuildingTurreted
# repair bay should repair vehicles
# add ornithocopter (might need new RenderOrni code)
# repair bay should really repair vehicles
# ornithocopter should flap (might need new RenderOrni code for proper animation)
# R8 converter needs infantry frame resorter
# add infantry
# add tanks
# add sandworm
# add thumper
# add thumper which really attracts sandworms
# allow upgrades
# add ordos/harkonnen (avoid redundancy using inheritances)
# add voices (Dune 2000/DATA/SFX folder contains .aud files)
@@ -28,4 +26,5 @@
# create a shellmap
# rework chrome UI, dialoges, tabs
# add install rules to makefile (once more polished)
# idea: frame 2998 (looks like hole) could become a tunnel to make Ordos really insidious (similiar mechanism to paratroopers powerproxy)
# idea: frame 2998 (fremen siech) could become a tunnel to make Ordos really insidious (similiar mechanism to paratroopers powerproxy)
# add sonic tank weapon (currently uses tesla)

BIN
mods/d2k/maps/blank.oramap Normal file

Binary file not shown.

View File

@@ -17,6 +17,7 @@ Packages:
Rules:
mods/d2k/rules/system.yaml
mods/d2k/rules/defaults.yaml
mods/d2k/rules/vehicles.yaml
mods/d2k/rules/structures.yaml
mods/d2k/rules/aircraft.yaml

View File

@@ -58,4 +58,42 @@ C17:
Invulnerable:
-Selectable:
-GainsExperience:
FlyAwayOnIdle:
FlyAwayOnIdle:
ORNI:
Inherits: ^Helicopter
Buildable:
Queue: Plane
BuildPaletteOrder: 90
Prerequisites: hightecha
BuiltAt: hightecha
Owner: atreides
Valued:
Cost: 1000
Tooltip:
Name: Ornithocopter
Description: Helicopter Gunship with Chainguns.\n Strong vs Infantry, Light Vehicles.\n Weak vs Tanks
Health:
HP: 150
Armor:
Type: Light
RevealsShroud:
Range: 10
AttackHeli:
PrimaryWeapon: ChainGun
PrimaryOffset: -5,-2,0,2
FacingTolerance: 20
Helicopter:
LandWhenIdle: false
InitialFacing: 20
ROT: 4
Speed: 12
RenderUnit:
PlayerPalette: d2kplayer
WithShadow:
Selectable:
Bounds: 38,32,0,0
FallsToEarth:
Explosion: UnitExplode
SmokeTrailWhenDamaged:
Offset: 0,-10

View File

@@ -0,0 +1,310 @@
^Vehicle:
AppearsOnRadar:
Mobile:
Crushes: atmine, crate, apmine
TerrainSpeeds:
Clear: 80
Rough: 40
Road: 100
Ore: 70
Beach: 40
ROT: 5
SelectionDecorations:
Selectable:
Voice: VehicleVoice
TargetableUnit:
TargetTypes: Ground
Repairable:
Chronoshiftable:
Passenger:
CargoType: Vehicle
IronCurtainable:
AttackMove:
HiddenUnderFog:
GainsExperience:
GivesExperience:
DrawLineToTarget:
ActorLostNotification:
Notification: unitlst1.aud
ProximityCaptor:
Types:Vehicle
GivesBounty:
GpsDot:
String:Vehicle
WithSmoke:
^Tank:
AppearsOnRadar:
Mobile:
Crushes: wall, atmine, crate, apmine
TerrainSpeeds:
Clear: 80
Rough: 70
Road: 100
Ore: 70
Beach: 70
ROT: 5
SelectionDecorations:
Selectable:
Voice: VehicleVoice
TargetableUnit:
TargetTypes: Ground
Repairable:
Chronoshiftable:
Passenger:
CargoType: Vehicle
IronCurtainable:
AttackMove:
HiddenUnderFog:
GainsExperience:
GivesExperience:
DrawLineToTarget:
ActorLostNotification:
Notification: unitlst1.aud
ProximityCaptor:
Types:Tank
GivesBounty:
GpsDot:
String:Vehicle
WithSmoke:
^Infantry:
AppearsOnRadar:
Health:
Radius: 3
Armor:
Type: None
RevealsShroud:
Range: 4
Mobile:
Crushes: apmine, crate
SharesCell: true
TerrainSpeeds:
Clear: 90
Rough: 80
Road: 100
Ore: 80
Beach: 80
SelectionDecorations:
Selectable:
Voice: GenericVoice
TargetableUnit:
TargetTypes: Ground
RenderInfantry:
AutoTarget:
AttackMove:
Passenger:
CargoType: Infantry
HiddenUnderFog:
TeslaInstantKills:
GainsExperience:
GivesExperience:
DrawLineToTarget:
ActorLostNotification:
Notification: unitlst1.aud
ProximityCaptor:
Types:Infantry
GivesBounty:
GpsDot:
String:Infantry
ParachuteAttachment:
Offset: 0,-10
CrushableInfantry:
CrushSound: squishy2.aud
^Ship:
AppearsOnRadar:
Mobile:
Crushes: crate
TerrainSpeeds:
Water: 100
SelectionDecorations:
Selectable:
Voice: ShipVoice
TargetableUnit:
TargetTypes: Ground, Water
DetectCloaked:
Range: 3
HiddenUnderFog:
AttackMove:
GainsExperience:
GivesExperience:
DrawLineToTarget:
ActorLostNotification:
Notification: navylst1.aud
ProximityCaptor:
Types:Ship
GivesBounty:
GpsDot:
String:Ship
WithSmoke:
^Plane:
AppearsOnRadar:
UseLocation: yes
SelectionDecorations:
Selectable:
Voice: GenericVoice
TargetableAircraft:
TargetTypes: Air
GroundedTargetTypes: Ground
HiddenUnderFog:
GainsExperience:
GivesExperience:
DrawLineToTarget:
ActorLostNotification:
Notification: aunitl1.aud
DebugAircraftFacing:
DebugAircraftSubPxX:
DebugAircraftSubPxY:
DebugAircraftAltitude:
ProximityCaptor:
Types:Plane
EjectOnDeath:
PilotActor: E1
SuccessRate: 50
GivesBounty:
GpsDot:
String:Plane
^Helicopter:
Inherits: ^Plane
GpsDot:
String:Helicopter
^Building:
AppearsOnRadar:
SelectionDecorations:
Selectable:
Priority: 3
TargetableBuilding:
TargetTypes: Ground
Building:
Dimensions: 1,1
Footprint: x
TerrainTypes: Clear,Road
GivesBuildableArea:
Capturable:
CapturableBar:
SoundOnDamageTransition:
DamagedSound: kaboom1.aud
DestroyedSound: kaboom22.aud
RenderBuilding:
WithBuildingExplosion:
RepairableBuilding:
EmitInfantryOnSell:
ActorTypes: e1,e1,e1,c1,c2,e6
MustBeDestroyed:
GivesExperience:
# FrozenUnderFog:
CaptureNotification:
Notification: strucap1.aud
EditorAppearance:
RelativeToTopLeft: yes
ShakeOnDeath:
ProximityCaptor:
Types:Building
Sellable:
AcceptsSupplies:
GivesBounty:
^Wall:
AppearsOnRadar:
Building:
Dimensions: 1,1
Footprint: x
BuildSounds: placbldg.aud
Adjacent: 7
TerrainTypes: Clear,Road
SoundOnDamageTransition:
DamagedSound: sandbag2.aud
DestroyedSound: sandbag2.aud
Wall:
CrushClasses: wall
LineBuild:
Range: 8
SelectionDecorations:
Selectable:
Priority: 1
TargetableBuilding:
TargetTypes: Ground
RenderBuildingWall:
HasMakeAnimation: false
Palette: terrain
GivesExperience:
EditorAppearance:
RelativeToTopLeft: yes
AutoTargetIgnore:
ProximityCaptor:
Types:Wall
Sellable:
^CivBuilding:
Inherits: ^Building
-RepairableBuilding:
Health:
HP: 400
Armor:
Type: Wood
Tooltip:
Name: Civilian Building
ProximityCaptor:
Types:CivilianBuilding
-AcceptsSupplies:
-GivesBuildableArea:
-Sellable:
-Capturable:
-CapturableBar:
^CivField:
Inherits: ^CivBuilding
-Selectable:
Tooltip:
Name: Field
-ProximityCaptor:
ProximityCaptor:
Types:CivilianField
^Tree:
Tooltip:
Name: Tree
RenderBuilding:
Palette: terrain
Building:
Footprint: x
Dimensions: 1,1
AppearsOnRadar:
RadarColorFromTerrain:
Terrain: Tree
EditorAppearance:
RelativeToTopLeft: yes
ProximityCaptor:
Types:Tree
^Husk:
Husk:
RenderUnit:
Health:
HP: 140
Armor:
Type: Heavy
HiddenUnderFog:
AppearsOnRadar:
Burns:
ProximityCaptor:
Types:Husk
^Bridge:
Tooltip:
Name: Bridge
BelowUnits:
TargetableBuilding:
TargetTypes: Ground, Water
Building:
Footprint: ____ ____
Dimensions: 4,2
Health:
HP: 1000
ProximityCaptor:
Types:Bridge
AutoTargetIgnore:

View File

@@ -1,23 +1,23 @@
#RIFLE:
# Inherits: ^Infantry
# Buildable:
# Queue: Infantry
# BuildPaletteOrder: 10
# Owner: atreides
# Valued:
# Cost: 100
# Tooltip:
# Name: Rifle Infantry
# Description: General-purpose infantry.\n Strong vs Infantry\n Weak vs Vehicles
# Selectable:
# Bounds: 12,17,0,-9
# Health:
# HP: 50
# Mobile:
# Speed: 4
# AttackFrontal:
# PrimaryWeapon: M1Carbine
# TakeCover:
# -RenderInfantry:
# RenderInfantryProne:
# IdleAnimations: idle1,idle2
RIFLE:
Inherits: ^Infantry
Buildable:
Queue: Infantry
BuildPaletteOrder: 10
Owner: atreides
Valued:
Cost: 100
Tooltip:
Name: Rifle Infantry
Description: General-purpose infantry.\n Strong vs Infantry\n Weak vs Vehicles
Selectable:
Bounds: 12,17,0,-9
Health:
HP: 50
Mobile:
Speed: 4
AttackFrontal:
PrimaryWeapon: M1Carbine
TakeCover:
-RenderInfantry:
RenderInfantryProne:
PlayerPalette: d2kplayer

View File

@@ -242,12 +242,12 @@ SILOA:
Type: Wood
RevealsShroud:
Range: 4
# RenderBuildingSilo:
RenderBuildingSilo:
PlayerPalette: d2kplayer
StoresOre:
PipCount: 5
Capacity: 1500
RenderBuilding:
PlayerPalette: d2kplayer
-RenderBuilding:
-EmitInfantryOnSell:
LIGHTA:
@@ -476,6 +476,5 @@ REPAIRA:
PlayerPalette: d2kplayer
BelowUnits:
Reservable:
RallyPoint:
RepairsUnits:
Interval: 10
RallyPoint:

View File

@@ -224,4 +224,33 @@ Missile:
PrimaryLocalOffset: 3,-5,0,0,0, -3,-5,0,0,0
RenderUnit:
PlayerPalette: d2kplayer
AutoTarget:
SONIC:
Inherits: ^Vehicle
Buildable:
Queue: Vehicle
BuildPaletteOrder: 15
Prerequisites: heavya,researcha
Owner: atreides
Valued:
Cost: 1500
Tooltip:
Name: Sonic Tank
Description: Fires a sound wave\n Strong vs Infantry.\n Weak vs Tanks
Selectable:
Bounds: 24,24
Health:
HP: 150
Armor:
Type: Light
Mobile:
Speed: 8
RevealsShroud:
Range: 7
RenderUnit:
PlayerPalette: d2kplayer
AttackFrontal:
PrimaryWeapon: TTankZap
PrimaryOffset: 0,0,0,-5
AutoTarget:

View File

@@ -103,8 +103,7 @@ refa:
siloa:
idle:
Start: 0
# Length: 3
Length: 1
Length: 4
damaged-idle:
Start: 4
Length: 1
@@ -166,6 +165,11 @@ carryall:
Start: 0
Facings: 32
orni:
idle:
Start: 0
Facings: 32
trike:
idle:
Start: 0
@@ -197,6 +201,11 @@ missile:
Start: 0
Facings: 32
sonic:
idle:
Start: 0
Facings: 32
guntowera:
idle:
Start: 0
@@ -222,46 +231,38 @@ frigate:
Start: 0
Facings: 1
#rifle:
# stand:
# Start: 0
# Facings: 8
# run:
# Start: 8
# Length: 6
# Facings: 8
# shoot:
# Start: 56
# Length: 8
# Facings: 8
# prone-stand:
# Start: 136
# Length: 4
# Facings: 8
# prone-run:
# Start: 136
# Length: 4
# Facings: 8
# standup-0:
# Start: 176
# Length: 2
# Facings: 8
# prone-shoot:
# Start: 168
# Length: 8
# Facings: 8
# die1:
# Start: 288
# Length: 8
# die2:
# Start: 296
# Length: 8
# die3:
# Start: 304
# Length: 8
# die4:
# Start: 312
# Length: 12
# die5:
# Start: 324
# Length: 18
#TODO: This is wrong.
rifle:
stand:
Start: 0
Facings: 8
stand2:
Start: 8
Length: 8
stand3:
Start: 128
Length: 16
run:
Start: 16
Length: 6
Facings: 8
shoot:
Start: 64
Length: 6
Facings: 8
prone-stand:
Start: 112
Length: 4
Facings: 8
prone-run:
Start: 144
Length: 4
Facings: 8
standup-0:
Start: 176
Length: 2
Facings: 8
prone-shoot:
Start: 192
Length: 6
Facings: 8

View File

@@ -71,7 +71,7 @@ mono OpenRA.Utility.exe --r8 $R8 $PAL 2523 2524 "pwra" --building
mono OpenRA.Utility.exe --shp pwra.png 64
mono OpenRA.Utility.exe --r8 $R8 $PAL 2525 2526 "barra" --building
mono OpenRA.Utility.exe --shp barra.png 80
mono OpenRA.Utility.exe --r8 $R8 $PAL 2527 2558 "walla" --building
mono OpenRA.Utility.exe --r8 $R8 $PAL 2527 2558 "walla" --wall
mono OpenRA.Utility.exe --shp walla.png 32
mono OpenRA.Utility.exe --r8 $R8 $PAL 2559 2560 "conyarda" --building
mono OpenRA.Utility.exe --shp conyarda.png 96