How can Sync two server player info just like official server?

fecund1

New Member
I wondering how can i sync two server player info in same map(ex:chernarus).

Now i opened two chernarus server(instance id 1 and instance id 101).
(server1_chernarus(for day time) and server101_chernarus(for night time))

Current situation is separated server(player and vehicle info).
I want to know how can i sync these two server player info(inventory,position,etc.), not vehicle(vehicle need to separate like official server).

Just like, when i joined server1_chernarus and moved some other place and then disconnect,
go to server101_chernarus, i want same place and same inventory like server1_chernarus.

Any idea or solution will be helped.

PS : As i know, init.sqf(in mpmission) refer dayz_instance =1 or 101
but it is all refered player & vehicle info.
 
database is one. hive is different(to run two server). and tables are separated(i'm using bliss).
i think server101 need to use server1's player info
(may be need to other funciton in mysql or server file need to modify, or other way).
but i need to help, how can i do that?
 
HiveExt.ini
[Charaters]
;WSField = Worldspace <--- not work(different player info).
and
WSField = Worldspace <--- not work(different player info).
and
WSField = chernarus <--- not work(different player info).
anyone could do more detailed answer for me?
or anyone success that?
 
OK. First of all you need to change your instance to 2.
In Bliss Instance Table Add another row with 2
load perl build.pl --instance 2 -world chernarus
Move both MPmissions and the Bliss_2_.Charnarus (I think that is what is in the deploy folder) to your server.

Run it and now you have two Chernarus maps runnig the same DB. You can jump from on to another with the same gear. However your vehicles will be in different places. Meaning if you move one bike to another part of the road and then you move to the other server the bike will not be there.
 
appreciate your answer but,
i already have two chernarus instance(one is instance 1 and the other is instance 101).

let me show what i did.
perl build.pl --world chernarus --instance 1
perl build.pl --world chernarus --instance 101

and added instance 1 and instance 101 in instance table already.
and spawned instance_vehicle for 1 and 101.
and opened two server. These worked fine separately(different player info and different vehicle info).

now my question is,
How can Sync two server player info?
Is there something else I need to do? or don't i understand what you said?
 
Hive.int for each server? do you mean WSField?
I have already stated before WSField not works for me.
more detailed answer will be appreciated.
 
In the Hive.ini in both of your folder (Instance 1 and instance 101) Should have the same DB info.

Code:
[Database]
;Currently, only MySQL is supported
Type = MySQL
;Hostname or IP of the server to connect to
Host = 127.0.0.1
;Port to connect to. The default is the default listening port of a server of the selected Type
;Instead of specifying Port, you can specify Socket and set Value to the socket name
Port = 3306
;Database name to connect to.
Database = dayz
;Username to connect with
Username = x
;Password to authenticate with (default is blank)
Password = x

Now in your Config.cfg file: once should state 1 and one should state 101

Code:
// MISSIONS CYCLE (see below)
class Missions
{
    class DayZ {
      [COLOR=#ff0000] template = dayz_1.charnarus;[/COLOR]
        difficulty = "Veteran";    // change this for other difficulty settings, regular, expert is valid
    };
};

template = dayz_1.charnarus;
template = dayz_101.charnarus;
Hope that helps. Now why in the world you went from instance 1 to 101 in beyond me since 1 and then 2 would have worked out just fine too.
 
i appreciate your concern and help.
but, what you stated above is already checked and finished.
hiveExt.ini : checked ok.
each config_xxxx.cfg :
template = dayz_1.chernarus; <-- for instance 1 : checked ok
template = dayz_101.chernarus; <-- for instance 101 : checked ok

and i wonder why your instance 1 and 2 work fine(same player info) and why not work for me(diffenent player info).
ps : my instance 1~10 already used for other map, so i'm using another instance(101) for second chernarus map.
 
when i connect instance 101 server,
i can see that player info in survivor table as world_id 101
it means survivor table refer separated instance(instance 1 and instance 101 work separatedly).
anyway thanks Falcon911.(+ like)
 
Will this only work with the same map "world"... or will it also work to sync Celle and Taviana to have the same character info? I would like to let players "go from Country to Country". Both of my servers are already using the same DB... but characters are still separate right now.
 
In HiveExt.ini says
;WSField = Worldspace

but i think it's only for sharing the position of the player and not the entire inventory(i never try to use), in bliss the table name is worldspace and not Worldspace not shure if the tablenames are case sensitive.


----
a dirty workaround can be to share the surviror data in every world change you must sync the last modified survivor entry.

if the player has:

1. UID=1122233 in the profile table
2. in survivor table for world 1 a huntingrifle and last update a hour ago
3. in survivor table for world 101 a lee enfield and last update yesterday


i think you need to make a store procedure called by server_onPlayerConnect.sqf that check the last update in N worlds (1 or 101 in this example) then if the player is in the world 1 the store procedure will do nothing, BUT if the player is joining to world 101 the store procedure must COPY the world 1 data (inventary,bakcpack...) to 101 instance survivor table replacing the last alive or if doesnt exist an alive player, then creates a new one.

YES, you will be duplicating the data, but i thinks this is the easy way to avoid inconsistent data related with deployable and vehicles and survivors id.



imagine a world with dayz private shared hives with more things like dayz2017 :p
 
/TWiG country to country is difficult,
because map size and map shape is different,
so when your character was in some city chernarus,
and moved ringor, your character will be in other place, like water.

/zedar
i appreciate your concern and useful idea.
i thought like what you stated, and looked through many times dayz_server.pbo file.

Anyway, i found something like what i wanted :) now.

what i found is,
in Config.cfg file for instance 101,
i changed template like this.

template = dayz_101.chernarus; to template = dayz_1.chernarus;
(before) ........................................(after)
it means same mission file will be used in two server.

now,
when i join server1_chernarus and moved my character to some other place, disconnect,
and then join server101_chernarus, my character can find that place
(position and inventory same as server1_chernarus:D ).
<== don't try this.(some problem remained...)

and vehicle also works fine.
when i join server1_chernarus and i drived elec bus to some other place, disconnect,
and then join server101_chernarus, i can find elec bus that not moved from original position.
(different vehicle info:D )
<== don't try this.(some problem remained...)
 
its a bad idea share teh vehicles the changes in one and other severs don't be showed until restart.

that is the reason to onlye share the player and maintain a consistent survivor id to avoid problem with deployables and vehicles.
 
you right. i found what you said.
when i restart server, vehicle moved same position:((instance 1 and instance 101) .
i need to modify more.
thanks zedar.
 
Back
Top