Jump to content
RedEagle_P1.

DEV ANSWER Serious urgent issue with custom maps

Recommended Posts

Hi there, 

When loading a SessionSave.ylandsgame  into a Ylands DS, it fails to work (wont start or show on list). This ONLY happens when the sessionsave is based on a exported custom map. 

Share this post


Link to post
Share on other sites

Do you have corresponding .ysd file present at the server? When loading a savegame, then you need support data to correctly load the world.

Share this post


Link to post
Share on other sites

I just tried it the other way you mentioned to BB cakes with this Dsconfig: 

 

{
    "SessionDataType": "TemplateFile",
    "SessionData": "C:\SERVICES\ni1427091_3_SHARE\ftproot\ylands/P1 SUNRISE CITY 15_190509152744.ygt",
    "nMaxPlayers": 8,
    "Name": "P1 Game Testing",
    "Password": "",
    "PrivilegeFilePath": "C:\SERVICES\ni1427091_3_SHARE/ftproot/ylands/permissions.txt"
}

This has failed. 

Trying a save next. 

Where do I get the ysd for a sessionsave? I cant export a save can I? Well I used the one from the original file the save is based on and no dice: 

{

    "SessionDataType": "TemplateFile",

    "SessionData": "C:\SERVICES\ni1427091_3_SHARE\ftproot\ylands/SessionSave.ylandsgame",

    "nMaxPlayers": 8,

    "Name": "P1 Game Testing",

    "Password": "",

    "PrivilegeFilePath": "C:\SERVICES\ni1427091_3_SHARE/ftproot/ylands/permissions.txt"

}

Edited by RedEagle_P1.

Share this post


Link to post
Share on other sites
3 hours ago, RedEagle_P1. said:

C:\SERVICES\ni1427091_3_SHARE/ftproot/ylands/permissions.txt

Just out of curiosity, does it matter that the path contains both kinds of slash?

Share this post


Link to post
Share on other sites

Try to change SessionDatatype to ""YlandFile" "

- "YlandFile" - Path to a savegame to host. Absolute or relative to the config file.
- "GameFile" - Path to a game (scenario) file from which a fresh savegame will be created and hosted. Path can be absolute or relative to the config file.
- "TemplateFile" - Path to a template file from which a fresh savegame will be created and hosted. Path can be absolute or relative to the config file.
- "BuiltIn" - Identifier of a built-in game type from which a fresh savegame will be created and hosted. "Explore" or "Creative"

I would request Dedicated Server documentation to be updated 

 

Share this post


Link to post
Share on other sites
On 5/8/2019 at 3:10 PM, RedEagle_P1. said:

Hi there, 

When loading a SessionSave.ylandsgame  into a Ylands DS, it fails to work (wont start or show on list). This ONLY happens when the sessionsave is based on a exported custom map. 

Explore generated maps still working.  Kind of . There are some major issues with power barrier failure but thats a different issue related to the recent hotfix, I think.

I can not make any map started in the editor work as a .ylandsgame  uploading to our servers.  The BI servers have no problem.  It works there.  Not on any other server I have found.  Multiplayer does not happen without a server.  It is the gateway. Close the gate, no one can play.  You know what you call multiplayer without servers working?  Single player.  You call it single player.  All the work you did to improve the multiplayer experience is wasted if servers can't accept your game.  The whole big 0.12 experience... flushed right down the toilet.

 

Share this post


Link to post
Share on other sites

Please look inside this topic

password: expectBugs
 


We've updated the guide

Share this post


Link to post
Share on other sites
On 5/16/2019 at 5:24 AM, Khanecz said:

Please look inside this topic

password: expectBugs
 


We've updated the guide

This is going to be a public forum, you may want to remove the pass ;)

 

Share this post


Link to post
Share on other sites

Hi, can you send us output_log_clean from the server? That would help us pinpoint the issue. Thanks!

Share this post


Link to post
Share on other sites

Those are our two most used servers, but the problem exists on all. 

Share this post


Link to post
Share on other sites

I just realized you asked for output_log_clean   we don't have that file type.   I did CTRL F to search, it doesn't exist.

Share this post


Link to post
Share on other sites

RedEagle_P1: it seems to me that at least one of the exported files is missing at target location:

