Aircraft Carrier

new unit for OpenRA - ra

Information and discussion for custom maps and mods.
xan2622
Posts: 80
Joined: Fri Mar 15, 2013 9:27 pm

Aircraft Carrier

Post by xan2622 » Sun Mar 31, 2013 11:52 pm

Hello.

As requested by Scott on the IRC channel, I made a Aircraft Carrier unit.

Screenshot :
Image

And the full image with all 16 frames (width: 217 px) :
Image

The model is finished but I don't know how to export this large PNG file to SHP.
Of course I have tried with OpenRA.Utility.exe but I have got many problems with palette files.

I was able to create the .PAL file of this image (and even the .ACT file for Photoshop) but I don't know how to keep good colors once converted to SHP.

When I convert it to SHP (with the RA palette), the colors are ugly. They don't respect the original image (see the screenshot above).

If someone can help creating this SHP file (with some nice colours) I would really appreciate.

Thanks
bye

Matt
Posts: 1021
Joined: Tue May 01, 2012 12:21 pm
Location: Germany

Post by Matt » Mon Apr 01, 2013 7:17 am

I did the quirky SHP conversion for you. Here is what my terminal says

Code: Select all

mono --debug OpenRA.Utility.exe
Usage: OpenRA.Utility.exe [OPTION] [ARGS]

  --settings-value KEY     Get value of KEY from settings.yaml
  --shp PNGFILE FRAMEWIDTH     Convert a single PNG with multiple frames appended after another to a SHP
  --png SHPFILE PALETTE [--noshadow]     Convert a SHP to a PNG containing all of its frames, optionally removing the shadow
  --extract MOD[,MOD]* FILES     Extract files from mod packages
  --tmp-png MOD[,MOD]* THEATER FILES      Extract terrain tiles to PNG
  --remap SRCMOD:PAL DESTMOD:PAL SRCSHP DESTSHP     Remap SHPs to another palette
  --r8 R8FILE PALETTE START END FILENAME [--noshadow] [--infrantry] [--vehicle] [--projectile] [--building] [--wall] [--tileset]     Convert Dune 2000 DATA.R8 to PNGs choosing start- and endframe as well as type for correct offset to append multiple frames to one PNG named by filename optionally removing the shadow.
  --transpose SRCSHP DESTSHP START N M [START N M ...]     Transpose the N*M block of frames starting at START.
  --docs MOD     Generate trait documentation in MarkDown format.

mono --debug OpenRA.Utility.exe --extract ra temperat.pal
mono --debug OpenRA.Utility.exe --extract ra ss.shp
mono --debug OpenRA.Utility.exe --png ss.shp temperat.pal
I then opened up the ss.png file with GIMP and expanded the image size and copied your 862838test05.png into it and saved it as ac.png

Code: Select all

mono --debug OpenRA.Utility.exe --shp ac.png 217
mono --debug OpenRA.Utility.exe --png ac.shp temperat.pal
WTF something went wrong. Background of ca.png is violet instead of black. Fill bucket everything black.

Code: Select all

mono --debug OpenRA.Utility.exe --shp ac.png 217
Now put into the game. Copy the newly made ac.shp to mods/ra/bits. Add the following to mods/ra/sequences.yaml:

Code: Select all

ac:
	idle:
		Start: 0
		Facings: 16
Now open up mods/ra/rules/ships.yaml and add this:

Code: Select all

AC:
	Inherits: ^Ship
	Buildable:
		Queue: Ship
		BuildPaletteOrder: 50
		Prerequisites: syrd
		BuiltAt: syrd
		Owner: allies
		Hotkey: a
	Valued:
		Cost: 5000
	Tooltip:
		Icon: clock
		Name: Aircraft carrier
		Description: Seaborne landing platform for aircraft
	Health:
		HP: 2000
	Armor:
		Type: Heavy
	Mobile:
		ROT: 2
		Speed: 2
	RevealsShroud:
		Range: 10
	Selectable:
		Bounds: 32,32
	RenderUnit:
	AttackMove:
		JustMove: true
	Chronoshiftable:
	IronCurtainable:
	RepairableNear:
You are limited by the grey shade and team colors Red Alert uses. So texture you model with those only. Get the SHP from http://content.open-ra.org/?p=detail&table=units&id=289 and feel free upload a better one there.
Attachments
ac-screeenshot.png
A screenshot of what it looks like in-game. Note the edges. Have a look at the ss.png which adds some water pixels around to work around this. Maybe also tweak the perspective a bit. Also only some parts of the start ramp line are remapped to player color
ac-screeenshot.png (222.88 KiB) Viewed 15141 times

raminator
Posts: 106
Joined: Tue Mar 15, 2005 6:31 pm
Location: Stuttgart

Post by raminator » Mon Apr 01, 2013 12:58 pm

