[MOD] BasilMod::PingLimit - limit maximum allowed latency.

Place for sharing your game modifications for Life is Feudal: Your Own
User avatar
Custodian
Mod Developer
 
Posts: 655
Joined: 08 Jun 2015, 14:58
Location: Lisbon

[MOD] BasilMod::PingLimit - limit maximum allowed latency.

Post by Custodian » 28 Aug 2015, 19:44

Greetings!

BasilMod::PingLimit allow server admin to limit maximum allowed player ping on the server.
This is server-side only mod.

LiF:YO is a network game, and peers with high latency can reduce joy of the game :evil:
This mod checks latency for player connection before character enters the world, once. It does not check or looks for network spikes during game session.
In general words, limit 1000+ms for players, and you are fine, you server will not stutter because of 'slow-internet-players'. :beer:

This mod is part of BasilMods pack.

Screenshots.
Spoiler

Installation and configuration
Spoiler
Last edited by Custodian on 21 Mar 2017, 16:12, edited 2 times in total.

User avatar
Malkom
Beta Tester
 
Posts: 50
Joined: 30 Sep 2014, 11:08

Re: [MOD] BasilMod::PingLimit - limit players ping.

Post by Malkom » 28 Aug 2015, 19:57

It would be helpful, thank you!


More mods for the God of mods :D
Image

User avatar
GruFF
Zealous Believer
 
Posts: 111
Joined: 20 Sep 2014, 02:06

Re: [MOD] BasilMod::PingLimit - limit maximum allowed latenc

Post by GruFF » 30 Aug 2015, 14:47

это супер


Qwetzalcoatl
 
Posts: 10
Joined: 31 Dec 2015, 18:34

Re: [MOD] BasilMod::PingLimit - limit maximum allowed latency.

Post by Qwetzalcoatl » 13 Jan 2016, 09:46

Hi,

Its possible if lot of player with bad ping, cause a latency server for all ?
And how to see the ping of the players?

User avatar
Custodian
Mod Developer
 
Posts: 655
Joined: 08 Jun 2015, 14:58
Location: Lisbon

Re: [MOD] BasilMod::PingLimit - limit maximum allowed latency.

Post by Custodian » 12 Feb 2017, 16:23

BasilMod::PingLimit has been updated to v2 and now compatible with LiF 64bit.

User avatar
Cosimo
Zealous Believer
 
Posts: 140
Joined: 02 Jan 2016, 13:40

Re: [MOD] BasilMod::PingLimit - limit maximum allowed latency.

Post by Cosimo » 20 Mar 2017, 14:11

Would it kick out anyone using a lagswitch? If so it would be pretty awesome!

User avatar
Custodian
Mod Developer
 
Posts: 655
Joined: 08 Jun 2015, 14:58
Location: Lisbon

Re: [MOD] BasilMod::PingLimit - limit maximum allowed latency.

Post by Custodian » 21 Mar 2017, 09:48

Ggarzelli wrote:Would it kick out anyone using a lagswitch? If so it would be pretty awesome!

Mod does not control network spikes at this time, but such functionality can be added in next version.

User avatar
Cosimo
Zealous Believer
 
Posts: 140
Joined: 02 Jan 2016, 13:40

Re: [MOD] BasilMod::PingLimit - limit maximum allowed latency.

Post by Cosimo » 21 Mar 2017, 15:32

Thanks, we have issues with people using lagswitches during combat to gain advantages, being hit by 4 arrows in in nearly the same second is not fun.

I read up that this is not covered by the VAC Ban, so a tool that kicks anyone with a configurable lag (default 1000ms) would really be mana from heaven.

thanks again.

User avatar
Custodian
Mod Developer
 
Posts: 655
Joined: 08 Jun 2015, 14:58
Location: Lisbon

Re: [MOD] BasilMod::PingLimit - limit maximum allowed latency.

Post by Custodian » 21 Mar 2017, 16:09

BasilMod::PingLimit mod has been updated to v3.

Mod now can monitor average ping while player is connected to the server.
If ping exceeds allowed value for certain amount of checks in a row, player will be disconnected.

New configuration options:
Code: Select all
//Enable ping monitoring while player is connected to server
$BasilMod::pinglimit::monitorEnabled = true;
//Player ping monitoring interval. Value in ms.
$BasilMod::pinglimit::monitorInterval = 1000;
//Maximum ping value allowed by the server. Value in ms.
$BasilMod::pinglimit::monitorMaxPing = 800;
//If player ping exceeds monitorMaxPing for monitorCount times, player will be disconnected
$BasilMod::pinglimit::monitorCount = 2;

User avatar
Satis
 
Posts: 5
Joined: 08 Apr 2016, 09:15

Re: [MOD] BasilMod::PingLimit - limit maximum allowed latency.