[IN] [08/05 22:59:28.37] Searching for .ysd in: C:\SERVICES\ni1427091_3_SHARE\ftproot\ylands

[IN] [08/05 22:59:28.49] Searching for .ygt in: C:\SERVICES\ni1427091_3_SHARE\ftproot\ylands

[IN] [08/05 22:59:28.62] Request #3: POST https://ylands-api.bistudio.com/ylands-api/bgslt-api/v1.0/ylands-game/getRegion 549B ...

[ER] [08/05 22:59:28.65] Unable to retrieve map data. Quitting

..

@Berzeger will have probably better answer but probably not sooner than on Monday. (DS are not my expertise)

Share this post


Link to post
Share on other sites
9 hours ago, Houp said:

RedEagle_P1: it seems to me that at least one of the exported files is missing at target location:


[IN] [08/05 22:59:28.37] Searching for .ysd in: C:\SERVICES\ni1427091_3_SHARE\ftproot\ylands

[IN] [08/05 22:59:28.49] Searching for .ygt in: C:\SERVICES\ni1427091_3_SHARE\ftproot\ylands

[IN] [08/05 22:59:28.62] Request #3: POST https://ylands-api.bistudio.com/ylands-api/bgslt-api/v1.0/ylands-game/getRegion 549B ...

[ER] [08/05 22:59:28.65] Unable to retrieve map data. Quitting

..

@Berzeger will have probably better answer but probably not sooner than on Monday. (DS are not my expertise)

I am trying again: 

 

839b93f969ed9ddcdc0c5f19174b9c31.png

d68aebc3e3cb0e54fdbc764154141e5a.png

 

Nothing. But here is the log. 

log_clean (5).txt

Forgive me if I am making a mistake or two this time around, I have been ill. 

 

 

Share this post


Link to post
Share on other sites

Hello, 

before getting to what is the issues I will try to clarify the entire flow from editor project to DS hosting, which might be useful.

Ylands Editor -> Hosting on DS

  1. We have some ylands editor project, in this case likely named "P1 SUNRISE CITY 15"
  2. We perform export via Editor > Export Game > Local Export, which generates up to two files: .ygt file, which is needed to create new games from the scenario and optionally .ysd file needed to play those games. If both files are generated during export, they will have identical name and differ in extension only. It this case I assume we got both files
    1. P1 SUNRISE CITY 15_190509152744.ygt
    2. P1 SUNRISE CITY 15_190509152744.ysd
  3. To host a custom game on DS our DsConfig.json needs to indicate we are hosting from a template (ygt) and point to the ygt file using these lines (note that the config in the post above points to .ysd file, which we do not want, point to .ygt instead). The relevant parts should look like so:
    • "SessionDataType" : "TemplateFile",
    • "SessionData" : "C:\SERVICES\ni1427091_3_SHARE\ftproot\ylands/P1 SUNRISE CITY 15_190509152744.ygt",
  4. Crucially, if .ysd file was generated as part of export, make sure it is located next to the .ygt file
  5. Launching DS should now create a new game from scenario.

Relevant note on what DS does when it detects existing savefile

When DS detects an existing savefile specified by SavePath (defaults to "SessionSave.ylandsgame" if unspecified), it attempts to rehost the savegame regardless of the rest of DsConfig.json. To rehost a savegame from scenario for which ysd file was created during export, the DS needs to know about the ysd file. It will look for this file:

  • In directory where the savefile is located
  • In the directory specified in SessionData - in our case "C:\SERVICES\ni1427091_3_SHARE\ftproot\ylands"

Suggested course of action

From log file you provided, what appears to be happening is the DS is attempting to rehost existing save file, for which the exact .ysd/.ygt is not found and fails.

If the SessionSave.ylandsgame is present, please try removing it and try restarting the DS with the config setup according to example ("SessionDataType":"TemplateFile", "SessionData": "<path_to_ygt>").

After new SessionSave.ylandsgame is created you should be able to rehost it as long as you leave the ysd file in the same directory.

If that fails to work, could you please archive the relevant parts of the directory (ygt, ysd, ylandsgame) and upload them for us? We should be able to resolve the issue conclusively that way.

 

 

Share this post


Link to post
Share on other sites
45 minutes ago, brod33 said:

Hello, 

before getting to what is the issues I will try to clarify the entire flow from editor project to DS hosting, which might be useful.

