Fidooop Posted March 9, 2014 Share Posted March 9, 2014 Hello, as most of you know I am making an awesome jungle biome mod!!! though I have a problem...I need to be able to make 1 of an item spawn inside the huge biome! but it just gets multiplied! GLOBAL.require("map/tasks")GLOBAL.require("constants")AddRoom("jungle", {colour={r=0.3,g=0.2,b=0.1,a=0.3},value = GLOBAL.GROUND.SINKHOLE, contents = {countprefabs= {wasphive = 1,spiderden = 1,pond = 1,}}}) local task = GLOBAL.tasks.GetTaskByName("Forest hunters", GLOBAL.tasks.sampletasks)task.room_choices["jungle"] = 15current "room" code my problem is that these things will be multiplied by 15!!! and yes I've tried decimals and fractions... it just makes nothing at all spawn.... so if anyone knows how I can get a single thing to spawn in the large area please let me know! thankyou so much for your help!!! Link to comment https://forums.kleientertainment.com/forums/topic/32558-making-a-single-prefab-spawn-in-a-very-large-area-need-help/ Share on other sites More sharing options...
KidneyBeanBoy Posted March 9, 2014 Share Posted March 9, 2014 (edited) I'm not that good when it comes to this, but try putting 1 in the place of 15 at the end. Edited March 9, 2014 by KidneyBeanBoy Link to comment https://forums.kleientertainment.com/forums/topic/32558-making-a-single-prefab-spawn-in-a-very-large-area-need-help/#findComment-427807 Share on other sites More sharing options...
Fidooop Posted March 9, 2014 Author Share Posted March 9, 2014 I'm not that good when it comes to this, but try putting 1 in the place of 15 at the end.that'll make the biome SUPER small....... Link to comment https://forums.kleientertainment.com/forums/topic/32558-making-a-single-prefab-spawn-in-a-very-large-area-need-help/#findComment-427841 Share on other sites More sharing options...
KidneyBeanBoy Posted March 9, 2014 Share Posted March 9, 2014 that'll make the biome SUPER small.......Herm. My only guess is that the spawn rate is across segments of the "room", or that the room is treated as a segment of the in-game biome. Is it possible to make a 1/15 chance for something to spawn?(Wow, this is confusing.) Link to comment https://forums.kleientertainment.com/forums/topic/32558-making-a-single-prefab-spawn-in-a-very-large-area-need-help/#findComment-427852 Share on other sites More sharing options...
Fidooop Posted March 9, 2014 Author Share Posted March 9, 2014 Herm. My only guess is that the spawn rate is across segments of the "room", or that the room is treated as a segment of the in-game biome. Is it possible to make a 1/15 chance for something to spawn?(Wow, this is confusing.)"and yes I've tried decimals and fractions..." so yeah I still don't know what to do... Link to comment https://forums.kleientertainment.com/forums/topic/32558-making-a-single-prefab-spawn-in-a-very-large-area-need-help/#findComment-427862 Share on other sites More sharing options...
JackSlender Posted March 10, 2014 Share Posted March 10, 2014 (edited) I would suggest creating a custom setpiece to hold the object you want one of, and setting the amount of that setpiece that can spawn in your biome. That should work, but if it doesn't feel free to tell me and I'll try to help more. Edited March 10, 2014 by JackSlender Link to comment https://forums.kleientertainment.com/forums/topic/32558-making-a-single-prefab-spawn-in-a-very-large-area-need-help/#findComment-427971 Share on other sites More sharing options...
Fidooop Posted March 10, 2014 Author Share Posted March 10, 2014 (edited) I would suggest creating a custom setpiece to hold the object you want one of, and setting the amount of that setpiece that can spawn in your biome. That should work, but if it doesn't feel free to tell me and I'll try to help more.I wouldn't know how to do that...if you wanna help I would love you Edited March 10, 2014 by Fidooop Link to comment https://forums.kleientertainment.com/forums/topic/32558-making-a-single-prefab-spawn-in-a-very-large-area-need-help/#findComment-427972 Share on other sites More sharing options...
JackSlender Posted March 10, 2014 Share Posted March 10, 2014 Sure, I'll be glad to help. I'm actually going to post a tutorial on it as soon as I have the chance. Link to comment https://forums.kleientertainment.com/forums/topic/32558-making-a-single-prefab-spawn-in-a-very-large-area-need-help/#findComment-428049 Share on other sites More sharing options...
Fidooop Posted March 10, 2014 Author Share Posted March 10, 2014 Sure, I'll be glad to help. I'm actually going to post a tutorial on it as soon as I have the chance.awesome!!! you can add me on steam (if you have 1) http://steamcommunity.com/id/Fidooop/ Link to comment https://forums.kleientertainment.com/forums/topic/32558-making-a-single-prefab-spawn-in-a-very-large-area-need-help/#findComment-428052 Share on other sites More sharing options...
JackSlender Posted March 10, 2014 Share Posted March 10, 2014 Here you go:http://forums.kleientertainment.com/topic/32602-tutorial-making-a-custom-setpiece/Sorry if it's hard to follow, but I hope it helps. Link to comment https://forums.kleientertainment.com/forums/topic/32558-making-a-single-prefab-spawn-in-a-very-large-area-need-help/#findComment-428342 Share on other sites More sharing options...
Fidooop Posted March 10, 2014 Author Share Posted March 10, 2014 Here you go:http://forums.kleientertainment.com/topic/32602-tutorial-making-a-custom-setpiece/Sorry if it's hard to follow, but I hope it helps.thanks! but I have decided that I will make the jungle act like caves do... and you can teleport from your first world to the jungle world and back again! so I have been trying to learn how saves and loads work xD Link to comment https://forums.kleientertainment.com/forums/topic/32558-making-a-single-prefab-spawn-in-a-very-large-area-need-help/#findComment-428355 Share on other sites More sharing options...
KidneyBeanBoy Posted March 10, 2014 Share Posted March 10, 2014 thanks! but I have decided that I will make the jungle act like caves do... and you can teleport from your first world to the jungle world and back again! so I have been trying to learn how saves and loads work xDWill you get to it by wormhole? Link to comment https://forums.kleientertainment.com/forums/topic/32558-making-a-single-prefab-spawn-in-a-very-large-area-need-help/#findComment-428357 Share on other sites More sharing options...
Fidooop Posted March 10, 2014 Author Share Posted March 10, 2014 (edited) Will you get to it by wormhole?a special green planty type wormhole and when you take the wormhole the game will load the new jungle world! then you can take a wormhole back home! either that or I have to make a new task..... which won't make it a separate world just a biome in the normal world Edited March 10, 2014 by Fidooop Link to comment https://forums.kleientertainment.com/forums/topic/32558-making-a-single-prefab-spawn-in-a-very-large-area-need-help/#findComment-428373 Share on other sites More sharing options...
JackSlender Posted March 10, 2014 Share Posted March 10, 2014 (edited) Ah, I see. It just so happens that I've also created a mod world that I can share parts of the code for. I'd rather not reveal what the mod actually IS yet, because it should be a surprise. The code DOES have some kinks that need to be worked out. For example: the player's inventory isn't kept when you are brought to the new world. For the most part, however, the code works. EDIT: The code is actually fairly buggy still. Probably shouldn't use it... To point you in the right direction, though, I would suggest looking at the maxwell boss fight mod. That makes a new level. Edited March 10, 2014 by JackSlender Link to comment https://forums.kleientertainment.com/forums/topic/32558-making-a-single-prefab-spawn-in-a-very-large-area-need-help/#findComment-428432 Share on other sites More sharing options...
Fidooop Posted March 10, 2014 Author Share Posted March 10, 2014 Ah, I see. It just so happens that I've also created a mod world that I can share parts of the code for. I'd rather not reveal what the mod actually IS yet, because it should be a surprise. The code DOES have some kinks that need to be worked out. For example: the player's inventory isn't kept when you are brought to the new world. For the most part, however, the code works. EDIT: The code is actually fairly buggy still. Probably shouldn't use it... To point you in the right direction, though, I would suggest looking at the maxwell boss fight mod. That makes a new level.hah I been looking in that for a while... I could help work out the bugs you have by pointing you to cave_entrance.lua when using that the player keeps his items so there must be something in there telling the player to keep his items Link to comment https://forums.kleientertainment.com/forums/topic/32558-making-a-single-prefab-spawn-in-a-very-large-area-need-help/#findComment-428442 Share on other sites More sharing options...
Fidooop Posted March 11, 2014 Author Share Posted March 11, 2014 (edited) Ah, I see. It just so happens that I've also created a mod world that I can share parts of the code for. I'd rather not reveal what the mod actually IS yet, because it should be a surprise. The code DOES have some kinks that need to be worked out. For example: the player's inventory isn't kept when you are brought to the new world. For the most part, however, the code works. EDIT: The code is actually fairly buggy still. Probably shouldn't use it... To point you in the right direction, though, I would suggest looking at the maxwell boss fight mod. That makes a new level.BTW could you add me on steam or on the forums so we can pm back and forth? and then you can keep your mod more secret that way... EDIT: oh I found you on steam and added you! Edited March 11, 2014 by Fidooop Link to comment https://forums.kleientertainment.com/forums/topic/32558-making-a-single-prefab-spawn-in-a-very-large-area-need-help/#findComment-428489 Share on other sites More sharing options...
IPO Posted October 12, 2014 Share Posted October 12, 2014 What an ending to an epic forum thread !Did you guys meet up for a cup of tea, hehe.I would love to hear the end of this, hows the mod going JackSlender & Fidooop? Link to comment https://forums.kleientertainment.com/forums/topic/32558-making-a-single-prefab-spawn-in-a-very-large-area-need-help/#findComment-550366 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