x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

Dedicated Server Default Map Not Working

For some reason my dedicated server is starting up with the Entry map instead of the map that I have defined.

I am packaing with RunUAT via

 "D:\UnrealEngine4.11\Engine\Build\BatchFiles\RunUAT" BuildCookRun -project="%WORKSPACE%\FPSGame\FPSGame.uproject" -noP4 -platform=Linux -serverplatform=Linux -server -serverconfig=DebugGame -cook -allmaps -build -stage -targetplatform=Linux -archive -archivedirectory="D:\UE4Builds\Omniwar"

I removed the -pak flag because I wanted to verify that my maps were actually being packaged.

I have set the ServerDefaultMap in DefaultEngine.ini

 [/Script/EngineSettings.GameMapsSettings]
 GameDefaultMap=/Game/Maps/MainMenu.MainMenu
 EditorStartupMap=/Game/Maps/Foo
 GameInstanceClass=/Script/FPSGame.FPSGameInstance
 GlobalDefaultGameMode=/Script/FPSGame.FPSGameModeTDM
 ServerDefaultMap=/Game/Maps/Foo

I have also set AllMaps in DefaultEditor.ini since I am building with the -allmaps flag

 [AllMaps]
 +Map=/Game/Maps/MainMenu
 +Map=/Game/Maps/Foo

I have verified that my maps are being packaged. alt text

But for some reason my dedicated server is still starting up with the Entry map. alt text

I have looked through the entire server log and there are no errors saying that it can't find the map. It just acts like it is supposed to start with Entry and it loads that.

It's like it is ignoring my ServerDefaultMap settings.

I am running my server with no flags via a systemd

 ./FPSGameServer-Linux-DebugGame
Product Version: UE 4.11
Tags:
maps.png (7.1 kB)
entry.png (6.7 kB)
more ▼

asked Jun 12 '16 at 02:55 PM in Packaging & Deployment

avatar image

erebel55
385 42 46 65

avatar image Doug E ♦♦ STAFF Jun 13 '16 at 04:25 PM

Hey erebel55-

In the Project Settings->Maps&Modes window, do you have your server default map set in the "Game Default Map" drop down? If not, does setting this option to the correct map affect your package? If this is all setup and you are still not getting the starting map that you intend, can you provide additional steps to help me reproduce this issue locally?

avatar image erebel55 Jun 13 '16 at 05:41 PM

Doug, yes that is essentially what the DefaultEngine.ini settings are. But here is the view from the editor as well. alt text

I have modified the source to log the default map that it is using within GameInstance::StartGameInstance. alt text

It is spitting out the Entry map. So I am digging into that function to have a look. alt text

psettings.png (21.4 kB)
log.png (48.3 kB)
entry.png (3.0 kB)
avatar image erebel55 Jun 13 '16 at 08:37 PM

I added the following to GetGameDefaultMap() and it is returning /Engine/Maps/Entry too..

I have tried specifying the map via cmd line

 ./FPSGameServer-Linux-DebugGame /Game/Maps/Foo
 
 ./FPSGameServer-Linux-DebugGame DEFAULTMAP=/Game/Maps/Foo

But neither of them help.

alt text

defaultmap.png (49.0 kB)
avatar image erebel55 Jun 13 '16 at 08:39 PM

Looking through the source code, the only place that I see the default map set is here https://github.com/EpicGames/UnrealEngine/blob/release/Engine/Source/Runtime/Engine/Private/UnrealEngine.cpp#L801

And that is surrounded by an if clause that looks at command line arguments. How does this work for anyone using ini settings?

avatar image erebel55 Jun 14 '16 at 12:59 PM

So while I'm cooking the correct map is logged (Foo) alt text

However, when I run the dedicated server it is using Entry alt text

cook.png (5.4 kB)
avatar image erebel55 Jun 14 '16 at 03:56 PM

I tested my RunUAT build command against MultiplayerShootout and it works fine. The correct map is loaded in that project. With my project I tried changing the map from Foo to a different one and it still loads Entry. So it's not my map file. I'm running out of ideas :(

avatar image erebel55 Jun 14 '16 at 05:29 PM

As a test I updated my DefaultEngine.ini to look like the following (based off of MultiplayerShootout)

 [/Script/EngineSettings.GameMapsSettings]
 EditorStartupMap=/Game/Maps/Foo
 TransitionMap=
 GameInstanceClass=/Script/FPSGame.FPSGameInstance
 GameDefaultMap=/Engine/Maps/Entry
 GameDefaultMap=/Game/Maps/Foo
 GlobalDefaultServerGameMode=/Script/FPSGame.FPSGameModeTDM
 GlobalDefaultGameMode=/Script/FPSGame.FPSGameModeTDM
 ServerDefaultMap=/Game/Maps/Foo

I am still getting this when I run my dedicated server...

alt text

So it's not updating my GameDefaultMap or my ServerDefaultMap......

I have verified that the correct ini settings are being cooked

avatar image erebel55 Jun 14 '16 at 07:40 PM

Even deleting the GameMapsSettings section from my DefaultEngine.ini doesn't change anything. Is there something that has to happen for these changes to take effect?

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

I was finally able to resolve this nightmare of an issue.

There was a DefaultEngine.ini file under Saved/Temp that I think for some reason was being loaded and prioritized ahead of my real one. At least that is what I'm telling myself.

Regardless I resolved the issue by doing the following

  1. Deleted Saved, Binaries, and Intermediate from my local project

  2. Deleted the contents of my jenkins project from the file system

  3. Deleted the contents of UE4Builds\Omniwar (the archived directory specified in my RunUAT command)

  4. Rebuilt

  5. Deleted my LinuxServer directory from my linux machine

  6. Did a rsync of the LinuxServer back to my linux machine

Now everything works fine. When I update my ini file the changes that effect. No more issues.

Thanks!

more ▼

answered Jun 16 '16 at 03:34 PM

avatar image

erebel55
385 42 46 65

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question