[Mod] exchange/replace nodes with one click [replacer]

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

[Mod] exchange/replace nodes with one click [replacer]

by Sokomine » Sun Feb 03, 2013 22:40

Update:The Inspection tool is more tablet-friendly and cheaper now.

Texture and rotation of a node are set at the same time. This allows easier handling of stairsplus-nodes: Just rotate one in the right direction, sneak-rightclick on that correctly rotated node, and either left-click to replace old nodes or right-click to place further nodes with exactly the same rotation.

The mod uses minetest.is_protected provided that the server version is recent enough. That's only relevant for multiplayer servers.

This mod allows you to create more intresting buildings by building the walls first and placing decorative nodes into those walls afterwards (e.g. windows). It replaces every node you left-click on with the node-type you last sneak-right-clicked on (all while wielding the replacement tool). You don't have to dig the old node first and place a new one afterwards. This is most useful for creative building. If you are in survival mode, you have to have enough of the selected replacement nodes in your inventory. For each left-click, the old/replaced node will be added to your inventory and the new one substracted from your inventory. For each normal right click, the stored block type will be placed with the stored
orientation/rotation.

Craft one chest in the upper left corner, another chest in the lower right corner, and a stick in the middle:
Image

Sample usage: Making a roof and decorating a hut
First, let's start with a very simple hut. The brick shall later be turned into a real roof.
Image
Now, let's craft some stone stairs and place them the way we want the roof to be orientated:
Image
Sneak-rightclick on the stone-stairs. Afterwards, left-click on the brick we want to replace:
Image
Repeat the same for the other side. We need to place a new stair here because it's orientation is diffrent:
Image
Finish the roof by left-clicking on the brick nodes on that side:
Image
Now we want to add some glass. Place one on the floor, sneak-rightclick, and then left-click on some wood. See how 8 glass where consumed and 8 wooden planks returned:
Image
Now we want to change the wood into brick. After crafting the bricks back into brick nodes, placing one, sneak-rightclicking and left-clicking once on each wood node, we get the desired result:
Image

The hut may not be very impressive, but the tool is definitely useful. One advantage is that you can build roofs without having to care much about your current view direction. The second is that you can place decorative nodes (and especially windows) very easily into a wall and thus add details to your building. Replacing nodes can of course be done with worldedit as well - provided you have got the privs.

The mod also includes a second tool, which looks like a question mark and provides information about things you may find in your Minetest world. That tool comes bundled with the replacer as both are small but useful. The texture for the new tool has been done by VanessaE.

Sometimes you want to know the name and/or rotation of a particular node. The "//inspect" command from WorldEdit does that, but you can also use this new inspect tool. It provides information about protection as well:
Image
You can get information about unknown nodes and find out what they used to be:
Image
Works for mobs as well (also for unknown ones):
Image
There's a mini-craft-guide included which will show the receipes of blocks upon right-click or - in case of dropped blocks/tools/items lying somewhere - sneak (usually shift)+leftclick. The individual indigrents can be clicked at and their receipes will be shown as well. If there is more than one receipe for something, you can click through all alternate receipes with prev/next buttons. The inspection tool can be crafted like this:
Image
The most common groups are supported, but it is not as extensive as i.e. inventory_plus:
Image
Receipes which require special machines show which machine they require. In the case of the circular saw, there is currently some guessing involved:
ImageImage
ImageImage


Version: 3.0 Added inspect tool with mini-craftguide.
2.1 Bugfix for survival mode
2.0 Facedir/rotation of nodes is stored and transfered as well.
Download: https://github.com/Sokomine/replacer/zipball/master
Browse code: https://github.com/Sokomine/replacer

Depends on: nothing; works in non-creative mode just as well
License: GPLv3

[Images updated]
Attachments
replacer_3.0.zip
02.10.14 Includes replacer + inspect tool
(9.84 KiB) Downloaded 228 times
replacer_2.1.zip
old version; deprecated
(5.5 KiB) Downloaded 153 times
Last edited by Sokomine on Tue Jul 28, 2015 20:55, edited 7 times in total.
A list of my mods can be found here.
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Sun Feb 03, 2013 23:04