Post by Satis » 19 Apr 2017, 19:47

Hi Custodian.

I have a 4 things for you. 2 which I believe might be bugs and 2 suggestions.

First bug:
When using:
Code: Select all
Basilmod::pinglimit_stats();

it prints out as it should, but also comes with this warming:
Code: Select all
WARN 2017-04-19 20:23:35.613 {} <<Thread>> [70720] BasilMod/pinglimit/pinglimit.cs (0): Unable to find object: '' attempting to call function 'motd_sendSystemMessage' [T:ThreadConsole:0xA150]


Second bug:
Once you log out of the server, the server continues trying to ping the player and shows ping messages like this:
Code: Select all
WARN 2017-04-19 20:24:11.703 {01} <[BasilModPingLimit]BasilMod::pinglimit_connectionCheck> [90168] BasilMod/pinglimit/pinglimit.cs (0): Unable to find object: '1589' attempting to call function 'getPing'

INFO 2017-04-19 20:24:11.703 {01} <[BasilModPingLimit]BasilMod::pinglimit_connectionCheck> [90168] 1589 PING


Now to the suggestions:
While connecting to the game, it checks the ping, but while entering the world, the ping some times gets really high, while it's loading and rendering the map, so I had a couple of times that that I got an ping on 3-4000 ms and is kicked based on that.
Would it not be an idea disabling the ping detection while player is entering the world for about 10 sec, to prevent this ? All the initial ping test while loading the data from the server shows an ping around 40ms all the time, so it's first when it's entering it's having the ping spike and disconnecting the player.

My second suggestion is regarding all the ping messages in the console. Could you not make an setting to disable all the ping check messages that runs each monitor interval, so it don't spam the console too much?
Maybe let it be disabled by default and add it as an debug mode for the mod instead.


I hope you will consider these things :)

Kind regards
Satis
ABC Game Servers
Satis - Engineer

User avatar
Custodian
Mod Developer
 
Posts: 655
Joined: 08 Jun 2015, 14:58
Location: Lisbon

Re: [MOD] BasilMod::PingLimit - limit maximum allowed latency.

Post by Custodian » 19 Apr 2017, 20:48

BasilMod::PingLimit has been updated to v4.

New configuration option added:
Code: Select all
//Initial delay before ping check starts
$BasilMod::pinglimit::monitorDelay = 10000; //Value in ms


Satis wrote:I have a 4 things for you. 2 which I believe might be bugs and 2 suggestions.

Thank you for the nice and clean feedback.

Satis wrote:First bug:

Fixed. It is intended, that mod would send GM personal stats via system message, if BasilMod::MotD is installed and running.
Proper check added.

Satis wrote:Second bug:

Fixed.

Satis wrote:but while entering the world, the ping some times gets really high, while it's loading and rendering the map, so I had a couple of times that that I got an ping on 3-4000 ms and is kicked based on that.

New configuration option added. See above.

Satis wrote:Maybe let it be disabled by default and add it as an debug mode for the mod instead.

Debug output is now ruled by variable.
Code: Select all
$BasilMod::pinglimit::debug = true;

Set following variable for that mod to enable debug (periodic) output.

User avatar
Satis
 
Posts: 5
Joined: 08 Apr 2016, 09:15

Re: [MOD] BasilMod::PingLimit - limit maximum allowed latency.

Post by Satis » 23 Apr 2017, 11:14

Sweet :) Thanks for the quick update!

Custodian wrote:Fixed. It is intended, that mod would send GM personal stats via system message, if BasilMod::MotD is installed and running.
Proper check added.


Yead that's what I thought as well and then installed MotD, but I still got the message and didn't get any messages from MotD as well.

I'll retest if that's still the case.
ABC Game Servers
Satis - Engineer

User avatar
Satis
 
Posts: 5
Joined: 08 Apr 2016, 09:15

Re: [MOD] BasilMod::PingLimit - limit maximum allowed latency.

Post by Satis » 23 Apr 2017, 22:35

Alright, here is my test result:

The prints are gone when the debug is turned off :good:

Once using the Basilmod::pinglimit_stats(); function, I get this:
Code: Select all
WARN 2017-04-23 23:30:02.049 {} <<Thread>> [83375] AccountId: 2 Player charId: 3 current ping is 50 [T:ThreadConsole:0x8DF0]

WARN 2017-04-23 23:30:02.049 {} <<Thread>> [83375] BasilMod/pinglimit/pinglimit.cs (0): Unable to find object: '' attempting to call function 'isMethod' [T:ThreadConsole:0x8DF0]


I have the MotD installed and I'm in GM mode, but I don't get any messages from it, might be due to the above warning.
ABC Game Servers
Satis - Engineer

Return to Game mods