• 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

I've seen both of those and as far as I know they are harmless.

The first one might be a server manager connection or lost packets or both.

The second one happens every time just before a player logs on.

 
Come up with another one, though more throwing this out there in case its a bug than because its a real issue for me;

Error in ApiHandler.HandleRequest(): Handler getlog threw an exception: NullReferenceException: Object reference not set to an instance of an object

Now I know this time its something between the web interface for the log and the server; the map still works perfectly, but if I click to view the log I get nothing showing, hence the getlog entry in the error.

Checking the log elsewhere I can see the above error repeated so long as I remain on the log page, if I switch back to map it will stop again.

This seems to clear its self for a while if I restart the server, but eventually will come back.

- - - Updated - - -

I've seen both of those and as far as I know they are harmless.
The first one might be a server manager connection or lost packets or both.

The second one happens every time just before a player logs on.

Thanks, good to know that first one is normal, its the one I thought may be worth looking at :)

 
Love the webserver thing you added to your server fixes. I noticed some of the inventory icons on the webserver inventory dialog are not exactly correct. My best guess is that it is returning the icon based on the item name, and not respecting the 'CustomIcon' and 'CustomIconTint' properties. Is that something that might get updated in a future version?

 
Hey Alloc, with your new map interface, is it possible to set it up in such a way that players can only see themselves and their own claim blocks on the map? This would be very useful for players and make it much easier to confirm if their claim blocks adequately cover their base.

 
Love the webserver thing you added to your server fixes. I noticed some of the inventory icons on the webserver inventory dialog are not exactly correct. My best guess is that it is returning the icon based on the item name, and not respecting the 'CustomIcon' and 'CustomIconTint' properties. Is that something that might get updated in a future version?
Yeah, that could be. Do you have a specific example of such an item?

Hey Alloc, with your new map interface, is it possible to set it up in such a way that players can only see themselves and their own claim blocks on the map? This would be very useful for players and make it much easier to confirm if their claim blocks adequately cover their base.
Yeah, that sounds like a really good idea, added to my list :)

 
Yeah, that could be. Do you have a specific example of such an item?
The shirts and tank tops are a good example.

Code:
<item id="708" name="plaidShirtRed">
       <property name="Meshfile" value="Items/Crafting/leather" />
       <property name="Material" value="cloth" />
       <property name="HoldType" value="21" />
       <property name="Stacknumber" value="1" />
       <property name="RepairTools" value="cloth" />
       <property name="EquipSlot" value="Chest" />
       <property name="FuelValue" value="3" />
       <property name="Weight" value="3" />
       [b]<property name="[color="#FFFFFF"]CustomIcon[/color]" value="plaidShirt" />
       <property name="[color="#FFFFFF"]CustomIconTint[/color]" value="AD0000" />[/b]
nuzVbWa.png


 
Hi Alloc:

I want to script something that allows me to remove banned players from showing up on the web map as "known" players. If they're banned, I don't want a flag on my map showing a banned player as "offline." I tried deleting the player data from $SDTDHOME/instance/Random Gen/seed/Player, but that doesn't affect the web map.

Further investigation showed that the web map keeps a persistent data store in the seed directory called "AllocsPersistentData.bin". Looking at string data suggests this is where the players data is stored. Can you share a little info about this file? What format is it, how to access it safely, etc.?

Thanks!

 
What dmustanger said ;)

I plan to add more options to the map to filter out players so you don't see an endless list of players that aren't even active. So filtering banned or inactive users should become possible.

 
What dmustanger said ;) I plan to add more options to the map to filter out players so you don't see an endless list of players that aren't even active. So filtering banned or inactive users should become possible.
Thanks dmustanger and Alloc.

