• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Prefab Editor (Alpha)

The next updates will be mainly about randomly generated prefabs (more precisely randomly generated interiors) and other gimmicks. The general idea is that we have random blocks (randomly chosen from a list of blocks) and random rooms (randomly chosen from a list of rooms; each element in this list is manually created by the user or automatically generated by an algorithm). So if we had a list with 4 basements and 3 attics, the editor would save 4*3 = 12 variants of one prefab.

It should be feasible to include a lot of prefabs into the rwg mixer:

https://7daystodie.com/forums/showthread.php?62893-Technical-limits-of-rwg&p=632561#post632561

However, I am not sure whether that's a good plan or not.^^ Is there a negative effect on the ram usage if we include a few hundred new POIs or do you see another technical obstacle?

Any suggestions or comments on the topic?
Random generated Prefabs (maybe with a button to keep refreshing until you find a design you like) would be great.

I recently added the Compo Pack (150 new prefabs) to a Dedicated server and didn't notice any huge change to the RAM usage or performance.

 
I recently added the Compo Pack (150 new prefabs) to a Dedicated server and didn't notice any huge change to the RAM usage or performance.
Thanks Amadeux. Good to know!

 
I have an rwgmixer that randomized the internal contents of a maze, I was going to eventually port the tech to a building, but your idea is better.

 
K. My thoughts. On random prefab building.

I choose category house. I can then choose # levels, and "has basement".

Exterior I choose material type (stone vs wood, or combo (stone base with wood top)).

I choose quality, which says if my house is a piece of crap, minor repair, normal, expensive.

Then I choose whether or not it's fortified.

I choose the number if bed, bath, etc rooms.

Thoughts? =)

 
New update:

Changelog v0.3d (July 12, 2017):

- added new style option for selected blocks and "blue prefab boxes" (is disabled by default but can be enabled it in the option menu) (see screenshot)

- fixed performance issues and reenabled option "Layer-independent selection"

- general performance improvements

ItWWcVV.png


@Guppycur

Sounds reasonable (and quite ambitious^^). We should start with the exterior. I don't have any experiences with programming randomly generated structures, so let's see what happens. :D

I have an rwgmixer that randomized the internal contents of a maze, I was going to eventually port the tech to a building, but your idea is better.
Interesting idea, I wonder how can you use the mixer to randomize prefabs.

 
Last edited by a moderator:
The next updates will be mainly about randomly generated prefabs (more precisely randomly generated interiors) and other gimmicks. The general idea is that we have random blocks (randomly chosen from a list of blocks) and random rooms (randomly chosen from a list of rooms; each element in this list is manually created by the user or automatically generated by an algorithm). So if we had a list with 4 basements and 3 attics, the editor would save 4*3 = 12 variants of one prefab.
I like this idea very much. It would be nice if we could reverse engineer a single building so that it could produce several variants based on maybe the same exterior painting style/materials. So if you wanted a fresh new district for RWG you build maybe a shop style building and a house, then just randomise as you mention, a bunch of each to the same theme.

Building a whole bunch of tunnel sections, anti-chambers and control rooms etc and have it string them all together into a dungeon style prefab you could just sink into the floor or hang off another building as a basement so it don't need to look nice on the exterior. Think Magoli's polar station with a single entrance and hidden beneath the floor, or a sewer/subway themed run. On the surface you have a prefab can identify with to know it's a dungeon, but they will never know what layout it is... and if they ever make maps you just gen a bunch more ;D.

 
I like this idea very much. It would be nice if we could reverse engineer a single building so that it could produce several variants based on maybe the same exterior painting style/materials. So if you wanted a fresh new district for RWG you build maybe a shop style building and a house, then just randomise as you mention, a bunch of each to the same theme.
Building a whole bunch of tunnel sections, anti-chambers and control rooms etc and have it string them all together into a dungeon style prefab you could just sink into the floor or hang off another building as a basement so it don't need to look nice on the exterior. Think Magoli's polar station with a single entrance and hidden beneath the floor, or a sewer/subway themed run. On the surface you have a prefab can identify with to know it's a dungeon, but they will never know what layout it is... and if they ever make maps you just gen a bunch more ;D.

This could be very funny - sounds like the best use for that - very good idea

(the prefab xcutsom_burialShrine is also kinda mini-dungeon (IndianaJones like) with a (hidden) entrance on the surface )

thx Pille - i can wait for it - no problemo

 
Interesting idea, I wonder how can you use the mixer to randomize prefabs.
The way it worked is there were 10 prefabs. 9 equal sized pieces and a 10th outer wall.

Each inner piece had doorways at the same spots, but different interiors. Setting up the mixer (well, stompy did most of the work) made it so that ONE of the 9 pieces would spawn in one of the 9 spots, with a random rotation, until all 9 were filled then the outer wall was spawned. Voila, instant random maze.

You could do a building the same way. First the outside shell, then individual components that spawn in the interior, that could connect together to make rooms. As long as the connection spots lined up, it would work.

I doubt you would need to take this approach to your idea though.

 
Botman has a maze randomizer that you can run in the game and it creates one for you based on a size you specify. I'm unsure of how it works but his source code is available to review.

 
@Slaan

Nice idea. It's probably clever to start with a simple problem. Tunnels shouldn't be very difficult to implement. I have a rough model in my mind which should allow us to generate building complexes with interior decorations. However, it's not completely thought-out yet and might be over the top for various reasons.^^

@Magoli

thx Pille - i can wait for it - no problemo
You don't have a choice. ;)

@Guppycur

Thanks Guppy. I like the idea but you're right, I don't need to work with the rwgmixer.

@Amadeux

I assume botman uses one of the standard algorithms:

https://en.wikipedia.org/wiki/Maze_generation_algorithm

Time will tell whether that's useful or not. :)

 
Last edited by a moderator:
Update:

Changelog v0.3e (July 13, 2017):

- improved placement of new sleeper volumes

- fixed bug in undo/redo function (should be bug free now^^)

Now when trying to run the editor it just spins and won't load. Ran the autoupdater but got the same results. Any suggestions?
I accidentally found the bug in the source code. The edit tab was undocked/floating when you closed the editor, right?^^ That prevents the program from starting. You can either delete the ini file (settings/Zombie Coop/Zombie.ini) to fix the problem or wait for the next update.

The next update available and it's an important one since it fixes a really annoying bug.

Changelog v0.3f (July 14, 2017):

- added console tab (it's not too useful atm but I will add more of developer functions to the console output)

- added function "print all prefab xml data" (this console function prints a list of all properties and corresponding values used in the prefab xml files and a list of those files)

- added X-ray mode (now we can see through air blocks^^. see details)

- fixed: closing the program while the edit tab was undocked/floating prevented to editor from starting

- renamed "prefab settings" tab to "Xml" and "sleeper volumes" tab to "Sleepers"

X-Ray Mode (highly experimental):

This mode changes the block rendering method. Instead of the blocks of the current layer the next non-air blocks will be shown. So you can see through the air blocks to the underlying strutures (see screenshot bellow). I am not sure how useful this feature is but it was very easy to implement. :)

ImFrU87.png


(Doema's cathedral in X-Ray mode, see links bellow)

Links:

http://steamcommunity.com/sharedfiles/filedetails/?id=735713440

http://steamcommunity.com/sharedfiles/filedetails/?id=735711263

 
Last edited by a moderator:
I accidentally found the bug in the source code. The edit tab was undocked/floating when you closed the editor, right?^^ That prevents the program from starting. You can either delete the ini file (settings/Zombie Coop/Zombie.ini) to fix the problem or wait for the next update.
I'm going to say more than likely "Yes". I have a 3 monitor setup so I had windows all over the place ;)

Very cool X-ray mode...Interested in testing that out when I get back.

 
I'm going to say more than likely "Yes". I have a 3 monitor setup so I had windows all over the place ;)
Ha, I knew it. :)

@StompyNZ

