• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Improvements for the dedicated server

Of course it will be at least maintained (hopefully extended somewhat ;) ). At some point most of it will probably move to the core game, with just minor parts staying as a mod to show how to do some stuff in mods.

 
Just started renting my server again and setup Alloc's fixes and noticed that I cannot view player inventories on the webmap. Curious if anyone else is experienced this. The most current version is being used also.

 
Just started renting my server again and setup Alloc's fixes and noticed that I cannot view player inventories on the webmap. Curious if anyone else is experienced this. The most current version is being used also.
Same here but I really don't use it, I just happened to notice it yesterday when I was goofing around.

 
Are you getting any errors?  Mine seemed to run up fine, but Haven't had a chance to actually connect to server as a player.

It may not need an update for this version jump.
site have problem with claims and inventory to show up properly only this. i hope you fix it as fast as possible ;)

 
Pushed an update yesterday (same version numbers, only JS files changed). I had this working before but forgot to bundle the updated web files with the release :(

 
Of course it will be at least maintained (hopefully extended somewhat ;) ). At some point most of it will probably move to the core game, with just minor parts staying as a mod to show how to do some stuff in mods.
Hello Sir. Been using you fixes for years. On 20 any link I find to the  20 version the links seem to be dead. where may I find the best link to it if it's available. . I still have your POWERSHELL installer some where.

 
Hi, hoping someone could help with an issue I encountered with Alloc's server mods -- also I'm sorry if this has been answered previously.

I manage a server that has Alloc's fixes and a UI mod, and other than that, vanilla files. The BloodMoonFrequency was set to 7, and on day 71 (a day after the BM on day 70) I used the console to enter ```setgamepref BloodMoonFrequency 10```, and then updated the serverconfig.xml to match. After restarting and logging in to the server, using the console I could see that the Blood moon was scheduled for day 80 as expected.

However, when I went to the Alloc webserver map, it was incorrectly showing the next blood moon occurring with the previous frequency (7) and the next blood moon occurring on day 77.

Is there any way to manually update Alloc's server to reflect the correct BM frequency?

I saw this open ticket on Alloc's Trac site (but I wonder if this update only queries the BM frequency once when the server is created?):  https://7dtd.illy.bz/ticket/163

Here's a picture (I would have taken a screenshot but the tooltip disappeared when I used the keyboard shortcut for the snipping tool):

LvH8xOL.jpg


 
Oh, someone reading docs/tickets first finally :)

As it says this behaviour unfortunately is hardcoded in the web files currently (think only stats.js). You would have to change the calculations there. Buuut ... this will only work if whatever schedule runs is a) static (i.e. no bloodmoon range set) and b) is not offset to zero (e.g. if you had the default bloodmoon frequency of 7 but for some reason the next one would be on 76 or 78 instead of 77 it would break). For you it should work if the next one is really on day 80 for a frequency of 10. Would only need to change line 41 of stats.js to a proper calc, something like "(10 - gametime.days) % 10".

The real fix is to actually query the correct data from the server which is what the ticket is for but had not gotten around to that one yet unfortunately. Would not even be hard to implement but mostly forgot about it ;)

 
Hey thanks for the quick reply.

(I do try to figure this stuff out on my own before asking questions)

Unfortunately, I'm not a software dev and I don't know much about JS, so you might need to hold my hand a bit more.

I tried editing stats.js but I'm just too dumb to fix the calculation.

Here's the function blocks I think are involved:

function DayOfWeek (days) {
return days % 7 > 0 ? days % 7 : 7;
}



Code:
function TimeTitle (gametime) {
	var daynames = ["", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Bloodday"];
	var dayOfWeek = DayOfWeek (gametime.days);
	var result = "";
	// Show days til blood moon:
	result += (10 - dayOfWeek) + " days til blood moon\n";
	// Show day of week (number):
	result += "Day of week: " + dayOfWeek + "\n";
	// Show day of week (name):
	//result += daynames[dayOfWeek];
	return result;
}

I edited the line you pointed it, but it looks like that function is working with the DayOfWeek and dayOfWeek variables, and the whole thing goes sideways if a week in the game is 10 days. 

Obviously, this isn't a major issue but if there's something else you see that I could edit, please let me know! 🙃

Edit: BloodMoonRange is 0 and BloodMooonFrequency is 10

Edit 2: I see that you already gave a solution! Sorry, must have missed that. I'll put that in and try again.

 
Last edited by a moderator:
Hello all,

I have a strange problem on my WebMap.

I made the following settings in the webpermissions.xml:

<permissions>
<permission module="webapi.getlog" permission_level="0"/>
<permission module="webapi.executeconsolecommand" permission_level="0"/>
<permission module="webapi.viewallplayers" permission_level="0"/>
<permission module="webapi.viewallclaims" permission_level="0"/>
<permission module="webapi.getplayerinventory" permission_level="0"/>
<permission module="web.map" permission_level="2000"/>
<permission module="webapi.getstats" permission_level="2000"/>
<permission module="webapi.getplayersonline" permission_level="2000"/>
<permission module="webapi.getplayerslocation" permission_level="2000"/>
<permission module="webapi.getlandclaims" permission_level="2000"/>
<permission module="webapi.gethostilelocation" permission_level="2000"/>
<permission module="webapi.getanimalslocation" permission_level="2000"/>
</permissions>


i also get all the data delivered from the corresponding endpoints, but the endpoint getplayerslocation always returns an empty array, even if players are online.
Have I set something wrong?

 
I suppose you mean for non-admin users (i.e. including those not logged in to the page) it does not show anyone?

The getplayerslocation and getlandclaims APIs are a bit special as by default they only show the own position / claims (thus nothing for non logged in users as they obviously don't have a position/claim). To view all the webapi.viewallplayers / viewallclaims have to be set for the user. In case you want *everyone* to see *ever* position (claim) you need to set those to 2000.

 
Back
Top