Following a few of the tutorials here, I was successfully able to implement another side into the game (as of now a differently-named clone of the Allies), which went mostly without a hitch. However, trying to add a new unit for this new size ("new" meaning a slightly modified unit from the other sides) crashes the game upon loading a map [gets into the menu fine].
I created the unit by simply adding an entry to the infantry.yaml file, is there something I'm missing perhaps?
EDIT: I also tried copying the strings in sequence.yaml for the unit graphic I was using, E1 in this case, and renaming it accordingly, to no avail. In fact, that made the game crash upon execution...
Thanks in advance for any help I may recieve.
Adding New Infantry Crashes The Game
Shalom,
you also need a shp file.
Use XCC-Mixer to get the shp of the original unit you copied. Afterwards, rename it and put it in this folder. => mods/cnc/bits
(you also need to copy and rename an icon (also from some .mix file in /documents/openra/content)
By example your original unit was E1 and you want E9 you should get E1.shp and E1icon.shp (or something similar) and rename it to E9.shp and E9icon.shp
Hope i was able to help.
Edit:
drop by at #openra to get help from people who really know what they are talking about (so not me, heh)
Edit 2:
This should help best
http://www.sleipnirstuff.com/forum/view ... 83&t=14951
you also need a shp file.
Use XCC-Mixer to get the shp of the original unit you copied. Afterwards, rename it and put it in this folder. => mods/cnc/bits
(you also need to copy and rename an icon (also from some .mix file in /documents/openra/content)
By example your original unit was E1 and you want E9 you should get E1.shp and E1icon.shp (or something similar) and rename it to E9.shp and E9icon.shp
Hope i was able to help.
Edit:
drop by at #openra to get help from people who really know what they are talking about (so not me, heh)
Edit 2:
This should help best
http://www.sleipnirstuff.com/forum/view ... 83&t=14951
-
- Posts: 4
- Joined: Mon May 02, 2011 5:51 pm
Sequences define the mapping between animation names used in the code and the shp files. OpenRA expects that each sequence definition corresponds to a shp with the same name. There is one exception: you can specify an alternate shp after the animation name (e.g. muzzle: minigun) but this should not be used for cloning sequences.
The correct method for using another actor's sequences is to override the Image property on the actor's Render* trait:
The correct method for using another actor's sequences is to override the Image property on the actor's Render* trait:
Code: Select all
e9:
... (other trait definitions) ...
RenderInfantryProne:
Image: e1
-
- Posts: 4
- Joined: Mon May 02, 2011 5:51 pm
Oh, thanks! That saves me a lot of trouble. Is there a way to do a similar thing for vehicles/aircraft and/or structures?Sleipnir wrote: ↑Sequences define the mapping between animation names used in the code and the shp files. OpenRA expects that each sequence definition corresponds to a shp with the same name. There is one exception: you can specify an alternate shp after the animation name (e.g. muzzle: minigun) but this should not be used for cloning sequences.
The correct method for using another actor's sequences is to override the Image property on the actor's Render* trait:Code: Select all
e9: ... (other trait definitions) ... RenderInfantryProne: Image: e1
I know, I'm rather crap at this, but it's sort of... masochistically satisfying, so far.