[mod] Godtools [anti-griefing, fill area, bookmars][12.5.31]

Post Reply
mauvebic
Member
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

[mod] Godtools [anti-griefing, fill area, bookmars][12.5.31]

by mauvebic » Post

This works independent of my main mod so i thought i'd spin it off (still going to be included in madblocks, just not making a release right now)

Anti-Griefing

Code: Select all

chat commands:
/shield on      enables protextion
/shield off      disables it
/prot1 (coords optional, defaults to player pos) first corner of a protection zone
/prot2 (coords optional, defaults to player pos) opposite corner of " " 
when the shield is on: water and lava sources can't be placed anywhere on the map. Buckets are rendered useless (until the shield is turned off).
in the protection zone no nodes of any type can be placed, and nodes that are dug are automatically regenerated. (shield off will restore normal interaction)

all these settings are saved individually for each world (worldpath). the defaults for first run are shield off, and a protection zone of 1000x1000 at the center.

demo:
http://youtu.be/uf-6BOxsUM8
http://youtu.be/xTokCt3Q-0A


FIll Tool

Code: Select all

chat commands:

/fill1 (coords optional, defaults to player pos) define first corner
/fill2 (coords optional, defaults to player pos) define opposite corner
/fillw <mod:nodename>  fills the area with given node
/fillw -light     fix persistent shadows
/remove <mod:nodename>     remove specific nodes from area
/remove -all   removes all nodes from the area

This one's self explanatory, kindof like a barebones worldedit for those who'v used it.

Bookmarks

Code: Select all

/setwarp <bookmark_name> (sets it using your position)
/warp <bookmark_name>  (teleports anyone there, w or w/o teleport priv)
/delwarp <bookmark_name> (deletes the bookmark)
/listwarp  (lists all the destionation names and coords)
bookmarks are saved between sessions and universal to all players ~ the next version will likely also have personalized bookmarks :-) (that only work for the player who created it)
Last edited by mauvebic on Sat Dec 08, 2012 00:19, edited 1 time in total.

User avatar
Switch5681
Member
Posts: 36
Joined: Sat Sep 24, 2011 03:28

by Switch5681 » Post

The mod I just wrote will do some crazy stuff to oceans/lava, if there's anything I can do to help you support griefing countermeasures, I'll be happy to. Feel free to message me.

I've not spent any time on public servers, so I don't know what all people do regarding griefing. Maybe disabling TNT or other specific mods if they're installed?

mauvebic
Member
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Post

Hmm, well we could either define a new privilege or agree on one of the games' privileges. Disabling buckets was pretty easy, just move the contents of bucket.liquids to a another variable, and put them back to restore functionality.

User avatar
Switch5681
Member
Posts: 36
Joined: Sat Sep 24, 2011 03:28

by Switch5681 » Post

perhaps a new privilege called "grownup_toys" ? How difficult is it to implement something like this into a mod?

We're talking about mod code control here though, aren't we? Can you control the order in which mods are loaded and use this mod to change the code in other mods? I'm not familiar enough with the API.
Last edited by Switch5681 on Wed May 23, 2012 14:21, edited 1 time in total.

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

by Topywo » Post

Is it possible to create new priviliges or alter old priviliges, with or without mods?

mauvebic
Member
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Post

well the file i currently release requires the priv 'server' to be able to use the commands. and yeah, mods can interact with eachother, in the case of buckets its was easy it already uses global variables. other mods might be more tricky, but that depends what the biggest servers are running and what kind of griefing they usually get. I cant operate a server from my setup so i dont know.

next up im gonna add 9 programmable bookmarks (or wormholes?) that work independently of teleport priv. the bookmarks will have to be set with server priv. but players without teleport could then use /go1 through /go9 to return to familiar parts on the map.
Last edited by mauvebic on Wed May 23, 2012 15:34, edited 1 time in total.

User avatar
redcrab
Member
Posts: 831
Joined: Tue Dec 13, 2011 13:45
Location: France
Contact:

by redcrab » Post

Very nice mod.

It's a very good start, but from now my needs can't be fulfill with this current mod

A) Protect
>> currently when protection is defined for a particular zone , the zone is locked, nobody can build in the zone even the server admin.
>>Admin should always be able to dig and place
>>Multi zone : one zone per player or set of players : nobody can't build except the player or set of players or admin
>> BlackList / WhiteList (the list define the players accepted, and refused all others or the list define the players rejected and the other players are accepted)
>> Named Zone : to identify uniquely the zone (for add / remove / zone list and other command)
>>A particular privilege should define the protection administration privilege to enable administrative delegation of zone protection to one or more chosen players.(not only server admin)
>>A command to enumerate current zones defined
>>A command to add/remove a player to a zone
>>A command to enable/disable the zone (on / off protection per zone)
>>A command to customize a message sent per zone when wrong player dig/place on disallowed zone .

B) - Bucket should be allowed/disallowed per zone
>> I know that is more diffuclt to manage liquid flow (out-to-in / in-to-out zone flow) but knowing the limitation it can be nice
C) - Confidential zone
>> A zone parameter should define if a unwanted player should be ejected from the zone (eject up(teleport) to the nearest zone border)

D) Mega feature : Accept and handle overlapped zones.. :D ( this feature is not mandatory)
>> At least at the beginning a map zone (a zone for the entire world) to define the default behavior (dig/place/bucket) except for ejection (is managed by ban list)