Nice :-)

Tested it, it works, also the crafting. I could use this on redcrab's server.
 

Test&Mine
New member
 
Posts: 8
Joined: Sun Feb 03, 2013 12:47

by Test&Mine » Sun Feb 03, 2013 23:04

Nice but can I make a model for it? maybe something goes great for it.

Ok I am done with the Texture Idea.
Last edited by Test&Mine on Sun Feb 03, 2013 23:06, edited 1 time in total.
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

by Sokomine » Mon Feb 04, 2013 00:33

Post your texture idea here or send it to me. I'd be glad if someone could do a texture and maybe a model.
A list of my mods can be found here.
 

Test&Mine
New member
 
Posts: 8
Joined: Sun Feb 03, 2013 12:47

by Test&Mine » Mon Feb 04, 2013 01:49

Well I don't know how to upload a model to a .x Format... so I am doing a texture model way.

http://ompldr.org/vaGNkdg/REPLACE!.zip

Made by likwid he, who made the whole thing, All I did, was change the color of it. plus he added you need a bucket of lava, plus he added a in file texture file, and he making more models he told me though pm.
 

User avatar
Likwid H-Craft
Member
 
Posts: 1113
Joined: Sun Jan 06, 2013 14:20

by Likwid H-Craft » Mon Feb 04, 2013 14:20

Thank you Test&Mine now, back making more Models!! Or I say Model Texture!
My Domain's/others:
http://likwidtest.hj.cx/ (Not Done)
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

by Sokomine » Tue Apr 23, 2013 23:46

Version 2.0 is out. This one saves param1 and param2 (and thus rotation) as well. It is intended for easier handling of stairsplus-nodes (similar but slightly diffrent from the chainsaw).

After you have rotated one node to the desired orientation with the screwdriver that is now part of the default game, hold sneak and right-click with the replacer on that node (sneak+right-click is the same as changing the mode of the screwdriver; here, it stores a new pattern in the replacer). After that, either left-click on an already placed block to turn it into the stored one with the stored blocks orientation (that's the replacement function of the replacer), or right-click to place a node of the stored type with the stored orientation (that's as if you where wielding the stored block; only that orientation will be the stored one). This way, building a roof can get a lot easier!

The crafting receipe has been changed to better reflect what this mod does.
A list of my mods can be found here.
 

User avatar
Inocudom
Member
 
Posts: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Sat Jun 15, 2013 20:50

For the sake of adding some spice to this mod, you could make a sound effect for blocks being switched and a sound effect for blocks being placed.
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Wed Jul 03, 2013 20:35

Nice, how did this gem go missing?

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Thu Jul 04, 2013 15:18

Hybrid Dog wrote:
Jordach wrote:Nice, how did this gem go missing?
I guess:
the usual way here
There are so many awesome mods, just not enough people give a damn on how useful it is.

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

User avatar
GloopMaster
Member
 
Posts: 213
Joined: Wed Aug 01, 2012 18:03

by GloopMaster » Thu Jul 04, 2013 19:03

Wand of Equal Trade? Me smells a Wand of Equal Trade.
Meow.

That is all.
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

by Sokomine » Wed Nov 20, 2013 21:20

I don't know what a "Wand of Equal Trade" is.

The mod has been updated and now uses minetest.is_protected if the server version is recent enough. Else it uses the old code from homedecor that supports the protector- and node_ownership mod in order to determine if the replacement is allowed.

If you run it in your singleplayer world, there's no need to update.

The mod is very useful for all servers that have players on them who want to build more complex buildings and are attracted by moreblocks/starisplus nodes - which usually require the correct placement (slabs, panels, stairs etc.).

Inocudom wrote:For the sake of adding some spice to this mod, you could make a sound effect for blocks being switched and a sound effect for blocks being placed.

I usually play with sound off or at least muted considerably, so I don't know much about sounds. As this tool is intended to be used for building, a sound that does not go on peoples nerves but instead just confirms that the action has succeeded would be fine. If you have such a sound at hand, I can integrate it as an option.
A list of my mods can be found here.
 

