Custom unit in map (RA)

Information and discussion for custom maps and mods.
Post Reply
twarpie
Posts: 60
Joined: Sun Jun 26, 2011 3:10 pm

Custom unit in map (RA)

Post by twarpie »

Got the idea to put a custom unit in a map.yaml rules section. Everything works great, just wondering if it is possible to embed the unit icon in the oramap file somehow.

For now I copied and renamed a shp from another unit and put it in 'mods/ra/bits', but would be nice to be able to embed it.

Is this possible?

User avatar
Harisson
Posts: 149
Joined: Sun Jan 13, 2008 10:03 pm

Post by Harisson »

Good idea :)
Thats can be fine, if OpenRa first loads units (.shp, .tmp, .aud, ) from oramap files....

twarpie
Posts: 60
Joined: Sun Jun 26, 2011 3:10 pm

Post by twarpie »

Harisson wrote: Good idea :)
Thats can be fine, if OpenRa first loads units (.shp, .tmp, .aud, ) from oramap files....
ok, but there is no support right now?

User avatar
Harisson
Posts: 149
Joined: Sun Jan 13, 2008 10:03 pm

Post by Harisson »

I don't know, you must ask developers.... try IRC

twarpie
Posts: 60
Joined: Sun Jun 26, 2011 3:10 pm

Post by twarpie »

Topic is a bit old, but just found out this actually works (at least for SHPs) and thought I'd document it here in this thread. See also ticket 1095.

User avatar
zypres1
Posts: 277
Joined: Mon Oct 24, 2011 8:22 pm

can we get tutorial?

Post by zypres1 »

Hi, I want a tutorial / code on this, so other can use it.Please share here or on the mapping-wiki.

twarpie
Posts: 60
Joined: Sun Jun 26, 2011 3:10 pm

Re: can we get tutorial?

Post by twarpie »

zypres1 wrote: Hi, I want a tutorial / code on this, so other can use it.Please share here or on the mapping-wiki.
What's to explain? Just place any custom SHPs inside your .oramap archive and reference them in your map.yaml, that should work.

User avatar
zypres1
Posts: 277
Joined: Mon Oct 24, 2011 8:22 pm

nice

Post by zypres1 »

Nice..

Can you post your oramap-file?

I want to put that in the mapping wiki so that's easier for others to do that.

twarpie
Posts: 60
Joined: Sun Jun 26, 2011 3:10 pm

Re: nice

Post by twarpie »

zypres1 wrote: Nice..

Can you post your oramap-file?

I want to put that in the mapping wiki so that's easier for others to do that.
Put a small example together.

Took the SHPs and AUDs from ticket #1273 and combined them with an empty temperat map. Yaml overrides E1 voice, icon, name and some other properties. Build a barracks and you should see the changes to E1.

Tested with playtest-20111108.
Attachments
Resource_Embed_Example.oramap
(163.71 KiB) Downloaded 440 times

User avatar
zypres1
Posts: 277
Joined: Mon Oct 24, 2011 8:22 pm

Thank you...

Post by zypres1 »

wiki.. Will soon try to put it in the wiki if no one else will. Can you explane more what programs, and where to find files etc.. (how can new modders do this, what do you need?)

twarpie
Posts: 60
Joined: Sun Jun 26, 2011 3:10 pm

Re: Thank you...

Post by twarpie »

zypres1 wrote: wiki.. Will soon try to put it in the wiki if no one else will. Can you explane more what programs, and where to find files etc.. (how can new modders do this, what do you need?)
Well I assume that if you are thinking about including custom assets into your maps, you'll have at least a basic understanding of the whole SHP / AUD / etc system. It's probably best to refer to other (existing) documentation on this.

As to what programs: OpenRA map editor for the map and any (un)zip program will do.

Then it's just a matter of decompressing the oramap archive, adding your assets, modifying the map.yaml to make use of them (which is no different than any other OpenRA yaml editing, infantry.yaml for instance) and zipping everything back up again into an oramap.

During editing / testing it is probably easiest to skip the recompression step: oramaps can also be loaded from directories, which are obviously easier to manage than tedious unzip/zip cycles.

User avatar
zypres1
Posts: 277
Joined: Mon Oct 24, 2011 8:22 pm

Post by zypres1 »

at the moment it's not working without a
Die: tandeth1,dedman1,dedman2,dogw6 something line.

But Chrisf fixed that for next I think...

Thanks for the idea, unit and help... Hope to see more units from you...

twarpie
Posts: 60
Joined: Sun Jun 26, 2011 3:10 pm

Post by twarpie »

zypres1 wrote: at the moment it's not working without a
Die: tandeth1,dedman1,dedman2,dogw6 something line.
Makes sense. I never tested this specific unit 'in battle', so there was no need for the engine to make use of those sounds / voices.
zypres1 wrote: But Chrisf fixed that for next I think...

Thanks for the idea, unit and help... Hope to see more units from you...
Just to make it clear: the Volkov unit is not mine, I just grabbed the assets from ticket #1273 and put them together in a map.

Also, I believe the voices are actually from the TS or RA2 version of Volkov, as the RA95 Volkov has no special voice (and I must admit I don't particularly like the RA2 version).

Post Reply