Results 1 to 9 of 9

Thread: Remove players from webmap?

  1. #1
    Hood Ornament Gamida's Avatar
    Join Date
    May 2015
    Location
    The Rock
    Posts
    3,854
    Rep Power
    1

    Remove players from webmap?

    Is there a way to remove players from the webmap. These are starting to take up too much room.


  2. #2
    Colony Founder StompyNZ's Avatar
    Join Date
    Apr 2015
    Posts
    3,858
    Rep Power
    1
    you can reset all of it by removing the .bin file allocs mod creates in the savegame folder, then it will refill as people join

  3. #3
    Hood Ornament Gamida's Avatar
    Join Date
    May 2015
    Location
    The Rock
    Posts
    3,854
    Rep Power
    1
    Thanks stompy. Am not owner and don't know if he would want all the players stats reset or not. Thought there might have been a way to just remove certain players. Out of curiosity do you know why this happens? I have seen it before with one or two people but never this many. Am guessing more people are hearing of the server and trying it out.

  4. #4
    Colony Founder StompyNZ's Avatar
    Join Date
    Apr 2015
    Posts
    3,858
    Rep Power
    1
    Quote Originally Posted by Gamida View Post
    Thanks stompy. Am not owner and don't know if he would want all the players stats reset or not. Thought there might have been a way to just remove certain players. Out of curiosity do you know why this happens? I have seen it before with one or two people but never this many. Am guessing more people are hearing of the server and trying it out.
    in allocs mod it makes an entry for every player that ever joins the server. There's no way to delete them individually via allocs mod, so wiping the file is the only way to reset it unless you make a reader/writer script to filter the data

  5. #5
    Reconstructionist Subquake's Avatar
    Join Date
    Oct 2014
    Location
    Planet Earth
    Posts
    553
    Rep Power
    1
    Too bad that it doesn't make it so that by default it wouldn't show stuff, that has position 0,0,0 and time played 0, that would pretty much do the trick.

  6. #6
    Inventor Prisma501's Avatar
    Join Date
    Sep 2016
    Location
    NL - Tilburg
    Posts
    940
    Rep Power
    1
    Quote Originally Posted by Subquake View Post
    Too bad that it doesn't make it so that by default it wouldn't show stuff, that has position 0,0,0 and time played 0, that would pretty much do the trick.
    Its javascipt that fills the table. Bit busy with work now but ill post a adjusted javascript for the players to filter out all players with totalplaytime < 1 minute

    Cheers

  7. #7
    Inventor Prisma501's Avatar
    Join Date
    Sep 2016
    Location
    NL - Tilburg
    Posts
    940
    Rep Power
    1
    players.js.txt

    remove .txt extension and put in /Mods/Allocs_WebAndMapRendering/webserver/js (replace after backing up players.js)

    didnt look at adjusting the pager class so for quick solution i made default rows visible = 200

    You can adjust the totalplaytime filter by changing the bold value below (its in seconds, so to filter out all players that played less than 5 minutes, put 300 in there):

    Code:
    ajaxProcessing: function(data){
    			var rows = [];
    			var skipped = 0;
    			for (var i=0; i < data.players.length; i++) {
    				if(data.players[i]["totalplaytime"] > 60)
    				{
    					var row = [];
    					for (var c = 0; c < columns.length; c++) {
    						
    						var col = columns[c];
    						var val = data.players[i][col[0]];
    						if (col.length > 2 && col[2] != null) {
    							val = col[2] (val);
    						}
    						row.push (val);
    						
    					}
    					rows.push (row);
    				}
    				else {skipped++}
    			}
    			
    			return {
    				"total": (data.total - skipped),
    				"headers": headers,
    				"rows": rows
    			};
    		},
    Cheers

    -edit- or if you dont mind doing it with every new session of the playertab and dont want tamper with the .js code, you can simply fill the filterbox of the "Total Playtime" column with the statement "> numberOfSecondsPlayed" ( "> 60" or "> 300" for example) it will achieve the same thing. No need to replace the players.js for that.

    filterplaytime.jpg
    Last edited by Prisma501; 03-06-2018 at 04:35 PM.

  8. #8
    Hood Ornament Gamida's Avatar
    Join Date
    May 2015
    Location
    The Rock
    Posts
    3,854
    Rep Power
    1
    Thanks. Will pass this post onto the proper authority

  9. #9
    Inventor Prisma501's Avatar
    Join Date
    Sep 2016
    Location
    NL - Tilburg
    Posts
    940
    Rep Power
    1
    Quote Originally Posted by Gamida View Post
    Thanks. Will pass this post onto the proper authority
    Filling the filterbox you can do as a "normal user"
    It will stay there until you hit the browser refresh button and you can still sort on all columns and/or put extra filters in other colums filterboxes.

    Cheers

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •