Faction-specific Starting Units

A simple question.

Information and discussion for custom maps and mods.
Post Reply
Leonan
Posts: 3
Joined: Wed Nov 30, 2011 2:35 am

Faction-specific Starting Units

Post by Leonan »

I'm attempting to make a mod with faction-specific starting units but can't seem to figure out how. I know the code supports it as I've read through SpawnMP units, and I'm pretty sure it's something simple in system.yaml, but as of yet I haven't been able to figure it out. If anyone knows how to properly use this feature, I'd appreciate it.

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

Post by Matt »

Have a look at my Dune 2000 mod and https://github.com/Mailaender/OpenRA/bl ... .yaml#L198

Leonan
Posts: 3
Joined: Wed Nov 30, 2011 2:35 am

Post by Leonan »

Thanks a bunch. I actually had the format correct, which your file confirmed, but later found out the problem was in the shellmap (I'm currently using the default RA shellmap). The engine was crashing on startup saying that all my SpawnMPUnits blocks were missing their trait dependency of MPStartLocations. When I edited the shellmap's map.yaml to remove the -MPStartLocations and -SpawnMPUnits lines, it loaded properly.

chrisf
Posts: 246
Joined: Mon Sep 06, 2010 4:59 am

Post by chrisf »

Hang on -- shellmap setup is leaking into your actual map?

Leonan
Posts: 3
Joined: Wed Nov 30, 2011 2:35 am

Post by Leonan »

No, the game crashes seemingly because it is running normal map startup on the shellmap. I don't know if it's not honoring the shellmap's -SpawnMPUnits or if having multiple SpawnMPUnits blocks in system.yaml defeats the shellmap's own script. Either way the crash stopped occuring after I deleted the shellmap's removal of SpawnMPUnits and MPStartPositions (or whatever it's called). It's also worth noting that I'm using the newest unstable build and the shellmap I'm using is perhaps six months old - I've been updating my mod to newer versions of OpenRA along the way and have never replaced it. If the shellmap or the map yaml standards have changed since then, the problem could be a matter of me needing to update the file I'm using.

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

Post by BaronOfStuff »

Wait... does this mean that in theory it's possible to set the game up so that players start with more than just the MCV, like was possible in RA95? Or do we only get one starting unit?

Or (most likely), am I missing something here?

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

Post by Matt »

InitialUnit (singular) is just a string (not an array) so I guess there can only be one unit atm. You can make a map with not just the player spawn but also additional starting units (for scouting?) however.

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

Post by BaronOfStuff »

Balls!

Oh well. I just wanted to know if it was possible, as I'd often start with extra units in RA95 skirmishes. Would usually make uncomfortably close spawn points interesting.

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

Post by Matt »


Post Reply