Nakano15
Terrarian
Damn, that's exactly what I was looking for. I'll try doing some more experiments with It later.
Damn, that's exactly what I was looking for. I'll try doing some more experiments with It later.
Its a derived class inheriting from Subworld. You create one by inheriting from it in normal C# fashionApologies for my lack of understanding, but I can't even begin to grasp what's being said here.
What's a subclass? Where do I find or create a subclass? What does SubworldName.<subworld class name> mean?
I'm not very technical minded so all of this soars way past my understanding, and while I see valiant attempts to document and describe the mod here, I think it needs to be clarified and dumbed down so the less technical minded like us have a chance at using this mod
If someone has the time, making a video covering this and how to set up a Subworld would help tremendously! I'm more of a visual learner so watching someone go step by step would make the process a breeze
Where do I define or specify or create the Subworlds? In which file or folder?Its a derived class inheriting from Subworld. You create one by inheriting from it in normal C# fashion
Then its specified that the localization key is SubworldName.<subworld class name>, so a hell subworld; Hell.HellSubworld, its most likely automatic.
I'm running a medium sized public server and this would be an amazing mod! Being able to run multiple server instances on different ports and switch between them seamlessly in game is a dream. Would allow servers to make use of more of its cores.Have you thought about switching the IL for spooled TCP instances to handle seamless client travel?
Seems like a nice mod for 1 or 2 players but for a grander application it'd be more ideal to have map servers (MMO architecture) and persistency is saved per map instance, say you have a server of like 6 people - this number is somewhat possible with friends so switching worlds might be an agreed vote but for some randoms in a public server people may decline the vote somewhat ruining the experience for the other people, so 3/6 can travel to 7778 for example and the rest can stay on 7777, or even more they might even go to like 7780 for a different world.
For the enemy spawns, i've attempted every combination possible to disable the spawn pool and enable a custom, but still can't figure it out. Any pointers?Damn, I loved this library. I made this mod create a Tungsten Brick world, and managed to enter and leave It without problems.
I'll try seeing if I can play more with this. Thanks John for such an amazing mod.
Edit:. Oh yeah, It will be a good idea to allow modifying the spawns from the subworld, directly from their class.
That way people can even set custom npc spawns inside the world file, instead of specifying if the subworld is active on the GlobalNpc script, before changing the spawns.
Edit2:. And I found a little bug after entering and leaving the world several times, where my character returned to the original world, falling from the upper left part of the world
Custom ModWorld comes to mind. Or create some kind of hook on your mod's modworld to change the custom spawns based on whatever the subworld you are.For the enemy spawns, i've attempted every combination possible to disable the spawn pool and enable a custom, but still can't figure it out. Any pointers?
Can't simply clear the list before adding the custom monsters?I would suggest how I did it, but mine involves a delegate field that allowed easy random npc customization so... Not a good example.
You need to use EditSpawnPool and set EVERY npc's (loop through all existing npc types, I like to use an array that will be resized to match this count, like Main.NPCTexture.length) spawn chance to 0, then set the NPCs you want to spawn.
you do, by running a forloop with EVERY npc type. Yeah this part of TML (and Terraria) is pretty gross in how it works if you want to override the entire spawn pool.Can't simply clear the list before adding the custom monsters?
that works.Or, could use pool.Clear();
I used It on my leveling mod's graveyard biome, It actually works.
View attachment 328490
I actually don't play tModLoader with mods that adds new npcs and stuffs, so I didn't noticed that problem yet of monsters falling from the sky, but the tModLoader devs could have at least added a flag to check if there's ground under the monster. Beside the modders could check themselves if there's floor under the spawn tile (If the spawn tile isn't actually the solid tile).
Beside, I found this variable here on NPCSpawnInfo: "spawnTileType", I have no idea what is It for, though. Maybe It tells if the tile is solid or not?
Several people assume this is a "use as is" mod, remember most of Terraria's playerbase are childrenThis is a library, do you even know programming?
Wall of text! Skipping!I'm sorry but this doesn't really make sense what actually is this mod? How do you use it? Are you saying I can create a world, then while I'm playing I can open up a portal to another world and play inside that one without having to actually create multiple worlds in the menu? I don't understand what you mean by " Loading a subworld is as simple as calling 'SLWorld.EnterSubworld'. ". What do you mean calling? Like calling it like a number? Obviously you can't do that so idk what that's supposed to mean. These two don't make sense to me either: "Each subworld can have a custom loading UI if its class overrides 'loadingUIState'. " . And: "Any class that derives from the Subworld class is automatically registered as a subworld". What do you mean class? Class of what? How can a class meaning a category or type of something override a code? Sorry man idk what's going on it's just really kind of a vague explanation of what the mod is and what you're actually making, and how and where to do it. I'm sure it's a good mod I'm not trying to be ungrateful for this free content here but I just would like to know what it is so I can actually enjoy your mod, thanks.
It's a lib mod dude, it doesn't do anything on its own. Other mods make use of it to add subworlds. Think of it like the Nether and End in Minecraft, seperate "dimensions" that are part of the same world.I'm sorry but this doesn't really make sense what actually is this mod? How do you use it? Are you saying I can create a world, then while I'm playing I can open up a portal to another world and play inside that one without having to actually create multiple worlds in the menu? I don't understand what you mean by " Loading a subworld is as simple as calling 'SLWorld.EnterSubworld'. ". What do you mean calling? Like calling it like a number? Obviously you can't do that so idk what that's supposed to mean. These two don't make sense to me either: "Each subworld can have a custom loading UI if its class overrides 'loadingUIState'. " . And: "Any class that derives from the Subworld class is automatically registered as a subworld". What do you mean class? Class of what? How can a class meaning a category or type of something override a code? Sorry man idk what's going on it's just really kind of a vague explanation of what the mod is and what you're actually making, and how and where to do it. I'm sure it's a good mod I'm not trying to be ungrateful for this free content here but I just would like to know what it is so I can actually enjoy your mod, thanks.
Honestly surprising how it's still "few are", and mostly mods "will" use it.It's a lib mod dude, it doesn't do anything on its own. Other mods make use of it to add subworlds. Think of it like the Nether and End in Minecraft, seperate "dimensions" that are part of the same world.
Mod of Redemption, SoA, Polarities and a few other mods will/are using this mod, maybe check them out? (but not SoA it sucks until we fix everything)