Jump to content

Wormholes going to the center and possible way to remove them


Devious

Recommended Posts

After wiping our server yesterday after the second patch in which this game-breaking bug was supposed to be fixed we found yet again a wormhole going to the center.

 

I had a chat with Koonschi and it became clear that he is too busy himself and doesn't care about a hotfix untill next patch.

 

To fix this both wormholes would need to be set to one way before they can be removed in the sector file.

I tried running /run WormHole(index).oneWay = true on his suggestion but this doesn't work because it tries to index a nil value.

Any help with this would be greatly valued, I have no coding experience myself so it's reaching in the dark for me.

 

It probably has got to do with the index not matching the wormhole, is there a way to read all the indexes of a sector to see what the index of the wormhole is?

I tried deleting everything in the sector through the entitydbg and using 1 as index, resulted in the same error.

 

Edit: It appears the wormhole only spawned because the server wasn't validated after the update, Koonschi tried to replicate it but didn't find a wormhole at that location.

Link to comment
Share on other sites

My guess would be that wormhole entrances/exits are sector-level objects and the workhole itself is a galactic entity.  In theory there might be a collection containing all the wormholes in the galaxy that one could iterate through to discover any with exit/entrance coords that match up with a central-galactic range.  I'm just fishing out ideas here though.

 

You might look at the mod which allows players/admins to add their own wormholes to see if you can reverse engineer that.  If an admin is adding wormholes, then surely it's registering them with some collection somewhere.

 

I do remember that wormholes are generated at the sector level, which might mean one would have to iterate through all of the sector data looking for wormholes and then, hopefuly, that entry would contain the data for it's matching wormhole in the target sector.

 

Bleh... now I'm curious and have to go digging though the code.

Link to comment
Share on other sites

You are correct, the wormhole data is saved on sector level.

Each sectorfile with wormhole data has got a second version with v behind the coordinates.

 

This file lists if there is any wormhole and also the coordinates to where it is going.

 

I luckily managed to remove wormholes with some help by running a script that sets the linked wormhole to a one-way wh.

To delete them both at the same time it would need to happen in the same frame Koonschi said, otherwise they will spawn again because of that they are linked.

 

Thanks to Toriath, I was able to unlink the wormholes by going to the linked sectors and running the command:

WormHole(Sector():getEntitiesByType(9).index).oneWay = true

.

After that I was able to delete the wormholes while the sector was loaded with the entitydbg script but it should also be possible to remove the wormhole from the sector files when the sector is unloaded.

 

Any way to prevent them from spawning again would be greatly appreciated since Koonschi is very busy with other things :)

 

 

Link to comment
Share on other sites

As I seen the wormhole generation is random, and it have been decided is the sector contains one or not when you entering into it. If you open the sectorgenerator.lua in the game library, and scrolling down to the very end there is 3 or 4 different kind of wormholes. One of them have the criteria to never point to the center. I don't remember I seen the same for the others.

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...