[Mod] ComboBlock [comboblock]

Post Reply
User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

[Mod] ComboBlock [comboblock]

by sirrobzeroone » Post

Image

Allows the stacking of slabs
A fork of the original Comboblock mod by Pithy to work with Minetest 5.0 to 5.6

Features
- Stack traditional half slabs vertically
- Slab stacking will respect rotation if a slab is rotated the second slab will be placed beside
- Rules around placement more intuitive eg click on bottom of node slab placed below, above when clicked on top of node. Upright placement by clicking on edges or middle of target node.
- Correctly handles MT Protection as of 5.5.0.1
- Handles mods with slabs whose textures are different resolutions

Issues
- Can't stack glass and normal slabs together as a node can't have two differing properties ie "normal" and "glasslike".
- Rotate a comboblock node 180 degrees and the node retains what the top slab properties were not the bottom slabs properties which is now on top. Single node cant have properties off two different nodes. However enjoy making Ice slippery wooden floors :)

Depends
Required: Stairs (well not really but you need a mod with slabs)
Optional/Work:
  • Farming, Included in Minetest Game
Leave a comment if theirs a slab mod you would like to work, although give it a try it may just work.

License
Comboblock is licensed under unlicence except for the function
"rotate and place" which has been copied unchanged from the Stairs mod
inside the Minetest Game and is under LGPL 2.1.
Further Detail: https://github.com/sirrobzeroone/combob ... icense.txt

Downloads
Release 5.6.0.1
Release 5.5.0.1
Release 5.4.0.1
Release 5.3.0.1
Release 5.2.0.3
Source Code
ContentDB
Attachments
Comboblock.png
Comboblock.png (258.98 KiB) Viewed 2005 times
Last edited by sirrobzeroone on Tue Jan 24, 2023 09:39, edited 19 times in total.

User avatar
pampogokiraly
Member
Posts: 293
Joined: Wed Jan 08, 2020 22:21
In-game: i_love_mesecon

Re: [MOD] ComboBlock for MT 5.2.0

by pampogokiraly » Post

Very nice mod! Thank you so much again ;D

Edit: Also, nice logo.
All praise the Bacon God! The one and only god in MineTest

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [MOD] ComboBlock for MT 5.2.0

by sirrobzeroone » Post

pampogokiraly wrote:
Thu May 21, 2020 16:11
Very nice mod! Thank you so much again ;D

Edit: Also, nice logo.
Thanks again and thanks for all your help identifying those bugs and issues. I think its helped the mod be much more robust and user friendly :)

I did have one additional feature I was looking at but it's a bit beyond the scope of what comboblock does but then it makes sense to me for it to work this way in some cases just not sure if it would be helpful or annoying (i can see both scenarios).

I'm fairly sure I could adjust the code so that if you clicked on a slab that was rotated vertically and the new slab should go above or to the side the new slab would inherit the orientation of the slab you clicked on. I see this as sort of consistent behavior as it does this when you click on the side of node the slab is placed top/bottom of the node to the side this is just a sort of extension of that behavior. Im just not sure if on balance this would be annoying or helpful ie less using of the screwdriver if you wanted to do a big run of vertical slabs say along the front of a wall? Hopefully what Im suggesting makes sense...if not ill post a picy.

CalebJ
Member
Posts: 407
Joined: Sat Dec 29, 2018 19:21
GitHub: KaylebJay
IRC: KaylebJay
In-game: CalebJ
Location: Tunnelers' Abyss

Re: [MOD] ComboBlock for MT 5.2.0

by CalebJ » Post

This is a very interesting mod. It does jump the node count, that's a problem, but it works very well and is a great building tool. Thanks for it, good job! :)

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [MOD] ComboBlock [MT 5.2.0]

by sirrobzeroone » Post

Comboblock 5.2.0.3 released and ready so long as I didn't stuff something up during upload.
  • Can now handle mods and base texture packs at different resolutions - setting under all settings - see Readme.
  • Changed from using depends.txt to mod.conf
  • Started to add localization file (sorry German speakers I just needed something to start with)
  • Renamed screenshot to "screenshot.png"
Pretty happy with the multi resolution support for slabs although it does up/down scale the mods depending on whatever resolution/scale you have the setting set to under all settings. I would have liked to have made this automated rather than something users have to worry about but no luck yet.

Here's a screenshot that shows 3 different res's all working together happily painterly as base pack at 128px, Jonez at 32px cracked castle and moreblocks at 16px - so my comboblock "Scale Textures to" setting is set to 128...naturally down scaling looks rougher but works fine, I tested that using default with Jonez and no issues:

