Page 1 of 1

How to edit .shp files without OpenRA crashing?

Posted: Mon Nov 21, 2011 5:50 am
by Falledeux
So. I am attempting to add some modifications to the basic e1.shp for a new unit.
However, if I add any colors to it, it will save, however, it catastrophically crashes the game en load-up.

See image E1.PNG for visual explanation

Also, please notice that I was using the temperate palette. (For RA 1.)
I am unsure if it's the color that crashes it, or is it that I am modifying it?
I just want to basically give him a visor.... (Yes, yes. You're saying, but Falle, that means you have to go through EVERY frame and do so. I have all the time in the world and I'm grounded!)
Thanks a bunch,
Falledeux

Posted: Mon Nov 21, 2011 7:43 am
by twarpie
I see you are using the OS SHP Builder (OSSHPB). Without seeing the log of the actual crash you experienced, it might be that you are trying to save your SHP with OSSHPB directly to a TD/RA95 format. This did not work for me, and indeed, caused OpenRA to crash (with an 'invalid file format' or somesuch exception).

The only way I could use OSSHPB SHPs in OpenRA is to save them to TS format first, then use XCC Mixer to convert to TD.

Also, XCC Mixer never wanted to open TD SHPs directly saved from OSSHPB, it just said claimed it was an unknown format and displayed a HEX dump.

Posted: Mon Nov 21, 2011 4:39 pm
by Falledeux
OH YES! I also get a an error when I try to open an edited RA1 file (in OSSHPB). However, is TD Tiberium Dawn? But anyways, I do get that error. And I am rather unsure how to do the following you prescribed.
Be a doll and notice the file where I try to open the edited RA1.shp :D
The only way I could use OSSHPB SHPs in OpenRA is to save them to TS format first, then use XCC Mixer to convert to TD.

Also, XCC Mixer never wanted to open TD SHPs directly saved from OSSHPB, it just said claimed it was an unknown format and displayed a HEX dump.
I think because I'm stupid ignorant about all this RA modification stuff, I will be making this very hard for any person willing to help me :C.

*EDIT*: I saved E9 using the temperate palette

Posted: Mon Nov 21, 2011 5:16 pm
by twarpie
Basically, I had to do the following to get OpenRA to accept my OSSHPB edited SHPs:
  1. Extract the SHP from the MIX (or open the OpenRA one, if that is already extracted)
  2. Open it in OSSHPB, edit, etc
  3. Save it as a Tiberian Sun (TS) SHP
  4. Open XCC Mixer and browse to the directory containing your edited SHP
  5. Using XCC Mixer, right click the TS SHP, and select 'copy as SHP'
Forgive me if I've left out any steps; this is all from memory.

The file listing should now include a new SHP (without the 'TS' in its name), which should be in the proper format for OpenRA (and XCC Mixer itself).

XCC Mixer can be downloaded from here.

As to the crashes in OSSHPB: it is quite an unstable utility in my experience, so I've tried to avoid using it as much as possible. Using XCC Mixer to convert to PCX / PNG and back again to SHP (using the TS -> TD route) has proven much more reliable. Be sure to take the usual 'precautions' with color palettes etc.

PS: in your particular case it might be easier to use the OpenRA Utility, which can convert from SHP to PNG and back (with the proper palettes).

Posted: Mon Nov 21, 2011 5:42 pm
by Falledeux
You're so awesome, Twarpie!

Nao, since you said Tiberium Sun, does it matter which palette I edit it with :D?
Refer to the large, honking picture below.

Posted: Tue Nov 22, 2011 7:54 am
by twarpie
I've always just used the TD or RA95 palettes, depending on the source of the artwork and / or the target game.

Some more info on palettes / SHP editing: "SHP Tools" by raminator and "SHP Help needed!" by jaymanxyz.

PS: not to insult your intelligence, but perhaps you could use alt + prtscrn to reduce the size of your screenshots.

Posted: Wed Nov 23, 2011 1:48 am
by Falledeux
Oh, I know how to crop it, I just didn't give a damn, haha. I was just trying to get this problem solved as fast as humanly possible. :P