Jump to content

Improvements for the dedicated server


Alloc
 Share

Recommended Posts

I must be blind, where do I find this...

 

It isn't showing for me, and presumably not for you either - which is strange assuming you have admin permission of '0' on your server.

Check out the web permissions section on the wiki:

https://7dtd.illy.bz/wiki/Integrated%20Webserver

 

It's most likely a config issue - when it is working, you will see a layer control box in the top right of the map that allows you to show and hide Players (online/offline), Zs, Animals, and Land Claims.

Link to comment
Share on other sites

It isn't showing for me, and presumably not for you either - which is strange assuming you have admin permission of '0' on your server.

Check out the web permissions section on the wiki:

https://7dtd.illy.bz/wiki/Integrated%20Webserver

 

It's most likely a config issue - when it is working, you will see a layer control box in the top right of the map that allows you to show and hide Players (online/offline), Zs, Animals, and Land Claims.

 

Wonder if we think of different things.

This one is when an admin i logged in

379616354_showpeople.PNG.85440a6a086653459456a285fc1b0085.PNG

 

What I'm thinking of is this list.

playerlist.jpg.3da02a50cf6e38068653397e3ab53145.jpg

I want to hide the offline players here.

Link to comment
Share on other sites

Wonder if we think of different things.

This one is when an admin i logged in

[ATTACH=CONFIG]17009[/ATTACH]

 

What I'm thinking of is this list.

[ATTACH=CONFIG]17010[/ATTACH]

I want to hide the offline players here.

 

Ahhh yes, we were talking about different things. There is currently no way to hide offline players from that list, unless you want to go into the source, hack, and then recompile it.

It seems that the filtering is not functioning properly or you could have put 'online' or whatever into the filter box above the column to hide the offline players.

Is there a reason you want to hide it, and is it just to hide it from non-admins?

Link to comment
Share on other sites

Ahhh yes, we were talking about different things. There is currently no way to hide offline players from that list, unless you want to go into the source, hack, and then recompile it.

It seems that the filtering is not functioning properly or you could have put 'online' or whatever into the filter box above the column to hide the offline players.

Is there a reason you want to hide it, and is it just to hide it from non-admins?

Its more of a cleaner look feeling. I have opened up this part for public users. For them to see which players that are online.

ITs easier to find them if its only online players in the list. Now they need to click "Online" to see who is online.

Link to comment
Share on other sites

Its more of a cleaner look feeling. I have opened up this part for public users. For them to see which players that are online.

ITs easier to find them if its only online players in the list. Now they need to click "Online" to see who is online.

 

Ok, well there is something you can do to get closer to this, but I'm surprised you want to go this far to help your users :D

Currently the list is loaded and auto sorted on the Name Column:

 

/js/players.js:

$(".players_tablesorter")
.tablesorter({
	theme: 'default',
	widthFixed: true,
	sortLocaleCompare: true, // needed for accented characters in the data
	sortList: [ [FindColumnIndexByField("name"),0] ], /* THIS LINE DEFINES THE AUTOSORT OPTION */
	widgets: ['zebra', 'formatter', 'filter'],
	widgetOptions: {
		formatter_column: formatterSettings
	}
})

 

As you can see on the SortList variable is configured to sort the columns by name (Alphabet Ascending), you can change this to sort on load by players->online.

Link to comment
Share on other sites

Ok, well there is something you can do to get closer to this, but I'm surprised you want to go this far to help your users :D

Currently the list is loaded and auto sorted on the Name Column:

 

/js/players.js:

$(".players_tablesorter")
.tablesorter({
	theme: 'default',
	widthFixed: true,
	sortLocaleCompare: true, // needed for accented characters in the data
	sortList: [ [FindColumnIndexByField("name"),0] ], /* THIS LINE DEFINES THE AUTOSORT OPTION */
	widgets: ['zebra', 'formatter', 'filter'],
	widgetOptions: {
		formatter_column: formatterSettings
	}
})

 

As you can see on the SortList variable is configured to sort the columns by name (Alphabet Ascending), you can change this to sort on load by players->online.

 

Thanks alot, zigstum.

I changed this

sortList: [ [FindColumnIndexByField("name"),0] ],

to this

sortList: [ [FindColumnIndexByField("online"),1] ],

 