I was thinking about a random-based customizable vegetation brush when I implemented the x-ray mode. So we could "paint" a flower meadow or a forest on the ground. However, that's one of those functions you use once per decade. Not sure whether I am going to add this.^^

Terrain smoothing and roughening brushes could be another use case.

Update Time!

Actually the main feature of the current release (sleeper generator) is not ready yet but Magoli urges me to release a bugfix for a formatting issue. ;)

Changelog v0.3g (July 15, 2017):

- added optional tab "sleeper generator"

- fixed missing line-breaking of prefab xml files in windows notepad

The sleeper generator provides a quick and dirty way to place sleepers and volumes (I don't recommend to use it in its current state). Sleepers will be spawned in roofed areas only.

Sleeper density (in percent): 100 means all ground blocks in roofed areas will be paved with sleeper blocks.^^

GameStageAdjust: Avarage SleeperGameStageAdjust. It's connected to a random number generator (gaussian distribution). So you get sleeper volumes with different SleeperGameStageAdjust values.

Volume probability (in percent): 100 means each sleeper block gets its own volume.

SleeperIsLootVolume probability (in percent): I still don't know what SleeperIsLootVolume means. So no further explanation...

New Update!

Changelog v0.3h (July 16, 2017):

- added button "count sleeper blocks" and text field sleeper block count to volume list items (gray indicates the volume doesn't contain any sleeper blocks)

- added "remove sleepers outside volumes" button to the sleeper generator tab.

- added function: sleeper volumes can be resized using the right mouse button (it's a bit buggy atm. see details)

- added tool "place sleeper" to toolbar

- Renamed "Sleepers" tab to "Sleeper Volumes"

- fixed: x-ray didn't work (didn't update) after activation until you changed the current layer

- fixed: click on a sleeper volume which is partially outside of the prefab area unintentionally changed the position of the volume. So double click didn't work for those volumes

- fixed: old sleeper volumes will not be deleted if you load a prefab without prefab xml

Hints:

- The resize function is less buggy on the right and the bottom side of the sleeper volume frame (see screenshot bellow).

- The auto-update doesn't work properly (shows update is available no matter whether an update is available or not) if you update from v0.2x to v0.3x. Please download the editor again to fix the problem.




JDmeYDb.png


Preview of upcoming features: :)

DgMxH1X.jpg


 
Last edited by a moderator:
Hi Pille,

Thanks for the editor. Based on your OP and that the remove layer button/fields are greyed out I am assuming that feature is not implemented yet. If so, do you have plans to add it soon? When using Hal's bbb command to export a prefab, it saves all blocks vertically between a specified x,y coordinate set. I need to be able to delete unwanted layers in order to properly edit these exports.

 
Hi Laz Man,

you can use the front view or the side view to remove layers:

1. click on front view

2. (optional) Go to layer 0

3. (optional) click on the x-ray mode button to find out which layers you want to delete (this will deactivate the "remove rows" button)

4. select some blocks that belong to those layers (right mouse button)

5. (optional) click again on x-ray mode to reactivate to "remove rows" button

6. move your mouse over the "remove rows" button (this should show you the selected layers)

7. click the "remove rows" button

VgPYR1Q.png


Based on your OP and that the remove layer button/fields are greyed out I am assuming that feature is not implemented yet. If so, do you have plans to add it soon?
Maybe that would be easier for most of the users.^^ So probably yes.

 
Last edited by a moderator:
Hi Laz Man,
you can use the front view or the side view to remove layers:

1. click on front view

2. (optional) Go to layer 0

3. (optional) click on the x-ray mode button to find out which layers you want to delete (this will deactivate the "remove rows" button)

4. select some blocks that belong to those layers (right mouse button)

5. (optional) click again on x-ray mode to reactivate to "remove rows" button

6. move your mouse over the "remove rows" button (this should show you the selected layers)

7. click the "remove rows" button

VgPYR1Q.png


Maybe that would be easier for most of the users.^^ So probably yes.
Thanks Pille! That works just fine. :)

 
Back
Top