Jump to content
  • 0

Problem running lingor server


billygoat

Question

So I was running just the regular Epoch Chern server and my friends and I wanted to try out lingor.  We got everything installed correctly and can join into the server but for some reason it loads our Character from the regular server(instance 11/chern) instead of creating a new character for instance 7(lingor).  This also effects when you go back to join the Chern server as you end up loading at a random spawn point on the shore next time you log in(changing your instance ID from 7 back to 11).

 

I was under the impression that epoch and the mysql was set up so that you could have multiple servers running/installed with only one mysql database installed, hence the use of the instance flag in character_data and object_data.

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

There must be a way to maintain your log off location across each map in the hive so we don't randomly spawn on the coast each time.  I see what is happening in the database with the InstanceID change, but I have yet to figure out where in the code it forces the random spawn just because the InstanceID changes.  The Worldspace coordinates are saved in two separate fields for two maps, in my case Chernarus and Lingor, but the code doesn't use the saved log off coordinates after it detects the InstanceID change.

 

Any ideas from the Dev team?

Link to comment
Share on other sites

  • 0

Yep, but it is not just the spawn loacation, it is inventory/backpack/medical.  It essentially takes the existing character and changes the instance ID to the current mission instead of creating a whole new character for the instance so both missions(lingor 7 and chern 11) are battling over using the same database entry for your character every time you log in.  I do not know enough about how aram2's servers work with the hive to know how to fix it but my best guess is when a player logs in it looks at the PlayerUID field for that player, if a match is found then it looks in the Alive field. If the alive field holds a 1 the server loads that character. There needs to be another step where the server matches the InstanceID field between where the server finds the player in PlayerUID and the server checking in the Alive field. 

 

Something like

while(_player !=PlayerUID && InstanceID[_player] != 7 && Alive[_player] != 1)

{

   "Next character"

}

 

if(_characterFound)

"Load Player"

else

"Spawn new character)

 

I have no idea how it loads the character and i'm pretty sure the above is not at all how the server handles that kind of stuff since it is probably a mysql query that deals with some of that but from what I can guess it needs to have a check that is somewhat like that.

 

I have no idea in what file player loading checks take place so if a dev could point me to the file where player loading takes place I could dig around and test.

 

Thanks!

Link to comment
Share on other sites

  • 0

Okay, in the PBO file there is a file in the /compile directory called server_playerSetup.sqf that has the following bit of code: 

 

// Came from another server force random spawn
if (_lastinstance != dayZ_instance) then {
_randomSpot = true;
};
 
I commented out this code, repacked the PBO and and now the player spawns where they log off.
Link to comment
Share on other sites

  • 0

This will not fix the issue of a lingor server and chern server using the same current character.  The server needs to spawn a completely new character if a character has not been created for that instance or if the character for that instance is not alive.  

 

Also is the PBO that you are talking about dayz_code?

 

I just realized, are characters suppose to be able to move to different maps while holding the same gear?  Is this an intended feature and the shore spawning is just a bug?  Because to me this makes no sense considering if you have instance depended items(keys) then they would be completely useless in the other instance.  

 

Anyways, I wont be home for the weekend. I will do some testing with the compile/server_playerSetup.sqf file once I get back on Sunday.

 

 

 

 

Sunday: So I found the PBO you were talking about. Again, the fix you stated will only move characters between instances, I want completely different character for the two instances. 

Now I found out that in the file comple/server_playerLogin.sqf there is code that determines where a the player entering the server has an existing character or needs a new one spawned, but it seems that wherever this script is called, the current instance value isn't passed as an argument. The following code would need to be changed:

 

if (!_isNew) then {
//RETURNING CHARACTER

to this->

if (!_isNew && _characterInstance == serverInstance) then {
//RETURNING CHARACTER

 

 

I just realized after posting that this may not work. I assume that at this point in the code a search in the database has already been run and a new characterID has been loaded regardless. I think the above condition is only to determine if the player should be loaded with the default loadout or load info(inv/med/backpack) from that entry in the database.  So the above is trash.

 

So what I need to know is where in the process of a player logging in does the database conduct the search of an alive character that matches that playerUID, or in the case that it is there first time/died, where it sets the isNew boolean?  

If a dev could help us out, it would be appreciated.

Link to comment
Share on other sites

  • 0

Sorry for the delay.  I was on travel.

 

How about creating a whole new character table and pointing the code (not sure which code that would be off the top of my head) to that table?  Alternatively, you could just make a new database instance per map and point HiveExt.ini to that new database.

 

I like the fact that players can bring the gear on their backs between worlds, including keys for vehicles, and hide/hoard on a different map.  the Hive schema needs more features to support that fully.

 

The keys and id system in Epoch are still being worked out by the Dev team it appears.  I'm not too worried about that aspect yet.  I do agree that the key/id system in Epoch's database schema needs to change to support the Hive, but it also needs help even for a single map.

 

This would be faster to talk through.  You can catch me on TS3 at ts.barelabelgaming.com:12100 most nights and sometimes during the day.

Link to comment
Share on other sites

  • 0

Sorry for the delay.  I was on travel.

 

How about creating a whole new character table and pointing the code (not sure which code that would be off the top of my head) to that table?  Alternatively, you could just make a new database instance per map and point HiveExt.ini to that new database.

 

 

I thought that was the whole point of having an instance column in the database so that you wouldn't have to create additional character_data and object_data tables for each server?

Link to comment
Share on other sites

  • 0

The database and epoch are setup to share the same database in a hive with any map, The reason the character instance id changes is so that we know when to reset the players position on changing instances. You will still have all of your gear, medical, etc only your location has changed. If we did not do this you would end up logging out of Chernarus and spawn in the middle of the ocean in Lingor. If you want to have separate characters per server use different database for each server.

Link to comment
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
  • Advertisement
  • Discord

×
×
  • Create New...