If there are anyone else that wanna go the same way :)

Link to comment
Share on other sites

Filtering *should* work just "fine" too. It's not nice yet so you'll have to enter "true" or "false" in the filter box but at least it does work for me :)

 

Ah of course! I had exactly the same issue using datatables to display the playerlist.

 

- - - Updated - - -

 

Thanks alot, zigstum.

I changed this

sortList: [ [FindColumnIndexByField("name"),0] ],

to this

sortList: [ [FindColumnIndexByField("online"),1] ],

 

If there are anyone else that wanna go the same way :)

 

Nice! You got it going :D

Link to comment
Share on other sites

Errors In WebMap When Viewing Player Inventory

 

Thanks, I suppose I know what it is (after all I changed the game code that probably broke this in the first place ^^). Thoufht this change had already been in 14.7 so didn't think it was broken now... Update tomorrow or monday.

 

Hi Alloc! Apologies if I've misunderstood the changelog, specifically "Fixed error loading item icons in A15 (may have added regressions for mod icons)", and am expecting this to be fixed when it hasn't yet. I've updated my server to rev.293 but am still getting the texture/icon errors on the WebMap when opening a player inventory. When I updated to rev.293, I deleted all the previous rev.289 folders too so it isn't an issue with old files. ;) One line of error below. Let me know if you need more.

 

2016-09-27T09:53:03 86407.430 INF Error in Web.HandleRequest(): UnityEngine.UnityException: Texture '' is not readable, the texture memory can not be accessed from scripts. You can make the texture readable in the Texture Import Settings.
 at (wrapper managed-to-native) UnityEngine.Texture2D:GetPixels (int,int,int,int,int)
 at UnityEngine.Texture2D.GetPixels (Int32 x, Int32 y, Int32 blockWidth, Int32 blockHeight) [0x00000] in <filename unknown>:0
 at AllocsFixes.NetConnections.Servers.Web.Handlers.ItemIconHandler.LoadIcons () [0x00000] in <filename unknown>:0
 at AllocsFixes.NetConnections.Servers.Web.Handlers.ItemIconHandler.HandleRequest (System.Net.HttpListenerRequest req, System.Net.HttpListenerResponse resp, AllocsFixes.NetConnections.Servers.Web.WebConnection user, Int32 permissionLevel) [0x00000] in <filename unknown>:0
 at AllocsFixes.NetConnections.Servers.Web.Web.HandleRequest (IAsyncResult result) [0x00000] in <filename unknown>:0

Link to comment
Share on other sites

Hi Alloc! Apologies if I've misunderstood the changelog, specifically "Fixed error loading item icons in A15 (may have added regressions for mod icons)", and am expecting this to be fixed when it hasn't yet. I've updated my server to rev.293 but am still getting the texture/icon errors on the WebMap when opening a player inventory. When I updated to rev.293, I deleted all the previous rev.289 folders too so it isn't an issue with old files. ;) One line of error below. Let me know if you need more.

 

2016-09-27T09:53:03 86407.430 INF Error in Web.HandleRequest(): UnityEngine.UnityException: Texture '' is not readable, the texture memory can not be accessed from scripts. You can make the texture readable in the Texture Import Settings.
 at (wrapper managed-to-native) UnityEngine.Texture2D:GetPixels (int,int,int,int,int)
 at UnityEngine.Texture2D.GetPixels (Int32 x, Int32 y, Int32 blockWidth, Int32 blockHeight) [0x00000] in <filename unknown>:0
 at AllocsFixes.NetConnections.Servers.Web.Handlers.ItemIconHandler.LoadIcons () [0x00000] in <filename unknown>:0
 at AllocsFixes.NetConnections.Servers.Web.Handlers.ItemIconHandler.HandleRequest (System.Net.HttpListenerRequest req, System.Net.HttpListenerResponse resp, AllocsFixes.NetConnections.Servers.Web.WebConnection user, Int32 permissionLevel) [0x00000] in <filename unknown>:0
 at AllocsFixes.NetConnections.Servers.Web.Web.HandleRequest (IAsyncResult result) [0x00000] in <filename unknown>:0

 

Im getting the same errors.

Link to comment
Share on other sites

Those outputs don't look like they were from the latest mod release though.

 

My server host (gameservers.com) has made the A15 experimental available for one click install but doesn't have an option to add the experimental version of the fixes (They do have version 289 available for one click install). Any chance we can get them to maintain one click install for the latest server fixes? After a few tries I was able to shutdown the server and upload the latest version. Everything works great so far. It would just be super convenient for us server admins due to VM flakiness shutting down running processes to overwrite via FTP. Feel free to tell me to stfu because that would be to much work for experimentals.

 

*LOVE* the mod. Logs are working great, inventory looks good so far. Very stable experimental all around except for the weirdness with antivirus and Unity 5.3 on windows 64.

 

-Dead

Link to comment
Share on other sites

Alloc,

 

I'm attempting to get this to work with my server manager (RAT) and am having some issues displaying the webmap. I've been trying it from Chrome, with the following:

 

http://localhost:8082/static/index.html?adminuser=test&admintoken=testing

http://localhost:8082/static/index.html#tab_map?adminuser=test&admintoken=testing

 

None of these log me in or display the map.

 

Settings are:

<token name="test" token="testing" permission_level="0" />

 

and

 

<permission module="web.map" permission_level="0" />

 

in their respective files.

 

If I log in using Steam, the map displays correctly.

 

I assume I'm just doing it wrong, but could use some help in figuring out what exactly that is.

 

Thanks much!

Link to comment
Share on other sites

Alloc,

 

I'm attempting to get this to work with my server manager (RAT) and am having some issues displaying the webmap. I've been trying it from Chrome, with the following:

 

http://localhost:8082/static/index.html?adminuser=test&admintoken=testing

http://localhost:8082/static/index.html#tab_map?adminuser=test&admintoken=testing

 

None of these log me in or display the map.

 

Settings are:

<token name="test" token="testing" permission_level="0" />

 

and

 

<permission module="web.map" permission_level="0" />

 

in their respective files.

 

If I log in using Steam, the map displays correctly.

 

I assume I'm just doing it wrong, but could use some help in figuring out what exactly that is.

 

Thanks much!

 

 

If you've added yourself as admin with permission zero, and you have set webmap to same permission level, you still need to log in with steam to actually view the map, or the map can't verify you are the user with the steamid that matches the permission. If you set map permission level to 2000 (webpermission add webapi.map 2000), then you won't need to log in with steam, as even a non-logged in user is granted that permission level. As far as I understand, the tokens are irrelevant here - they are for api calls, eg:

http://localhost:8082/api/getplayerslocations?adminuser=test&admintoken=testing

This would give you a json string of player locations, regardless of logged in state, and would check the permission level of the token, rather than the permission level of the steamid of the logged in user.

Link to comment
Share on other sites

Actually in theory tokens can be used for everything that can be accessed via HTTP. But they aren't meant for frontend use. So the limitation is that *every request* made has to have to parameters appended.

 

In your case you only made the request for the HTML with the token so that file was delivered as if you had permission level 0 (of course not making any difference at all for the HTML as it's a static public file anyway ;) ). All requests your browser makes to further resources, especially the Maptile and API requests don't have those parameters and are treated like any other public non-logged in request.

Link to comment
Share on other sites

Actually in theory tokens can be used for everything that can be accessed via HTTP. But they aren't meant for frontend use. So the limitation is that *every request* made has to have to parameters appended.

 

In your case you only made the request for the HTML with the token so that file was delivered as if you had permission level 0 (of course not making any difference at all for the HTML as it's a static public file anyway ;) ). All requests your browser makes to further resources, especially the Maptile and API requests don't have those parameters and are treated like any other public non-logged in request.

 

Thanks for the information Alloc, what I'm attempting to do is load the map in a window within my server manager and was hoping to bypass the SteamID check using the tokens to display the map. I'll see what I can come up with a work around, but more than likely it'll have to be that the end user (the admin running RAT) will still have to sign in to steam to use it.

Link to comment
Share on other sites

Well, depending on what rendering engine you use it might be possible to intercept any outgoing requests and append the required parameters. If not ... well, that would mean you're more or less out of options then :(

 

Alrighty then, probably not going to work. =)

 

Any chance I can get you to add this to your pages? It should help with IE rendering anyway.

 

<meta http-equiv="X-UA-Compatible" content="IE=edge" />

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
 Share

×
×
  • Create New...