[Mod] Map Fixer [mapfix]

User avatar
Gael de Sailly
Member
 
Posts: 475
Joined: Sun Jan 26, 2014 17:01
GitHub: Gael-de-Sailly
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly

[Mod] Map Fixer [mapfix]

by Gael de Sailly » Sun Nov 30, 2014 20:08

Hello !

This very simple mod can fix some map errors (light and flow problems) simply by typing "/mapfix <radius>". Radius is by default 40. Il you haven't the "server" privilege, you can't exceed 50.

It corrects most of light and flow bug.

Feel free to work on this project. The code is so short that I think it is simpler to copy the lines of the file directly on the forum, instead of making a fork and a pull request.

View on Github
Download

EDIT : there are now 3 settings, in minetest.conf :
  • mapfix_default_size (by default 40) : size used when <size> is omitted
  • mapfix_max_size (by default 50) : maximum size allowed for players
  • mapfix_delay (by default 15) : minimal delay in seconds between 2 "/mapfix" (to avoid server freezing)
These limits can be exceeded by the admin only.
Last edited by Gael de Sailly on Thu Jul 02, 2015 15:27, edited 1 time in total.
Very busy this year too, so do not expect me to be very active on the forum or in game. But I'm not about to drop Minetest forever :)
 

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

Re: [Mod] Map Fixer [mapfix]

by Krock » Sun Nov 30, 2014 20:16

Nice, it works!

The dependencies are missing btw.
Last edited by Krock on Sun Nov 20, 2016 08:08, edited 1 time in total.
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>
 

User avatar
Gael de Sailly
Member
 
Posts: 475
Joined: Sun Jan 26, 2014 17:01
GitHub: Gael-de-Sailly
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly

Re: [Mod] Map Fixer [mapfix]

by Gael de Sailly » Sun Nov 30, 2014 20:51

No dependencies.
Very busy this year too, so do not expect me to be very active on the forum or in game. But I'm not about to drop Minetest forever :)
 

User avatar
Minetestforfun
Member
 
Posts: 936
Joined: Tue Aug 05, 2014 14:09
GitHub: Darcidride
IRC: Darcidride + MinetestForFun
In-game: Darcidride + MinetestForFun

Re: [Mod] Map Fixer [mapfix]

by Minetestforfun » Sun Nov 30, 2014 22:33

Thank you for this mod Gael, it's now activated in my server, i tried it and it works perfectly :)
 

User avatar
philipbenr
Member
 
Posts: 1665
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: WisdomFire or philipbenr

Re: [Mod] Map Fixer [mapfix]

by philipbenr » Mon Dec 01, 2014 00:49

Very nice and handy mod. Thanks Gael.
 

User avatar
Gael de Sailly
Member
 
Posts: 475
Joined: Sun Jan 26, 2014 17:01
GitHub: Gael-de-Sailly
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly

Re: [Mod] Map Fixer [mapfix]

by Gael de Sailly » Thu Jul 02, 2015 15:18

Updated : rewritten.
There's now a limitation for players, to avoid server freeze.

Added minetest.conf settings.
Very busy this year too, so do not expect me to be very active on the forum or in game. But I'm not about to drop Minetest forever :)
 

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

Re: [Mod] Map Fixer [mapfix]

by ExeterDad » Sun Jul 19, 2015 21:36

This mod is awesome.
Just say'n
٩(̾●̮̮̃̾•̃̾)۶

Kibbie and I have a beautiful public server now! HOMETOWN
 

User avatar
trev
Member
 
Posts: 42
Joined: Fri Sep 26, 2014 16:49
In-game: trev

Re: [Mod] Map Fixer [mapfix]

by trev » Fri Sep 11, 2015 18:27

Thank you so much! My server was broken with pitch black areas. It was terrible. Fixed with a command. Nice!
Do what you love, and you will love what you do! :)
 

User avatar
Gael de Sailly
Member
 
Posts: 475
Joined: Sun Jan 26, 2014 17:01
GitHub: Gael-de-Sailly
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly

Re: [Mod] Map Fixer [mapfix]

by Gael de Sailly » Sun Oct 04, 2015 21:08

UPDATE: Timer problems fixed by using os.time(), and settings are now fully functional.
Very busy this year too, so do not expect me to be very active on the forum or in game. But I'm not about to drop Minetest forever :)
 

Betamine
New member
 
Posts: 9
Joined: Tue Jul 07, 2015 10:07

Re: [Mod] Map Fixer [mapfix]

by Betamine » Tue Oct 06, 2015 08:03

It's great, thank you.

Is it possible to fix map around a region define by pos1 ?
I would like to fix a great region and it will be faster if i can excute the command in the chat window without "going" to the place to fix, something like this :
- //fixedpos set1 0 0 0
- //mapfix pos1
- //fixedpos set1 50 0 0
- //mapfix pos1
- //fixedpos set1 100 0 0
- //mapfix pos1
- etc ...

Thank you.
 

User avatar
Milan*
Member
 
Posts: 203
Joined: Thu May 28, 2015 06:45
GitHub: tchncs
IRC: Passant
In-game: Milan Passant

