Jump to content

Static Layouts 100% spawning?


Recommended Posts

I'd like to know, how can I select specific layouts to have 100% spawn chance, such as using this presets:

I want to know if it's possible to have multiple of some of them too - I'm a noob at modding)

 

bargain_start

cave_art_test_start

cave_base_1

cave_base_2

cave_base_3

cave_test_start

default_plus_start (can I have it without selecting default plus config? )

insane_flint (5 per map, ideally not very far from each other but away enough giants or varg can't attack each other)

 resurrectionstone ( having at least 10 through the map, I'm playing with huge map)

 

 

Link to comment
Share on other sites

If I understand you correctly, you want to add static layouts in a specific number to your map, right?

I personally would make a new room for the layouts and add it to the worldgen task were I would like to have it. I`m sure there a nicer ways to do it but for me this works (modworldgenmain):

1. Create the room:

Unbenannt.thumb.png.f8b4d481455b9257aecf31cf8cee480c.png

2. Add the room to the worldgen task:

Unbenannt1.thumb.png.0165928159bcacc36bb57fce57a850fc.png

The worldgen task you select will decide in which part of the map the room or rooms will appear.  

The most of the worldgen tasks can be found here by the way, if you haven`t until now, I recommand, you should take a look at them: 

C:\Programm\Steam\steamapps\common\dont_starve\data\DLC0003\scripts\map\tasks

or in the corrosponding files of the other DLC if you don`t have Hamlet

 

I hope this helps you and sorry if my english is not the best I`m not a native speaker

Have a nice weekend

 

Link to comment
Share on other sites

7 hours ago, MissSora22 said:

If I understand you correctly, you want to add static layouts in a specific number to your map, right?

I personally would make a new room for the layouts and add it to the worldgen task were I would like to have it. I`m sure there a nicer ways to do it but for me this works (modworldgenmain):

1. Create the room:

Unbenannt.thumb.png.f8b4d481455b9257aecf31cf8cee480c.png

2. Add the room to the worldgen task:

Unbenannt1.thumb.png.0165928159bcacc36bb57fce57a850fc.png

The worldgen task you select will decide in which part of the map the room or rooms will appear.  

The most of the worldgen tasks can be found here by the way, if you haven`t until now, I recommand, you should take a look at them: 

C:\Programm\Steam\steamapps\common\dont_starve\data\DLC0003\scripts\map\tasks

or in the corrosponding files of the other DLC if you don`t have Hamlet

 

I hope this helps you and sorry if my english is not the best I`m not a native speaker

Have a nice weekend

 

 

 

Hey I've made a modworldgenmain.lua file with the code you gave me, I've got an error...

Here follows how my modworldgenmain is coded:

 

GLOBAL.require("constants")
local GROUND = GLOBAL.GROUND

AssRoom("1StartBargain", {
                             colour={r=0,g=.9,b=0,a=.50},
                             value = GROUND.GRASS,
                             contents = {
                                         countstaticlayouts={
                                            ["bargain_start"] = 1,
                             },
                             distributepercent = .2,
                             distributeprefabs=
                             {
                                 berrybush = 5,
                                 sapling = 5,
                                 grass = 5,
                              },
                            }
                    })


local function 1StartBargainTaskPrelnit(task)
      task.room_choices["bargain_start"] = 1
end
AddTaskPrelnit("Other_edge_of_civilization", 1StartBargainTaskPrelnit)

za moddo error 1.png

Link to comment
Share on other sites

You tried to add the layout instead of the room:

    task.room_choices["bargain_start"] = 1

must be

    task.room_choices["1StartBargain"] = 1

and you have a typo here:

    AssRoom("1StartBargain", {   

must be

    AddRoom("1StartBargain", {   

 

Link to comment
Share on other sites

10 hours ago, MissSora22 said:

You tried to add the layout instead of the room:

    task.room_choices["bargain_start"] = 1

must be

    task.room_choices["1StartBargain"] = 1

and you have a typo here:

    AssRoom("1StartBargain", {   

must be

    AddRoom("1StartBargain", {   

 

 

I fixed the text, but still got an error.

 

Text currently on modworldgenmain:

 

GLOBAL.require("constants")
local GROUND = GLOBAL.GROUND

AddRoom("1StartBargain", {  
                             colour={r=0,g=.9,b=0,a=.50},
                             value = GROUND.GRASS,
                             contents = {
                                         countstaticlayouts={
                                            ["bargain_start"] = 1,
                             },
                             distributepercent = .2,
                             distributeprefabs=
                             {
                                 berrybush = 5,
                                 sapling = 5,
                                 grass = 5,
                              },
                            }
                    })


local function 1StartBargainTaskPrelnit(task)
      task.room_choices["1StartBargain"] = 1
end
AddTaskPrelnit("Other_edge_of_civilization", 1StartBargainTaskPrelnit)

za moddo error 2.png

Link to comment
Share on other sites

I have never gotten this specific error befor, but perhabs he doesn´t like the 1 in front of the task

Try  StartBargain1TaskPrelnit(task)   instead of  1StartBargainTaskPrelnit(task)

If it still doesn`t work then, please send me the complete error log file under documents/ klei/ dontstrave/ log 

Link to comment
Share on other sites

1 hour ago, MissSora22 said:

I have never gotten this specific error befor, but perhabs he doesn´t like the 1 in front of the task

Try  StartBargain1TaskPrelnit(task)   instead of  1StartBargainTaskPrelnit(task)

If it still doesn`t work then, please send me the complete error log file under documents/ klei/ dontstrave/ log 

 

I tried to fix it again, but the error got worse LOL

 

file:

 

GLOBAL.require("constants")
local GROUND = GLOBAL.GROUND

AddRoom("Start1Bargain", {  
                             colour={r=0,g=.9,b=0,a=.50},
                             value = GROUND.GRASS,
                             contents = {
                                         countstaticlayouts={
                                            ["bargain_start"] = 1,
                             },
                             distributepercent = .2,
                             distributeprefabs=
                             {
                                 berrybush = 5,
                                 sapling = 5,
                                 grass = 5,
                              },
                            }
                    })


local function Start1BargainTaskPrelnit(task)
      task.room_choices["Start1Bargain"] = 1
end
AddTaskPrelnit("Other_edge_of_civilization", Start1BargainTaskPrelnit)

za moddo error 3.png

log.txt

Link to comment
Share on other sites

It`s not worse, it`s just another one ;). That means we solve the one from bevor.

But honestly, I can´t say much more without knowing more over the error or what ecactly the mod should do.

First Question: This is for Don`t Starve, right? Not for Don`t starve together?

Second Question: Do you just have DS or also RoG, SW and/or Hamlet.

Third Question: In which world do you want to put the layout?

Link to comment
Share on other sites

50 minutes ago, MissSora22 said:

It`s not worse, it`s just another one ;). That means we solve the one from bevor.

But honestly, I can´t say much more without knowing more over the error or what ecactly the mod should do.

First Question: This is for Don`t Starve, right? Not for Don`t starve together?

Second Question: Do you just have DS or also RoG, SW and/or Hamlet.

Third Question: In which world do you want to put the layout?

Yes, Dont starve (alone). I have all three DLC. I wanted to a rog world with hamlet compatibility (which means shipwrecked would be ported too)

 

But nonetheless, the game crashes as soon I simply turn on the mod.

I just want to spawn structures from the static layouts, for example, spawning a world with 100% chance of having both tallbird fort and reed trap, along other structures

 

Link to comment
Share on other sites

1: I found a spelling mistake, in AddTaskPrelnit its a big i not a l, sorry it`s hart to see in this typeface.

2: If you want to add the room to RoG you have to use a RoG worldgen task. "Other_edge_of_civilization" is a worldgen task from Hamlet. 

Try

AddTaskPreInit ("Badlands", Start1BargainTaskPrelnit)

or

AddTaskPreInit ("Oasis", Start1BargainTaskPrelnit)

 

The other worldgen tasks form Vanilla DS can be found under dont_starve\data\DLC0001\scripts\map\task.lua

There is where the room must be added to appear in RoG

Link to comment
Share on other sites

8 hours ago, MissSora22 said:

1: I found a spelling mistake, in AddTaskPrelnit its a big i not a l, sorry it`s hart to see in this typeface.

2: If you want to add the room to RoG you have to use a RoG worldgen task. "Other_edge_of_civilization" is a worldgen task from Hamlet. 

Try

AddTaskPreInit ("Badlands", Start1BargainTaskPrelnit)

or

AddTaskPreInit ("Oasis", Start1BargainTaskPrelnit)

 

The other worldgen tasks form Vanilla DS can be found under dont_starve\data\DLC0001\scripts\map\task.lua

There is where the room must be added to appear in RoG

 I did as you said, using the badlands task, I loaded a base game world, a rog, and a rog w hamlet compatibility, and the roon did not appear in none of them

Link to comment
Share on other sites

34 minutes ago, MissSora22 said:

That should insert the room 1 time in the RoG World in the Desert Biome. I don`t know why it doesn`t work.

If you send me a .zipwith the mod, I will take a look. Right know I`m out of ideas. Sorry

Thanks, here it is. It's possible to make it spawn into a forest or grassland?

Za Moddo.zip

Link to comment
Share on other sites

Some of the layouts can`t be used together, becauce all of them include startingpoints for the world. But I can give you the stuff from these layouts.

Right now I have ready:

1 Diviningrod not too far away form your starting point in Vanilla and RoG Survival, run in a few big circles and you will find it.

7 - 8 additional Resurrectionstones in Vanilla and RoG Survival, all around the map above ground

 

But I need to know where you want your other things. Especially if above ground or in the caves.

Also if you want I can make option for you so you can enable or disable the different parts of the mod

 

Za Moddo.zip

Link to comment
Share on other sites

I've used the show map command (below) in both vanilla and RoG worlds, haven't found the divining rod...

minimap=TheSim:FindFirstEntityWithTag("minimap")minimap.MiniMap:ShowArea(0,0,0, 10000)

However, the ressurection spots are working awesomely! In both worlds!

It's possible to copy the entire static layout of the bargain_start with the whole structure? (walls, tent, divining rod, 2 bee boxes) with additional twigs, grass and bushes

Link to comment
Share on other sites

Stupid Question first: Did you enable the mod under the mod tab?

try this command : c_gonext("diviningrodstart"), that should bring you to it, it is not showing on the map

I will see what I can do with the layout, but I have never changed one, so no promises

Link to comment
Share on other sites

Hmm,  it seems that it works sometimes, sometimes it doesn`t and sometimes partly. Perhabs there is a cap to the number of rooms somewhere I`m not aware of.

I will try something else, but I have to take 1 1/2 shifts at work until Saturday and I can`t promise you I will be able to get it ready this week.

Link to comment
Share on other sites

I tested the mod a few times to see what is wrong, it seams that it works correctly but there is not enough room for all the layouts on the default map. Try a huge one. By the way, you can count the existing prefabs like this: c_countprefabs("prefab"), then you don´t have to search for them on the map.

And     GetWorld().minimap.MiniMap:ShowArea(0,0,0,10000)   doesn´t reveal everything on the map. Often you still have to had been there befor you can see the icons on the map. To telepot to a prefab use c_gonext("prefab")

Try to find prefabs like tent,  treasurechest, resurrectionstone  ect.

Link to comment
Share on other sites

Here is the best mod I can make. In my game I get everything you wanted above ground in a large or bigger world. Caves and ruins normally give me around 3 bases together, I think because the map is small.  If it doesn`t work send me the log and I will have a look.

Za Moddo.zip

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...