Custom campaign maps fail to load. [Solved]

I'm not sure why this is happening.

Information and discussion for custom maps and mods.
Post Reply
xX_Pokeman2003_Xx
Posts: 6
Joined: Sun Mar 20, 2022 11:25 pm

Custom campaign maps fail to load. [Solved]

Post by xX_Pokeman2003_Xx »

Hi all! for some reason, the attached map refuses to load. It plagues any new campaign map I attempt to create. Here's the exception log.

Code: Select all

OpenRA engine version release-20210321
Red Alert mod version release-20210321
Date: 2022-03-20 21:00:52Z
Operating System: Windows (Microsoft Windows NT 6.2.9200.0)
Runtime Version: .NET CLR 4.0.30319.42000
Exception of type `System.ArgumentException`: Collection must not be empty.
Parameter name: ts
   at OpenRA.Exts.Random[T](IEnumerable`1 ts, MersenneTwister r, Boolean throws)
   at OpenRA.Mods.Common.Traits.MPStartLocationsInfo.OpenRA.Traits.IAssignSpawnPointsInfo.AssignSpawnPoint(Object stateObject, Session lobbyInfo, Client client, MersenneTwister playerRandom)
   at OpenRA.Mods.Common.Traits.CreateMPPlayersInfo.OpenRA.Traits.ICreatePlayersInfo.CreateServerPlayers(MapPreview map, Session lobbyInfo, List`1 players, MersenneTwister playerRandom)
   at OpenRA.Server.Server.StartGame()
   at OpenRA.Mods.Common.Server.LobbyCommands.CheckAutoStart(Server server)
   at OpenRA.Mods.Common.Server.LobbyCommands.State(Server server, Connection conn, Client client, String s)
   at OpenRA.Mods.Common.Server.LobbyCommands.InterpretCommand(Server server, Connection conn, Client client, String cmd)
   at OpenRA.Server.Server.<>c__DisplayClass47_0.<InterpretServerOrder>b__0(IInterpretCommand t)
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
   at OpenRA.Server.Server.InterpretServerOrder(Connection conn, Order o)
   at OpenRA.Server.Server.InterpretServerOrders(Connection conn, Byte[] data)
   at OpenRA.Server.Server.DispatchOrders(Connection conn, Int32 frame, Byte[] data)
   at OpenRA.Server.Connection.ReadData(Server server)
   at OpenRA.Server.Server.<>c__DisplayClass29_0.<.ctor>b__1(Object _)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart(Object obj)
Any clue ins on what's happening?

Solution:
OpenRA no longer handles this automatically for you. You need to define under the rules the campaign ruleset(IE:ra|rules/campaign-rules.yaml). Hope this helps someone.
Attachments
dev.oramap
My really basic map.
(1.44 KiB) Downloaded 42 times
Last edited by xX_Pokeman2003_Xx on Mon Mar 21, 2022 4:47 pm, edited 1 time in total.

xX_Pokeman2003_Xx
Posts: 6
Joined: Sun Mar 20, 2022 11:25 pm

Re: Custom campaign maps fail to load.

Post by xX_Pokeman2003_Xx »

Oh, found the utility tool. Now I'm just confused. Also, I accidentally left England in because I had copied the player configuration from Allies-01. My other map I've been working on doesn't have that problem.
It's complaining about having 0 spawn points. What the in the world?

Code: Select all

C:\Program Files\OpenRA>OpenRA.Utility.exe ra --check-yaml C:\Users\Pokeman2003\AppData\Roaming\OpenRA\maps\ra\release-20210321\dev
Testing map: Playground
OpenRA.Utility(1,1): Error: The map allows 1 possible players, but defines only 0 spawn points
Errors: 1

abcdefg30
Posts: 562
Joined: Mon Aug 18, 2014 6:00 pm

Re: Custom campaign maps fail to load.

Post by abcdefg30 »

The player configuration doesn't contain any information about how to spawn the players. Allies01 defines rules overrides which contain

Code: Select all

World:
	-SpawnStartingUnits:
	-MapStartingLocations:
from the shared "campaign-rules.yaml" file. You'll have to use this as well if you don't have any spawns.

xX_Pokeman2003_Xx
Posts: 6
Joined: Sun Mar 20, 2022 11:25 pm

Re: Custom campaign maps fail to load.

Post by xX_Pokeman2003_Xx »

Yeah, that does it. Last time I tried making a custom campaign map, that wasn't a thing I had to do, so that got me really confused. Thanks man.

Post Reply