[Mod] Node Meta Manipulation [alternode] (v1.2)

Post Reply
User avatar
AntumDeluge
Member
Posts: 213
Joined: Sun Aug 07, 2016 05:42
GitHub: AntumDeluge
IRC: AntumDeluge
Contact:

[Mod] Node Meta Manipulation [alternode] (v1.2)

by AntumDeluge » Post

Alternode: Node Meta Manipulation

Description:

A mod that allows administrators with server privilege to examine & alter node meta data. Regular users have limited functions using the pencil & key items.

Usage:

Chat commands:
  • /getmeta <x> <y> <z> <key>
    • prints the value of key in meta data of node at x,y,z.
  • /setmeta <x> <y> <z> <key> <value>
    • Sets the value of key in meta data of node at x,y,z.
  • /unsetmeta <x> <y> <z> <key>
    • Unsets the value of key in meta data of node at x,y,z.
Tools:

Use the alternode:wand on a node to view, set, or unset meta info. Only players with the server privilege can use this item.
  • left-click (use): Opens formspec to retrieve & set/unset meta attributes.
  • right-click (place): Print node coordinates, name, & some select meta info.
The alternode:pencil is a tool for players to set/unset the infotext meta value of nodes within protected/owned areas.
  • left-click (use): Opens formspec to set/unset infotext meta attribute.
The alternode:key is a tool that will set/unset the player wielding it as owner of a node (e.g. owner meta attribute will be set to player's name or cleared). Only nodes within an area owned/protected by the player can owned. Any node can be unowned.
  • left-click (use): Sets/Unsets user as owner.
  • right-click (place): Prints owner status to chat log.
Licensing:
  • Code: MIT
  • Textures: CC0
Dependencies:
  • Required: none
  • Optional:
    • for pencil & key to be fully functional: simple_protection
    • for craft recipes: default, technic, gems, gems_encrustable
Links
Last edited by AntumDeluge on Sun Jul 18, 2021 19:30, edited 2 times in total.

ShadMOrdre
Member
Posts: 1118
Joined: Mon Dec 29, 2014 08:07
Location: USA

Re: [Mod] Node Meta Manipulation [alternode] (v1.2)

by ShadMOrdre » Post

Haven't looked yet, but good idea.

Does the node ownership work the same way that cornernotes node_owner mod did. It also set the node meta.

The use of a wand makes sense, now I can "unown" a node so someone else can build on it.

Shad

User avatar
Wuzzy
Member
Posts: 4778
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: [Mod] Node Meta Manipulation [alternode] (v1.2)

by Wuzzy » Post

There's a similar tool in DevTest, it is the Node Meta Editor.

I think your mod should list all the available keys for a given node, so you don't have to guess the key names. ;-)

User avatar
AntumDeluge
Member
Posts: 213
Joined: Sun Aug 07, 2016 05:42
GitHub: AntumDeluge
IRC: AntumDeluge
Contact:

Re: [Mod] Node Meta Manipulation [alternode] (v1.2)

by AntumDeluge » Post

Wuzzy wrote:
Tue Jul 13, 2021 14:59
I think your mod should list all the available keys for a given node, so you don't have to guess the key names. ;-)
Agreed, I want to do this. I just didn't know how until I figured out MetaDataRef:to_table(). Will get a new version out soon.
ShadMOrdre wrote: Does the node ownership work the same way that cornernotes node_owner mod did
I'm not sure how node_owner works. The key item simply sets/unsets the "owner" value in the node's meta data using the wielder's name. This is really only useful if mods that handle the node respect the "owner" value (e.g. doors).

Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests