Lonestarcanuck Posted March 6, 2018 Share Posted March 6, 2018 in Rust we had a mod that allows admins to setup: - Automatic closing of all doors after XX seconds (3, 5, 15, 30, etc.) - close all doors at fixed time like start of night. is it possible to do this with 7DTD? the scenario I would like: -- Close Player doors after XX seconds -- Close Trader doors after XX seconds -- close all doors at 2158 - right before night or what every time I specify Link to comment Share on other sites More sharing options...
Guppycur Posted March 6, 2018 Share Posted March 6, 2018 Yes, using SDX to add the new asset (the door with an animation, or the code that closes it). - - - Updated - - - Yes, using SDX to add the new asset (the door with an animation, or the code that closes it). ooh, ooh... you could also have doors degrade onto themselves every 30 seconds, which would replace the open door with a closed door, but 1) Performance suckage, and 2) No control when that timer hits, so if a player opens the door and goes through at second 29, it'll change on them. Link to comment Share on other sites More sharing options...
Lonestarcanuck Posted March 6, 2018 Author Share Posted March 6, 2018 Yes, using SDX to add the new asset (the door with an animation, or the code that closes it). - - - Updated - - - Yes, using SDX to add the new asset (the door with an animation, or the code that closes it). ooh, ooh... you could also have doors degrade onto themselves every 30 seconds, which would replace the open door with a closed door, but 1) Performance suckage, and 2) No control when that timer hits, so if a player opens the door and goes through at second 29, it'll change on them. [/quote LOL that would be funny - I like code idea. I assume every door is enumerated and has properties that can be set. there was little to no performance hit on RUST but that is a diff engine. Link to comment Share on other sites More sharing options...
StompyNZ Posted March 6, 2018 Share Posted March 6, 2018 Door open/close state is a meta setting. In my mod block and blockrpc can set the meta directly, so you can use that and just have your server manager of choice call the command at the set times etc. blockrpc scan x y z would tell you the current state of the door at x y z blockrpc meta1 x y z /meta=0 blockrpc meta1 x y z /meta=2 those would toggle the open close state tile unlock x y z tile lock x y z These would lock and unlock the door Link to comment Share on other sites More sharing options...
Guppycur Posted March 7, 2018 Share Posted March 7, 2018 Oooh. That would be a nice feature. ...how do you update a table whenever a door is placed, so that BCM can read the table and keep 30 second timers on each door? Or is that cost prohibitive? Maybe just make it so that the timer starts only in active chunks? Link to comment Share on other sites More sharing options...
StompyNZ Posted March 7, 2018 Share Posted March 7, 2018 You can set a delegate on the OnBlockChanged and scan for doors in the newblockvalue (it's how MBM works) and have it record the door into a list for the world. Or, just use tile to scan for doors near a player at the time you want to do the changes if you dont know where the doors are tile scan 90 90 /r=13 /type=SecureDoor /forceSync That will scan the chunks around cx 90 cz 90 in a radius of 13 chunks Result on the medi prefab server: Setting radius to +13 Processing Command synchronously... Loading 729 chunks took 0 seconds Chunks 77 77 to 103 103 {"Count":104,"Tiles":{"SecureDoor":[{"Owner":"76561198067088370","Users":[],"HasPassword":false,"IsLocked":true,"Type":"SecureDoor","Pos":{"x":1243,"y":26,"z":1450}},{"Owner":"76561198067088370","Users":[],"HasPassword":false,"IsLocked":true,"Type":"SecureDoor","Pos":{"x":1236,"y":52,"z":1447}}, etc (13 chunks is max view distance for players) tile command will load chunks as needed too the async version (leave /forcesync off) will log the results if using browser, or send the notice to telnet session if using telnet Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.