• 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'm running render map on a server, and it's got 93,664 files to go... any way to optimize that?
Nope, if the uncovered map is so big and you run rendermap it will have to do all those parts (btw, it's not directly files and also not necessarily linear in time during those steps).

What happens when one player map has an older version than another (like if a base was built later)? Can you skip duplicates, like from all the players that log in and out immediately?
I don't use any player maps. The rendering is done directly from the chunks as they are in the game so it will always be up to date and just contain anything that has ever been rendered by the game.

Also, when I open the website, I get these errors in the log:
I would assume they don't hurt. Do you see any problems when those errors appear? Do they appear when you tried to open the page while rendermap was running?

/EDIT: Ignore that very last question, the log shows that it was during rendermap ;)

I assume the engine just wasn't fast enough to reply to the browsers request as it is quite busy with rendering during that time so the browser probably closed the connection for a timeout.

@leadingzero:

First of all I just made an updated release package for the deobfuscator which contains the entity.position field used by my mod so you should switch to that one if you want to also apply my mod ;)

Is there a dependency that's missing from the release tree, or is it likely encountering an execution permissions issue?
I suppose it indeed is some kind of permission or access problem. Wonder why it tries to open the files by an URI (file:///) instead of just a local path. You could try for example to put the deobfuscator in a simpler path, e.g. (at least for trying) in C:\deobfuscate.

 
Last edited by a moderator:
I've been using your tool on a pretty busy server, and it's been amazing. I was wondering if you could add a list of players to the webserver map? Currently I have to click each individual dot to see who it is, and if someone is much further out, I had to scroll the map around look for them.

 
That's part of the plan ;)

The map isn't going to be the full thing, it will be merely an additional tool to support the whole administration thing.

 
That was exactly it! I was able to deobfuscate, compile 7dtd-server-fixes.dll, compile the assembly-patcher, invoke 7dtd-fixer.exe and produce an Assembly-CSharp.patched.dll -- which totally works.

Is "7d2d-server-fixes" on github somewhere, or is there otherwise a way to download the whole source tree recursively? I click-save-as'd it from the download link one file at a time, creating directories on my end to match your tree.

Thanks so much for your generosity in sharing you expertise and efforts!

 
Gee now you have me wondering if that is what it was, I am paying much more for the Dedicated then the VPS, Don't get me wrong the Dedicated will be a way better system then the VPS was but I am tight on funds for this project. Anyway I will test the Dedicated and see what happens with it then post here to let everyone know.
After getting my dedicated setup and leaving run for some time I have noticed a lot of improvements on the server side. One being my zombie no longer go out of sync with the server/clients so they no longer freeze and get bugged out, Also the negative times seen in my logs in the past I have yet to see any longer.

Seem running a 7DTD server on a VPS is a bad thing and I would suggest no one do it, Better to just pay the few extra few bucks and get a dedicated.

 
@Alloc

Is there a way to add a custom command in game that players can type in chat like /url and it will open the players default browser to the link set in the command??

 
@Alloc
Is there a way to add a custom command in game that players can type in chat like /url and it will open the players default browser to the link set in the command??
Also a /rd or /removedebuff command so if a Admin breaks their leg while helping a player they can remove it and walk normal again :p

 
When I try compile 7dtd-server-fixes I get the below 3 errors...

F:\7dtd\binary-improvements\7dtd-server-fixes\src\CustomCommands\ListPlayersExtended.cs(22,22): Error CS1061: 'EntityPlayer' does not contain a definition for 'fd008e' and no extension method 'fd008e' accepting a first argument of type 'EntityPlayer' could be found (are you missing a using directive or an assembly reference?) (CS1061) (7dtd-server-fixes)
F:\7dtd\binary-improvements\7dtd-server-fixes\src\CustomCommands\ListPlayersExtended.cs(22,22): Error CS1061: 'EntityPlayer' does not contain a definition for 'fd00b1' and no extension method 'fd00b1' accepting a first argument of type 'EntityPlayer' could be found (are you missing a using directive or an assembly reference?) (CS1061) (7dtd-server-fixes)

F:\7dtd\binary-improvements\7dtd-server-fixes\src\CustomCommands\TeleportPlayer.cs(38,38): Error CS1061: 'PackageQueue' does not contain a definition for 'Send' and no extension method 'Send' accepting a first argument of type 'PackageQueue' could be found (are you missing a using directive or an assembly reference?) (CS1061) (7dtd-server-fixes)
What am I missing?

 
Is there a way to add a custom command in game that players can type in chat like /url and it will open the players default browser to the link set in the command??
In chat: Not yet, that's just text for everyone right now.

I assume you want it to be sent to others and they can click thank link? Or really open a browser just locally by typing "/url ..."?

Also a /rd or /removedebuff command so if a Admin breaks their leg while helping a player they can remove it and walk normal again :p
Hm, would have to see if that's possible, may require a client side change which would make it impossible for now.

When I try compile 7dtd-server-fixes I get the below 3 errors...
At least the last one means you don't have a deobfuscated DLL from the latest deobfuscator as the PackaqeQueue deobfuscation has been there since 0.3.1.

The other two may just be different field names in your DLL (couldn't easily deob them so those are the only two that have to be checked each update ;) ). Might be they would have the correct names if you update to the latest deob too as that could change field order because of the added deobfuscation for another field in the entities. If not use an assembly browser (e.g. the one from MonoDevelop) to look at the deobfuscated DLL, go to Command_listplayers.Run() and check which fields that reads for "id" and "remote".

 
I think it was how I was using the deob tool.... drag and drop the dll into it doesn't completely work, I think it was needed the some other .dll files from the 7dtd Managed folder.

INFO : Started logging to mainlog.txt.INFO : Deobfuscating Assembly-CSharp.dll...

___

INFO : Executing patcher "ManualDeobfuscator" (by Alloc,DerPopo)...

INFO : Writing the current Assembly-CSharp.dll to a MemoryStream...

INFO : Reading the current Assembly-CSharp.dll from the MemoryStream...

INFO : Executing patcher "NameSimplifier" (by DerPopo)...

ERROR : ERROR : Invoking the Patch method for NameSimplifier resulted in an exception :

ERROR : System.Exception: occured while patching 2 ---> Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'

at Mono.Cecil.BaseAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters)

at Mono.Cecil.DefaultAssemblyResolver.Resolve(AssemblyNameReference name)

at Mono.Cecil.MetadataResolver.Resolve(IAssemblyResolver resolver, TypeReference type)

at Mono.Cecil.TypeReference.Resolve()

at NamePatcher.NameNormalizer.checkLocalDefinition[T](T def, String prefix, Int32 cmid, TypeDefinition btdef)

at NamePatcher.NameNormalizer.checkLocalDefinitions[T](Collection`1 memDef, String prefix, Int32 cmid, TypeDefinition btdef)

at NamePatcher.NameNormalizer.CheckNames(TypeDefinition tdef)

--- End of inner exception stack trace ---

at NamePatcher.NameNormalizer.CheckNames(TypeDefinition tdef)

at NamePatcher.NamePatcher.Patch(Logger logger, AssemblyDefinition asmCSharp, AssemblyDefinition __reserved)

INFO : Writing the current Assembly-CSharp.dll to a MemoryStream...

INFO : Reading the current Assembly-CSharp.dll from the MemoryStream...

INFO : Executing patcher "PacketClassesPatcher" (by DerPopo,Alloc)...

ERROR : ERROR : Invoking the Patch method for PacketClassesPatcher resulted in an exception :

ERROR : Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'

at Mono.Cecil.BaseAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters)

at Mono.Cecil.DefaultAssemblyResolver.Resolve(AssemblyNameReference name)

at Mono.Cecil.MetadataResolver.Resolve(IAssemblyResolver resolver, TypeReference type)

at Mono.Cecil.TypeReference.Resolve()

at NetworkPatcher.Helpers.PatchSubMethods(MethodDefinition method, String newName)

at NetworkPatcher.Helpers.PatchVMethod(MethodDefinition method, String newName)

at NetworkPatcher.PatchPackageQueue.Patch(Logger logger, AssemblyDefinition asmCSharp)

at NetworkPatcher.NetworkPatcher.Patch(Logger logger, AssemblyDefinition asmCSharp, AssemblyDefinition __reserved)

INFO : Writing the current Assembly-CSharp.dll to a MemoryStream...

INFO : Reading the current Assembly-CSharp.dll from the MemoryStream...

___

INFO : Saving the new assembly to F:\7dtd\binary-improvements\Deobfuscate-7dtd_pre0.3.2\Assembly-CSharp.deobf.dll ...

INFO : Success.
so i dumped the deob tool in that main 7dtd game folder then did it, now the deob .dll works and I can compile

 
In chat: Not yet, that's just text for everyone right now.I assume you want it to be sent to others and they can click thank link? Or really open a browser just locally by typing "/url ..."?
Not a clickable link, Have the browser open to the url when the command is typed in. How its would work is I would set up a auto message to server stating something like "Please type /url in chat to visit our website" they would type /url in chat and hit enter as soon as the command hits the server it send the message back to the client to open the clients default web browser to a link that could be set inside a .txt file or something on the server side.

 
I think it was how I was using the deob tool.... drag and drop the dll into it doesn't completely work, I think it was needed the some other .dll files from the 7dtd Managed folder.
so i dumped the deob tool in that main 7dtd game folder then did it, now the deob .dll works and I can compile
Yup, the Deobfuscator needs UnityEngine and I think also SteamworksManaged.dll by now. Normally it should work with drag'n'dropping the AC#.dll on the executable but it looks like that's not always the case :(

Not a clickable link, Have the browser open to the url when the command is typed in. How its would work is I would set up a auto message to server stating something like "Please type /url in chat to visit our website" they would type /url in chat and hit enter as soon as the command hits the server it send the message back to the client to open the clients default web browser to a link that could be set inside a .txt file or something on the server side.
Well, that would definitely include client side changes, so not for now. But I think the new server browser might also include things like a server homepage :)

 
Just wanted to say, phenomenal work here Alloc You have given the tools to the community so that they might fight the war on hacking and trouble makers.

Aside from my amusing opening line, I'm receiving the following errors upon De-obfuscation.

log_PacketClassesPatcher.txt

INFO : Renamed packet class (NetPackage_MapPosition)!INFO : Patched PackageQueue.Send.

INFO : Patched PackageQueue.SendAll.

INFO : Patched PackageQueue.Update.

INFO : Patched PackageQueue.GetEstimatedStreamSize.

INFO : Patched PackageQueue.Read.

INFO : Patched PackageQueue.IsConnected.

INFO : Patched PackageQueue.Close.

INFO : Patched PackageQueue.isClosed.

INFO : Patched PackageQueue.emptyList.

INFO : Patched PackageQueue.lastBytesSent.

INFO : Successful: 233 / Failed: 5
Manual De-obfuscator

ERROR : (Command_listents.Help()): MethodDefinition not found!ERROR : (Command_listents.RepeatInterval()): MethodDefinition not found!

ERROR : (Command_listplayers.Help()): MethodDefinition not found!

ERROR : (Command_listplayers.RepeatInterval()): MethodDefinition not found!

ERROR : (Command_listthreads.Help()): MethodDefinition not found!

ERROR : (Command_listthreads.RepeatInterval()): MethodDefinition not found!

ERROR : (Command_enablescope.Help()): MethodDefinition not found!

ERROR : (Command_enablescope.RepeatInterval()): MethodDefinition not found!

ERROR : (Command_chunkcache.Help()): MethodDefinition not found!

ERROR : (Command_chunkcache.RepeatInterval()): MethodDefinition not found!

ERROR : (Command_showchunkdata.Help()): MethodDefinition not found!

ERROR : (Command_showchunkdata.RepeatInterval()): MethodDefinition not found!

ERROR : (Command_gameover.Help()): MethodDefinition not found!

ERROR : (Command_gameover.RepeatInterval()): MethodDefinition not found!

ERROR : (Command_debugmenu.Help()): MethodDefinition not found!

ERROR : (Command_debugmenu.RepeatInterval()): MethodDefinition not found!

ERROR : (Command_shutdown.Help()): MethodDefinition not found!

ERROR : (Command_shutdown.RepeatInterval()): MethodDefinition not found!

ERROR : (Command_spawnentity.Help()): MethodDefinition not found!

ERROR : (Command_spawnentity.RepeatInterval()): MethodDefinition not found!

ERROR : (Command_settime.Help()): MethodDefinition not found!

ERROR : (Command_settime.RepeatInterval()): MethodDefinition not found!

ERROR : (Command_setgamepref.Help()): MethodDefinition not found!

ERROR : (Command_setgamepref.RepeatInterval()): MethodDefinition not found!

ERROR : (Command_kick.Help()): MethodDefinition not found!

ERROR : (Command_kick.RepeatInterval()): MethodDefinition not found!

ERROR : (Command_ban.Help()): MethodDefinition not found!

ERROR : (Command_ban.RepeatInterval()): MethodDefinition not found!

ERROR : (Command_admin.Help()): MethodDefinition not found!

ERROR : (Command_admin.RepeatInterval()): MethodDefinition not found!

ERROR : (Command_mod.Help()): MethodDefinition not found!

ERROR : (Command_mod.RepeatInterval()): MethodDefinition not found!

ERROR : (Command_whitelist.Help()): MethodDefinition not found!

ERROR : (Command_whitelist.RepeatInterval()): MethodDefinition not found!

ERROR : (Command_cp.Help()): MethodDefinition not found!

ERROR : (Command_cp.RepeatInterval()): MethodDefinition not found!

ERROR : (Command_say.Help()): MethodDefinition not found!

ERROR : (Command_say.RepeatInterval()): MethodDefinition not found!

ERROR : (Command_convertdtm.Help()): MethodDefinition not found!

ERROR : (Command_convertdtm.RepeatInterval()): MethodDefinition not found!

ERROR : (Command_mem.Help()): MethodDefinition not found!

ERROR : (Command_mem.RepeatInterval()): MethodDefinition not found!

ERROR : (Command_aiddebug.Help()): MethodDefinition not found!

ERROR : (Command_aiddebug.RepeatInterval()): MethodDefinition not found!

ERROR : (Command_spawnwanderinghorde.Help()): MethodDefinition not found!

ERROR : (Command_spawnwanderinghorde.RepeatInterval()): MethodDefinition not found!

ERROR : (Command_spawnairdrop.Help()): MethodDefinition not found!

ERROR : (Command_spawnairdrop.RepeatInterval()): MethodDefinition not found!

ERROR : (Command_spawnsupplycrate.Help()): MethodDefinition not found!

ERROR : (Command_spawnsupplycrate.RepeatInterval()): MethodDefinition not found!

ERROR : (Command_shownexthordetime.Help()): MethodDefinition not found!

ERROR : (Command_shownexthordetime.RepeatInterval()): MethodDefinition not found!

ERROR : (Command_sounddebug.Help()): MethodDefinition not found!

ERROR : (Command_sounddebug.RepeatInterval()): MethodDefinition not found!

ERROR : (Command_smoothworld.Help()): MethodDefinition not found!

ERROR : (Command_smoothworld.RepeatInterval()): MethodDefinition not found!

ERROR : (Command_generatemap.Help()): MethodDefinition not found!

ERROR : (Command_generatemap.RepeatInterval()): MethodDefinition not found!

ERROR : (Command_saveworld.Help()): MethodDefinition not found!

ERROR : (Command_saveworld.RepeatInterval()): MethodDefinition not found!

ERROR : (Command_buff.Help()): MethodDefinition not found!

ERROR : (Command_buff.RepeatInterval()): MethodDefinition not found!

ERROR : (Command_debuff.Help()): MethodDefinition not found!

ERROR : (Command_debuff.RepeatInterval()): MethodDefinition not found!

INFO : Successful: 132 / Failed: 64
Whilst the main log prints the following, ultimately it looks as though it has failed.

INFO : Started logging to mainlog.txt.INFO : Deobfuscating Assembly-CSharp.dll...

___

INFO : Executing patcher "ManualDeobfuscator" (by Alloc,DerPopo)...

INFO : Writing the current Assembly-CSharp.dll to a MemoryStream...

INFO : Reading the current Assembly-CSharp.dll from the MemoryStream...

INFO : Executing patcher "NameSimplifier" (by DerPopo)...

INFO : Writing the current Assembly-CSharp.dll to a MemoryStream...

INFO : Reading the current Assembly-CSharp.dll from the MemoryStream...

INFO : Executing patcher "PacketClassesPatcher" (by DerPopo,Alloc)...

INFO : Writing the current Assembly-CSharp.dll to a MemoryStream...

INFO : Reading the current Assembly-CSharp.dll from the MemoryStream...

___

INFO : Saving the new assembly to F:\Project 1\tools\Deobfuscate-7dtd_pre0.3.2\Deobfuscate-7dtd_pre0.3.2 (2) (1)\Deobfuscate-7dtd_pre0.3.2\Assembly-CSharp.deobf.dll ...

INFO : Success.
I understand you are a very busy individual, however any help would be most appreciated.

Best regards

Archangel

View attachment 4684View attachment 4683View attachment 4682View attachment 4681

log_ManualDeobfuscator.txt

log_NameSimplifier.txt

log_PacketClassesPatcher.txt

mainlog.txt

 

Attachments

Hi,

can't tell you much on the network-deob part as that's by DerPopo but as there are no errors I'd assume it's fine. For the ManualDeob it's fine too, those 64 "failures" are from classes that don't have those methods so it's actually fine. Didn't come around to filter those yet ;)

Regards,

Chris

 
Excellent thank you Alloc, looking to do something similar to leadingzero. Seems to be a lack of modders around here but the few that are present, are offering invaluable tools, advice and features to strengthen the game we all love to play.

Best Regards

Archangel

 
I keep seeing Rev. 199, on the site and its starting to get too me, That odd number just looks at me and makes me what too punch myself in the face. How about doing one more Rev to 200 make it an even number for me even if its just a new Rev with no changes even Rev. 2.0 would be better then seeing that 199... lol :p

 
2 Requests.

First, Noticed the llp command for listing Keystones will list everyone on the server, While in game your console window will only allow so much text displayed so it would be good to put a break after every 10 or 20 displayed then maybe have Admin type "next" in console to scroll through the next 10 or 20 Keystones. This way it does not spam all the keystone locations at one time and run most of them up and off the console window due to the text limit set in game console.

Second, Would like to see a new command added that a Admin can type in console like "event" after this is entered a message is displayed on chat box to all players stating if they would like to join the event then type "/join" in chat, As soon as they type "/join" it teleports the player that types the command to the Admin online with permission level of "0", This will help server admins that like to host events on their server to get the players where they need to be faster so the event can start. This request is just a idea and its up too you if you want to add it in the .dll or not.

 
I keep seeing Rev. 199, on the site and its starting to get too me...
Don't worry, there'll be an update soon™ ;)

First, Noticed the llp command for listing Keystones will list everyone on the server, While in game your console window will only allow so much text displayed so it would be good to put a break after every 10 or 20 displayed then maybe have Admin type "next" in console to scroll through the next 10 or 20 Keystones. This way it does not spam all the keystone locations at one time and run most of them up and off the console window due to the text limit set in game console.
Hm, even though paging sounds like a good idea in the current framework it would be annoying to implement. Isn't filtering the list (llp summary, llp <steamid> etc) not enough?

Second, Would like to see a new command added that a Admin can type in console like "event" after this is entered a message is displayed on chat box to all players stating if they would like to join the event then type "/join" in chat, As soon as they type "/join" it teleports the player that types the command to the Admin online with permission level of "0", This will help server admins that like to host events on their server to get the players where they need to be faster so the event can start. This request is just a idea and its up too you if you want to add it in the .dll or not.
I suppose until there is a real chat command implementation it doesn't help you much. Obviously it's a bit less work for the admin but on the other hand you can still send a message manually, have people reply (/join would work just fine ;) ) and use "tele <other> <your>" to get them to you. One command per player, shouldn't be thaaaat problematic ;)

 
Back
Top