User avatar
Dan Duncombe
Member
 
Posts: 904
Joined: Thu May 09, 2013 21:11

by Dan Duncombe » Thu Nov 21, 2013 07:45

I believe a wand of equal trade is a equivalent exchange mod item that replaces large numbers of blocks at once iirc.
Some Mods: Castles Prefab Camouflage
My Games: Nostalgia Realtest Revamped
Servers: See above games.
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

by Sokomine » Sun Jan 12, 2014 19:44

HybridDog detected a bug related to usage of the replacer on a server that is not in creative mode (namely, replacing a chest with content and thus destroying it). That bug has been fixed now. Please update your version in order to avoid item loss! I've attached a new version for easy download as well.
A list of my mods can be found here.
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

by Krock » Mon Feb 24, 2014 16:50

*bump*

This replacer has been removed from my server for following reasons:
- does not take damage on use
- can get abused as obsidian mining tool (click and replace with dirt)
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

by Sokomine » Wed Feb 26, 2014 04:50

Krock wrote:This replacer has been removed from my server for following reasons:
- does not take damage on use

It's a tool for building - not for digging. It's a shame that the screwdriver does take damage. Those tools are for building, to circumvent problems with handling nodes/placement. Like your mouse and keyboard are.

Krock wrote:- can get abused as obsidian mining tool (click and replace with dirt)

When I wrote the tool, I wondered shortly if any abuse might be possible and if so if it would be worth including any restrictions. The only possible abuse that came to my mind was "digging" ores by replacing them with easier-diggable material. That is of course possible. It could be circumvented by allowing use of the replacer only above ground - except that there are cellars and people building large cities underground. They didn't do anything wrong there and there's no reason to limit their building capabilities.

If players really abuse the replacer as a digging tool, insert some local log functions and talk to the players who do it. There's no real way to decide weather a node has been placed by mapgen or has been placed by the player who now legitimately prefers a diffrent material for his/her house - or just wants to build with stairsplus nodes without getting permanent damage to his/her real life hand.

As long as players do not exaggerate it, I see no gain in abusing the replacer. Normal mining usually gives you enough mese and diamonds for the tools you need. Constantly changing the tools wielded and waiting for the server would be far more annoying than crafting a new pick once in a while.
A list of my mods can be found here.
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

Re: [Mod] exchange/replace nodes with one click (replacer)

by Sokomine » Thu Sep 11, 2014 02:46

Added the images that where lost and which show how the mod may be used.

In general, if you want to support builders on your server, please install this mod. It is very helpful especially for stairsplus/moreblocks nodes.
A list of my mods can be found here.
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

Re: [Mod] exchange/replace nodes with one click [replacer]

by Sokomine » Thu Oct 02, 2014 16:20

Update
The mod now also includes a second tool, which looks like a question mark and provides information about things you may find in your Minetest world. That tool comes bundled with the replacer as both are small but useful. The texture for the new tool has been done by VanessaE.

Sometimes you want to know the name and/or rotation of a particular node. The "//inspect" command from WorldEdit does that, but you can also use this new inspect tool. It provides information about protection as well:
Image
You can get information about unknown nodes and find out what they used to be:
Image
Works for mobs as well (also for unknown ones):
Image
There's a mini-craft-guide included which will show the receipes of blocks upon right-click or - in case of dropped blocks/tools/items lying somewhere - sneak (usually shift)+leftclick. The individual indigrents can be clicked at and their receipes will be shown as well. If there is more than one receipe for something, you can click through all alternate receipes with prev/next buttons. The inspection tool can be crafted like this:
Image
The most common groups are supported, but it is not as extensive as i.e. inventory_plus:
Image
Receipes which require special machines show which machine they require. In the case of the circular saw, there is currently some guessing involved:
ImageImage
ImageImage
A list of my mods can be found here.
 

User avatar
Inocudom
Member
 
Posts: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: [Mod] exchange/replace nodes with one click [replacer]

by Inocudom » Thu Oct 02, 2014 20:40

Very good work you did here, Sokomine.
 

