[Mod] Simple Arcs [pkarcs] updated for 0.4.16

User avatar
PEAK
Member
Posts: 187
Joined: Mon Jun 08, 2015 20:32
In-game: PEAK
Contact:

[Mod] Simple Arcs [pkarcs] updated for 0.4.16

by PEAK » Post

I wonder if nobody else had this idea so far: Arcs - for all default stone and plank nodes. They behave like stairs.

Image

There are arcs for outer and inner corners too:

Image

Crafting:

Arcs
Image

Inner Arcs
Image

Outer Arcs
Image

A quick example:
Image

depends: default

Download: see attachment

UPDATE:

Reworked the code (I studied "viaduct" viewtopic.php?f=9&t=14559 -- thanks pithy!)

So the api is much more easy:

To make arcs from nodes of your mod, put "pkarcs?" into your depends.txt,
and call this function in your init.lua:

Code: Select all

if minetest.get_modpath("pkarcs") then
	pkarcs.register_node("your_mod:your_nodename")
end
Another update:
added Aspen Wood Arcs - Minetest 0.4.14
License changed to LGPLv2.1+


Update for Minetest 0.4.15:

- Arcs added for the new stone- sandstone- desertstone- and obsidian-blocks.

- mod.conf added.

- Better placing!
(I don't really understand facedir and param2, but with the code I gathered it works...)
When placed, the hollow side of the arc points to the player (similar to stairs).
When placed on ground, the hollow side points upwards, otherwise (placed under a node or on its side) downwards.
For sidewards arcs you need the screwdriver.

- Compatible with older versions of this mod. (!)


Update for Minetest 0.4.16:

added arcs for

- Desert Sandstone
- Desert Sandstone Block
- Desert Sandstone Brick
- Silver Sandstone
- Silver Sandstone Block
- Silver Sandstone Brick
Attachments
pkarcs.zip
(399.81 KiB) Downloaded 1401 times
Last edited by PEAK on Mon Jun 05, 2017 20:15, edited 10 times in total.
I am okay with using the screenshots in all my posts for the website of Minetest (http://minetest.net).

KCoombes
Member
Posts: 427
Joined: Thu Jun 11, 2015 23:19
In-game: Knatt
Location: SW Florida, USA

Re: [Mod] Simple Arcs [pkarcs]

by KCoombes » Post

+10 Beautiful!

User avatar
benrob0329
Member
Posts: 1341
Joined: Thu Aug 06, 2015 22:39
GitHub: Benrob0329
IRC: benrob0329
In-game: benrob03
Location: Michigan
Contact:

Re: [Mod] Simple Arcs [pkarcs]

by benrob0329 » Post

Very cool!

User avatar
Onyx
Member
Posts: 132
Joined: Fri Sep 25, 2015 08:36
In-game: Onyx
Location: On your planet

Re: [Mod] Simple Arcs [pkarcs]

by Onyx » Post

Hi,

Good work! Compatibility with "moreblocks" is it envisaged in the near future?
"One chunk, two chunks, three chunks..."

User avatar
PEAK
Member
Posts: 187
Joined: Mon Jun 08, 2015 20:32
In-game: PEAK
Contact:

Re: [Mod] Simple Arcs [pkarcs]

by PEAK » Post

Onyx wrote:Compatibility with "moreblocks" is it envisaged in the near future?
Do you mean

1. Compatibility with blocks from moreblocks?
or
2. Compatibility with the circular saw?

1. I think there are only a few blocks that would fit for these shapes - maybe worth considering. There are a lot of other mods that could get arcs for their blocks, but I sought to keep it very basic.

It’s a fundamental question, which other mods a mod should take care of. E.g. shall "stairs" optionally depend on "very_special_blocks" or the other way round? Either are possible, but which is more reasonable?

2. For now I’m to lazy to go into the code of the circular saw. For a while I was using it extensive, but it became annoying. I rather prefer to see all available blocks in the inventory (for creative mode). So I like "stairsio" as well.

Nevertheless I would be glad if moreblocks includes the nodeboxes of the arcs...
I am okay with using the screenshots in all my posts for the website of Minetest (http://minetest.net).

User avatar
oleastre
Member
Posts: 81
Joined: Wed Aug 13, 2014 21:39
GitHub: oleastre
In-game: oleastre

Re: [Mod] Simple Arcs [pkarcs]

by oleastre » Post

First, I really like your mod and what you can create with this.

I just had a quick look at your mod code and you can improve it a little bit, allowing external mods to register new materials (and creating new arcs types).
Just wrap the whole recipes and nodes definitions in a function that takes a line of your materials map as argument and creates arcs for that material.
Then just loop over you materials map and call that function.

Also, the node sound and groups can probably be retrieved from the original node by using the minetest.registered_nodes map (just like it's done in the moreblocks/stairsplus mod).

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] Simple Arcs [pkarcs]

by Krock » Post

Amazing! I would love to see the feature to place the arcs around the corner and the mod will automatically relpace the regular arc with an edge one.

Also: Are there any plans for a mesh version of this yet? But I'm not sure if it would fit well into the blocky buildings.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
MineYoshi
Member
Posts: 5373
Joined: Wed Jul 08, 2015 13:20
Contact:

Re: [Mod] Simple Arcs [pkarcs]

by MineYoshi » Post

Nice +100

If you do a temple and you add those arcs to the corners, the building will be more nice and awesome!
Have a nice day! :D

User avatar
PEAK
Member
Posts: 187
Joined: Mon Jun 08, 2015 20:32
In-game: PEAK
Contact:

Re: [Mod] Simple Arcs [pkarcs]

by PEAK » Post

just a few nodeboxes... ;-)
oleastre wrote:I just had a quick look at your mod code and you can improve it a little bit
That’s always welcome.
oleastre wrote:Just wrap the whole recipes and nodes definitions in a function that takes a line of your materials map as argument and creates arcs for that material.
Then just loop over you materials map and call that function.
As yet I made it so:

Code: Select all

if minetest.get_modpath("...") then...
but your suggestion is far more better.
And so my thoughts
It’s a fundamental question, which other mods a mod should take care of...
become pointless.
oleastre wrote:Also, the node sound and groups can probably be retrieved from the original node by using the minetest.registered_nodes map
Indeed I didn’t know this two methods. Thank you very much, I will work on it and report in a few days.
oleastre wrote:(just like it's done in the moreblocks/stairsplus mod).
Damn, I must read more code!
Krock wrote:I would love to see the feature to place the arcs around the corner and the mod will automatically relpace the regular arc with an edge one.
No idea how to do that. That would be fine for stairs too--but may not always be intended.
Krock wrote:Also: Are there any plans for a mesh version of this yet?
I don’t think. That’s something I never dealt with.
Krock wrote:But I'm not sure if it would fit well into the blocky buildings.
Yes, meshnodes are great for decorations as in homedecor. Building materials should well integrate into the default blocks.
Last edited by PEAK on Wed May 04, 2016 00:52, edited 1 time in total.
I am okay with using the screenshots in all my posts for the website of Minetest (http://minetest.net).

User avatar
Don
Member
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [Mod] Simple Arcs [pkarcs]

by Don » Post

Looks nice. If you want to try a mesh node for the arc you could try the one in mymeshnodes.
https://github.com/DonBatman/mymeshnodes.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here

User avatar
PEAK
Member
Posts: 187
Joined: Mon Jun 08, 2015 20:32
In-game: PEAK
Contact:

Re: [Mod] Simple Arcs [pkarcs]

by PEAK » Post

I applied oleastre’s suggestions viewtopic.php?f=9&t=14541&p=216103#p215959 to the code. (see edited attachment in first post)

OK. Problem solved. Forget all the following stuff...

It was something like this: viewtopic.php?f=47&t=14389#p213433
Spoiler
For itself it works well, but when I try to apply it to another mod I get errors.

I took
pkpoud: viewtopic.php?t=13755

added "pkarcs?" to its depends.txt

added

Code: Select all

if minetest.get_modpath("pkarcs") then
	pkarcs.register_all(
		"poudstone",
		"Poudlard Stone",
		"pkpoud_poudstone",
		"pkpoud:poudstone",
		minetest.registered_nodes["pkpoud:poudstone"].sounds,
		minetest.registered_nodes["pkpoud:poudstone"].groups
	)
end
to its init.lua (line 112)

errors:

Code: Select all

... ERROR[main]: ========== ERROR FROM LUA ===========
... ERROR[main]: Failed to load and run script from 
... ERROR[main]: /home/albert/.minetest/mods/pkpoud/init.lua:
... ERROR[main]: /usr/share/minetest/builtin/game/register.lua:60: Name pkarcs:poudstone_arc does not follow naming conventions: "modname:" or ":" prefix required
... ERROR[main]: stack traceback:
... ERROR[main]: 	[C]: in function 'error'
... ERROR[main]: 	/usr/share/minetest/builtin/game/register.lua:60: in function 'check_modname_prefix'
... ERROR[main]: 	/usr/share/minetest/builtin/game/register.lua:98: in function 'register_item'
... ERROR[main]: 	/usr/share/minetest/builtin/game/register.lua:165: in function 'register_node'
... ERROR[main]: 	/home/albert/.minetest/mods/pkarcs/init.lua:45: in function 'register_all'
... ERROR[main]: 	/home/albert/.minetest/mods/pkpoud/init.lua:113: in main chunk
... ERROR[main]: ======= END OF ERROR FROM LUA ========
... ERROR[main]: Server: Failed to load and run /home/albert/.minetest/mods/pkpoud/init.lua
... ERROR[main]: ModError: ModError: Failed to load and run /home/albert/.minetest/mods/pkpoud/init.lua
... ERROR[main]: Error from Lua:
... ERROR[main]: /usr/share/minetest/builtin/game/register.lua:60: Name pkarcs:poudstone_arc does not follow naming conventions: "modname:" or ":" prefix required
... ERROR[main]: stack traceback:
... ERROR[main]: 	[C]: in function 'error'
... ERROR[main]: 	/usr/share/minetest/builtin/game/register.lua:60: in function 'check_modname_prefix'
... ERROR[main]: 	/usr/share/minetest/builtin/game/register.lua:98: in function 'register_item'
... ERROR[main]: 	/usr/share/minetest/builtin/game/register.lua:165: in function 'register_node'
... ERROR[main]: 	/home/albert/.minetest/mods/pkarcs/init.lua:45: in function 'register_all'
... ERROR[main]: 	/home/albert/.minetest/mods/pkpoud/init.lua:113: in main chunk
... ERROR[main]: Siehe debug.txt für Details.
I don’t understand this:
Name pkarcs:poudstone_arc does not follow naming conventions: "modname:" or ":" prefix required
But that should be ok???

The same happens with any other mod I tried.

I can’t figure out where it goes wrong.

(Minetest 0.4.13)

EDIT:

When I try it the other way: make pkarcs soft depend on pkpoud and add the corresponding code to init.lua of pkarcs -- then it works. But I think the first approach should be right. The mods which want arcs should access pkarcs.
---
Don wrote:If you want to try a mesh node for the arc you could try the one in mymeshnodes.
Thank you--perhaps later.
I am okay with using the screenshots in all my posts for the website of Minetest (http://minetest.net).

User avatar
PEAK
Member
Posts: 187
Joined: Mon Jun 08, 2015 20:32
In-game: PEAK
Contact:

Mod updated

by PEAK » Post

see first post.
I am okay with using the screenshots in all my posts for the website of Minetest (http://minetest.net).

User avatar
TumeniNodes
Member
Posts: 2941
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: [Mod] Simple Arcs [pkarcs]

by TumeniNodes » Post

Awesome!
A Wonderful World

u34

Re: [Mod] Simple Arcs [pkarcs]

by u34 » Post

+1

User avatar
Damien
New member
Posts: 7
Joined: Wed Mar 18, 2015 05:11
In-game: Damien
Location: Bouvet Island

Re: [Mod] Simple Arcs [pkarcs]

by Damien » Post

Image
. \∼❈∼/ MOTHER
... ||| |||of
... ||| |||ARCHITECTURE

User avatar
Fixer
Member
Posts: 904
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer
Location: Ukraine

Re: [Mod] Simple Arcs [pkarcs]

by Fixer » Post

Nice mod! I think you can even adapt for every block like moreblocks mod does.

User avatar
PEAK
Member
Posts: 187
Joined: Mon Jun 08, 2015 20:32
In-game: PEAK
Contact:

Re: [Mod] Simple Arcs [pkarcs]

by PEAK » Post

Fixerol wrote:I think you can even adapt for every block like moreblocks mod does.
I tried this, but my attempt didn’t work--my lua skills are not sufficient to understand how to do it.

I must study more code of other mods.
I am okay with using the screenshots in all my posts for the website of Minetest (http://minetest.net).

User avatar
philipbenr
Member
Posts: 1897
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: robinspi
Location: United States

Re: [Mod] Simple Arcs [pkarcs]

by philipbenr » Post

@PEAK: Aren't those weird craft recipes? Just saying... unless the nodes light up, torches are not a very good choice.

User avatar
PEAK
Member
Posts: 187
Joined: Mon Jun 08, 2015 20:32
In-game: PEAK
Contact:

Re: [Mod] Simple Arcs [pkarcs]

by PEAK » Post

philipbenr wrote:@PEAK: Aren't those weird craft recipes? Just saying... unless the nodes light up, torches are not a very good choice.
I referenced to stairsio viewtopic.php?t=13018
I am okay with using the screenshots in all my posts for the website of Minetest (http://minetest.net).

User avatar
philipbenr
Member
Posts: 1897
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: robinspi
Location: United States

Re: [Mod] Simple Arcs [pkarcs]

by philipbenr » Post

But that still doesn't make it not odd... Try a something like this:

SSS
S
S

SSS
SS
S

SS
S

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] Simple Arcs [pkarcs]

by Sokomine » Post

Very nice! And the sample building is also quite impressive. Thanks for the mod! And it would be great to have it supported by the circular saw and similar mods.
A list of my mods can be found here.

User avatar
PEAK
Member
Posts: 187
Joined: Mon Jun 08, 2015 20:32
In-game: PEAK
Contact:

Re: [Mod] Simple Arcs [pkarcs]

by PEAK » Post

Bump! Update for Minetest 0.4.15

see first post
I am okay with using the screenshots in all my posts for the website of Minetest (http://minetest.net).

User avatar
BirgitLachner
Member
Posts: 393
Joined: Thu May 05, 2016 10:18
In-game: Bibs

Re: [Mod] Simple Arcs [pkarcs]

by BirgitLachner » Post

Do have your mod on github? It would be nice to follow him :-)

User avatar
PEAK
Member
Posts: 187
Joined: Mon Jun 08, 2015 20:32
In-game: PEAK
Contact:

Re: [Mod] Simple Arcs [pkarcs]

by PEAK » Post

Thank you for your interest in my mod.
BirgitLachner wrote:Do have your mod on github? It would be nice to follow him :-)
No, I think such a simple thing is not worth the effort.

By the way: just updated for Minetest 0.4.16! See attachment of first post.
I am okay with using the screenshots in all my posts for the website of Minetest (http://minetest.net).

User avatar
v-rob
Developer
Posts: 970
Joined: Thu Mar 24, 2016 03:19
GitHub: v-rob
IRC: v-rob
Location: Right behind you.

Re: [Mod] Simple Arcs [pkarcs] updated for 0.4.16

by v-rob » Post

This is a really cool mod -- useful for so many things!

I refurbished a dungeon with it. It looks really cool.

http://imgur.com/a/c3WNv
Core Developer | My Best Mods: Bridger - Slats - Stained Glass

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 21 guests