Jump to content
Alloc

Improvements for the dedicated server

Recommended Posts

Specifying how external commands work has to be figured out with the devs of those tools ;)

 

@schwanz9000: Did you also try using tele with negative Y?

 

 

/EDIT: Did you make sure to update the fixes for A13? Commands mod should be at version 6.

Edited by Alloc (see edit history)

Share this post


Link to post
Share on other sites
Specifying how external commands work has to be figured out with the devs of those tools ;)

 

True, but we need to figure out how to get the internal commands working correctly first. :wink:

 

@schwanz9000: Did you also try using tele with negative Y?

 

I have not. Won't this just put me underground anyway? Bedrock is at -57 with in game elevation. Is that not the same?

 

/EDIT: Did you make sure to update the fixes for A13? Commands mod should be at version 6.

 

I have 6_8_10 installed. I haven't bothered with 6_8_11 since it was just player bag icons that I don't allow players to use. I'll update tonight and try the negative Y.

Share this post


Link to post
Share on other sites
I have not. Won't this just put me underground anyway?

No, see "help tele" ;)

 

Bedrock is at -57 with in game elevation. Is that not the same?

o.O really?

Share this post


Link to post
Share on other sites

Elevation used to be a constant but ever since I think RWG 2.0 it varies completely. You can dig very far down and take much longer to hit bedrock depending on where you are. Could this be why? /home may be teleporting you to the default elevation regardless of where the level ground actually is?

Share this post


Link to post
Share on other sites

Interesting, gotta modify it so that it uses a different detection whether the user wants to spawn on ground or at a given vertical pos ...

 

For now: Specify < 0 and you get on (highest) ground, >= 0 and you get to the exact given height (even if that would be below the top ground level).

 

Btw, the code used for the tele command is *exactly* the same as when using tele with negative Y/height ;)

  • Like 1

Share this post


Link to post
Share on other sites
No, see "help tele" ;)

 

AH! I see that now...

 

"1. Teleports the player given by his SteamID, player name or entity id (as given by e.g. "lpi") to the specified location. Use y = -1 to spawn on ground."

 

o.O really?

 

Yup. I'm talking about the in game stats window that shows elevation. Are the cords different for the teleport functions? I'll go to my bedrock bunker tonight and see if in game and lp cords are the same for Y.

 

Elevation used to be a constant but ever since I think RWG 2.0 it varies completely. You can dig very far down and take much longer to hit bedrock depending on where you are. Could this be why? /home may be teleporting you to the default elevation regardless of where the level ground actually is?

 

/home uses the cords from /sethome. As far as i know, it uses the Y of your current location. I have two bases on my dedi mp game. The first one I had was in a plains biome with an elevation of 112 and bedrock being at -57. A 169 block diagonal shaft is not fun to walk up (I found that jumping makes it way faster). :D My second base is on a beach next to huge lake(ocean) on the western side of our map. ~8k West of 0,0. The beach is at an elevation of -27 with bedrock still at -57. With the /home command, I would fall through the world if I did /sethome on the ground at either base. As an admin always in debug mode, I just hover over the ground until the chunk loads when I do a /home. I also use dmustanger's Server Tools. It allows me to set the time between /home command usage to 0 (FRT makes you wait a minimum of one minute). With the wait set to 0, my players can hit /home, fall into the void, and then hit /home again 15 to 20 seconds later once the chunk loads without having to log out and back in.

Share this post


Link to post
Share on other sites
As far as i know, it uses the Y of your current location.

As long as the used Y value is >= a hole in the world at the X/Z coords it should be just fine. Both ways it waits for the chunks to load, the difference comes after loading: With given Y it moves you to that height which could lead to you dropping through the world if there's no ground level below that (i.e. solid world to bottom).

 

Also tested it myself again, both debug menu teleporting and "tele" seem to function exactly the same for me (as the code suggests too ;) ).

Share this post


Link to post
Share on other sites

Sorry. Just to be clear, I should have said that it uses your current location when you do the /sethome command.

 

