Ipsquiggle

Understanding Shards and Migration Portals

Recommended Posts

Oarc    0
20 minutes ago, Ipsquiggle said:

@Oarc Right now the shard systems assumes that all connected servers form a "single world". This is intentional as that is the main design we want to support, and supporting other scenarios increases complexity. We do want to allow more varied clusters in the future but at the moment it's not what the system is built for, unfortunately.

No Problem. Thank you for the reply! And definitely makes sense from a complexity point of view. I can't imagine how difficult that would be to implement and test.

Share this post


Link to post
Share on other sites
Zekfad    21

Hmm ... What if this is the key to the ruins? Connect additional levels of caves (but with changed settings generation), and then it should turn out that that is all you need. Only one snag. How to change the generation in the ruins? (Or how to connect a similar fashion to a dedicated server)

Share this post


Link to post
Share on other sites
Oarc    0

For what it's worth, I successfully setup a 2 overworld + 1 cave endless server with all 3 connected and working.

1st Overworld = No monsters + Campfire Respawn Enabled (noob friendly but lacks silk/gears).
2nd Overworld = Defaults w/ Giants + often spiders/chess (basically a warzone when you go in).
3rd Cave = Defaults w/ some rare settings for the monsters.

If anyone's interested in trying it out, search for "Oarc" and my server should pop up. It's based in US-East.

(@Zekfad I have no idea how generation of ruins works. I read somewhere that DST merged ruins in caves for simplicity sake to let people easily setup their own servers without too much complexity.)

Share this post


Link to post
Share on other sites
striker96    4

The OP seriously needs to correct this:

c_find('cave_entrance').components.worldmigrator:SetDestinationWorld(2, true)

to this, it took me hours to find that out:

c_find('cave_entrance').components.worldmigrator:SetDestinationWorld("2", true)

Share this post


Link to post
Share on other sites
Ipsquiggle    3,477
16 hours ago, striker96 said:

The OP seriously needs to correct this:

c_find('cave_entrance').components.worldmigrator:SetDestinationWorld(2, true)

to this, it took me hours to find that out:

c_find('cave_entrance').components.worldmigrator:SetDestinationWorld("2", true)

