NoRestarts Posted September 22, 2020 Share Posted September 22, 2020 (edited) I found a mod to pick which biomes a wormhole appears in world gen, but is there a way to setup that wormhole in biome 1 will be linked to wormhole in biome 2, and so on? Or are wormhole paths only generated on use? And if so, would it be possible to make a mod that setup the links before player use? I guess the questions are, where is wormhole link data saved, and can that be modified prior to first use? I'm running multiple main islands, and would like to ensure they are linked by wormholes. I see that there are mods to move wormholes, but that would be a lot of work, jumping through them all to see where they go, then moving where I want, every time I reset the server. Edited September 22, 2020 by NoRestarts Link to comment https://forums.kleientertainment.com/forums/topic/121920-pre-determined-wormholes/ Share on other sites More sharing options...
Serpens Posted September 23, 2020 Share Posted September 23, 2020 (edited) I already did this in my adventure mod for the "island hopping" world. It is difficult, but possible. You can link @ADM there if he does not know how to link themhttps://steamcommunity.com/sharedfiles/filedetails/?id=1847959350 in modworldgenmain, I add a wormhole setpiece to every task. I tell the code to add 12 and I do this 3 times (Wormhole_Mod,Wormhole_Mod2,Wormhole_Mod3) because it is not guranteed that they really spawn and one command to place 12 in total, still only add 1 per task. So I call it 3 times, to have at best 3 per task==per island, and hopefully if sth goes wrong, still 2 per island. Now that the wormholes are placed, I connect them within modmain and delete the ones we don't need. In addition I also move the wormholes a bit, so they are not too close to the water, because you might fall into water using them otherwise. (Instead of placing them in modworldgenmain via setpiece, it might also be possible to do this in modmain, but how to get the coordinates to know where to place them?!). Linking the wormholes is done in my modmain at 2 places, just search for " GetModConfigData("withocean")=="wormholes" ". First I go through every wormhole via AddPrefabPostInit("wormhole"...) and get the task/room the wormhole is placed in. Then I save 2 wormholes for nearly every island, one entrance and one exit wormhole. After I have all wormholes I need, all other wormholes are deleted. To make sure the PrefabPostInit of all wormholes are completed, I do world:DoTaskInTime(1,function()..) to finally do the link code in. This was the easiest and only way I found to place and connect custom wormholes. Alternativley one could check the game code that places wormholes and if it is possible to alter it somehow, but I found no solution there. Edited September 23, 2020 by Serpens 1 Link to comment https://forums.kleientertainment.com/forums/topic/121920-pre-determined-wormholes/#findComment-1373541 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