Ylands Editor -> Hosting on DS

  1. We have some ylands editor project, in this case likely named "P1 SUNRISE CITY 15"
  2. We perform export via Editor > Export Game > Local Export, which generates up to two files: .ygt file, which is needed to create new games from the scenario and optionally .ysd file needed to play those games. If both files are generated during export, they will have identical name and differ in extension only. It this case I assume we got both files
    1. P1 SUNRISE CITY 15_190509152744.ygt
    2. P1 SUNRISE CITY 15_190509152744.ysd
  3. To host a custom game on DS our DsConfig.json needs to indicate we are hosting from a template (ygt) and point to the ygt file using these lines (note that the config in the post above points to .ysd file, which we do not want, point to .ygt instead). The relevant parts should look like so:
    • "SessionDataType" : "TemplateFile",
    • "SessionData" : "C:\SERVICES\ni1427091_3_SHARE\ftproot\ylands/P1 SUNRISE CITY 15_190509152744.ygt",
  4. Crucially, if .ysd file was generated as part of export, make sure it is located next to the .ygt file
  5. Launching DS should now create a new game from scenario.

Relevant note on what DS does when it detects existing savefile

When DS detects an existing savefile specified by SavePath (defaults to "SessionSave.ylandsgame" if unspecified), it attempts to rehost the savegame regardless of the rest of DsConfig.json. To rehost a savegame from scenario for which ysd file was created during export, the DS needs to know about the ysd file. It will look for this file:

  • In directory where the savefile is located
  • In the directory specified in SessionData - in our case "C:\SERVICES\ni1427091_3_SHARE\ftproot\ylands"

Suggested course of action

From log file you provided, what appears to be happening is the DS is attempting to rehost existing save file, for which the exact .ysd/.ygt is not found and fails.

If the SessionSave.ylandsgame is present, please try removing it and try restarting the DS with the config setup according to example ("SessionDataType":"TemplateFile", "SessionData": "<path_to_ygt>").

After new SessionSave.ylandsgame is created you should be able to rehost it as long as you leave the ysd file in the same directory.

If that fails to work, could you please archive the relevant parts of the directory (ygt, ysd, ylandsgame) and upload them for us? We should be able to resolve the issue conclusively that way.

 

 

Changed the Dsconfig, no luck. Ill send you the files direct. 

Share this post


Link to post
Share on other sites

Received your files, tried creating new savegame and rehosting it, did not run into any issues. These were my steps: 

1/ Get DS: Downloaded the DS tool from steam public_alpha beta branch (version 69650)

2/ Setup ds working directory: Using the same path as in your example I have prepared the DS working directory with:

-ygt/ysd files you provided

-Ylands.ini containing

s DsBohemiaLoginToken=<my_login_token>
b DsAutoLaunchMonitor=1

-DsConfig.json containing:

{
    "SessionDataType" : "TemplateFile",
    "SessionData" : "C:\SERVICES\ni1427091_3_SHARE\ftproot\ylands/P1 SUNRISE CITY 43 NPCS P2_190525003503.ygt",
    "nMaxPlayers" : 8,
    "Name" : "P1 Game Testing",
    "PrivilegeFilePath" : "C:\SERVICES\ni1427091_3_SHARE/ftproot/ylands/permissions.txt"
}

After setup, the directory looks like so:

image.png

3/ Launch the DS for the first time

-Open poweshell (or your preferred console) in C:\SERVICES\ni1427091_3_SHARE\ftproot\ylands

-Launch the ds, for powershell I used: & "C:\Program Files (x86)\Steam\steamapps\common\Ylands Dedicated Server\YlandsDs.exe" -batchmode -nographics -logFile ./log.txt

DS  hosts new game from ygt

After DS loads into session I use monitor console (which opened automatically because of the config in ini) to gracefully shutdown the ds using shutdown command.

After DS shuts down, SessionSave.ylandsgame file is created in the directory, which now looks like so:

image.png 

4/ Rehost existing savegame 

-Launch the ds again, using the same command as before.

In log_clean.txt, I can see the line

[IN] [28/05 16:36:11.85] Searching for .ysd in: C:\SERVICES\ni1427091_3_SHARE\ftproot\ylands

which indicates DS located the existing save file and is using it to rehost session.