Thanks for pointing this out! It has been corrected. Sorry for the trouble. :(

  • Like 1

Share this post


Link to post
Share on other sites
striker96    4
On 10/3/2016 at 11:03 AM, Ipsquiggle said:

Thanks for pointing this out! It has been corrected. Sorry for the trouble. :(

Ha, no problem, thanks for the guide in the first place. Dat string vs int :/

Share this post


Link to post
Share on other sites
Hotkang    0

Should the MasterPort in the MasterServer need to be listening?

 

sorry..to my English ,it's not my first Lauguage

 

QQ图片20161112045500.png

Share this post


Link to post
Share on other sites
Hotkang    0

I try to make the MasterPort in Cave's cluster.ini Match the cluster_port in Master's cluster.ini and it dosen't work

then I do not math,it also dosen't work

I am really love this game and always play with my friends.

I have learn how to make it in different server for some days because of my pool English...

and these is the Configuration and thanks for your help:

QQ图片20161112054902.png

QQ图片20161112054947.png

 

QQ图片20161112054641.png

QQ图片20161112054721.png

 

 

Edited by Hotkang

Share this post


Link to post
Share on other sites
Hotkang    0
11 hours ago, Hotkang said:

I try to make the MasterPort in Cave's cluster.ini Match the cluster_port in Master's cluster.ini and it dosen't work

then I do not math,it also dosen't work

I am really love this game and always play with my friends.

I have learn how to make it in different server for some days because of my pool English...

and these is the Configuration and thanks for your help:

QQ图片20161112054902.png

QQ图片20161112054947.png

 

QQ图片20161112054641.png

QQ图片20161112054721.png

 

 

I have solved it. Because of the firewall,thanks

Share this post


Link to post
Share on other sites
Hotkang    0

Dose " On the same machine, this must be unique among the servers, but for multi-machine servers, can be whatever. Pay special attention to the value you give the master server, as it must match the value you put in the master_port in cluster.ini. "

mean that?

QQ图片20161112234439.png

Share this post


Link to post
Share on other sites
justacpa    5
On 11/17/2015 at 8:16 PM, Ipsquiggle said:

 

Part 1: Connecting your Servers

There are two possibilities: either your servers are running on the same machine (easier) or on separate machines (more exandable/less lag). The setup is basically the same for both, except that on the same machine, all servers will point to a local address (127.0.0.1) and share the port space, but on separate machines shards must be aware of the master server's address, but each can configure ports as they please.

Before diving further, please http://forums.kleientertainment.com/topic/64552-dedicated-server-settings-guide/]familiarize yourself with the .ini files.

 

This link does not work, it simply goes back to the originating (this) thread.  Where can I find the correct link and/or information?

Share this post


Link to post
Share on other sites
justacpa    5
On 11/17/2015 at 8:16 PM, Ipsquiggle said:

And naturally, you'll have to configure the [shard] settings as well:
is_master: Set this true for the master, and false for all other shards.
name: Name your shards! Required, but also makes understanding the log files and folders much easier.
id: Whatever value you put here is what will be used when linking the migration portals, which is explained below.

 

1.  What is the difference between the name and id and how does it affect the operation of the game?  Is the name simply a descriptor and reference with no real impact other than distinguishing for someone reading the logs what was happening in the game?

 

2.  Do the names of the folders where the ini files reside e.g Master, Caves (if using the quick set up guide) impact the game i.e. if I change the names of the folders will that cause something to break? 

Share this post


Link to post
Share on other sites

@justacpa  

as someone who just started playing with this stuff, i haven't found a really substantive difference between name and id. they are both used to (uniquely) identify each shard. Nuke's mod uses the id parameter to do the mapping, and if you look in server_log.ini you'll usually see both name and id together whenever a shard is referred to. they're both identifiers for shards.

the name is just an identifier. it won't change your world. changes to world come from the worldgenoverride.lua file (and possibly modfiles as well). so you could call an overworld/forest world "Caves" and it would work fine - it would not be a cave world.

The name of the directory is important in that it's an argument to the dedicated server command. It's how the server knows where to look for shard parameters. an example is donstarve_dedicated_server_nullrendered -cluster [Cluster name] -shard [name of your directory]

so if i just changed my directory name, my server would break because the command to run my shard wouldn't find the folder anymore. but if you change it in all places it's referenced you'll be fine.

 

Share this post


Link to post
Share on other sites
tinco    15

Hello,

For the past few months, I have been playing with my brother on our dedicated server just fine. Suddenly, this past week (without any changes to LAN configuration, Router or Server settings), I am getting this error, when I try to go from caves to the overworld:

ID_DST_SHARD_SILENT_DISCONNECT

Does anyone know how to overcome this? I am backing up all files after each play and when I put them back, it was working fine for few in-game days and then it happened again. We are stuck until we can resolve this and we don't want to loose the generated world.

Can someone help me figuring out what this is about?

Any google search came fruitless, since there wasn't any solution to this problem, that some few others had. Also I wanted to post this in the bugtracker, but it seems that dedicated server bug tracker needs a password huh...

Any help appreciated. @Ipsquiggle

caves_server_log.txt

overworld_server_log.txt

Edited by tinco

Share this post


Link to post
Share on other sites
vovik    83

I wanted to create several dedicated shards with one of them acting as lobby, worlds will be with different seasons and world presets.
I tried linking 3 shards(2 overworld, 1 cave) by droping session data, tried creating different shards with diferent settings and relinking them by hand, but  linking doesnt work. Moreover i can`t migrate to some of the worlds by using c_migrateto command, it simply locates me to position i started from or kicks me out of server.
Sinkholes also connect only worlds i can migrate to. Though sometimes it allows me to migrate to caves but locks another overworld shard from being reachable.

Can anyone tell what is done wrong? Any help appreciated.

World 1(overworld)  server1.ini wordlgenovrride1.lua

World 2(caves)  server2.ini wordlgenovrride2.lua

World 3(overworld)  server3.ini wordlgenovrride3.lua

------------

So, i did it, first - you dont want to use leveldataoverride format, use only worldgenoverride. Second - you can use override = {...}, part of leveldataoverride.lua, so you can setup a world in "host game" and copy settings to worldgenoverride, be warned - you will need to delete value "linknodesbykeys" or it will not link worlds properly for multiple worlds O_o.
Also you can use modoverrides from your created world easially, its easier then configuting by hand.

You can use leveldataoverride but it will allow only for 2 worlds - caves and overworld or overworld and overworld... etc

Also, in my case it did not generate a cave world for some reason, it was solved after few times regenerating that world, so it at last accounted worldgenoverride.lua for the world with caves
 

 

 

 

 

Edited by vovik
Linked worlds, posting my errors in here.

Share this post


Link to post
Share on other sites
snyder    0

 

Hello guys. I would like to know what I need to do, to work on Linux.

I'm waiting for you.

And sorry for the Google of the treacherous google.

Edited by snyder

Share this post


Link to post
Share on other sites
Luke4World    0

Question1:

60th line of worldmigrator.lua 

assert(self.linkedWorld == nil or self.linkedWorld == fromworld)

No matter how I change self.linkedWorld (parameter of the portal) with SetDestinationWorld

It will occour assertion...

Is anyone the same with me?

 

P.S.Whole function:

function WorldMigrator:SetReceivedPortal(fromworld, fromportal)
    -- TODO: This needs to be part of a two-way process, so both ends of the portal link to each other
    -- (or IDs are handed down from the master or something, so that bi-directionality can be guaranteed)
    assert(self.linkedWorld == nil or self.linkedWorld == fromworld)
    self.linkedWorld = fromworld
    self.receivedPortal = fromportal
    self:ValidateAndPushEvents()
end

Question2:

I can't remove my portal!!They will come back to my server evertime I restart my server.

Edited by Luke4World
Wrong word

Share this post


Link to post
Share on other sites
myxal    303

For anyone running a cluster with multiple slaves on a Linux server, I suggest checking out my toolbox script - it handles properly starting and stopping clusters with arbitrary number of slaves. https://github.com/myxal/DST-DS-Tools/blob/master/dstds_tools.sh

Caveats:

  • Shard directory with 2 successive spaces will break the script. Single spaces are handled correctly.
  • Many features mentioned in usage are not implemented yet.
  • Script assumes steamcmd is in PATH

 

 

Share this post


Link to post
Share on other sites
Berwin    1

Hi

I'm having trouble with a 6 shard setup.  The first overworld has 1 sinkhole down to a cave (8 holes plugged) and in that cave I can find another sinkhole back up to a new overworld.  This works as intended but in the new overworld I can't find another sinkhole which is open which there should be so the chain is broken.  Any ideas please.  The worlds are supposed to form a chain: Overworld1 to Cave1, Overworld2 to Cave2, Overworld3 to Cave3.  I'm sure when I mine one of the holes in the second overworld (the one I can't find an opened sinkhole in) I can see it open momentarily when mined  and then plug itself).

return {
    ["workshop-595764362"] = {
        enabled = true,
        configuration_options = {
            ["Connections"] = {
                ["1"] = { "4" },
                ["2"] = { "4", "5" },
                ["3"] = { "5", "6" },
            },
        }
    },
}
 

Share this post


Link to post
Share on other sites
myxal    303
15 hours ago, Berwin said:

I can't find another sinkhole which is open which there should be so the chain is broken. 

How are you looking for this sinkhole? I had a similar issue where c_gonext("cave_entrance") wouldn't find anything.. Turns out, when the plug is removed (either by mining or by going up the sinkhole from the other world), the prefab changes to "cave_entrance_open".

Share this post


Link to post
Share on other sites
Berwin    1

I realise the difference in tags. I regenerated the world a few times and the same problem persisted. It want until I ran the shard ids in sequence that it seemed to work. When it was 1, 4, 2, 5, 3, 6 it didn't work. 

Share this post


Link to post
Share on other sites

hola a todos, actualmente tengo un servidor corriendo con 5 esclavos, el master esta conectado a los 5 mundos a través de cave_entrance hacia un portal de cada server y los esclavos se conectan a través de cave_entrance y cave_exit al portal del master.

Como puedo conectar un cave_entrance o cave_exit de una cueva o mundo al maestro a otro ave_entrance o cave_exit especifico?

Hello everyone, I currently have a server running with 5 slaves, the master is connected to the 5 worlds through cave_entrance to a portal of each server and the slaves are connected through cave_entrance and cave_exit to the master portal.

How can I connect a cave_entrance or cave_exit from a cave or world to the master to another ave_entrance or cave_exit specific?

 

Google translate

 

 

Share this post


Link to post
Share on other sites
k2trix    7

Hello everybody,
Thanks to the shard configuration mod, i finally linked 6 different worlds, configurated by two way, worldgenoverride.lua and threw line commands :
- Master shard 1 is CLASSIC (worldgenoverride.lua)

return {
 		override_enabled = true,
       	misc = {
               autumn = "verylongseason",
               day = "longday",
               season_start = "autumn",
               spring = "verylongseason",
               summer = "veryshortseason",
               touchstone = "rare",
               winter = "veryshortseason",
       				},
			}


- Slave 1 shard 2 is CAVE CLASSIC
- Slave 2 shard 3 is All WINTER (line command example)

TheWorld:PushEvent("ms_setclocksegs", {day=6,dusk=5,night=5})
TheWorld:PushEvent("ms_setseasonlength", {season="spring", length=3})
TheWorld:PushEvent("ms_setseasonlength", {season="summer", length=4})
TheWorld:PushEvent("ms_setseasonlength", {season="autumn", length=3})
TheWorld:PushEvent("ms_setseasonlength", {season="winter", length=60})
TheWorld:PushEvent("ms_setseason", "winter")


- Slave 3 shard 4 is All SUMMER
- Slave 4 shard 6 is ONLYDUSK LOTS
- Slave 5 shard 7 is ONLYNIGHT FEW

Everything is connected threw these rules in modoverrives.lua
 

["workshop-595764362"] =
    {
        enabled = true,
        configuration_options =
        {
            ["DeleteUnused"] = false,
            ["SyncFromMaster"] = true,
            ["Connections"] =
            {
                ["1"] = { "2", "2", "2", "2", "2"},
                ["2"] = { "3", "3", "3"},
                ["3"] = { "4", "4"},
                ["4"] = { "6"},    
                ["6"] = { "7"},                    
            },
            ["OneWayConnections"] =
            {                                        
                ["3"] = { "2", "2", "2", "1", "1"},                
                ["4"] = { "3", "3", "3", "2", "2", "1", "1"},                
                ["6"] = { "4", "4", "4", "3", "3", "3", "2", "1"},
                ["7"] = { "6", "6", "6", "6", "6", "6", "6", "6", "1"},              
            },
        }
    },

I wanted this to behave like some adventure mode.. and it works perfectly...
screen.thumb.jpg.46d8d7c928edb22d76a99213b3ceeddc.jpg
BUT
i encounter some huge problems with day segments and season segment synchronisation.
All my slaves servers are loading every new day the timeclock and seasonclock from masterserver's.

Do someone here knows how can i make it asyncronous ?
It would be lovely :D

Edited by k2trix
missing image :O

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now