I'll see what I can see with a hex editor. I have no real experience reverse engineering binary files, so I will probably delete the file as dmustanger suggests or just wait for your enhancements. I don't suppose I could talk you into using some kind of a lightweight database instead, like sqlite or nosql or something? Thanks!

 
I have a server (Linux dedicated 32-bit) that has been up now for 4 weeks but this morning it stopped allowing people to attach and I started getting errors in the output log to the effect "cannot open file such-and-such" and "too many open files." The user under which my server runs had a maximum of 8192 files open. I increased this to 32768 and the server is working again.

The troubling part of this is that "cat /proc/sys/fs/file-nr" gives the following output: 2528 0 3285628. This is while the server is running, which is well short of the 8192 max. Why was I getting those error messages? Does the server open a bazillion files during startup and then release them at some point?

I've opened a thread under "Support" already, but was hoping someone here knows what's going on. Pastebin with the log here:

http://pastebin.com/eJmC6JW1

Thanks for any insight!

 
Last edited by a moderator:
The shirts and tank tops are a good example.

Code:
<item id="708" name="plaidShirtRed">
       <property name="Meshfile" value="Items/Crafting/leather" />
       <property name="Material" value="cloth" />
       <property name="HoldType" value="21" />
       <property name="Stacknumber" value="1" />
       <property name="RepairTools" value="cloth" />
       <property name="EquipSlot" value="Chest" />
       <property name="FuelValue" value="3" />
       <property name="Weight" value="3" />
       [b]<property name="[color="#FFFFFF"]CustomIcon[/color]" value="plaidShirt" />
       <property name="[color="#FFFFFF"]CustomIconTint[/color]" value="AD0000" />[/b]
nuzVbWa.png
I'd throw in the armors. It would be nice to apply a CustomColor versus a tint. Iron armors appear to resist even tints; as with many things color and effect appear to be derived from the prefab/model/mesh and not independent colors.

Or...perhaps items could have the same default color and every version of that item be a tint.

As an example, the plaidshirt has a default color which is neutral and each shirt has a tint which establishes the color. Plaid shirts seem to do fine in this regards; other items such as the denim pants are ok, with the armors not doing as well (try making iron armor black, or any other color, for that matter).

Vote h0tr0d 2016 -- the "icon".

 
The shirts and tank tops are a good example.

Code:
<item id="708" name="plaidShirtRed">
       <property name="Meshfile" value="Items/Crafting/leather" />
       <property name="Material" value="cloth" />
       <property name="HoldType" value="21" />
       <property name="Stacknumber" value="1" />
       <property name="RepairTools" value="cloth" />
       <property name="EquipSlot" value="Chest" />
       <property name="FuelValue" value="3" />
       <property name="Weight" value="3" />
       [b]<property name="[color="#FFFFFF"]CustomIcon[/color]" value="plaidShirt" />
       <property name="[color="#FFFFFF"]CustomIconTint[/color]" value="AD0000" />[/b]
nuzVbWa.png
There is a solution to this. Please open the below link and check #229.

https://7daystodie.com/forums/showthread.php?14482-Inventory-item-Atlas-index-editor&p=274307&viewfull=1#post274307

Basically you just have to use some graphic software to create icons (.png) then drag into the folder Mods\ItemIconTest\ItemIcons

Here is an example

2.jpg

1.jpg

 
There is a solution to this. Please open the below link and check #229.
https://7daystodie.com/forums/showthread.php?14482-Inventory-item-Atlas-index-editor&p=274307&viewfull=1#post274307

Basically you just have to use some graphic software to create icons (.png) then drag into the folder Mods\ItemIconTest\ItemIcons

Here is an example

View attachment 11098View attachment 11099
While that does achieve the desired end result its not as elegant (or automated) as just having the block/item property for CustomIcon be read and use that as the filename for the .png instead of the block/item name.

 
I'm working on a fork of Alloc's great work here and thought I'd fix the custom and tinted icons issues. Anyone know the formula for the color blending during tint? I've tried so, so many variations to get items to tint correctly but they're slightly off every time.

7dtd_blend_Test.jpg

Anyone have ideas on the exact method used to blend the icon's tint?

