Jump to content

(REQ) Clear all Wrackages on the Galaxy ?


Tarantel

Recommended Posts

Hey dudes ^^

 

Have someone a script to Clear the complete Galaxy from the Wrackages on Server Restart or something ?

 

This would be possible and not possible in some ways.

 

Server stats of mine:

23 players online, in 21 sectors

413 players registered

997 factions registered

65 sectors in memory, 18995 sectors in total

 

 

You imagine trying to load 19,000 sectors and clear their wreckage.

 

I guess you could do it when a player leaves but the whole point of wreckage is to salvage and have it float around. There is entire systems with 1000's of ships and the fps/performance is great.

Link to comment
Share on other sites

He's not asking what the point of wreckage is, or why it's there, or about its performance, or caring about your server stats. He's asking how it can be done to remove it.

 

I personally don't know, because I haven't really tried modding any scripts. Just studying them -- I would think that due to the way wrecks are handled, it's probably very easily done. Wrecks are, if I am remembering right, treated as an entity anyway. You could write a script that finds all of these entities in a given sector and remove them from play. Attac hthe script to the player entity, or something, and you could set it up so that the player can run a command like /clean or something -- hell maybe even have it run the function when a player warps to a new sector, or loads into another one.

Link to comment
Share on other sites

He's not asking what the point of wreckage is, or why it's there, or about its performance, or caring about your server stats. He's asking how it can be done to remove it.

 

I personally don't know, because I haven't really tried modding any scripts. Just studying them -- I would think that due to the way wrecks are handled, it's probably very easily done. Wrecks are, if I am remembering right, treated as an entity anyway. You could write a script that finds all of these entities in a given sector and remove them from play. Attac hthe script to the player entity, or something, and you could set it up so that the player can run a command like /clean or something -- hell maybe even have it run the function when a player warps to a new sector, or loads into another one.

 

Thanks for speaking for him and not understanding. I was trying point out he stated "Clear the complete Galaxy from the Wrackages on Server Restart"

 

A person could easily explore 100's of systems in 1 sitting. Would you like to weigh in the performance issues let alone the technical issues of having to load 100's and 100's of systems?

Link to comment
Share on other sites

Seeing as a system doesn't even exist until you visit it and it's generated, clearing the "Entire galaxy" is literally clearing the currently loaded sectors. Which, as they're already loaded, running a script that iterates through each one to clear the wrecks across the server isn't going to do much at all -- seeing as the server will already be keeping those sectors in memory. As long as you don't do something stupid, like try to clean all the sectors in one single process and instead iterate through them, say one every 250 microseconds, it'll not even be noticeable on performance.

Link to comment
Share on other sites

Seeing as a system doesn't even exist until you visit it and it's generated, clearing the "Entire galaxy" is literally clearing the currently loaded sectors. Which, as they're already loaded, running a script that iterates through each one to clear the wrecks across the server isn't going to do much at all -- seeing as the server will already be keeping those sectors in memory. As long as you don't do something stupid, like try to clean all the sectors in one single process and instead iterate through them, say one every 250 microseconds, it'll not even be noticeable on performance.

 

I might be wrong but scripts don't have the power to shutdown a system and default is 300 seconds though can be changed via a config. The idea is just silly. Better off doing a clean script when someone enters the system or leaves the system.

 

My point was the idea of doing the entire galaxy seem a bit off.

Link to comment
Share on other sites

Seeing as a system doesn't even exist until you visit it and it's generated, clearing the "Entire galaxy" is literally clearing the currently loaded sectors. Which, as they're already loaded, running a script that iterates through each one to clear the wrecks across the server isn't going to do much at all -- seeing as the server will already be keeping those sectors in memory. As long as you don't do something stupid, like try to clean all the sectors in one single process and instead iterate through them, say one every 250 microseconds, it'll not even be noticeable on performance.

 

From my understanding, sectors are not constantly loaded, they unload after around...what was it 5 minutes? after all players leave the sector. So the chances of all the sectors that have been visited by players being already loaded isn't very high. Most likely you will have a small number of sectors loaded over the total number of sectors visited. The other issue is he wants to do this on a restart, that is when the fewest number of sectors is loaded.

 

The better option would be attaching something to the sector loading operation to 'trim' the number of wrecks when someone jumps into the sector...although that may screw up scrapyards O_O

 

EDIT: lol Kane beat me

Link to comment
Share on other sites

Its easy enough.

 

Just clear the sector, when all players are gone.

So noone expieriencing the cleanup and you'll be fine.

I would recommend to make a cooldown, so if the player comes back, he still can farm the wrecks if the likes to. ( 160 seconds )

 

I will try to make such a script.

Link to comment
Share on other sites

 

Server stats of mine:

23 players online, in 21 sectors

413 players registered

997 factions registered

65 sectors in memory, 18995 sectors in total

 

 

Damn, what are your hardware specs? Just playing with a couple buddies right now and my 3600k is being maxed out in fights, I don't think I could handle more than 3-4 people total.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...