Project Zomboid

Project Zomboid

[B42] Better Building
45 Comments
Blessed Mother 4 Jun @ 11:53pm 
@RedChili Is there a way to make it so it doesn't appear every time I load my save?
RedChili  [author] 31 May @ 11:51am 
@Alpha Gamer SHIFT + X by default, you can rebind in the mod options. You can check the feature list I have in the description, I list all the keybindings and different options.
Alpha Gamer 31 May @ 11:30am 
how do you get rid of the hotbar when you dont need it as its annoying to have on screen
RedChili  [author] 16 Apr @ 2:13am 
@σ Fred Flintstone Yes it will work on pre-existing saves, it can be removed safely as well
σ Fred Flintstone 15 Apr @ 8:53pm 
Is it confirmed wether this mod is supported for pre-existing saves?
Proud Wingman 5 Apr @ 6:18am 
The hotbar position is now properly restored if i load a savegame. Thanks for that!

Looking forward to the progress of this mod. Thanks for your statement :)
RedChili  [author] 5 Apr @ 5:26am 
Sorry everyone, this mod has been taking a back seat while I worked on the Skateboard and Kick Scooter. Since no one has reported any more bugs I will finish up some stuff for the other mods and then come back to this one to add more features.

If anyone bumps into any issues, just let me know and I'll fix it!
Proud Wingman 30 Mar @ 8:50am 
Thanks. Gonna test now. Quick feedback and updates. Great to see!
RedChili  [author] 29 Mar @ 4:31am 
I fixed the hotbar position not saving issue real quick, it should persist now
RedChili  [author] 29 Mar @ 4:25am 
I got delayed a bit with the planning mode, I had an idea for a different mod and just had to do it
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/comments/3453879909

But I'm gonna go back to working on planning mode now, I'll keep you all updated on the progress!
RedChili  [author] 28 Mar @ 6:59am 
@Proud Wingman that's odd, it should indeed be saving the position per savegame. I'll take a look and see if I can modify the save method to make sure it always saves.
Proud Wingman 27 Mar @ 5:55am 
Is it just happening for me or do i need to place the hotbar UI after every game load into the desired position? Is the position not saved per savegame?
RedChili  [author] 27 Mar @ 3:43am 
@slimeform Thanks! Yeah the poster looks like AI because it is, I'm not a graphic designer and don't have the funds to commission someone to make something for me unfortunately. Maybe if it gets popular enough someone will want to make me a poster.

@PanicLedisko Thank you so much! I've started on the planning mode, but it's definitely gonna be a big undertaking, might take a week or two to get something working properly
PanicLedisko 26 Mar @ 11:45pm 
Dude this mod looks awesome! I'm installing it now and I'm absolutely looking forward to the possibility of having the planning mode. I don't understand why it's not vanilla honestly! I'm wishing you good luck on trying to figure out how to implement it!!
slimeform 26 Mar @ 5:54pm 
mod looks great but the mod thumbnail has that AI look to it
RedChili  [author] 25 Mar @ 7:24am 
Small update just pushed that adds a tooltip when hovering on a recipe so you can see materials/tools required to build, and fixed a bug when building stuff that can't be rotated (for example gravel floor)

I'm gonna start on the preview and planning modes, but they will likely take quite some time since they are complex and there's no current system that is similar to it in the game already.

Please keep reporting any bugs you bump into and I'll do my best to patch them quickly.
RedChili  [author] 25 Mar @ 7:24am 
@Aba Dabba Yeah The Forest is awesome! I'm taking a lot of inspiration from games like Satisfactory, Valheim, and The Forest to try and improve the PZ building experience :)
Aba Dabba 24 Mar @ 7:05pm 
The Forest Mentioned, Peace, at Last
That sounds like such a cool feature though I was fixing up a cabin and I could not stop thinking how much that reminded me of The Forest and Sons of The Forest
RedChili  [author] 24 Mar @ 5:16pm 
Added two QoL features:
1. It's now possible to drag recipes on the hotbar to re-arrange them.
2. You can now assign recipes by opening the build menu, holding down a number key, and then clicking on the recipe you want to assign in the list.

Notes:
The vanilla hotbar will still trigger, but only when tapping a number key, not when holding, so you can still use the vanilla hotbar items with the build menu open, and only when holding a number key down to assign will it block it.

You can still move the builder's hotbar, just grab where there's no recipe slot to move it around.
RedChili  [author] 24 Mar @ 11:27am 
@Whisperer No unfortunately not, B42 introduced a whole new system for how things are built, so porting this to B41 will be a crazy amount of work and I might not even be able to do it. I also haven't actually played B41 and probably never will, that's why I'm only focusing on B42
Spongebob CirclePants 24 Mar @ 10:47am 
Does this work for B41?
RedChili  [author] 24 Mar @ 7:30am 
@Proud Wingman Hell yeah! Let me know if you bump into any issues!

I think the next thing I'll do is make this same system work for crafting as well, so you can have builder's and crafter's hotbars.
Then I'll make it so it's possible to click and drag to reorder the items on the hotbar.
Proud Wingman 24 Mar @ 6:17am 
Yay great update. Now that the hotbar is not triggered anymore I am happy to test your mod.
RedChili  [author] 24 Mar @ 6:09am 
Alrighty, gamepad support is out!


Assigning a Recipe:

1. Open the build menu (hold BACK and select Build).

2. Navigate to your desired recipe and press X.

3. Select a slot and press RB to assign the recipe.


Building an Assigned Recipe:

1. Hold RB and then hold Left on the D-Pad to open the recipe menu.

2. You can now release RB (but Left still held), choose the recipe you want to build and then release Left to build it.


