Jump to content

Hal's Prefab Editor


HAL9000

Recommended Posts

[QUOTE=Guppycur;635393]I just what someone to comfort me and assure me that everything will be okay, and that I will still be able to make and export prefabs. Gaza, hold me? :)[/QUOTE] If my TWD prison can be converted from A15 to A16, I will hold you...but only for as long as I can hold my breadth lol...
Link to comment
Share on other sites

[QUOTE=Guppycur;635256]I'd be all for the editor just choosing the base block and making us paint it in game to export for sharing. Makes sense, and easier for you. The only thing you would need to do (and pilles may be able to already) is allow us trimming layers, columns and rows after exporting the PAINTED prefab, without it losing its paint properties. Yeh. You'd likely have to start from scratch just for the ui, if you included painting...[/QUOTE] It's possible but I doubt it. If there wasn't going to be another editor then I'd probably go this route but it looks like Pille is committed to releasing his and I'm looking forward to seeing his work. [QUOTE=Pille;635326]Due to real life annoyances, it will take a few days (after A16 release) to make the editor compatible to the painting system.[/QUOTE] Ha, I'll just be playing for the first few days! Hell if they give us fair warning I may take some time off! [QUOTE=Pille;635360]As far as I understand the new color system, we can paint each side of a block a different color or texture, right? So why we have to deal with shapes in A16? Isn't that an A17 thing?[/QUOTE] No colours, just textures. Up to 255 of them. You choose from a list of shapes that's made from the right material and then paint the texture on. It can only be done on some blocks (cubish, non-terrain shapes usually). Have a play when it releases and just shout if you want any help with the code for the editor. [QUOTE=Gazz;635369]That's looking great - and I know [I]how[/I] much had changed! LOL[/QUOTE] Thanks for the rotation data Gazz - that stuff worked a treat! I haven't seen anything mis-aligned in anything I've converted so far! [QUOTE=Guppycur;635393]I just what someone to comfort me and assure me that everything will be okay, and that I will still be able to make and export prefabs. Gaza, hold me? :)[/QUOTE] You'll still be able to make and export prefabs.... Probably... :) [QUOTE=Laz Man;635398]If my TWD prison can be converted from A15 to A16, I will hold you...but only for as long as I can hold my breadth lol...[/QUOTE] [QUOTE=Guppycur;635405]Yeh it's the big scary projects that are going to need some loving. For me it's guppyville. Diersville sized.[/QUOTE] PM me with anything you want me to try. It'll be a good test for the converter. Just no prefabs with custom blocks.
Link to comment
Share on other sites

[QUOTE=HAL9000;635560]No colours, just textures. Up to 255 of them. You choose from a list of shapes that's made from the right material and then paint the texture on. It can only be done on some blocks (cubish, non-terrain shapes usually). Have a play when it releases and just shout if you want any help with the code for the editor. [/QUOTE] I guess I have to see it to understand how the system works.^^ If you are going to reimplement the export and import commands, everything should be okay. I really need this stuff for testing purposes. [QUOTE=HAL9000;635560]It's possible but I doubt it. If there wasn't going to be another editor then I'd probably go this route but it looks like Pille is committed to releasing his and I'm looking forward to seeing his work.[/QUOTE] This reaction is exactly what I was afraid of when I released the editor. :)
Link to comment
Share on other sites

[QUOTE=Pille;635650]I guess I have to see it to understand how the system works.^^ If you are going to reimplement the export and import commands, everything should be okay. I really need this stuff for testing purposes.[/QUOTE] Now the converter is ready I'll be looking at converting the bbb code over to A16 soon. There's a bank holiday this weekend so I should get some time. [QUOTE=Pille;635650]This reaction is exactly what I was afraid of when I released the editor. :)[/QUOTE] No pressure then ^^
Link to comment
Share on other sites

Hey Laz, You owe Gup a hug ^^ [IMG]http://7d.l9000.co.uk/TWD01.png[/IMG] [IMG]http://7d.l9000.co.uk/TWD02.png[/IMG] That's taking your [URL="https://7daystodie.com/forums/showthread.php?13610-Prefab-The-Walking-Dead-Prison"]A13 prefab[/URL] and running it through the converter to change it to A14 and then running that through the converter again to A16. There's some rotation issues (I think it's cause it's an A13 prefab) but most of the structure is there
Link to comment
Share on other sites

[QUOTE=Guppycur;635393]I just what someone to comfort me and assure me that everything will be okay, and that I will still be able to make and export prefabs. Gaza, hold me? :)[/QUOTE] Rest easy Gup. The bbb codes are back in and painting aware ^^
Link to comment
Share on other sites

[QUOTE=Guppycur;638425]...gazz is halfway here flying over the Atlantic. Boy, won't HE be pissed when he finds out he's not needed...[/QUOTE] Luckily you'll be there with a hug to calm him down ^^ [QUOTE=Pille;638485]Glad to read that. So we are ready for the battle. :)[/QUOTE] Yep, we should be able to handle anything that crops up. For the prefabs the new texture system is handled similarly to densities. You just have to do some bitmasking to calculate each face into a long value first.
Link to comment
Share on other sites

Nice work everybody !!! :) Good to hear everything will be alright. I wish i could do anything atm - but it seems i have to wait for the off. A16-Release. My plan is to let the A16 custom-Prefabs (COMPOPACK) look like the A15-Prefabs (or at least look-a-like). This means I have to check 500 Prefabs (again :) ) Further I have to learn the new Block- and ShapeSystem, that paintingstuff and ofc the new RWG-mixer. Will be alot of work to do. thx to u guys the CP probably will life on.
Link to comment
Share on other sites

[QUOTE=Pille;640757]Hi Hal, looks like your editor has an integrated check for invalid density values. Could you please explain this feature to me? Would be good to know how the algorithm works.[/QUOTE] Sure, it's pretty simple: [Code] private List CheckPrefabDensitiesAreOk(PrefabEditor p) { var ret = new List(); for (int y = 0; y < p.size.y; y++) { for (int x = 0; x < p.size.x; x++) { for (int z = 0; z < p.size.z; z++) { var b = p.GetBlock(x, y, z); var density = p.GetDensity(x, y, z); if (Block.list[b.type].shape.IsTerrain()) { if (density == 127) { //if block is terrain type then 127 would make it invisible density = 0; ret.Add("Terrain was invisible: " + x + "," + y + "," + z + ": value set to 0"); } else continue; } else if (density == 0) { density = 127; } else { continue; } p.SetDensity(x, y, z, density); } } } return ret; } [/code] Loop through each block. If the block shape type is terrain and the density is 127 then the block would be invisible so we reset it. If it's not terrain then if it's a zero density the game would automatically set it to 127 anyway so we might as well do it now. If it's something else then assume all is good and move on to the next block. [QUOTE=Magoli;640820]Nice work everybody !!! :) Good to hear everything will be alright. I wish i could do anything atm - but it seems i have to wait for the off. A16-Release. My plan is to let the A16 custom-Prefabs (COMPOPACK) look like the A15-Prefabs (or at least look-a-like). This means I have to check 500 Prefabs (again :) ) Further I have to learn the new Block- and ShapeSystem, that paintingstuff and ofc the new RWG-mixer. Will be alot of work to do. thx to u guys the CP probably will life on.[/QUOTE] Hey Mag, Long time no chat ^^ hopefully there'll be less work to do on this conversion but there'll still be some issues around. Just shout if you need anything for the Pack [QUOTE=sphereii;640825]Hal9000, any chance of batch processing the conversion?[/QUOTE] Hi Sphereii, That's always been part of the converter. If you put a full path to a file (D:\7D\Data\Prefab\Cabin_01.tts) it will just convert that, if you put a directory (D:\7D\Data\Prefab\) it will convert everything it finds there.
Link to comment
Share on other sites

[QUOTE=Pille;640757]Hi Hal, looks like your editor has an integrated check for invalid density values. Could you please explain this feature to me? Would be good to know how the algorithm works.[/QUOTE] you could also use the repair chunk code with a little modification to use prefab blocks and size rather than chunk [code] public bool RepairDensities() { Vector3i vector3i = new Vector3i(0, 0, 0); Vector3i vector3i2 = new Vector3i(16, 256, 16); bool result = false; for (int i = vector3i.x; i < vector3i2.x; i++) { for (int j = vector3i.z; j < vector3i2.z; j++) { for (int k = vector3i.y; k < vector3i2.y; k++) { BlockValue block = this.GetBlock(i, k, j); Block block2 = Block.list[block.type]; sbyte density = this.GetDensity(i, k, j); if (block2.shape.IsTerrain()) { if ((int)density >= 0) { this.SetDensity(i, k, j, -1); result = true; } } else if ((int)density < 0) { this.SetDensity(i, k, j, 1); result = true; } } } } return result; } [/code] the numbers are a bit diff to hals results, if its terrain it wont allow any value 0 and over, sets it to -1 if it is, and non terrain is set to 1 if under 0
Link to comment
Share on other sites

If that's code from the game I'd trust it more than my stuff ^^ It does look a bit odd though cause I could have sworn you can have terrain values > 0 as long as they're not 127 but maybe it's a situation of you can, but you shouldn't. The Pimps will know better than I though.
Link to comment
Share on other sites

I tested densities; the terrain block densities made negligible changes and resulted in some pretty decent tearing, so a check on those is good. Block densities is where it's at for smoothing the gap between terrain and blocks, and even those should have like 3 valid numbers and call it a day... I honestly HATE densities, it results in more problems than solutions.
Link to comment
Share on other sites

[QUOTE=Guppycur;641955]I tested densities; the terrain block densities made negligible changes and resulted in some pretty decent tearing, so a check on those is good. Block densities is where it's at for smoothing the gap between terrain and blocks, and even those should have like 3 valid numbers and call it a day... I honestly HATE densities, it results in more problems than solutions.[/QUOTE] Agreed! I wish it was easier to implement. As a side note, because certain block types are now restricted to certain density ranges, it appears to be more difficult to get a seamless transition between a square block and a terrain block. It is not impossible, just not as "clean" looking as before. Hal, any luck the editor will be able to create prefab imposter meshes? (for distant POI) :p If not no biggie. I am sure its no small task.
Link to comment
Share on other sites

[QUOTE=HAL9000;642065]Any guesses what it is Laz? [IMG]http://7d.l9000.co.uk/!DistantTerrainTWD.png[/IMG][/QUOTE] YESSSS!!!!!! *Bows down to the king* Side note, I loaded up the good ole prison last night and started updating it all the new blocks since its last update. Getting it ready for A16. I really want to move onto my next project and hopefully A16 will reignite some motivation. :)
Link to comment
Share on other sites

Archived

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

×
×
  • Create New...