User avatar
ExeterDad
Member
 
Posts: 1121
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad

Re: [Mod] exchange/replace nodes with one click [replacer]

by ExeterDad » Fri Oct 03, 2014 02:03

I've been building a bunch of streets and roads the last few days and I've been hating it. So I decide to use your mod to build them with. AMAZING! I was laying asphalt in flattened areas as fast as I could click and run. Grassy dirt into asphalt with a click. Love it. Striping is the same way. Just watch the grass or other plants at high speed. They turn into blocks too if clicked and will stop you in your tracks. :P
My vote for favorite mod of the evening.
Thanks for your efforts.
٩(̾●̮̮̃̾•̃̾)۶

Kibbie and I have a beautiful public server now! HOMETOWN
 

dgm5555
Member
 
Posts: 244
Joined: Tue Apr 08, 2014 19:45

Re: [Mod] exchange/replace nodes with one click [replacer]

by dgm5555 » Mon Mar 02, 2015 22:16

This would be a brilliant tool to integrate with worldedit...
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

Re: [Mod] exchange/replace nodes with one click [replacer]

by Sokomine » Tue Mar 17, 2015 21:15

dgm5555 wrote:This would be a brilliant tool to integrate with worldedit...

It ought to be available to all players :-) Not only to those who have the WorldEdit priv.
A list of my mods can be found here.
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: [Mod] exchange/replace nodes with one click [replacer]

by Krock » Wed Mar 18, 2015 19:27

This tool is made to replace just one node at once.
If you really want to place many nodes, use the current WorldEdit with //copy
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

Re: [Mod] exchange/replace nodes with one click [replacer]

by Sokomine » Tue Jul 28, 2015 21:01

The inspection tool - which includes a mini-craft-guide - now works a bit diffrent. It shows its receipe when you left-click on a node or entity - right-click/shift-right-click is no longer required (but still supported). Instead of writing the information in the chat, position, protection state, node name, param2 and (new) light level are shown in the mini-craft-guide. This will hopefully make it easier for tablet-users to use the tool.

As the inspection tool is intended to help players with finding out node names and craft receipes, I've made the tool cheaper. It now costs only a torch plus a stick. That is hopefully something new players can afford.

The inspector tool can help if no craft guide is installed or if you want to find out information like param2, nodename etc.
A list of my mods can be found here.
 

User avatar
ExeterDad
Member
 
Posts: 1121
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad

Re: [Mod] exchange/replace nodes with one click [replacer]

by ExeterDad » Wed Jul 29, 2015 04:39

One of my favorite mods. Looking forward to exploring your new features soon.
Thanks :)
٩(̾●̮̮̃̾•̃̾)۶

Kibbie and I have a beautiful public server now! HOMETOWN
 

Gundul
Member
 
Posts: 177
Joined: Thu Aug 27, 2015 10:55
GitHub: berengma
IRC: Gundul

Re: [Mod] exchange/replace nodes with one click [replacer]

by Gundul » Tue May 10, 2016 04:48

Thank you for your great mod. We all like it a lot on my server.


Unfortunately the inspector tool crashes the server when inspecting certain entities or
objects.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
2016-05-10 03:12:09: ACTION[ServerThread]: nona uses replacer:inspect, pointing at [object 1384]
2016-05-10 03:12:11: ACTION[ServerThread]: nona uses replacer:inspect, pointing at [object 1446]
2016-05-10 03:12:11: ERROR[main]: UNRECOVERABLE error occurred. Stopping server. Please fix the following error:
2016-05-10 03:12:11: ERROR[main]: Lua: Double fault error from mod 'replacer' in callback item_OnUse(): error in error handling

