Jump to content
Pille

Prefab Editor (Alpha)

Recommended Posts

@Guppycur

Thanks Guppy for making the video! You saved me a lot of time! Sadly, I cannot upvote you atm, because of the strange rating system. :(

 

Btw. I've added your video to the opening post. I hope that's ok.

 

 

Pille. So I was thinking. When viewing the blocks in the editor, it would be cool if the sleeper blocks would include that little icon you use for your editor. Yes, sure, you would need to tag those blocks with "isZombie" or something every time they added one, but it would sure help "see" where the blocks are with a quick glance.

 

Also, once you get a handle on volumes, clicking on one and seeing a visual representation of the volume space would also be cool.

 

Nice suggestions. I've added some symbols for the most important block classes (e.g. sleepers, loot containers and so on...). You have to activate this feature in the option menu.

 

Unfortunately, making a proper visual representation of sleeper volumes is harder than I've expected since you can use negative numbers for the SleeperVolumeStart variable. So your Volume is not limited to the volume of your prefab.

 

Ksq9uec.png

 

 

@Slaan

Working this way has a few snags which I hinted at earlier, using 'prefab save' ingame or maybe it's saving via the editor cleans out the prefabs XML

That's my fault.^^ There is an option in the latest version to turn on/off this nonsense (should be deactived by default now).

Edited by Pille (see edit history)

Share this post


Link to post
Share on other sites

@All: I'm uploading the first of my "Tutorial" videos with this editor. I'll be adding more as I review my teamviewer session with Pille and remember more stuff. I got uh, distracted this weekend. Project Coaster is amazing. :)

 

After watching your video, I think it's time for some performance tweaks for big prefabs (how big is guppyville?). I have many ideas on how to improve the speed but there's so much to do and so little time.^^

Share this post


Link to post
Share on other sites

[quote=Pille;683682

 

Unfortunately, making a proper visual representation of sleeper volumes is harder than I've expected since you can use negative numbers for the SleeperVolumeStart variable. So your Volume is not limited to the volume of your prefab.

 

Does this mean we can set a trigger area bigger than the space available in the prefab? for example, having a volume set to 50 x 50 in a prefab thats only say 30 x 30 (lendth x width). The idea being it triggers and loads sleepers for that area when your a few blocks away instead of when you actually walk through the door.

Share this post


Link to post
Share on other sites

In theory, yes

 

SelectionBoxManager.Instance.AddSelectionBox("SleeperVolume", name2, bbPos + startPos, size, false);

SelectionBoxManager.Instance.SetActive("SleeperVolume", name2, true);

 

when it creates the spawn trigger area it adds the bbPos (aka prefab co-ords) with the start pos... adding a negative vector will do as you expect. It's placing them in the world not the prefab :)

Share this post


Link to post
Share on other sites

Unfortunately, making a proper visual representation of sleeper volumes is harder than I've expected since you can use negative numbers for the SleeperVolumeStart variable. So your Volume is not limited to the volume of your prefab.

 

Well in those instances, have it do something else to let us know it can't be visualized. :)

Share this post


Link to post
Share on other sites

Would that work? I haven't really been playing with the code so not sure but if the volume was outside the prefab region there wouldn't be any sleeper blocks to spawn in that space. I'm not sure if another prefabs spawner blocks would count.

Share this post


Link to post
Share on other sites

@Slaan, StompyNZ

I found those negative vectors in the vanilla 7 days to die files. So if that doesn't work, it's probably a bug and should be reported. :)

 

@Guppycur

Yep, that would be the easy/dark way.^^

 

@HAL9000

I don't know but I am going to do some tests at the weekend...

Share this post


Link to post
Share on other sites
Would that work? I haven't really been playing with the code so not sure but if the volume was outside the prefab region there wouldn't be any sleeper blocks to spawn in that space. I'm not sure if another prefabs spawner blocks would count.

 

its not the sleeper blocks, its the trigger.

 

so the volume going out of the prefab means the trigger for them can be beyond the prefab and then they spawn where the blocks are :)

 

obviously if the entire volume was outside the prefab then it wouldnt work :)

Share this post


Link to post
Share on other sites

@StompyNZ

So we cannot trigger sleeper spawns in multiple POI using only one single big sleeper volume?

 

 

Update time!

 

I've added a marker system to the editor. Basically, it's a shameless copy of Hal's system. You have to activate the correct mode to set or remove the marks (see red circle in the screenshot bellow). The upper screenshot is from Hal's editor.

 

tiuUdCa.png

Edited by Pille (see edit history)

Share this post


Link to post
Share on other sites
its not the sleeper blocks, its the trigger.

 

so the volume going out of the prefab means the trigger for them can be beyond the prefab and then they spawn where the blocks are :)

 

obviously if the entire volume was outside the prefab then it wouldnt work :)

 

Ah I see, so there's two volumes in the XML? Good to know, thanks Stompy!

 

@StompyNZ

Update time!

 

I've added a marker system to the editor. Basically, it's a shameless copy of Hal's system.

 

Aww yeah! You know you've made it when someone does a shameless copy! I did it to AussieWombat back in the day with his rotation settings ^^ Though I smell Guppy all over this...

 

Great work Pille, this editor is growing fast!

Share this post


Link to post
Share on other sites
Ah I see, so there's two volumes in the XML? Good to know, thanks Stompy!

 

Not quite sure I understand what you mean.

 

It is possible to have many sleeper volumes in a single prefab :)

 

I'm not sure what happens if they overlap, but i assume from it placing the sleeper selection it will only look at 1) its location and size, 2) if there are sleeper blocks to use. So if you enter an area it could trigger two volumes at once.

 

As for it using a sleeper block from another prefab, I'm thinking probably not, but wouldn't rule out the possibility. It all depends on if the blocks get changed when the prefab is added and that process is tied to the prefab that contained them, or if its independant of the prefab itself.

 

I haven't looked closely at that specific part of the code yet :)

Share this post


Link to post
Share on other sites

Yay. Markers. I ... May have mentioned something about them in my video. :)

 

Still love you Hal, but I'm starting to love Pille too. ;-)

Share this post


Link to post
Share on other sites
Not quite sure I understand what you mean.

 

It is possible to have many sleeper volumes in a single prefab :)

 

I'm not sure what happens if they overlap, but i assume from it placing the sleeper selection it will only look at 1) its location and size, 2) if there are sleeper blocks to use. So if you enter an area it could trigger two volumes at once.

 

As for it using a sleeper block from another prefab, I'm thinking probably not, but wouldn't rule out the possibility. It all depends on if the blocks get changed when the prefab is added and that process is tied to the prefab that contained them, or if its independant of the prefab itself.

 

I haven't looked closely at that specific part of the code yet :)

 

Overlapping spawn areas seems to work fine, I have a section of tunnels that look like a letter 'E' from above and the main corridor itself has one volume but as you walk down the corridor you are triggering the volumes in the off shott corridors too. Custom prefabs are defo not gonna be the loot pinatas they used to be.... well they are but you gonna die.

Share this post


Link to post
Share on other sites

Makes sense. Also makes sense the prefab editor shouldn't have to worry about out of bound trigger areas, but SHOULD do in bound trigger areas, so I'm all for that quick and dirty "dark way" approach. :)

 

Because slaan is right. We can do this better. Lol.

Share this post


Link to post
Share on other sites
Makes sense. Also makes sense the prefab editor shouldn't have to worry about out of bound trigger areas, but SHOULD do in bound trigger areas, so I'm all for that quick and dirty "dark way" approach. :)

 

Because slaan is right. We can do this better. Lol.

 

Ok I am persuaded.^^ I hope I do have time to implement the A16 xml support (so sleeper volumes and more) on this weekend. However, beeing a prefab editor may be just a temporary state. There are plans...

So I have to find a better solution sooner or later.

 

Yay. Markers. I ... May have mentioned something about them in my video. :)

 

Still love you Hal, but I'm starting to love Pille too. ;-)

Not sure whether am I ready for this kind of relationship. ;)

 

I watched some of your old vids and found the tutorial about Hal's marker system.

 

 

@HAL9000

Indeed, stealing your ideas is actually a compliment.^^

Edited by Pille (see edit history)

Share this post


Link to post
Share on other sites
Not quite sure I understand what you mean.

 

Sorry, I meant that there's two volumes per sleeper pack, 1 for the volume and the other for triggering. I've not really looked at it (and with them constantly spawning when I walk in the room I didn't think there was a trigger area)

 

 

 

Yay. Markers. I ... May have mentioned something about them in my video. :)

 

Still love you Hal, but I'm starting to love Pille too. ;-)

 

As long as I'm not the filler in the sandwich I'm fine with it. I'm not the jealous type...mainly....

Share this post


Link to post
Share on other sites
Sorry, I meant that there's two volumes per sleeper pack, 1 for the volume and the other for triggering. I've not really looked at it (and with them constantly spawning when I walk in the room I didn't think there was a trigger area)

 

Just from experience and conjecture, it looks like the trigger area is smaller when you are in stealth.

i.e. if I walk in a room standing, mobs spawn right away in the immediate area.

If I walk in a room crouched, I can get pretty close before they are triggered.

Share this post


Link to post
Share on other sites

Hello guys, can any of you prefab guru's point me in the right direction regarding sleeper configuration. From the limited reviewing of XMLs I have determined the following files need to be looked at to make sleeper changes.

 

gamestage XML file (defines the different sleeper spawn groups)

prefab XML file (specifies which sleeper spawn group is used)

prefab TTS file (sleeper blocks)

 

My general understanding is each prefab has a specific sleeper spawn group assigned to it. I didn't see something about a secondary trigger? Am I missing something? Thanks in advance.

Share this post


Link to post
Share on other sites

Imho the sleeper spawn groups are assigned to the sleeper volumes (not to the prefab).

 

<?xml version="1.0" encoding="UTF-8"?>
<prefab>
   <property name="CopyAirBlocks" value="True" />
   <property name="AllowTopSoilDecorations" value="False" />
   <property name="Zoning" value="Commercial" />
   <property name="RotationToFaceNorth" value="2" />
   <property name="AllowedTownships" value="rural" />
   <property name="AllowedBiomes" value="snow" />
   <property name="TraderArea" value="False" />
   <property name="ExcludeDistantPOIMesh" value="False" />
   <property name="SleeperVolumeSize" value="39, 4, 31#39, 9, 31#8, 4, 8#9, 4, 8#8, 4, 8#8, 4, 8#34, 4, 15" />
   <property name="SleeperVolumeStart" value="0, 0, 0#0, 4, 0#26, 0, 21#17, 0, 21#9, 0, 21#1, 0, 21#1, 0, 7" />
   <property name="SleeperVolumeGroup" value="S_SnowZombies_Med,S_Default_S,S_LootRoom_XS,S_LootRoom_XS,S_LootRoom_S,S_LootRoom_S,S_SnowZombies_Med" />
   <property name="SleeperVolumeGameStageAdjust" value=",,,,medium,hard," />
   <property name="SleeperIsLootVolume" value="False,False,True,True,True,True,True" />
</prefab>

 

(snow_sky_lodge.xml)

 

 

So there are 7 volumes in this example and 7 SleeperVolumeGroups. Btw. it might be a good idea to wait for a more qualified answer.^^

Edited by Pille (see edit history)

Share this post


Link to post
Share on other sites

Love the editor so far and was trying to figure out how the drawing tools worked a bit more.

 

I was able to lock it up a few times by trying to fill a full layer.

 

Now when trying to run the editor it just spins and won't load. Ran the autoupdater but got the same results. Any suggestions?

Share this post


Link to post
Share on other sites

No, that's right. I suspect ultimately, it would be best if each prefab has its own sleeper volume group; well, at least for the ones where it would make sense. Lumberyard, sewer, etc.

 

I always find it odd that there can be dogs on the upper levels of Joe Bros and usually a stripper in the trailer.

 

The latter is funny, the former is retarded.

 

My point? My prefabs will likely have their own groups.

Share this post


Link to post
Share on other sites
Sorry, I meant that there's two volumes per sleeper pack, 1 for the volume and the other for triggering. I've not really looked at it (and with them constantly spawning when I walk in the room I didn't think there was a trigger area)

 

Ah right, no they use the same area, but the area is essentially the trigger, it just has the additional requirement of a sleeper block to be in it for it to work :) If I understand right, the 'idle' sleeper spawns when you cross the boundary, but doesn't become a real entity until it 'detects' you

Share this post


Link to post
Share on other sites

....Cool.... i use two monitors... i like this feature with the division panels of toolbars !

 

PS: Sideview - this is what i was lacking.

Because of the lack of tooltips (or button-names) - I'm afraid to press buttons :D

 

 

Besides, i think, it is unlikely the TFP will make such editors after game-release... i think - they have confine with built-in editor like a "Creative Mode". But for serious work - needed 2D-editors.

Edited by n2n1 (see edit history)

Share this post


Link to post
Share on other sites

Great tool to start off with. This is my first time editing Prefabs outside of the game.

 

I've noticed that when using the fill tool the program sometimes locks up. No error or anything but becomes unresponsive and all buttons and actions become greyed out.

 

I've also had to redownload a few times even after updating as the Zombie.exe just seems to do nothing.

 

I would also like to make a suggestion to possibly add a circle tool like can be found at this site. It's worked really well for laying out some structures I've made in the past.

 

https://www.pixilart.com/

 

Thanks again!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...