Jump to content

console command 'c_connect' can directly connect to Caves Shard?


Recommended Posts

I know this command can direct  connect to Master World, but can it be used to connect Caves Shard?

For example:

Master port is 10999, Caves port is 10998

Master: c_connect(myServerIp, 10999, "123") , this command is useful :)

Caves(maybe): c_connect(myServerIp, 10998, "123") , this command is useless :confusion:, tips for me on dialog is  "password not correct "

 

Any friends has Similar question or useful solution to connect Caves ?  :cheerful:

Link to comment
Share on other sites

Afaik that's not possible.

First problem: All connections are handled by the master server, and are then deligated to the caves shard as needed. This is also the reason why when you join a server, where your character logged out inside the caves, while logging into the server, you get some of the "transition to caves" loading screens.

My first thought would be to chain the command and add a second command at the join command to move the current player to the caves.
Pretty much guaranteed, non-working example of what I'm talking about:

c_connect(myServerIp, 10999, "123"); ThePlayer:PushEvent("migration_activate")

Problem with this approach: I have no idea what the PushEvent for entering the caves is, and it's probably missing some metadata. One could be lucky that the DST Server just defaults everything and spawns you at the caves portal, but I have no idea.

Third, and probably main issue: The command you set off in the main menu to join is a client side command, which only does stuff on the client. If there is a command to move the player to the caves, it has to be launched Remotely on the server.

So you could try just entering the Master server normally and then set off a second command remotely to transition your character to the caves. The command could look something like this:

cave = c_find("cave_entrance"); TheWorld:PushEvent("ms_playerdespawnandmigrate", { player = ThePlayer(), portalid = cave.id, worldid = cave.linkedWorld })

This command (or rather chain of two commands) picks the nearest sinkhole to get the necessary info, and tells the server to migrate the player that sets off the command to transition over the portal's id to the world that is linked to the portal.

I haven't tested this command though. I just picked the code from the worldmigrator class and adjusted it a little to be able to run by itself, so chances are high that something is wrong and/or break things, so make sure you either backup your world, or are certain, that that world doesn't mean anything to you. (That kinda sounds dark. Damn.)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...