Image
Attachments
screenshot_5_2_0_3.png
screenshot_5_2_0_3.png (423.64 KiB) Viewed 2005 times

User avatar
pampogokiraly
Member
Posts: 293
Joined: Wed Jan 08, 2020 22:21
In-game: i_love_mesecon

Re: [MOD] ComboBlock [MT 5.2.0]

by pampogokiraly » Post

GG! I have nothing else to say i think XD
All praise the Bacon God! The one and only god in MineTest

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [MOD] ComboBlock [MT 5.2.0]

by sirrobzeroone » Post

thanks both :)

I've been looking at the performance trying to isolate down were the code is slow. Unfortunately it looks like it's in the register nodes chunk and a fair amount of time is taken up doing all image conversions and overlays. Not to surprising as there is a lot going on for each node image-wise and lots of nodes once you start working out number of combinations with about 97 unique slabs with moreblocks active (around 9000-ish - lose a few as glass slabs and normal don't combine).

I'll play around and see if there is anything, that can be done...

User avatar
pampogokiraly
Member
Posts: 293
Joined: Wed Jan 08, 2020 22:21
In-game: i_love_mesecon

Re: [MOD] ComboBlock [MT 5.2.0]

by pampogokiraly » Post

strange.. i haven't seen any lag at all :P
All praise the Bacon God! The one and only god in MineTest

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [MOD] ComboBlock [MT 5.2.0]

by sirrobzeroone » Post

Its only on load and probably only if your on some fairly antique piece of hardware like myself :). But comboblock does have a noticable impact on game loadtimes, I probably cant do anything but thought it was worth a look, nothing like waiting a few mins or so for a game to load :)

User avatar
pampogokiraly
Member
Posts: 293
Joined: Wed Jan 08, 2020 22:21
In-game: i_love_mesecon

Re: [MOD] ComboBlock [MT 5.2.0]

by pampogokiraly » Post

lol! I use so much mods that i don't even notice it XD
All praise the Bacon God! The one and only god in MineTest

User avatar
daret
Member
Posts: 136
Joined: Tue Nov 12, 2019 20:36
GitHub: daretmavi
In-game: Daretmavi

Re: [MOD] ComboBlock [MT 5.2.0]

by daret » Post

Greate mod, thanx.

User avatar
sare
New member
Posts: 7
Joined: Wed Sep 06, 2017 08:46
IRC: sare_at_work
In-game: sare

Re: [MOD] ComboBlock [MT 5.2.0]

by sare » Post

Hi, i wanted to use this gread mod, but have a problem with MT 5.3.0.
Maybe my mistake?

Or too many blocks for slab combination?

Thanks,
sare
01-12-_2020_12-16-22.png
01-12-_2020_12-16-22.png (51.86 KiB) Viewed 2005 times
~ if nothing goes right, go left ~

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [MOD] ComboBlock [MT 5.2.0]

by sirrobzeroone » Post

Sorry for my slow reply, yes unfortunatly you have hit the node limit.

Ill have a look and see if theres a way to not try and register beyond node limit and just print a warning that not all slabs have combinations.

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [MOD] ComboBlock [MT 5.2.0]

by sirrobzeroone » Post

I've just pushed a change to source:

https://github.com/sirrobzeroone/comboblock

Comboblock will I guess you could say fail more elegantly now if 32668 nodes have been registered. This will mean Comboblock wont stop the game from loading. I have set Comboblock to stop registering 100 nodes below max this is to give any later mods that want to register nodes and slim chance of being able to although if they have more than 100 nodes to register then it will still cause a load failure. If theres intrest I can make that node limit a mod_setting so it can be adjusted up and down by minetest settings ui.

I've also added a Warning that will get printed to debug, depending how many nodes fail this could poduce a long list of errors.

Code: Select all

2020-12-15 06:43:35: [Main]: WARNING:Comboblock - Max nodes registered: 'some_mod:slab_random_thing' slab combos not registered
I'd be intrested how the above go's, I artifically tested by lowering my node limit down to check it worked okay but it would be cool to know if this works live were Sare your hitting this limit fo real.

I'll wrap up a new version shortly and add it to contentDB and first post.

User avatar
LRV
Helper
Posts: 378
Joined: Mon Dec 19, 2016 17:29
GitHub: Mooncarguy
In-game: Mooncarman Mooncarguy

Re: [Mod] ComboBlock [comboblock]

by LRV » Post