If I'm standing on solid ground at X=100, Y=100, Z=100 when I do the /sethome command, it will put me at X=100, Y=100, Z=100 when I do the /home command. The problem is that the ground is never there to land on.

 

Same cords above, but using the debug menu, I land every time as the ground is there and loaded quickly.

 

Using the tele command with the same cords, I fall into the void because there is nothing to land on.

 

/home and /sethome are outside of your scope, so I'll test a few things tonight with debug menu and tele command only and let you know. I'll "try" to do a video.

Share this post


Link to post
Share on other sites

Lesson of the day: Read The Freaking Manual! :D

 

Ok Alloc! I think I've got this figured out now and boy do I feel dumb for not knowing sooner.

 

I updated the server to 6_8_11 and tried the following on my dedicated multiplayer server.

 

Debug Menu Teleporting: No lag. Fast chunk loading. No issue.

 

Console Command "tele" with -1 for Y: No lag. Fast chunk loading. No issue.

 

Console Command "tele" with positive integer for Y: No lag. Fast chunk loading. No issue.

 

The following is outside your scope, but worth noting.

 

Server Tools "/home" command: Lag. 10 - 20 second chunk loading. Fell into the void.

 

Now here's the kicker.

 

Server Tools Custom Chat Command: I setup a custom command /comm to use the tele command and used a positive integer for Y.

Lag. 10 - 20 second chunk loading. Fell into the void.

 

Server Tools Custom Chat Command: I setup a custom command /comm to use the tele command and used -1 for Y.

No lag. Fast chunk loading. No issue.

 

Also, the in game "Elevation" and the console command Y coords are different. Bedrock has an elevation of -57m, but the lp command still shows the Y coord as 3. Looks like -1 is ok to use.

 

dsOslox.png

Share this post


Link to post
Share on other sites

Hello Alloc, thanks for your great work.

 

Would you mind adding this to the next release ?

in GetPlayersOnline.cs

after

p.Add ("steamid", new JSONString (ci.playerId));

add

p.Add ("id", new JSONString(ci.entityId.ToString()));

 

Also, would it be possible to add a console command to destroy items ? (for example to destroy any stack > max from a player inventory, or change the stack value to fit the max)

Share this post


Link to post
Share on other sites
So you are talking about a game side API? Basically due to the game being .NET there's no need for a fully specialized API to do stuff. Just use whatever you need (though obviously stuff is in development so external code might need to be updated whenever the game changes).

 

 

 

You have to update to at least 6_8_10 for A13 compatibility.

 

 

 

Alloc,

 

I'm running a dedicated server and want to connect to the server via c# and .NET. How to get a connection established and which assembly i need to reference? I was trying it for 2 hours to connect to a running dedicated server, but neither the Assembly-CSharp nor the UnityEngine.Networking was successful in any case.

A small code sample would be great, you can send it to me vie private message. Thanks

Share this post


Link to post
Share on other sites
Ok Alloc! I think I've got this figured out now and boy do I feel dumb for not knowing sooner.

 

I updated the server to 6_8_11 and tried the following on my dedicated multiplayer server.

...

Thank you for the thorough investigation. Only thing I'm really surprised about is the custom command with positive Y as even your direct command seemed to be fine and there's no difference who's executing a command. Starting to get the feeling there's some kind of problem between whatever tool you use for commands and the game in terms of delays or something.

 

 

 

Would you mind adding this to the next release ? ...

Yeah, won't hurt :)

(Will be "entityid" and a JSON number instead of string though)

 

Also, would it be possible to add a console command to destroy items ? (for example to destroy any stack > max from a player inventory, or change the stack value to fit the max)

Nope, not possible, server has no control over player inventories atm.

 

 

 

I'm running a dedicated server and want to connect to the server via c# and .NET. How to get a connection established and which assembly i need to reference? I was trying it for 2 hours to connect to a running dedicated server, but neither the Assembly-CSharp nor the UnityEngine.Networking was successful in any case.

A small code sample would be great, you can send it to me vie private message. Thanks

Sorry, did not even get what you are trying to achieve ;)

Connect as in the command console? A player connection? Something else?

Either way I probably won't be of much help as I never tried to connect to the game with a program so I don't have anything at hand to show you. If it's just the command console it should be fairly easy to find simple examples on the internet, it's just a simple TCP stream.

Share this post


Link to post
Share on other sites

I'm sure this has been answered already but does

 

spawnwanderinghorde

 

not work or does it spawn a horde just at random locations?

Share this post


Link to post
Share on other sites
I'm sure this has been answered already but does

 

spawnwanderinghorde

 

not work or does it spawn a horde just at random locations?

It works. Or at least last I checked it did.

 

It spawns the horde at a completely random location.

Share this post


Link to post
Share on other sites

Ahh ok. Well then I guess the folks on our server will get mass amounts of hordes cause I used it about 12 times. lol That'll teach to ever complain there are no zombies.

Share this post


Link to post
Share on other sites
Thank you for the thorough investigation. Only thing I'm really surprised about is the custom command with positive Y as even your direct command seemed to be fine and there's no difference who's executing a command. Starting to get the feeling there's some kind of problem between whatever tool you use for commands and the game in terms of delays or something.

 

No problem! I'm using dmustanger's Server Tools. He's aware of my investigation and will be looking into it on his end as well.

 

Alloc,

 

I'm running a dedicated server and want to connect to the server via c# and .NET. How to get a connection established and which assembly i need to reference? I was trying it for 2 hours to connect to a running dedicated server, but neither the Assembly-CSharp nor the UnityEngine.Networking was successful in any case.

A small code sample would be great, you can send it to me vie private message. Thanks

 

Sorry, did not even get what you are trying to achieve ;)

Connect as in the command console? A player connection? Something else?

Either way I probably won't be of much help as I never tried to connect to the game with a program so I don't have anything at hand to show you. If it's just the command console it should be fairly easy to find simple examples on the internet, it's just a simple TCP stream.

 

I wrote a small application using VBA in Excel that uses winsock to communicate with the server via telnet. Old as heck I know, but that's what I've got and it works. :D Maybe that is something to point you in the right direction?

 

...and before you ask. No. I can't share it since it is not done yet. I'm waiting on Alloc to update the spawn entity command so that I can spawn zombies at x,y,z in my arena. At that point I might.

Share this post


Link to post
Share on other sites
I'm sure this has been answered already but does

 

spawnwanderinghorde

 

not work or does it spawn a horde just at random locations?

 

 

I was trying to use this last night. (just goofing around).

It seems to spawn at random, and for me it just spawned dogs, but that may be due to the day it was. think it was a dog day.

Spawning the plane worked great, and it also seems to be random on where and which direction it is heading. (was nice to hear it again).

 

I am wondering how to actually use two other commands.

teleport player:

I tried tele playername 0,0 and it responded player name or steam id didnt exist.

I used the same name as well as tried the steam id from the list player command and got the error.

 

spawn entity:

How do I use this exactly? if someone could provide the syntax and possibly an example command that would be awesome.

 

Thanks.

Share this post


Link to post
Share on other sites

 

 

 

 

 

I wrote a small application using VBA in Excel that uses winsock to communicate with the server via telnet. Old as heck I know, but that's what I've got and it works. :D Maybe that is something to point you in the right direction?

 

...and before you ask. No. I can't share it since it is not done yet. I'm waiting on Alloc to update the spawn entity command so that I can spawn zombies at x,y,z in my arena. At that point I might.

 

 

 

Nope.. We dont want to use telnet.. its too slow and overburdened. Then we want to use the tcp stream.

Share this post


Link to post
Share on other sites
I was trying to use this last night. (just goofing around).

It seems to spawn at random, and for me it just spawned dogs, but that may be due to the day it was. think it was a dog day.

Spawning the plane worked great, and it also seems to be random on where and which direction it is heading. (was nice to hear it again).

 

I am wondering how to actually use two other commands.

teleport player:

