[ X ]
Faction-specific Starting Units
A simple question.
Post new topic   Reply to topic Page 1 of 1
View previous topic :: View next topic  
Author Message
Leonan
Level: 34


Position: Registered User
Joined: 30 Nov 2011
Posts: 3
Kel: 4  [ Donate ]

Online Status: Offline
PostPosted: Sun Jun 17, 2012 3:19 am    Post subject: Faction-specific Starting Units Reply with quote

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.
Back to top
View user's profile Find all posts by Leonan Send private message ICQ Number
Cmd. Matt
Level: 45



Position: Registered User
Joined: 01 May 2012
Posts: 519
Kel: 518  [ Donate ]

Online Status: Offline
PostPosted: Sun Jun 17, 2012 9:11 am  Reply with quote

Have a look at my Dune 2000 mod and https://github.com/Mailaender/OpenRA/blob/dune/mods/d2k/rules/system.yaml#L198
Back to top
View user's profile Find all posts by Cmd. Matt Send private message ICQ Number
Leonan
Level: 34


Position: Registered User
Joined: 30 Nov 2011
Posts: 3
Kel: 4  [ Donate ]

Online Status: Offline
PostPosted: Sun Jun 17, 2012 9:52 pm  Reply with quote

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.
Back to top
View user's profile Find all posts by Leonan Send private message ICQ Number
chrisf
Level: 52


Position: Moderator
Joined: 06 Sep 2010
Posts: 243
Kel: 256  [ Donate ]

Online Status: Offline
PostPosted: Sun Jun 17, 2012 10:24 pm  Reply with quote

Hang on -- shellmap setup is leaking into your actual map?
Back to top
View user's profile Find all posts by chrisf Send private message Send e-mail ICQ Number
Leonan
Level: 34


Position: Registered User
Joined: 30 Nov 2011
Posts: 3
Kel: 4  [ Donate ]

Online Status: Offline
PostPosted: Mon Jun 18, 2012 5:22 pm  Reply with quote

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.
Back to top
View user's profile Find all posts by Leonan Send private message ICQ Number
BaronOfStuff
Level: 48


Position: Registered User
Joined: 22 May 2011
Posts: 313
Kel: 333  [ Donate ]

Online Status: Offline
PostPosted: Mon Jun 18, 2012 6:31 pm  Reply with quote

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?
Back to top
View user's profile Find all posts by BaronOfStuff Send private message ICQ Number
Cmd. Matt
Level: 45



Position: Registered User
Joined: 01 May 2012
Posts: 519
Kel: 518  [ Donate ]

Online Status: Offline
PostPosted: Mon Jun 18, 2012 6:56 pm  Reply with quote

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.
Back to top
View user's profile Find all posts by Cmd. Matt Send private message ICQ Number
BaronOfStuff
Level: 48


Position: Registered User
Joined: 22 May 2011
Posts: 313
Kel: 333  [ Donate ]

Online Status: Offline
PostPosted: Mon Jun 18, 2012 7:05 pm  Reply with quote

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.
Back to top
View user's profile Find all posts by BaronOfStuff Send private message ICQ Number
Cmd. Matt
Level: 45



Position: Registered User
Joined: 01 May 2012
Posts: 519
Kel: 518  [ Donate ]

Online Status: Offline
PostPosted: Wed Mar 20, 2013 8:51 pm  Reply with quote

See https://github.com/OpenRA/OpenRA/issues/2197
Back to top
View user's profile Find all posts by Cmd. Matt Send private message ICQ Number
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1