[Mod] Hexagonal* Prisms [hex]
[Mod] Hexagonal* Prisms [hex]
I once read in the Minetest modding book that before releasing a mod, one should think about whether it is useful. This mod isn't.
But it is fun to play with it.
* Technically, they are not hexagonal, but dodecagonal, but I still prefer this name because it just sounds better and seems easier to imagine.
Since I am totally new to this forum, I may introduce myself, but there is not very much to say. As you will see when you read further, my largest motivation for playing Minetest is that I have way too much free time. I am an unskilled programmer and a horrible texture designer. English is not my mother tongue, please correct me if I make mistakes.
Presenting...
hex (version 0.1)! (Imagine a dramatic fanfare here.)
description.txt says "This mod adds prisms with a hexagonal base area which behave similar to nodes." And that's it, basically.
I got a bit bored by all those cubes, so I added prisms. They are entities, technically, and "similar to nodes" is an exaggeration (no ABMs, no VoxelManip, no digging animation), but you can build houses out of them - if Minetest doesn't decide that there are too much entities in some area and removes all of them.
This mod adds a simple API described in api.txt for adding your own prisms and already registers two prisms: Basalt and a Basalt slab.
License:
The parts of the code which were written by me, Schnux: LGPL 2.1.
I copied and adjusted some lines from the "carts" and "stairs" mod from Minetest Game, this is documented in the readme.
Media, all by myself: CC BY-SA 3.0.
How to install:
Download and decompress the folder which is attached to this post, if necessary, rename it to "hex" (that is how it should already be called), and put it into the "mods" subfolder of your Minetest folder. (If you only want this to be used in a single world, place the folder in worldmods/ in your world directory.)
For further information or help see http://wiki.minetest.com/wiki/Installing_Mods.
Dependencies:
None.
Download:
https://github.com/Schnux2/hex/archive/master.zip or the attachment below
View Source:
https://github.com/Schnux2/hex
If you encounter any problem or need help, just write something into this forum topic or write an e-mail to schnux@gmx.de.
(Edit 1: Added screenshot
Edit 2: added Github and another download link
Edit 3: solved the error reported by DS-minetest below and updated the attachments)
But it is fun to play with it.
* Technically, they are not hexagonal, but dodecagonal, but I still prefer this name because it just sounds better and seems easier to imagine.
Since I am totally new to this forum, I may introduce myself, but there is not very much to say. As you will see when you read further, my largest motivation for playing Minetest is that I have way too much free time. I am an unskilled programmer and a horrible texture designer. English is not my mother tongue, please correct me if I make mistakes.
Presenting...
hex (version 0.1)! (Imagine a dramatic fanfare here.)
description.txt says "This mod adds prisms with a hexagonal base area which behave similar to nodes." And that's it, basically.
I got a bit bored by all those cubes, so I added prisms. They are entities, technically, and "similar to nodes" is an exaggeration (no ABMs, no VoxelManip, no digging animation), but you can build houses out of them - if Minetest doesn't decide that there are too much entities in some area and removes all of them.
This mod adds a simple API described in api.txt for adding your own prisms and already registers two prisms: Basalt and a Basalt slab.
License:
The parts of the code which were written by me, Schnux: LGPL 2.1.
I copied and adjusted some lines from the "carts" and "stairs" mod from Minetest Game, this is documented in the readme.
Media, all by myself: CC BY-SA 3.0.
How to install:
Download and decompress the folder which is attached to this post, if necessary, rename it to "hex" (that is how it should already be called), and put it into the "mods" subfolder of your Minetest folder. (If you only want this to be used in a single world, place the folder in worldmods/ in your world directory.)
For further information or help see http://wiki.minetest.com/wiki/Installing_Mods.
Dependencies:
None.
Download:
https://github.com/Schnux2/hex/archive/master.zip or the attachment below
View Source:
https://github.com/Schnux2/hex
If you encounter any problem or need help, just write something into this forum topic or write an e-mail to schnux@gmx.de.
(Edit 1: Added screenshot
Edit 2: added Github and another download link
Edit 3: solved the error reported by DS-minetest below and updated the attachments)
- Attachments
-
- hex.zip
- (790.64 KiB) Downloaded 47 times
-
- small_screenshot.png (218.31 KiB) Viewed 601 times
Last edited by Schnux on Sat Oct 13, 2018 21:40, edited 3 times in total.
- Andrey01
- Member
- Posts: 2577
- Joined: Wed Oct 19, 2016 15:18
- GitHub: Andrey2470T
- In-game: Andrey01
- Location: Russia, Moscow
Re: [Mod] Hexagonal* Prisms [hex]
Screens please?
Re: [Mod] Hexagonal* Prisms [hex]
Of course.
Re: [Mod] Hexagonal* Prisms [hex]
Update: Github link added for those who just want to look at the source code.
- Desour
- Member
- Posts: 1473
- Joined: Thu Jun 19, 2014 19:49
- GitHub: Desour
- IRC: Desour
- In-game: DS
- Location: I'm scared that if this is too exact, I will be unable to use my keyboard.
Re: [Mod] Hexagonal* Prisms [hex]
You can do this with nodes. Just use the mesh drawtype here and add the name of your model here. Don't forget to set paramtype to "light".
Oh, and there's already a vector.round in minetest builtin, you don't need to add it yourself.
Oh, and there's already a vector.round in minetest builtin, you don't need to add it yourself.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)
Re: [Mod] Hexagonal* Prisms [hex]
No! Please just download the mod, then you will see the difference to normal nodes. The point of this mod is that their positions do not have to be on whole-integer coordinates (are they called like that?), but you can build structures like this:
If they would have to have integer coordinates, the best result of an attempt to build an almost hexagonal* shape out of small hexagonal* meshes I could imagine would be this:
By the way, with only-integer coordinates (normal nodes), not even such a simple shape would be possible (with prisms of a reasonable size):
The prisms have to have non-integer coordinates to form such a shape.
(The distance from the middle point of one prism to the middle point of the next prism in x-direction (left/right on the picture) is not the width of a node, but (square_root(3)) /2 (≈0.866) times the width of a node.)
As far as I know, all this is not possible with nodes - please correct me if I am wrong!
My own hex.vector_round is also different to the builtin vector.round because it rounds the x- and z-coordinates to integers and integers+0.5 instead of only to integers, but it isn't even actually used.
Spoiler
Spoiler
Spoiler
(The distance from the middle point of one prism to the middle point of the next prism in x-direction (left/right on the picture) is not the width of a node, but (square_root(3)) /2 (≈0.866) times the width of a node.)
As far as I know, all this is not possible with nodes - please correct me if I am wrong!
My own hex.vector_round is also different to the builtin vector.round because it rounds the x- and z-coordinates to integers and integers+0.5 instead of only to integers, but it isn't even actually used.
- Attachments
-
- screenshot_20181013_230604.png (54.2 KiB) Viewed 601 times
-
- screenshot_20181013_230306.png (143.82 KiB) Viewed 601 times
-
- screenshot_20181013_223931.png (134.81 KiB) Viewed 601 times
- Desour
- Member
- Posts: 1473
- Joined: Thu Jun 19, 2014 19:49
- GitHub: Desour
- IRC: Desour
- In-game: DS
- Location: I'm scared that if this is too exact, I will be unable to use my keyboard.
Re: [Mod] Hexagonal* Prisms [hex]
Oh, ok.
Doesn't dofiling "\\test.lua" cause a crash for you? It has to be "/test.lua" (or DIR_DELIM.."test.lua").
Doesn't dofiling "\\test.lua" cause a crash for you? It has to be "/test.lua" (or DIR_DELIM.."test.lua").
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)
Re: [Mod] Hexagonal* Prisms [hex]
No, it doesn't cause a crash (I still play on Minetest 0.4.16, may this be the reason?).
I still changed it because it works in my Minetest version also with DIR_DELIM and if it crashed yours, that's definitely a thing to fix.
I still changed it because it works in my Minetest version also with DIR_DELIM and if it crashed yours, that's definitely a thing to fix.
Re: [Mod] Hexagonal* Prisms [hex]
Just as an example what is possible to build with this (in case anyone is interested...):
Some kind of a dark tower, maybe the fortress of an evil overlord, maybe the temple of an ancient civilisation, worshipping their god of fire...
(This could definitely have been built better, it is just an advertisement.)
But larger buildings like this one are very instable. After exiting the game and re-eentering, it looked like this:
I do not have any idea why Minetest removed exactly those prisms and let others be. Probably it is possible to have more entities inside one mapblock with the setting "max_objects_per_block", but why were they so randomly removed?
Some kind of a dark tower, maybe the fortress of an evil overlord, maybe the temple of an ancient civilisation, worshipping their god of fire...
(This could definitely have been built better, it is just an advertisement.)
Spoiler
Spoiler
Spoiler
- Attachments
-
- screenshot_20181030_170637.png (297.08 KiB) Viewed 601 times
-
- screenshot_20181030_163413.png (219.13 KiB) Viewed 601 times
-
- screenshot_20181030_164137.png (128.89 KiB) Viewed 601 times
Who is online
Users browsing this forum: No registered users and 32 guests