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

Prefab Editor (Alpha)

Looks like two minor bugs to me.

1. There is no check for modifications - The editor will load and save the prefab, no matter if any changes were made.

2. The editor doesn't keep the old prefab formats when saving prefabs (this is somehow intended but should be optional). It loads the resource prefabs (they use the old a15 prefab format without the painting stuff) and it adds some bytes to the files related to the painting system. So it's basically a conversion from A15 prefab to A16 prefab.

Edit:

I recommend to use the old unmodified resource prefabs, just in case. I've made some tests ... haven't found any performance impacts or bugs but who knows.

 
Last edited by a moderator:
Update Time!

Changelog v0.43(b) and Changelog v0.43©

(I accidentally renamed 0.42 to 0.43. Actually, it's 0.42(b) and 0.42©)

- added console command 'prefab' - shows the path of the currently loaded prefab

(i am going to add more useful command in the near future...)

- fixed: editor overwrites previously loaded prefabs:

https://7daystodie.com/forums/showthread.php?62501-Prefab-Editor-(Alpha)&p=801364&viewfull=1#post801364

- fixed advanced replace function 'replace (prefabs in folder)':

The editor saves the loaded prefabs, no matter if any changes were made (Note: it still changes the file format of the A15 compatible prefabs if blocks were modified)

Edit:

Download link in the op updated.

 
Last edited by a moderator:
Thank you for your continued improvements on this essential modding tool! I keep stumbling over 1 tiny bug, since it's something I use fairly often: the paint colors concrete dark grey and concrete medium grey have the same ID nr (162) in your editor, it should be 161 for the medium grey. Hope that makes it into the next patch :)

Also, a question: is there currently a way to auto-compare 2 prefab files to each other to locate changes?

 
Upps, pretty embarrassing bug.^^ I am going to add a fix very soon. If you want it now, take a look at the texture folder in the program folder (path: ~Zombie (64 bit)/data/textures ). Rename the file 'concrete grey__id162.jpg' to fix the issue.

Also, a question: is there currently a way to auto-compare 2 prefab files to each other to locate changes?
Nope but it's a nice suggestion. I've to add some additional tools anyway (in preparation for a17). Perhaps I can or have to invent such an auto-'comparator'.^^

 
Awesome, thank you! :) I just fiddled with some prefabs and noticed a new bug: the editor now removes the AllowedTownships line from the xml upon saving, easy to fix when you know, but easy to overlook as well.

 
I wasn't able to reproduce the problem. In the worst case, I have to ask you for more information. Perhaps there will be an update tomorrow (need some sleep now :) ).

Thank you for reporting these bugs.

 
Last edited by a moderator:
It actually doesn't remove a pre-existing Townships line, but doesn't add it to xmls that don't have it yet, when I choose townships in the editor. Adding lines for Biomes and Zones that way does work, though. Sorry about the unclear report, I was working with several different files so I didn't notice the exact circumstances right away.

 
Also, a question: is there currently a way to auto-compare 2 prefab files to each other to locate changes?
I also want this feature, Yes, it is in demand everywhere ...

-------------

PS: i can't figure out how to find a specific block inside a prefab(search). This is possible now ?

-------------

A! I always forget to tell :) .

... I understand that icons (symbols sleepers...) will not look good when zoomed ...

but still, during work it is not so important, more important is the possibility to see the icon...

perhaps you can even slightly improve the turn off threshold of the icons when zooming ?

 
Last edited by a moderator:
It actually doesn't remove a pre-existing Townships line, but doesn't add it to xmls that don't have it yet, when I choose townships in the editor. Adding lines for Biomes and Zones that way does work, though. Sorry about the unclear report, I was working with several different files so I didn't notice the exact circumstances right away.
No problem. Got it!

PS: i can't figure out how to find a specific block inside a prefab(search). This is possible now ?
There're several search tools but I am afraid none of them is particularly useful^^:

4Rvvws7.jpg


Green (magnifier): It's an auto selection tool. You can enter a list of block ids (separated by a , ) and the editor will select the corresponding blocks when you switch the layer.

Orange (x-ray mode): I've added blacklists and whitelists to the x-ray mode tool, so it can be used as search tool to some extent. However, there is a technical limitation which makes it less useful than it could be. Have to invent a fix for this issue.

Red: This is a list of selected block ids. If you click on an item from the list the editor will unselect all blocks except the ones having the corresponding id.

What I could add:

Find idle villagers (easy): I could add a function allowing you to switch through all blocks with a certain id (similar to the find idle villager feature in Age of Empires)

Hide blocks (harder): We could find blocks by hiding everything else. It's harder to implement though but would fix the x-ray mode.

Do you have other suggestions regarding search tools?

A! I always forget to tell .... I understand that icons (symbols sleepers...) will not look good when zoomed ...