In thread 7f3b85b857c0:
/build/minetest-5EsLJt/minetest-0.4.13/src/server.cpp:511: void Server::step(float): A fatal error occurred: Lua: Double fault error from mod 'replacer' in callback item_OnUse(): error in error handling
Debug stacks:
DEBUG STACK FOR THREAD 7f3b79890700:
#0  virtual void* EmergeThread::Thread()
(Leftover data: #1  MapBlock* ServerMap::loadBlock(v3s16))
(Leftover data: #2  void ServerMap::loadBlock(std::string*, v3s16, MapSector*, bool))
(Leftover data: #3  void ItemStack::deSerialize(std::istream&, IItemDefManager*))
(Leftover data: #4  void ItemStack::deSerialize(std::istream&, IItemDefManager*))
DEBUG STACK FOR THREAD 7f3b7a091700:
#0  virtual void* CurlFetchThread::Thread()
DEBUG STACK FOR THREAD 7f3b7a892700:
#0  virtual void* ServerThread::Thread()
#1  void Server::Receive()
(Leftover data: #2  void Server::SendBlocks(float))
(Leftover data: #3  void RemoteClient::GetNextBlocks(ServerEnvironment*, EmergeManager*, float, std::vector<PrioritySortedBlockTransfer>&))
(Leftover data: #4  void Server::SendHP(irr::u16, irr::u8))
(Leftover data: #5  bool getCraftingResult(Inventory*, ItemStack&, std::vector<ItemStack>&, bool, IGameDef*))
(Leftover data: #6  void ItemStack::deSerialize(std::istream&, IItemDefManager*))
DEBUG STACK FOR THREAD 7f3b85b857c0:
#0  int main(int, char**)
#1  Dedicated server branch
#2  void dedicated_server_loop(Server&, bool&)
#3  void Server::step(float)

-----------------------------
2016-05-09 02:22:36: ACTION[ServerThread]: nona right-clicks object 31160: LuaEntitySAO at (360,3,-103)
2016-05-09 02:22:36: ERROR[ServerThread]: LuaEntity name "animal_vombie:vombie_spawner_at_night" not defined
2016-05-09 02:22:37: ACTION[ServerThread]: nona uses replacer:inspect, pointing at [object 31160]
2016-05-09 02:22:37: ERROR[main]: UNRECOVERABLE error occurred. Stopping server. Please fix the following error:
2016-05-09 02:22:37: ERROR[main]: Lua: Double fault error from mod 'replacer' in callback item_OnUse(): error in error handling

In thread 7f72db03a7c0:
/build/minetest-5EsLJt/minetest-0.4.13/src/server.cpp:511: void Server::step(float): A fatal error occurred: Lua: Double fault error from mod 'replacer' in callback item_OnUse(): error in error handling
Debug stacks:
DEBUG STACK FOR THREAD 7f72ca7fc700:
#0  virtual void* EmergeThread::Thread()
(Leftover data: #1  MapBlock* ServerMap::loadBlock(v3s16))
(Leftover data: #2  void ServerMap::loadBlock(std::string*, v3s16, MapSector*, bool))
(Leftover data: #3  void ItemStack::deSerialize(std::istream&, IItemDefManager*))
(Leftover data: #4  void ItemStack::deSerialize(std::istream&, IItemDefManager*))
DEBUG STACK FOR THREAD 7f72caffd700:
#0  virtual void* CurlFetchThread::Thread()
DEBUG STACK FOR THREAD 7f72cb7fe700:
#0  virtual void* ServerThread::Thread()
#1  void Server::Receive()
(Leftover data: #2  void Server::SendBlocks(float))
(Leftover data: #3  void RemoteClient::GetNextBlocks(ServerEnvironment*, EmergeManager*, float, std::vector<PrioritySortedBlockTransfer>&))
(Leftover data: #4  void Server::SendHP(irr::u16, irr::u8))
(Leftover data: #5  void ServerMap::loadBlock(std::string*, v3s16, MapSector*, bool))
(Leftover data: #6  void ItemStack::deSerialize(std::istream&, IItemDefManager*))
DEBUG STACK FOR THREAD 7f72db03a7c0:
#0  int main(int, char**)
#1  Dedicated server branch
#2  void dedicated_server_loop(Server&, bool&)
#3  void Server::step(float)
(Leftover data: #4  void Server::SendAccessDenied_Legacy(irr::u16, const wstring&))




Any Idea how to fix this ?


greetings

Gundul
 


Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 27 guests

cron