Re: [Mod] Map Fixer [mapfix]

by Milan* » Sun Dec 13, 2015 18:38

Sadly doesnt help on all non-shadow lightbugs :(
Last edited by Milan* on Mon Nov 21, 2016 10:41, edited 1 time in total.
 

Fixerol
Member
 
Posts: 633
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer

Re: [Mod] Map Fixer [mapfix]

by Fixerol » Sat Nov 19, 2016 22:07

I have suggestion for developing second version of this mod, for fixing on large scale:
I'm thinking about more enhanced version
Imagine you glitched lighting on your map again
now comes improved mapfix 2.0
it works differently
map divided into 50 x 50 x 50 chunks
it checks if players around
if player is in this chunk -> check if it was mapfixed -> do mapfix in that chunk -> write in some file to avoid mapfixing it later
this way you can gradually fix the map
 

User avatar
sorcerykid
Member
 
Posts: 219
Joined: Fri Aug 26, 2016 15:36
In-game: Nemo

Re: [Mod] Map Fixer [mapfix]

by sorcerykid » Sun Dec 04, 2016 16:34

I'm curious why nobody has proposed merging this into the official minetest-game? It seems to be one of the most essential mods, particularly for a server.
 

User avatar
YuGiOhJCJ
Member
 
Posts: 34
Joined: Sat Jan 23, 2016 07:41
GitHub: YuGiOhJCJ
IRC: YuGiOhJCJ
In-game: YuGiOhJCJ

Re: [Mod] Map Fixer [mapfix]

by YuGiOhJCJ » Thu Dec 22, 2016 13:37

Awesome mod! It solved all my shadow problems on my Minetest server. Thank you.
 

hajo
Member
 
Posts: 262
Joined: Thu Oct 13, 2016 10:45

Re: [Mod] Map Fixer [mapfix]

by hajo » Mon Jan 02, 2017 16:59

sorcerykid wrote:I'm curious why nobody has proposed merging this into the official minetest-game?

This mod is still announced as WIP - 'Work-in-Progress'.

Are there any open issues that need fixing ?
Otherwise, request to move thread / announce as regular/finished mod.
Some of 'my' wiki-pages: Build-a-home - basic-robot - basic-machines - digtron
 

User avatar
Gael de Sailly
Member
 
Posts: 475
Joined: Sun Jan 26, 2014 17:01
GitHub: Gael-de-Sailly
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly

Re: [Mod] Map Fixer [mapfix]

by Gael de Sailly » Mon Jan 02, 2017 20:08

Some things should be changed (smaller radius by default) but yes, it's a very simple code, there is not a lot of issues to fix.
The code is somewhat hacky, in fact it gets a voxelmanip and immediately write it (after recalculating liquid flow) and while writing it, it automatically recalculate the light.
It could be implemented much more cleanly in the core. All needed functions already exist, so it would be a very small addition in terms of quantity of code.
Very busy this year too, so do not expect me to be very active on the forum or in game. But I'm not about to drop Minetest forever :)
 

User avatar
Sergey
Member
 
Posts: 362
Joined: Wed Jan 11, 2017 13:28

Re: [Mod] Map Fixer [mapfix]

by Sergey » Tue Feb 21, 2017 18:35

Error occured with automatic exit from gameplay when I typed /mapfix 1000

If this value considired too big, then your script must check it, warn about it, but not crash with errors and breaking the game.

Image
Attachments
screenshot_2017-02-21_21-30-04_1280x1024.2.png
screenshot_2017-02-21_21-30-04_1280x1024.2.png (146.87 KiB) Viewed 2564 times
 

User avatar
Gael de Sailly
Member
 
Posts: 475
Joined: Sun Jan 26, 2014 17:01
GitHub: Gael-de-Sailly
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly

Re: [Mod] Map Fixer [mapfix]

by Gael de Sailly » Wed Feb 22, 2017 17:29

Sergey wrote:Error occured with automatic exit from gameplay when I typed /mapfix 1000

If this value considired too big, then your script must check it, warn about it, but not crash with errors and breaking the game.

Thank you :)
Done: I've limited the radius to 120 nodes, and changed the max radius for players without server privs to 24. I've noticed some weeks ago that a very large radius (>60?) can sometimes cause black chunks instead of solving them.
Very busy this year too, so do not expect me to be very active on the forum or in game. But I'm not about to drop Minetest forever :)
 

User avatar
Sergey
Member
 
Posts: 362
Joined: Wed Jan 11, 2017 13:28

Re: [Mod] Map Fixer [mapfix]

by Sergey » Thu Feb 23, 2017 12:43

I think maximum value should be mentioned in warning in order not to guess it.

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
/mapfix 1000
Radius is too big

/mapfix 500
Radius is too big

/mapfix 250
Radius is too big

/mapfix 125
Radius is too big

/mapfix 62
Done


Now maximum radius can be determined only using bisection method.

Please, mention something like this
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
Radius is too big. Maximum radius allowed is <max_radius>.


In any software the more detailed output is the better.
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 74 guests

cron