but still, during work it is not so important, more important is the possibility to see the icon...

perhaps you can even slightly improve the turn off threshold of the icons when zooming ?
It's an easy request. I'll make it adjustable (text field in the option dialog). Btw. it may affect the performance on slow systems. That's why I added the threshold.

 
Last edited by a moderator:
Do you have other suggestions regarding search tools?.
For example, it might look like this:

- when entering the desired ID (only one - in one time) - simply display a text list (which will stay to work with it) with the coordinates of these blocks.

- when you click on the block (in list) - the corresponding block is shown (and selected) in the working window.

- when working with the list - you can select blocks and perform actions (delete, select a group with pressed shift-button, replace ID, or parameters)

It is highly desirable that the "search" worked for all prefabs (that it was possible to identify prefab which then work)

(this is perhaps all that could come in handy for me to solve my tasks, such as finding a rare block...)

 
Last edited by a moderator:
@owl79

Mhh I get a new allowedtownships line even if it wasn't there before. :( Sorry if I bother you.^^

 
Last edited by a moderator:
@owl79Mhh I get a new allowedtownships line even if it wasn't there before. :( Sorry if I bother you.^^
Here, try with this prefab (not mine so I'll take the link down again of course), that's what I used to confirm it (I still can reproduce the error):

*poof*

Not sure how else to help; maybe it matters if the .xml was originally created with an older alpha? I remember I had problems with xml options not "taking" before, and I often use the editor on older prefabs.

 
Last edited by a moderator:
Ok maybe I can find the reason for this bug. Thanks.

Not sure how else to help; maybe it matters if the .xml was originally created with an older alpha?
No I don't think so. The formation of the xml file looks a bit strange though. This could be the problem.

 
Last edited by a moderator:
How Sleeper Volumes really truly work

SleeperIsLootVolume:

- Provides a protection against other (intersecting or outer) Sleeper Volumes (see fig. 1)

Example:

Blue and red Volume have SleeperIsLootVolume true.

B: yellow areas

C: white tiled area

D: wooden area

E: drywall area

F: white area

[table=width: 500, class: grid]

[tr]

[td]Transition; moving from X to Y (X -> Y)[/td]

[td]Allowed Spawning Area(s)[/td]

[td]Used SleeperVolumeGroup[/td]

[td]Comment[/td]

[/tr]

[tr]

[td]A -> B[/td]

[td]B[/td]

[td]Green Volume[/td]

[td]Moving from A to B[/td]

[/tr]

[tr]

[td]A -> C (red arrow)[/td]

[td]C[/td]

[td]Blue Volume[/td]

[td]Moving from A to C triggers sleepers in C, not B[/td]

[/tr]

[tr]

[td]A -> D[/td]

[td]D and E[/td]

[td]Red Volume[/td]

[td][/td]

[/tr]

[tr]

[td]B -> C[/td]

[td]C[/td]

[td]Blue Volume[/td]

[td][/td]

[/tr]

[tr]

[td]B -> E[/td]

[td]E and D[/td]

[td]Red Volume[/td]

[td][/td]

[/tr]

[tr]

[td]C -> B[/td]

[td]B[/td]

[td]Green Volume[/td]

[td][/td]

[/tr]

[tr]

[td]C -> F[/td]

[td]D and E and F[/td]

[td]Red Volume ?[/td]

[td][/td]

[/tr]

[tr]

[td]D -> E or vice versa[/td]

[td]-[/td]

[td][/td]

[td]No additional spawns triggered[/td]

[/tr]

[tr]

[td]E -> B[/td]

[td]B[/td]

[td]Green Volume[/td]

[td][/td]

[/tr]

[tr]

[td]E -> D[/td]

[td]-[/td]

[td][/td]

[td]No additional spawns triggered[/td]

[/tr]

[tr]

[td]E -> F[/td]

[td]C and F[/td]

[td]Blue Volume ?[/td]

[td][/td]

[/tr]

[/table]

(empirically investigated, not completely verified)

PRVgSuc.jpg


fig. 1

 
Last edited by a moderator:
Added a 'How-To and FAQ' section to the OP and made the 'unintended post' more useful. Click

Note: The tutorial about sleepers isn't finished yet. There is some unexpected stuff you should be aware of when using sleeper volumes (explanations follow later).

 
There must be a mismatch between the blocks defined in the blocks.xml and those used in your prefab. Perhaps the game directory is not set or you loaded a modded prefab but your blocks.xml was unmoded. Click on 'Extras' -> 'Set game directory...'. You should get this dialog:

K6L5ges.jpg


Is the text field empty?

PS. Wir kِnnten uns auch auf Deutsch unterhalten wenn du willst ;-)

 
Last edited by a moderator:
Back
Top