DS then successfully loads and registers the session with lobby

I did not try connecting to the DS as I understand that is not the issue here. 

 

Please let me know which step fails for you or if your setup is significantly different from mine and this flow is not useful for you.

Edit: typos.

Share this post


Link to post
Share on other sites

Is either Nitrado or the game itself overwriting DsConfig.json?  I followed these instructions precisely, using a simple test map, just an Explore map generated in the Editor then exported.  For the path to my ygt file I used the PrivilegeFilePath, since it is the same location.  For this export, there was only the ygt file.

I joined my server (with a password of course) and instead of loading me into the map I uploaded, it has started a new Creative map.  The map it loads is 1 completely flat island, Arid biome, in Creative mode.  I logged out, and turned off the server.

The DsConfig.json file was changed somehow.

Before starting my server:

json_before_nopass.thumb.PNG.176992f3285d1c3cef826c6f00d172d8.PNG

 

After starting my server (before I stopped it again):

json_after_nopass.thumb.PNG.9acee2145a9434683cd668a22dbd062f.PNG

 

I am attaching logs from the server.  This includes the "old_1_log_clean.txt" and a few others from previous attempts today.  I've also attached the game files, if that would help.

 

session_logs.zip

game_files.zip

Share this post


Link to post
Share on other sites

Are you saying that we need to export the game, then upload the corrosponding  .yst .ygt and .ylandsgame?  If that is all it is, the explanation should have rolled out when the new files were first introduced in 0.12. I have been asking this question all over the forum since 0.12 came out.  

Share this post


Link to post
Share on other sites
On 6/10/2019 at 4:34 PM, Indomitus said:

Is either Nitrado or the game itself overwriting DsConfig.json?  I followed these instructions precisely, using a simple test map, just an Explore map generated in the Editor then exported.  For the path to my ygt file I used the PrivilegeFilePath, since it is the same location.  For this export, there was only the ygt file.

I joined my server (with a password of course) and instead of loading me into the map I uploaded, it has started a new Creative map.  The map it loads is 1 completely flat island, Arid biome, in Creative mode.  I logged out, and turned off the server.

The DsConfig.json file was changed somehow.

Before starting my server:

json_before_nopass.thumb.PNG.176992f3285d1c3cef826c6f00d172d8.PNG

 

After starting my server (before I stopped it again):

json_after_nopass.thumb.PNG.9acee2145a9434683cd668a22dbd062f.PNG

 

I am attaching logs from the server.  This includes the "old_1_log_clean.txt" and a few others from previous attempts today.  I've also attached the game files, if that would help.

 

session_logs.zip

game_files.zip

Same here.  

Do I need to download the dedicated server software from Steam and run it on my computer?  Nitrado has been doing that stuff for us, I assume when we upload the file?  I am not a programmer.  This shouldn't be this hard.  Normal, regular people will be playing this game.  The deep programming nerds, not so much.  Devs please spend some time on this side of the game.  As it is, I still can't use the updates that we got in 0.12 on anything but my rented BI server.  Is it your intent that all games will be hosted by you?  Because that's what it feels like.

 

Share this post


Link to post
Share on other sites

Hello bb cakes_P1,

the DS at no point modifies the DsConfig.json file. 

The flat creative map that was generated corresponds to the 'After starting my server' settings you posted, so my only guess is that the file is indeed getting overwritten by external application before DS actually launches as you suggest.

The step by step instructions only apply if you actually host the server manually. The DsConfig.json file format changed in the 0.12 update (as per the description above), so it is possible the automated flow services such as nitrado use to generate the DsConfig.json from web form is no longer compatible and needs to be updated.

Unfortunately, we do not currently have the means to provide support regarding third party hosting, but I agree that the operation of DS is currently a rather nebulous process in need of improvement.

Share this post


Link to post
Share on other sites
1 hour ago, brod33 said:

the DS at no point modifies the DsConfig.json file. 

The flat creative map that was generated corresponds to the 'After starting my server' settings you posted, so my only guess is that the file is indeed getting overwritten by external application before DS actually launches as you suggest. 

I did notice that their web form to edit that file is out of date, only allowing Explore and Creative as session types.  As a result of that, I was forced to edit the file directly.  This might be an issue for us to discuss with the hosting service.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×