Alloc Posted February 4, 2015 Author Share Posted February 4, 2015 This might help as a point to get started: https://7dtd.illy.bz/wiki/Hooks Also I think there were some people in the thread for the management scripts who said they implemented some stuff with the chat hook, maybe you should ask over there Link to comment Share on other sites More sharing options...
Quicksilver Posted February 4, 2015 Share Posted February 4, 2015 Maybe this is a stupid question but are your fixes ever going to be rolled into the standard release of the dedicated server and if so when would this occur? if it is going to be soon I can stop hounding our server owner to get these installed. :-) Link to comment Share on other sites More sharing options...
Alloc Posted February 5, 2015 Author Share Posted February 5, 2015 A lot of it, yes. Not necessarily all of it though. Only time can tell though. Link to comment Share on other sites More sharing options...
pitufocabeza Posted February 7, 2015 Share Posted February 7, 2015 Hey Folks, it's me again I played a bit with the hooks and somehow I came to the idea that I could use the "serverPostStart" hook to make my server print out messages via the telnetCommand "say" every 600s. I have to admit that I'm pretty new to that linux server thing and I know it isn't the best prereq, but I'm eager to learn how this stuff works so maybe someone can take a look into it and give me a hint into the right direction. So let's get down to business! Since I want that the server sends the messages over and over again I thought I could do a while loop with true as condition. Here's myscript: #!/bin/bash . /usr/local/lib/7dtd/common.sh while true do telnetCommand $1 "say Use bandanas to mark your faction." sleep 600 telnetCommand $1 "say A brown bandana represents the Nomads." sleep 600 telnetCommand $1 "say A red bandana represents the Vagabonds." sleep 600 telnetCommand $1 "say A green bandana represents the Colonists." sleep 600 telnetCommand $1 "say A black bandana represents the Outlaws." sleep 600 telnetCommand $1 "say A white bandana represents the Altruists." sleep 600 telnetCommand $1 "say You may only attack others inside the wasteland biome." sleep 600 telnetCommand $1 "say You may defend your claim by any means if necessary." sleep 600 telnetCommand $1 "say You may use the unlocked shelters all over the world as hideout during the night." sleep 600 done It works fine so far, the problem is just that the shell goes to sleep too after I started the server. As I said I'm really new to this shell script stuff, I know a little about programming but I'm far from being professional nor I want to be professional, I have other fields of study and it's just for fun. Anyways, hope someone have a bright idea! Kind Regards pitufocabeza Link to comment Share on other sites More sharing options...
seb2015 Posted February 8, 2015 Share Posted February 8, 2015 Very nice Thank you. Link to comment Share on other sites More sharing options...
Alloc Posted February 8, 2015 Author Share Posted February 8, 2015 Hi, Since I want that the server sends the messages over and over again I thought I could do a while loop with true as condition. Here's myscript: ... It works fine so far, the problem is just that the shell goes to sleep too after I started the server. As I said I'm really new to this shell script stuff, I know a little about programming but I'm far from being professional nor I want to be professional, I have other fields of study and it's just for fun. first of all: wrong thread The correct one is over here: http://7daystodie.com/forums/showthread.php?11184-Native-Linux-server-(with-management-scripts) On the topic of the hook: Hooks aren't meant to run infinitely but just do some action and close. If you want stuff to be done all the time I'd probably go with a cron job to run your script on a given interval. Of course in that case you'll have to pass in the server instance name manually (either as parameter to your script when cron executes it or by hard coding it into the script). Regards, Chris Link to comment Share on other sites More sharing options...
StephanieRct Posted February 9, 2015 Share Posted February 9, 2015 Hi Alloc & everyone. So I've added quite a lot more various server command to your fixes, the classes are attached to this post. If you'd like to add them to your build, feel free! Here's the list of new command, they should be self-explanatory but they all generate help when called without parameters AddBuffIn.cs AddBuffOn.cs AddLootAt.cs CountEnemyEntityIn.cs CountEntityIn.cs GetBlockAt.cs GetDensityAt.cs GetLootAt.cs KillEnemyEntityIn.cs ListBuffIn.cs ListBuffOn.cs ListEnemyEntityIn.cs ListEntityIn.cs RemoveBuffIn.cs RemoveBuffOn.cs RetrieveLootAt.cs SetBlockAt.cs SetBlockIn.cs SetDensityAt.cs SetPropOn.cs SpawnEntityAt.cs SpawnHordAt.cs UnlockAt.cs All commands that finish with "in" takes a shape as parameter, so it's possible to do "batch" command. Or for instance, building shapes in blocks, killing enemies that are within/outside a distance of any players, etc. Here's the shapes available as of now: ShapeAll.cs ShapeBox.cs ShapeEntityProx.cs ShapePlayersProx.cs ShapeSphere.cs Have fun! binary-improvements-nie.zip Link to comment Share on other sites More sharing options...
alanine Posted February 18, 2015 Share Posted February 18, 2015 Hello, First off, a big thanks for your work! In your list entities command, a dropped item will appear - with it's co-ordinates - but no actual information on what item it is, or how many. This information could be used for a variety of purposes -- most valuable of which that I can see, is player trading; without the use of modded game-files. There are several really cool functions that I could use this information for, within my server manager; should it ever become available. Link to comment Share on other sites More sharing options...
Alloc Posted February 18, 2015 Author Share Posted February 18, 2015 It's not "my command" actually, le is one of the base commands. Link to comment Share on other sites More sharing options...
eNkrypt Posted February 23, 2015 Share Posted February 23, 2015 (edited) Hey guys, sorry if I don't make sense - I just started playing 7dtd yesterday am hosted a dedicated server. Was wondering if this "server fix" works with the latest alpha version, and if so - will it overwrite my map? Thanks again Trying to get the ability for users to sethomes and such. I am running the 7dtd server on CentOS 7 - I am not sure how to get this to work with my dedicated server as the install instructions reference .exe files. Any help would be great! Edited February 23, 2015 by eNkrypt (see edit history) Link to comment Share on other sites More sharing options...
SylenThunder Posted February 23, 2015 Share Posted February 23, 2015 Hey guys, sorry if I don't make sense - I just started playing 7dtd yesterday am hosted a dedicated server. Was wondering if this "server fix" works with the latest alpha version, and if so - will it overwrite my map? Thanks again Trying to get the ability for users to sethomes and such. I am running the 7dtd server on CentOS 7 - I am not sure how to get this to work with my dedicated server as the install instructions reference .exe files. Any help would be great! Yes it works, no it doesn't change your map. You may want to run the mapping script with no one on the server if you plan to use that feature though. Link to comment Share on other sites More sharing options...
StephanieRct Posted February 24, 2015 Share Posted February 24, 2015 Hello, First off, a big thanks for your work! In your list entities command, a dropped item will appear - with it's co-ordinates - but no actual information on what item it is, or how many. This information could be used for a variety of purposes -- most valuable of which that I can see, is player trading; without the use of modded game-files. There are several really cool functions that I could use this information for, within my server manager; should it ever become available. You can achieve player trading using the GetLootAt / RetrieveLootAt / AddLootAt commands Link to comment Share on other sites More sharing options...
Koolio Posted February 24, 2015 Share Posted February 24, 2015 Hi Alloc & everyone. So I've added quite a lot more various server command to your fixes, the classes are attached to this post. If you'd like to add them to your build, feel free! Here's the list of new command, they should be self-explanatory but they all generate help when called without parameters AddBuffIn.cs AddBuffOn.cs AddLootAt.cs CountEnemyEntityIn.cs CountEntityIn.cs GetBlockAt.cs GetDensityAt.cs GetLootAt.cs KillEnemyEntityIn.cs ListBuffIn.cs ListBuffOn.cs ListEnemyEntityIn.cs ListEntityIn.cs RemoveBuffIn.cs RemoveBuffOn.cs RetrieveLootAt.cs SetBlockAt.cs SetBlockIn.cs SetDensityAt.cs SetPropOn.cs SpawnEntityAt.cs SpawnHordAt.cs UnlockAt.cs All commands that finish with "in" takes a shape as parameter, so it's possible to do "batch" command. Or for instance, building shapes in blocks, killing enemies that are within/outside a distance of any players, etc. Here's the shapes available as of now: ShapeAll.cs ShapeBox.cs ShapeEntityProx.cs ShapePlayersProx.cs ShapeSphere.cs Have fun! posted 2weeks ago.. missed that ..looks like some nice utility stuff You can achieve player trading using the GetLootAt / RetrieveLootAt / AddLootAt commands not checked it yet.. is this to be used on static containers like chests? or can it be directly to and from a player at there xyz position aswel? Link to comment Share on other sites More sharing options...
StephanieRct Posted February 24, 2015 Share Posted February 24, 2015 not checked it yet.. is this to be used on static containers like chests? or can it be directly to and from a player at there xyz position aswel? It's for containers in the world. i.e chest, safe, crate, etc. Link to comment Share on other sites More sharing options...
StephanieRct Posted February 25, 2015 Share Posted February 25, 2015 (edited) *Edit* oops I posted in the wrong thread *blush* but hey, still valid imagine if we could add any color blocks, we could build things like this (minecraft) but in 7 days to die http://map.greenfieldmc.com/?worldname=world&mapname=surface&zoom=5&x=-773&y=64&z=-359 Edited February 25, 2015 by StephanieRct (see edit history) Link to comment Share on other sites More sharing options...
Soylent Posted March 1, 2015 Share Posted March 1, 2015 Alloc, I'm not sure if this has already been posted about, but there are so many posts about your mod that I can't find anything. Our server map has grown enormous. Opening the webpage and zooming in/out causes noticeable lag and CPU spikes on the server, affecting gameplay. What can I do to optimize the webserver map? Link to comment Share on other sites More sharing options...
LT. Posted March 1, 2015 Share Posted March 1, 2015 Hi Alloc & everyone. So I've added quite a lot more various server command to your fixes, the classes are attached to this post. If you'd like to add them to your build, feel free! Here's the list of new command, they should be self-explanatory but they all generate help when called without parameters AddBuffIn.cs AddBuffOn.cs AddLootAt.cs CountEnemyEntityIn.cs CountEntityIn.cs GetBlockAt.cs GetDensityAt.cs GetLootAt.cs KillEnemyEntityIn.cs ListBuffIn.cs ListBuffOn.cs ListEnemyEntityIn.cs ListEntityIn.cs RemoveBuffIn.cs RemoveBuffOn.cs RetrieveLootAt.cs SetBlockAt.cs SetBlockIn.cs SetDensityAt.cs SetPropOn.cs SpawnEntityAt.cs SpawnHordAt.cs UnlockAt.cs All commands that finish with "in" takes a shape as parameter, so it's possible to do "batch" command. Or for instance, building shapes in blocks, killing enemies that are within/outside a distance of any players, etc. Here's the shapes available as of now: ShapeAll.cs ShapeBox.cs ShapeEntityProx.cs ShapePlayersProx.cs ShapeSphere.cs Have fun! This is great work. I can see a lot of uses for these commands already. Especially buffs via server commands. It also seems it would be possible to do some interesting anti-cheating stuff that I won't go into detail here. Oh and proper selling of items looks to be possible with these commands, so a resource trade system could become quite advanced with these commands. Will this be updated in parallel with allocs fixes? Or is alloc planning to incorporate this functionality at some point? Link to comment Share on other sites More sharing options...
Alloc Posted March 2, 2015 Author Share Posted March 2, 2015 Hi Alloc & everyone. So I've added quite a lot more various server command to your fixes, the classes are attached to this post. If you'd like to add them to your build, feel free! ... Wow, quite a bunch of nice additions Currently not planning to integrate it, I'm hoping to get the console rework done soon that should hopefully also allow adding such additions more easily. Then we don't have to put everything into a single DLL anymore Our server map has grown enormous. Opening the webpage and zooming in/out causes noticeable lag and CPU spikes on the server, affecting gameplay. What can I do to optimize the webserver map? Feared this would happen at some point Especially when zooming the browser requests a *lot* of tile files. You could reduce the number of files by changing the tilesize to 256 though that would require to reset the map (and optionally completely rerender it afterwards). Can't tell you how much of an improvement this would be but as doubling the tilesize basically divides the number of requests by 4 it could help. If you want to do that shutdown the server, go to the map-folder of the savegame, open the mapinfo.json, replace the 128 for blocksize with 256 (theoretically 512 should work too, wouldn't recommend it though as it will trade file count against performance for the actual rendering code), delete all the subfolders, start the server again. Link to comment Share on other sites More sharing options...
John Black Posted March 3, 2015 Share Posted March 3, 2015 Feared this would happen at some point Especially when zooming the browser requests a *lot* of tile files. Maybe some smart person can make the webserver throttle map file access? Link to comment Share on other sites More sharing options...
LT. Posted March 3, 2015 Share Posted March 3, 2015 Maybe some smart person can make the webserver throttle map file access? One of my players ran the tiles through an optimisation tool and managed to halve all the file sizes, might be an option. Link to comment Share on other sites More sharing options...
StephanieRct Posted March 3, 2015 Share Posted March 3, 2015 Hey me again! I've added an isometric map renderer, check this out! http://www.theroad7dtd.com/plotworld I still have a couple if small issues to fix but I couldn't wait to share this :3 1 Link to comment Share on other sites More sharing options...
LT. Posted March 3, 2015 Share Posted March 3, 2015 Hey me again! I've added an isometric map renderer, check this out! http://www.theroad7dtd.com/plotworld [ATTACH=CONFIG]7201[/ATTACH] I still have a couple if small issues to fix but I couldn't wait to share this :3 Wow that is awesome. Link to comment Share on other sites More sharing options...
OzzFreak Posted March 3, 2015 Share Posted March 3, 2015 Hey me again! I've added an isometric map renderer, check this out! http://www.theroad7dtd.com/plotworld [ATTACH=CONFIG]7201[/ATTACH] I still have a couple if small issues to fix but I couldn't wait to share this :3 that is groovy Link to comment Share on other sites More sharing options...
Alloc Posted March 3, 2015 Author Share Posted March 3, 2015 Maybe some smart person can make the webserver throttle map file access? Could help a bit but the major problem is probably the amount of requests, not the individual file size. Hey me again! I've added an isometric map renderer, check this out! http://www.theroad7dtd.com/plotworld Wondering ... you don't use the game's rendering capabilities, do you? Looks like you added kind of an own renderer based on the blocks? Link to comment Share on other sites More sharing options...
StephanieRct Posted March 3, 2015 Share Posted March 3, 2015 yeah I've coded my own voxel raycast, the one in the game use Unity's physics raycast on the terrain generated mesh. That wouldn't work since it won't hit chunks that are not loaded. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now