Argonwolf Posted May 7, 2019 Share Posted May 7, 2019 (edited) I've been reading about worldgen mods and how to make them, and mostly what I see is how to use the existing system to create branching chains of rooms that are then filled with random stuff. What I'd like to know is whether it's possible to just fill a 425x425 integer (or similar data type) array using your own algorithms, and then use that to generate the world before the first time it's loaded. I'm aware I could probably wait until the world is loaded, then have a script replace all the tiles in the world with the ones I want, then generate the necessary entities. However I would expect this to be much more taxing on the game engine than allowing it to be pre-generated (I could be wrong). Any information pertaining to this subject is much appreciated, even if it's just a link to another post, though I will say I already know that you can alter the existing world generator. That's not what I want, I want to generate my own map and write the code myself that lays tiles, places plants and mobs, generates setpieces (which I also intend to fully customize and semi-randomly create), wires up wormholes and cave entrances, and plants boss spawners in appropriate places. Edited May 7, 2019 by Argonwolf typo 1 Link to comment https://forums.kleientertainment.com/forums/topic/105770-how-much-can-you-customize-world-generation/ Share on other sites More sharing options...
CarlZalph Posted May 7, 2019 Share Posted May 7, 2019 It's a lot easier and less of a hair pull if you use the system already in place and generate your own map using Klei's map system. I've done what you're wanting to do before and it's a lot of hack workarounds because you're not only dealing with a lot of lua data that needs to be set, but there are several C-side functions that rely on some data being present else it'll explode. You may want to look into the creative mode mod as it does have two preset custom world generation settings. It uses the underlying system to do it cleanly. https://steamcommunity.com/sharedfiles/filedetails/?id=1416903676 Link to comment https://forums.kleientertainment.com/forums/topic/105770-how-much-can-you-customize-world-generation/#findComment-1190205 Share on other sites More sharing options...
Argonwolf Posted May 7, 2019 Author Share Posted May 7, 2019 Okay then, plan B. I have a few more questions. Is it possible to generate setpieces/static layouts randomly during the worldgen process? That way they can sort of be a part of the randomization of the worldgen. And also relevant: Is it possible make a setpiece/static layout the size of the entire map, or very nearly? Basically I'm wondering if I can abuse the setpiece system to just have a single room full of water that places a single, randomly generated (at runtime) setpiece or static layout the size of the whole map, in order to circumvent the normal world generation and use my own generator algorithms. Link to comment https://forums.kleientertainment.com/forums/topic/105770-how-much-can-you-customize-world-generation/#findComment-1190473 Share on other sites More sharing options...
Argonwolf Posted May 9, 2019 Author Share Posted May 9, 2019 Does anyone know the answer to the above question? Sorry if I bumped too soon, I'd just like to know before I really dive deep into modding if my plans are doomed to fail from the start. People who've done it before can help me find that out. Link to comment https://forums.kleientertainment.com/forums/topic/105770-how-much-can-you-customize-world-generation/#findComment-1191444 Share on other sites More sharing options...
Argonwolf Posted May 11, 2019 Author Share Posted May 11, 2019 Bump Link to comment https://forums.kleientertainment.com/forums/topic/105770-how-much-can-you-customize-world-generation/#findComment-1192343 Share on other sites More sharing options...
Argonwolf Posted May 12, 2019 Author Share Posted May 12, 2019 So... can somebody please show me to a resource explaining how to manually set tiles instead of letting the map generate them? I want this to happen during worldgen so that I don't have to very slowly generate them after the initial worldgen, and I also need to know how to connect cave entrances to exits. Link to comment https://forums.kleientertainment.com/forums/topic/105770-how-much-can-you-customize-world-generation/#findComment-1193025 Share on other sites More sharing options...
Argonwolf Posted May 14, 2019 Author Share Posted May 14, 2019 Okay maybe you can just tell me how to manually add tiles during worldgen instead of after? Link to comment https://forums.kleientertainment.com/forums/topic/105770-how-much-can-you-customize-world-generation/#findComment-1193889 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