I tried tele playername 0,0 and it responded player name or steam id didnt exist.

I used the same name as well as tried the steam id from the list player command and got the error.

 

spawn entity:

How do I use this exactly? if someone could provide the syntax and possibly an example command that would be awesome.

 

Thanks.

 

Teleporting one can be tricky.

 

Command: tele NAME NAME

or Command: tele NAME LOCATION (See the use of PLAYERENTITYID)

- This one works if the name of the players being Teleported or Teleported to does not contain spaces. If the name contains spaces then use

Command: tele PLAYERENTITYID PLAYERENTITYID

 

Command: spawnentity PLAYERENTITYID ITEMENTITYID

or Command: se PLAYERENTITYID ITEMENTITYID

- Example: If I wanted to spawn a Zombie on myself I would find my PlayerEntityID (176) and Let us use Feral Zombie for instance

Example Command: spawnentity 176 3

Share this post


Link to post
Share on other sites
Teleporting one can be tricky.

 

Command: tele NAME NAME

or Command: tele NAME LOCATION (See the use of PLAYERENTITYID)

- This one works if the name of the players being Teleported or Teleported to does not contain spaces. If the name contains spaces then use

Command: tele PLAYERENTITYID PLAYERENTITYID

 

Command: spawnentity PLAYERENTITYID ITEMENTITYID

or Command: se PLAYERENTITYID ITEMENTITYID

- Example: If I wanted to spawn a Zombie on myself I would find my PlayerEntityID (176) and Let us use Feral Zombie for instance

Example Command: spawnentity 176 3

 

Thanks Kage,

 

That does help, and Ill give it a play this evening. Where are you getting the Feral Zombie ID # from?

When I search through the entityclasses for feral I find it, but do not see the # you are referencing.

 

Thanks again for the help.

Share this post


Link to post
Share on other sites
Thanks Kage,

 

That does help, and Ill give it a play this evening. Where are you getting the Feral Zombie ID # from?

When I search through the entityclasses for feral I find it, but do not see the # you are referencing.

 

Thanks again for the help.

 

Type se in the command console to see the list. The number is the entity number. You can use the name or the number.

Share this post


Link to post
Share on other sites
...

I am wondering how to actually use two other commands.

teleport player:

I tried tele playername 0,0 and it responded player name or steam id didnt exist.

I used the same name as well as tried the steam id from the list player command and got the error.

...

Location has to be "x y z", e.g. "tele playername 500 65 -300". No commas, always give all three values. In your case you basically gave it just two parameters, first one being the player name and second one being "0,0". With two parameters the command expects the second one to be another player (name or id) and couldn't find any matching your input so that's why you got the error.

 

 

...

Command: tele NAME NAME

or Command: tele NAME LOCATION (See the use of PLAYERENTITYID)

- This one works if the name of the players being Teleported or Teleported to does not contain spaces. If the name contains spaces then use

Command: tele PLAYERENTITYID PLAYERENTITYID

...

No need to use the entity id (though mostly easier as it's shorter / no special chars etc). You can simply use quotes around the player names.

 

 

 

Nope.. We dont want to use telnet.. its too slow and overburdened. Then we want to use the tcp stream.

What you're calling Telnet is just the TCP stream ;)

It's a text oriented command interface, but no Telnet, just plain TCP.

Share this post


Link to post
Share on other sites

Are the server files updated for 13.7? Installing them on a server that is working fine until the fixes are installed and then we get the message that te server is running 13.6. Removing the fixes fixes the issue.

Share this post


Link to post
Share on other sites
Are the server files updated for 13.7? Installing them on a server that is working fine until the fixes are installed and then we get the message that te server is running 13.6. Removing the fixes fixes the issue.

 

rev. 254 (6_8_11) (2015-12-24) is running fine on my Bluefang MP Server running Alpha 13.7.

Share this post


Link to post
Share on other sites

Yeah, no change is required for 13.7. With some upgrades, you may need to re-install the mod afterwards. I know my Linux dedi is like this.

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

×
×
  • Create New...