Mod follows guidelines and was moved.
This is a cool signature. :)

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [Mod] ComboBlock [comboblock]

by sirrobzeroone » Post

Tested and confirmed as working with MT engine 5.4 and mtg matching. Nil changes except version number so if you already have this installed and working under 5.4 no need to update.

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [Mod] ComboBlock [comboblock]

by sirrobzeroone » Post

I had a go at getting this running for mineclone2 but although I can fix the code errors and make it not dependent on stairs, it wont load gets jammed on item definitions (litrally load bar hangs on the screen saying item definitions) I can see in debug the server is listening okay but singleplayer never joins. My guess is something to do with menu's or huds maybe...anyways spent more than a few hrs trying to track down were with no luck I'll have another go later.

The code errors related to the assumption I made about registered texture structure which was a few lines of code fix. Since that overall makes the code base more resilient I'll roll those into the next version I do.

Grubler
Member
Posts: 98
Joined: Wed Nov 06, 2019 03:01
In-game: Grubler

Re: [Mod] ComboBlock [comboblock]

by Grubler » Post

Is it already noted that it seems like sometimes it does a thing where a sort of phantom slab gets added to a stack so it is like 2 were placed instead of 1, and then when you add another next to it, it goes away and leaves the 1? And also would it be possible to be able to target and break the bottom slab of a stack of 2 instead of always having to break the top one first? I have seen where I want to break a wooden slab, but the stone slab on top needs me to use a pick to break it before I can remove the wooden one underneath. Just wanted to maybe share that, I guess. Otherwise seems to add a lot of building potential and stuff, maybe. Yeah.

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [Mod] ComboBlock [comboblock]

by sirrobzeroone » Post

I'm working on a big update to Comboblock.

I've just commited a big change to github which changes the place and rotate code, significant simplification - 800 lines down to 400 lines but more importantly about 1000x more understandable, also makes use of raycast which helped heaps with simplification.
Placement now happens on 5 quadrants on each side and I carefully configured the placement so the large flat sides are in the same alignment as a full node, so if you want alcoves in a wall it will appear the same. Not much I can do about the short sides.

Click placement image - side clicks result in poking out/up on that edge, middle click results in flat against existing node/slab.
Image

Naturally the above only works if theres not already a slab sitting in that node space. I've done a fair bit of testing myself but it would be great if a few others could give the code a workout and see if I've missed anything - No release just need to grab master:

https://github.com/sirrobzeroone/comboblock

Next I'll be working on the destroy code basically I'm hoping to do a reverse of the above placement so like Grubler has asked if you target a slab thats the one destroyed at the moment it always destroys the top slab. Which is slightly annoying. The phantom slab placement I'm hoping has been addressed by cleaning up and radically changing the way slab placement is checked for.

I'll go work on that destroyed code now.

Edit - I should have mentioned I also fixed the too many nodes registered code and do a more through check for slab nodes that are registered but use tiles = "image_name.png" instead of tiles ={"image_name.png"}
Attachments
comboblock_place_quadrants.png
comboblock_place_quadrants.png (692 Bytes) Viewed 1656 times

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [Mod] ComboBlock [comboblock]

by sirrobzeroone » Post

Just a quick reply I've uploaded changes to master that now mean which ever slab in the comboblock node your targetting, that is the slab that is removed and returned to player. As with the above this works for all 3 axis's

I'm still testing myself but if you want to give it a try feel free:
https://github.com/sirrobzeroone/comboblock

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [Mod] ComboBlock [comboblock]

by sirrobzeroone » Post

Minor addition to the current dev work, Comboblock should now respect protected area's. Previously it was possible to place a slab on another slab in a protected area that you didn't own or have the rights to build in. This hole I created should now be patched.

Good mod to test this from solo is Protector redo if anyone wants to give it a try - viewtopic.php?f=11&t=9376

Thanks to LMD for confirming how protection works.

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [Mod] ComboBlock [comboblock]

by sirrobzeroone » Post

Testing hasn't revealed any issues I've been able to spot - so I'll wait another day or so then do a new release.

I did just add my last little update which is an attempt at some usage instructions using just pictures no words so easier - less translating. Not sure I quiet succeded but hopefully it might help someone. Just aware more people are downloading directly from ContentDB and then straight into game now without reading the readme for a mod.

Anyways this is what I came up with (Might have crushed the image a bit to much for forum posting not that jagged in game):
Attachments
letter_comboblock.png
letter_comboblock.png (8.61 KiB) Viewed 1556 times

Post Reply

Who is online

Users browsing this forum: No registered users and 26 guests