Jump to content

Hal's Prefab Editor


HAL9000

Recommended Posts

I've been addicted to this prefab editor. I may need an intervention soon :) Having had a chance to really dive into this I do have a few feature requests. 1. Editing of columns and rows Keyboard shortcuts for the addition/removal of columns and rows. Maybe something like this; Remove Left Column shift+a Remove Right Column shift+d Remove Top Row shift+w Remove Bottom Row shift+s Add Left Column alt+a Add Right Column alt+d Add Top Row alt+w Add Bottom Row alt+s 2. Replace Block ID Match rotation feature & checkbox on Replace Blocks pane. Perhaps just below the option. Basically any blocks replaced would retain the original block rotation. Kindly sudo
Link to comment
Share on other sites

Hi Sudo, Keyboard shortcuts are something I've been wanting to do. It's just a pain in the @ss and I'm lazy :) but I'll get round to it at some point. When replacing blocks it should already keep the rotation of the original block. Does it not for you? I've just tested changing a layer of concrete to asphalt and it worked fine. Cheers, Hal
Link to comment
Share on other sites

Hal I'm wondering if It wasn't another process that muddled things up. Could have been my fault. I had a cutlog structure that I was experimenting with. Basically I was trying out other blocks using the replace block ID feature but when I went back to the cutlog block the rotations weren't as they were. Strange but no big deal. I did just now test this on a new build and it seems to be working OK. Thanks Sudo
Link to comment
Share on other sites

Hey Hal, I was just building New Gravestown for out map. I was working on the Marina area which I decided to make a larger prefab for this time. 300 X 300 block. So I guess I pushed your editor a little hard because it wouldnt let me edit the layers (IE. Remove layers, rows, ect..) It would crash. If you like I can send you the .ex file i was working with so you can test it. I'd like to make larger prefabs in the future. Right now I've stayed with 221 x 221 blocks because that is the largest that the editor has allowed me to work with and no crash. Let me know what information you need from me and I'll make sure i get it. SDK
Link to comment
Share on other sites

[QUOTE=Shadow Doctor K;70876]Hey Hal, I was just building New Gravestown for out map. I was working on the Marina area which I decided to make a larger prefab for this time. 300 X 300 block. So I guess I pushed your editor a little hard because it wouldnt let me edit the layers (IE. Remove layers, rows, ect..) It would crash. If you like I can send you the .ex file i was working with so you can test it. I'd like to make larger prefabs in the future. Right now I've stayed with 221 x 221 blocks because that is the largest that the editor has allowed me to work with and no crash. Let me know what information you need from me and I'll make sure i get it. SDK[/QUOTE] Hey Shadow, Yeah you'll hit a limit on how big the prefabs can be. It's limited by either the amount of RAM you have or the amount of RAM a .NET process can allocate itself. A 64 bit version of the editor will probably help but the full solution of keeping the file on disk instead of in memory is a big task and it'll be a while before I have that amount of free time. When I get some free time later I'll release a test 64 bit version and see if it helps. Hal
Link to comment
Share on other sites

[QUOTE=HAL9000;71047]Hey Shadow, Yeah you'll hit a limit on how big the prefabs can be. It's limited by either the amount of RAM you have or the amount of RAM a .NET process can allocate itself. A 64 bit version of the editor will probably help but the full solution of keeping the file on disk instead of in memory is a big task and it'll be a while before I have that amount of free time. When I get some free time later I'll release a test 64 bit version and see if it helps. Hal[/QUOTE] I can't wait =] I'm holding 64 GBs of ram in my Development Rig so I'm looking forward to digest the game sometime soon. Thanks for this great tool. If you need help testing let me know. I have a couple different setups I can test it out on. SSDs, Standard HDs, 4 Gb - 64Gbs of ram. Thanks for the responce. SDK PS. I'm going to look into the .net processes and see if i can bump the buffer its allowed for ram. If I find a solution i'll post it for other here.
Link to comment
Share on other sites

Ok here's a test release for the 64 bit version of the editor. A few notes: 1) Only download this if you know what you're doing with computers. I'm not preventing any crashes from silly inputs or user error. I highly doubt you'll do anything to damage your computer (and it's not my fault if anything suddenly sets on fire) but there's many ways to break this program and I won't be fixing it. 2) IT'S HUNGRY! Large prefabs use a lot of RAM and if you go over the amount you have installed in your system it'll start paging it which will lock your system and require a long wait or a reboot to sort out. Prefabs get big quickly when you start adding height so keep an eye on it. I think prefabs take around 60 bytes per block you want to make rough calculations of x * y * z * 60 < RAM bytes. 3) Don't overwrite the editor you've already downloaded. This doesn't have the update checks and won't be updated automatically. 4) When using the functions for add/remove layer etc it can create a second prefab of around the same size as the original so you'll need twice the RAM you're using to access these functions. 5) This is mixed in with an updated drawing function so you should notice quicker renders when moving the mouse over large prefabs but there's still some bugs so if you're moving the mouse around and it's drawing weirdly either move the layer up and down or set the scale to be different to force a complete redraw. Here's the [URL="http://www.vendocode.com/SDTD64.zip"]link[/URL] --EDIT-- I always forget things... 6) It's 64 bit so you'll need a 64 bit operating system to use it 7) It uses .NET Framework 4.5 so if you don't have it installed you'll need to grab a copy Hal
Link to comment
Share on other sites

Hey Hal, After working with your editor for a few prefabs, I notice that the way you have the coordinates laid out, the "Y" is reverse from what I would expect. What I mean is.. If I was to place a prefab at world location 10,10,10... this is from the lower left corner of the prefab. I assume facing north nothing rotated. When I use the editor I would like to be able to quickly find real game coordinates. If the 0,0 was also in the lower left corner I could quickly add the x,y to my placement location and get an in game coordinate. thus editor 2,2 would translate easily to 12,12 in game. Also, If we could provide a display offset, or the placement coordinate X,Y and possibly Z, then we could display the matching game coordinate as we move the cursor just as you do with 0,0. and the layer could also show the in game layer based on the offset value. it would make matching up in game coordinates to editor coordinates much simpler. Not sure if you understand what I'm trying to say. But I hope so. Thanks.
Link to comment
Share on other sites

Many thanks Hal. I think I've logged more time in your editor than i have in the actual game. Edit I was just curious if there's a way to draw more than one block at a time. For example a 6 block circle for large landscaping alterations.
Link to comment
Share on other sites

[QUOTE=Wsiegel;71558]Hey Hal, After working with your editor for a few prefabs, I notice that the way you have the coordinates laid out, the "Y" is reverse from what I would expect. What I mean is.. If I was to place a prefab at world location 10,10,10... this is from the lower left corner of the prefab. I assume facing north nothing rotated. When I use the editor I would like to be able to quickly find real game coordinates. If the 0,0 was also in the lower left corner I could quickly add the x,y to my placement location and get an in game coordinate. thus editor 2,2 would translate easily to 12,12 in game. Also, If we could provide a display offset, or the placement coordinate X,Y and possibly Z, then we could display the matching game coordinate as we move the cursor just as you do with 0,0. and the layer could also show the in game layer based on the offset value. it would make matching up in game coordinates to editor coordinates much simpler. Not sure if you understand what I'm trying to say. But I hope so. Thanks.[/QUOTE] Hey Wseigel, Yeah the reversed Z (it's the Z location not the Y (that's height in the world) but on a 2D view it gets confusing) position comes from the prefab file format itself. I first coded it the way you're thinking but everything added to the world is inverted on the Z axis. It seemed backwards to me too but that's because I'm used to windows layouts. Macs often use bottom left as the position start. The block position should be displayed in the top left of the form in the title bar when you're hovering over a block. Is that what you mean? I can look at adding an offset position so it'll display the world coordinates but it'll be when I'm back actively updating again. [QUOTE=sudo;71566]Many thanks Hal. I think I've logged more time in your editor than i have in the actual game. Edit I was just curious if there's a way to draw more than one block at a time. For example a 6 block circle for large landscaping alterations.[/QUOTE] Hi Sudo, I don't think I've replied to your PM yet. Sorry, I've been busy. I have read it and looks promising! Other than the middle-click and drag for filling in large areas there's no multi block tools at the moment. You can make a shape and copy/paste it though using the copy radio button. Hal
Link to comment
Share on other sites

Hey Hal... No it is the "Y" I was talking about. you have 0.0 at the top left of the window and increases as you move down in the editor opposite from the normal Y movement of north increase, south decrease. The X is fine as right increases and left decreases. IE 0,0 I think should be in the lower left as the prefab is. That way it would directly relate to the map coordinates. Then an editor coordinate of say 2,10 ( 10 in the Y ) would be the placement of the prefab in game position ( +10) = real game coordinates. Hope that made better sense. Thanks
Link to comment
Share on other sites

Thanks Hal. No need to apologize. You've been such a huge help to us all. Just to give you some insight I added a large series of tunnels to one of my prefabs. They were so popular I got to thinking about a prefab based on Metro 2033. I went ahead and got started on a 500x500x60 prefab that would be a mock of the Washington DC metro system. So far It's pretty easy especially with the new 64bit editor. Where I run into trouble is curves. I've created a series of premade curved block arrangements on my prefab that I can copy and paste. Should be pretty neat all said and done. Thanks again sudo
Link to comment
Share on other sites

This has likely been mentioned before but I can't find the post. Would it be possible to optionally support icons along with colors? I don't mind working on a sprite sheet for this. I could have them no bigger than 16x16. Given how blocks tend to change in the game for every version, though, it may have to be configured to where the user can change it manually.
Link to comment
Share on other sites

[QUOTE=Wsiegel;71644]Hey Hal... No it is the "Y" I was talking about. you have 0.0 at the top left of the window and increases as you move down in the editor opposite from the normal Y movement of north increase, south decrease. The X is fine as right increases and left decreases. IE 0,0 I think should be in the lower left as the prefab is. That way it would directly relate to the map coordinates. Then an editor coordinate of say 2,10 ( 10 in the Y ) would be the placement of the prefab in game position ( +10) = real game coordinates. Hope that made better sense. Thanks[/QUOTE] You're absolutely right Wseigel. -1 to me for going from memory rather than checking the code. It's updated in the next release. [QUOTE=Hiyoto;72378]This has likely been mentioned before but I can't find the post. Would it be possible to optionally support icons along with colors? I don't mind working on a sprite sheet for this. I could have them no bigger than 16x16. Given how blocks tend to change in the game for every version, though, it may have to be configured to where the user can change it manually.[/QUOTE] Sure, if you're willing to create (and maintain) the sprite sheet I'll build it into the editor and keep it updated for the new releases. Most of the code is already there as the entities are drawn as icons. Performance may need testing but it'd be nice for people to have the option. I'm hoping to have some free hours this weekend to catch up with some 7DTD coding. I'll be trying to get DNC's funky prefab importer merged into the editor, FTP access back into the editor software and hopefully (but no promises) some new software for you guys to play with that I think you'll like. Hal
Link to comment
Share on other sites

Would it be possible to get a latest export of all items? You provided [URL="http://www.vendocode.com/BlockHex.txt"]this [/URL]a while back, but I don't know if it's up to date. I'll be using it as a personal checksum to see what needs to be updated.
Link to comment
Share on other sites

[QUOTE=Hiyoto;72968]Would it be possible to get a latest export of all items? You provided [URL="http://www.vendocode.com/BlockHex.txt"]this [/URL]a while back, but I don't know if it's up to date. I'll be using it as a personal checksum to see what needs to be updated.[/QUOTE] Yep, that link now has the latest blocks in it. Hal
Link to comment
Share on other sites

Hal, When you change the zero location maybe you could quickly add a place on the right of the screen maybe above your block in layer list that the user can input the prefabs intended location. X, Y, Z, ( default to "0" ) then the current cursor position under it. this could be update by adding the X, Y, and Z of the current cursor position to the intended prefab location. ( even if a negative coordinate ) This would make finding an in game location in the prefab editor so much easier. a "current region" block would also be cool. I know I know... and I want a pony and I want... lol Sorry for being long winded. Thanks.
Link to comment
Share on other sites

Hal.. I found the way to add decals to the top of blocks.. it involves the meta tag plus another flag. in the editor maybe you could have a check box for meta tags for decals that would add this bit. there are 15 meta tags for decals. they are shown in the models_1 asset, however they are not named... I can name them for your editor later. Normal Asphalt block place down west. hex code 0F 00 00 00 ( decimal 15 ) Asphalt block with meta tag 12 added hex code 0F C0 00 00 Now to turn on decals for meta tags hex code 0F C0 [COLOR="#FF0000"]0F[/COLOR] 00 I edited my prefab with a hex editor and turned that (nibble?) on to F and decals began showing up. Now I can see if all blocks will accept this meta tag decal. Right now it appears that it is top of the block only. Cheers.
Link to comment
Share on other sites

Opps.. correction there are 16 decals... 0 is a valid decal with that flag turned on. here is a screen shot with the decals meta tags listed. [URL=http://s267.photobucket.com/user/wsiegel/media/7DaysToDie2014-05-0209-05-30-901.png.html][IMG]http://i267.photobucket.com/albums/ii294/wsiegel/7DaysToDie2014-05-0209-05-30-901.png[/IMG][/URL]
Link to comment
Share on other sites

Archived

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

×
×
  • Create New...