the model itself looks nice =)

but you need to add remap and compare the perspective to the other ships...
another thing that bothers me is the size...i know that carriers are huge but it should be only a few px bigger then the battleship.

good work =)

xan2622
Posts: 80
Joined: Fri Mar 15, 2013 9:27 pm

Post by xan2622 » Mon Apr 01, 2013 2:14 pm

Thanks you Raminator.

I understand the size problem but how could the Aircraft Carrier park several aircrafts on it ?

Because this aircraft carrier could have some options :
- build aircrafts ?
- park aircrafts on its deck (or inside it, hiding them with an elevator) ?
..

Btw, the palettes problems are a pain to deal with.
I really hope too see a GUI for OpenRA.Utility. link

PS: Raminator, I would be happy to see you in the IRC channel.

Nukem
Posts: 137
Joined: Sat Sep 10, 2011 6:26 pm

Post by Nukem » Wed Apr 03, 2013 10:43 pm

Also something to add to the art, make the bottom look like it is actually in the water.. see destroyer or cruiser to see what I mean.

User avatar
JOo
Posts: 510
Joined: Wed Jan 25, 2012 8:12 pm

Post by JOo » Thu Apr 04, 2013 3:53 pm

Nukem wrote: Also something to add to the art, make the bottom look like it is actually in the water.. see destroyer or cruiser to see what I mean.
thats exaclty what i thought !

looks very good , but it looks currently a bit too good for openra ..

epice
Posts: 174
Joined: Tue Oct 16, 2012 5:39 am

Post by epice » Thu Apr 04, 2013 3:56 pm

Guys, how will the soviets defend their carrier against enemy aircraft? They have nothing water-based that can shoot aircraft.

Matt
Posts: 1021
Joined: Tue May 01, 2012 12:21 pm
Location: Germany

Post by Matt » Thu Apr 04, 2013 3:58 pm

It was made for an upcoming single-player mission.

xan2622
Posts: 80
Joined: Fri Mar 15, 2013 9:27 pm

Post by xan2622 » Sat Apr 06, 2013 9:37 am

I don't get it.

I did what you adviced me Mailaender:
- I extracted a ship from the game (with openra.utility, same command as you posted above)
- I expanded its canvas size in Photoshop (to match my large image with all positions of my aircraft carrier)
- I pasted my artwork over this indexed png file
- I saved the png file (I got this image: http://www.hostingpics.net/viewer.php?i ... arrier.png .. which looked good to me AND with indexed colors)
- and converted it to a SHP file
- I modified the yaml files as you adviced me

But here are the results I have :
Image Image Image

My problems are :
- the yellow colors I used for the Aircraft Carrier control tower, the landing lanes, .. are not all correct
- the control tower doesn't look good, there are messing pixels (but maybe I used a bad lightning when I modeled the Aircraft Carrier)

These palette files are REALLY ANNOYING and a pain to work with.

raminator
Posts: 106
Joined: Tue Mar 15, 2005 6:31 pm
Location: Stuttgart

Post by raminator » Sat Apr 06, 2013 10:03 am

try to edit the remap colors in the extracted ship/shp (the 16 sandy-yellow colors at the bottom left).
make them purple and rerender your carrier with purple instead of yellow...
that should fix this.

User avatar
Petrenko
Posts: 156
Joined: Fri Apr 08, 2011 5:36 pm

Post by Petrenko » Sat Apr 06, 2013 5:39 pm

Heyho,

would anyone be as kind to convert my .pngs?

Thank you in advance :3
Attachments
civt.png
civt.png (1.56 KiB) Viewed 14858 times
civc.png
civc.png (2.37 KiB) Viewed 14858 times
Hail to the soviets!

Nukem
Posts: 137
Joined: Sat Sep 10, 2011 6:26 pm

Post by Nukem » Sat Apr 13, 2013 8:00 pm

Here you go
Attachments
civt_805.shp
Mapped and Shp'd.
(3.11 KiB) Downloaded 439 times
civc_168.shp
Mapped and Shp'd.
(3.11 KiB) Downloaded 432 times

User avatar
JOo
Posts: 510
Joined: Wed Jan 25, 2012 8:12 pm

Post by JOo » Sun Apr 14, 2013 4:44 pm

size like this here should be okay (imho)

Image

Image

note: just a sketch

User avatar
BaronOfStuff
Posts: 438
Joined: Sun May 22, 2011 7:25 pm

Post by BaronOfStuff » Sun Apr 14, 2013 5:57 pm

Agreed, that's a much more reasonable size/look.

Matt
Posts: 1021
Joined: Tue May 01, 2012 12:21 pm
Location: Germany

Post by Matt » Thu Apr 18, 2013 3:43 pm

We could use the giant one for single-player and the small one as a real multi-player unit.

Post Reply