multiple zone ... each zone defines:
Name : "TheZoneName"
Area : (x1,y1,z1)-(x2,y2,z2)
MessageToWrongPlayer : "Sorry You can't dig/place in this area" / "You were ejected from a confidential zone"
Enabled : True /False (defined zone is active or not)
BlackList : True / False (if false then "Players" list define the authorized players )
Players {player1,player2, player3 ....}
Bucket : On/Off :
EjectWrongPlayer : On/Off


One mandatory zone for the map zone (default behavior for the entire map)
it should be a zone with a reserved Name (e.g "World") so by default ...
Name : "World"
MessageToWrongPlayer : "Sorry you're no able to do all what you want (landlord)"
Area: <ignored values>
Enabled : True / False (can choose to ignore the zone definition)
BlackList : True / False
players : {} / {players1, players2 ...}
Bucket : on / off
EjectWrongPlayer : Off (ignored and always be considered as Off )

this World zone can't be removed of course.

Thanks for you current work, I hope that my needs is not too huge/hard to implement but anyway, what I've written is my current need..
0.4 for serious builder click here
Dedicated Minetest redcrab server forum at http://minetestbb.suret.net

It's nice to be important but it is more important to be nice.

mauvebic
Member
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Post

if i understand, you want more protection zones, and you want to be able to specify player exceptions for each of these zones?

As for hidden zones,ill have to think about how that could be done. I cant really constantly poll the position of all players, that would slow things down. but i could create nodes that have onstep functions that teleport people away?

the way i wrote todays' version was based on the idea that the shield could be turned off while admins are present on the server or just when work needs to be done within the zone, and then turned on when no ones keeping an eye or theres' no more room for developement. In a sense you'd have a 1st/3rd world situation going on, where rules are less strict (or inexistant) outside the protection zone(s)

ive also got bookmarks working , go1 through go9. You go to your town square (or house or lair, etc.) and do /setgo1 and /go1 will teleport you there.the bookmark is saved between sessions and is changeable the same way every time. no need to memorize or write down coordinates anymore.

and hey keep the input coming :-) madblocks is getting pretty stable so i need to find new features people want :P
Last edited by mauvebic on Wed May 23, 2012 22:29, edited 1 time in total.

User avatar
Switch5681
Member
Posts: 36
Joined: Sat Sep 24, 2011 03:28

by Switch5681 » Post

Adding a node with an onstep should be fine. Maybe give it a configurable radius?

User avatar
Calinou
Moderator
Posts: 3162
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

by Calinou » Post

I like it! Keep up the good work.

mauvebic
Member
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Post

Thanks :-) though to do whats being asked im gonna have to figure out a new way to save info between sessions. Otherwise im looking at two dozen single value files :-S or using special characters to split entries within the file.

I dont suppose anyone knows how i can save/convert/export an array from lua?

User avatar
Switch5681
Member
Posts: 36
Joined: Sat Sep 24, 2011 03:28

by Switch5681 » Post

You could parse the array into/from XML. (maybe?) http://asbradbury.org/projects/lua-xmlreader/

mauvebic
Member
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Post

either xml or

Code: Select all

local file = io.open("filename.txt")
if file then
    for line in file:lines() do
        local name, address, email = unpack(line:split(";")) --unpack turns a table like the one given (if you use the recommended version) into a bunch of separate variables
        --do something with that data
    end
else
end
[http://stackoverflow.com/questions/1891 ... ble-in-lua]

ill probably try both see what works better/faster :-)

User avatar
Switch5681
Member
Posts: 36
Joined: Sat Sep 24, 2011 03:28

by Switch5681 » Post

I noticed one of the comments at the bottom of that link mentioned putting the data into LUA format. Maybe you could do something like that.

mauvebic
Member
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Post

Multi-zones arent gonna work well - implemented it this morning and it made things hellishly slow. I tried to implement trusted players this morning too, but unless someone tells me how to get the player name on place node or dig, thats not gonna work either :S

Though id like to emphasize that the protection zone can be as big as you want - and it doesn't come with an off switch for no reason :-) using go bookmarks (which im nearly done and should release later today) you can set one that takes players to the unrestricted zone.

for far-off areas that require protection ~ ive thought of traps (node->onstep->teleport) and barriers/forcefields of sort, how and who would control them is still up for consideration. Though its entirely pointless if everyone has fly.
Last edited by mauvebic on Thu May 24, 2012 15:37, edited 1 time in total.

mauvebic
Member
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Post

Updated - now with bookmarks (nameable, no limits to how many)

User avatar
bcnjr5
Member
Posts: 67
Joined: Wed Apr 25, 2012 16:08
Location: 26.895601,-80.243576
Contact:

by bcnjr5 » Post

THANKS, only copied the bookmarks part though

mauvebic
Member
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Post

No prob.

thinking of adding:
- neutron bombs (turns lush forests into barren deserts)
- genesis (turn dead landscapes into forests/vegetation)
- level terrain (levels terrain)

User avatar
Calinou
Moderator
Posts: 3162
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

by Calinou » Post

Code: Select all

/setgo <bookmark_name> (sets it using your position)
/go <bookmark_name>  (teleports anyone there, w or w/o teleport priv)
/delgo <bookmark_name> (deletes the bookmark)
You should rename these to "warp" instead of "go" - Minecraft players are more used to these, and they sound far better.

mauvebic
Member
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Post

Will do :-) i thought of it but wasn't sure people would get the meaning :-S lol

and prolly add a /listwarp command to iterate the names of destinations saved
Last edited by mauvebic on Wed May 30, 2012 15:54, edited 1 time in total.

Post Reply

Who is online

Users browsing this forum: nolombic and 10 guests