(full sized image: dtd_blend_test.png)

 
I'm working on a fork of Alloc's great work here and thought I'd fix the custom and tinted icons issues. Anyone know the formula for the color blending during tint? I've tried so, so many variations to get items to tint correctly but they're slightly off every time.
View attachment 11109

Anyone have ideas on the exact method used to blend the icon's tint?

(full sized image: dtd_blend_test.png)
Hi psouza4, there is a method to do it which is by Photoshop. (I have a Photoshop CS6 OSX Version)

----------------------------------------------------------------------------------------

Open the icon image, then click "Add a layer style" -> "Color Overlay".

Select "Multiply" in Blend Mode and it will give you the same tint as you put in game.

 
Yeah I just figured out using Paint.Net and random experimentation with layer blending that it's a simple multiply blend. (But thanks a ton for your reply -- if I hadn't figured it out, I would have been stumbling around for a while on it still).

Anyone have a 12.5A Windows-based server and want to test my build?

 
Hmm, can't edit my last post. Here's an update with the corrected tinting:

7dtd_blend_final.png

And here's a quick-and-dirty changelog of stuff I've added to my fork:

Enemies (zombies and hostile animal entities) are now shown on the map as Hostiles and require permission level 'webapi.gethostilelocation' for web viewers to see.
Animals (non-hostile entities) are now shown on the map as Animals and require permission level 'webapi.getanimalslocation' for web viewers to see.

Permission level for 'webapi.viewallclaims' is now required for a viewer to see all claims, otherwise the permission level for 'webapi.getlandclaims' will only show viewer-owned claims. A viewer requires both 'webapi.getlandclaims' and 'webapi.viewallclaims' to be set for all claims to show (you can't just set 'webapi.viewallclaims').

https://7daystodie.com/forums/showthread.php?12837-Improvements-for-the-dedicated-server&p=317405&viewfull=1#post317405

Permission level for 'webapi.viewallplayers' is now required for a viewer to see all players, otherwise the permission level for 'webapi.getplayerslocation' will only show the player for the currently-authenticated viewer. A viewer requires both 'webapi.getplayerslocation' and 'webapi.viewallplayers' to be set for all players to show (you can't just set 'webapi.viewallplayers').

https://7daystodie.com/forums/showthread.php?12837-Improvements-for-the-dedicated-server&p=317405&viewfull=1#post317405

Banned players are now hidden from the web map.

https://7daystodie.com/forums/showthread.php?12837-Improvements-for-the-dedicated-server&p=320702&viewfull=1#post320702

Items using 'CustomIcon' and 'CustomIconTint' are now supported (although the exact tinting may not be perfectly the same as the game).

https://7daystodie.com/forums/showthread.php?12837-Improvements-for-the-dedicated-server&p=317117&viewfull=1#post317117

https://7daystodie.com/forums/showthread.php?12837-Improvements-for-the-dedicated-server&p=317679&viewfull=1#post317679

Map marker icons for players, hostiles, and animals have been updated.
Build binaries:

server_fixes_psouza_27915_1102.tar.gz

Build source code (not all of my code is neatened up yet):

server_fixes_source_psouza_27915_1102.zip

No support provided for compiling this yourself -- you can refer to Alloc's instructions for that. And I'm not entirely sure the .tar package will work properly on linux-based boxes since no permission/owner data is being retained from my Windows machine. You may have to clean that up manually if you're running a linux server.

Please let me know how you like my updates and if you encounter any issues. And a big thanks to Alloc' for his project: this is my way of helping out and giving something back!

 
Last edited by a moderator:
Enemies (zombies and hostile animal entities) are now shown on the map as Hostiles and require permission level 'webapi.gethostilelocation' for web viewers to see.

Animals (non-hostile entities) are now shown on the map as Animals and require permission level 'webapi.getanimalslocation' for web viewers to see.
Can you post some screenshots? I'm curious how the hostiles and animals look on the map. It's one thing to show two dozen players. But now in addition to players, it will show 50+ zombies and 50+ animals simultaneously?

 
Back
Top