Also fixed so that vanilla hotbar is not triggered if you have the Builder's Hotbar open and you hold down SHIFT + 1-8 to build. Vanilla will still trigger if you don't hold down SHIFT, so it should be a smooth experience.
N0wh3re 23 Mar @ 5:05pm 
@RedChill Okay I will try later :) I just realized I forgot to say how to reproduce... sry

I will tell you when this happened again in future. gg!
RedChili  [author] 23 Mar @ 4:57pm 
@N0wh3re I added a check that should hopefully fix the issue you're having. I wasn't able to reproduce it so can't say for sure it will work, so let me know if you still have the same error.

Rotation now persists after building an object and you have material to keep building.
Also fixed so you can't build from the builder's hotbar if it's hidden, pressing SHIFT + 1-8 when it's hidden will not do anything now.

I'm almost done with controller support. What you will be able to do is open the builder's menu as usual using back button, then when you go to select a recipe you can press X and it will bring up a radial menu where you select a slot that you want to assign the recipe to, then press right trigger to assign it. Then you will be able to hold RB + Left on dpad to open a radial with your saved recipes.
Should be done tomorrow or Tuesday!
RedChili  [author] 23 Mar @ 5:18am 
@LokiPhur, I made some tests on a new save with just this mod active and it's not building the furniture instantly for me, it's the same as vanilla. My mod basically just calls the vanilla building function, it shouldn't mess with the build timing at all.
But if you give me a list of your mods I can take a look and see if any of them maybe use a function that I've replaced.

If anyone else have the same issue with the furniture building instantly, it would be great if I could get the mod list there too, will help pinpoint if there's a conflict

@N0wh3re oh yeah that shouldn't happen, I'll take a look and see what could be causing it!

Also figured out how to hook into the back button on controller without replacing vanilla so should be able to make a clean non-obstructive solution
N0wh3re 23 Mar @ 4:40am 
after this error, the window about key-assignment wouldn't be closed by clicking cancel. also no assigned.
not too critical error but you may want to know this :)
Thank you for good mod anyways.
N0wh3re 23 Mar @ 4:36am 
STACK TRACE
-----------------------------------------
function: onCancelAssignment -- file: ISBuildingHotbar.lua line # 260 | MOD: [B42] Better Building
function: onMouseUp -- file: ISButton.lua line # 56 | Vanilla

ERROR: General f:243390, t:1742727789075> ExceptionLogger.logException> Exception thrown
java.lang.RuntimeException: attempted index: removeFromUIManager of non-table: null at KahluaThread.tableget(KahluaThread.java:1667).
Stack trace:
se.krka.kahlua.vm.KahluaThread.tableget(KahluaThread.java:1667)
se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:624)
se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:173)
LokiPhur 23 Mar @ 4:34am 
The furniture seems to be built instantly for me, like counters and containers. It could be a mod doing it but I dont have any mods that mess with building. Drying racks get built instantly as well I believe. Although im not entirely sure if thats vanilla or just the food drying mods I have. I will check.
LokiPhur 23 Mar @ 4:32am 
Thank you @RedChili !! Blessed to have modders like you
RedChili  [author] 23 Mar @ 4:15am 
Small patch coming today that fixes the rotation not persisting after building and triggering the Builder's hotbar even when it's hidden.

I will try to get the gamepad working today as well, I am trying to find a way that does not override the vanilla back menu because if you use any other mods that overrides it, there will be a compatibility issue which I want to avoid as much as possible.

But if I can't figure out a clean way to keep vanilla back menu but have it open my custom build menu, then I'll release it with the replacement method and add a warning about potential compatibility issues with gamepad mods.
RedChili  [author] 23 Mar @ 4:10am 
@LokiPhur actually could you give some examples of a building that is instantly built? I was trying to find a recipe that has time set to 0, but I couldn't find any, and all the ones I've tried in game have a build timer. So nothing should be instantly built already, but there could definitely be a bug somewhere in the vanilla code or my code that causes it to happen
RedChili  [author] 23 Mar @ 1:27am 
@Markovicz Oh woah, I'm pretty new to PZ (started playing like a month and a half ago) so had to look up who that is and realized I've watched a bunch of his videos haha

@LokiPhur that should be possible yeah, I think there's only a check for maximum time to build, but not minimum, so I could try to put a check for minimum time to build and whenever it's 0 I bump it up. I'll probably add it as an optional toggle in mod settings
LokiPhur 22 Mar @ 5:54pm 
Any chance to give building things a timer? the instant build of some things is immersion breaking.
Markovicz 22 Mar @ 1:28pm 
you know youre doing good when retanaru the goat comments :cherrypie:
Groggybear 21 Mar @ 4:57pm 
Nice one man will keep an eye for an update
RedChili  [author] 21 Mar @ 4:48pm 
@Groggybear at the moment unfortunately not, but it shouldn't take long for me to add, i laid the groundwork for it. I just didn't have my controller to test with, but expect it to work next week!
Groggybear 21 Mar @ 4:44pm 
Does it work with gamepads?
RedChili  [author] 21 Mar @ 4:20pm 
Glad you guys like it! I think I might as well make this mod better for crafting as well, like bringing back saw all planks, make a hotbar for crafting stuff as well, etc. So if anyone has suggestions for improving crafting, let me know and I'll put it in!
tilarium 21 Mar @ 11:38am 
Pretty handy! My thanks, RedChili!
Retanaru 21 Mar @ 9:55am 
Instant win.
RedChili  [author] 21 Mar @ 9:08am 
@Markovicz cheers man, hope it works well for you!

@Cyber_D that's a great idea! I will add it to the planned features
Cyber_D 21 Mar @ 8:04am 
hmm, what if couple of slots will be for last used recipes?
Markovicz 21 Mar @ 7:09am 
Came here from your Reddit post. It looks amazing! A proper example of a decent QoL mod! :cherrypie: