[Mod] Protector Redo [3.4] [protector]

User avatar
MeseCraft
Member
Posts: 47
Joined: Wed Nov 04, 2020 22:52
GitHub: MeseCraft
Contact:

Re: [Mod] Protector Redo [3.2] [protector]

by MeseCraft » Post

Hi TenPlus1,

I saw in the commitnotes that this worked with the playerfactions mod, however, when I went to use it, right clicking on the protector produced a fatal crash:

Code: Select all

2020-12-24 18:21:44: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback item_OnPlace(): ...e/games/minetest/games/mesecraft/mods/protector/init.lua:176: bad argument #1 to 'next' (table expected, got nil)
2020-12-24 18:21:44: ERROR[Main]: stack traceback:
2020-12-24 18:21:44: ERROR[Main]:       [C]: in function 'next'
2020-12-24 18:21:44: ERROR[Main]:       ...e/games/minetest/games/mesecraft/mods/protector/init.lua:176: in function 'protector_formspec'
2020-12-24 18:21:44: ERROR[Main]:       ...e/games/minetest/games/mesecraft/mods/protector/init.lua:504: in function 'on_rightclick'
2020-12-24 18:21:44: ERROR[Main]:       /usr/share/games/minetest/builtin/game/item.lua:426: in function </usr/share/games/minetest/builtin/game/item.lua:419>
🌎 Website | ⛏️ MeseCraft Game | πŸ“° News | πŸ–ŒοΈ ContentDB

User avatar
MeseCraft
Member
Posts: 47
Joined: Wed Nov 04, 2020 22:52
GitHub: MeseCraft
Contact:

Re: [Mod] Protector Redo [3.2] [protector]

by MeseCraft » Post

MisterE and I were able to patch a quick fix.

https://notabug.org/MeseCraft/mesecraft ... #L176-L180
🌎 Website | ⛏️ MeseCraft Game | πŸ“° News | πŸ–ŒοΈ ContentDB

User avatar
MeseCraft
Member
Posts: 47
Joined: Wed Nov 04, 2020 22:52
GitHub: MeseCraft
Contact:

Re: [Mod] Protector Redo [3.2] [protector]

by MeseCraft » Post

Another when player2 punching the protector owned and shared by player1.

Code: Select all

2020-12-24 19:25:55: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback node_on_punch(): /usr/share/games/minetest/builtin/game/auth.lua:13: assertion failed!
2020-12-24 19:25:55: ERROR[Main]: stack traceback:
2020-12-24 19:25:55: ERROR[Main]:       [C]: in function 'assert'
2020-12-24 19:25:55: ERROR[Main]:       /usr/share/games/minetest/builtin/game/auth.lua:13: in function 'get_auth'
2020-12-24 19:25:55: ERROR[Main]:       /usr/share/games/minetest/builtin/game/misc.lua:87: in function 'player_exists'
2020-12-24 19:25:55: ERROR[Main]:       ...es/minetest/games/mesecraft/mods/playerfactions/init.lua:51: in function 'player_is_in_faction'
2020-12-24 19:25:55: ERROR[Main]:       ...e/games/minetest/games/mesecraft/mods/protector/init.lua:87: in function 'is_member'
2020-12-24 19:25:55: ERROR[Main]:       ...e/games/minetest/games/mesecraft/mods/protector/init.lua:312: in function 'can_dig'
2020-12-24 19:25:55: ERROR[Main]:       ...e/games/minetest/games/mesecraft/mods/protector/init.lua:363: in function 'is_protected'
2020-12-24 19:25:55: ERROR[Main]:       ...e/games/minetest/games/mesecraft/mods/protector/init.lua:512: in function <...e/games/minetest/games/mesecraft/mods/protector/init.lua:510>
Last edited by MeseCraft on Fri Dec 25, 2020 01:54, edited 1 time in total.
🌎 Website | ⛏️ MeseCraft Game | πŸ“° News | πŸ–ŒοΈ ContentDB

User avatar
MeseCraft
Member
Posts: 47
Joined: Wed Nov 04, 2020 22:52
GitHub: MeseCraft
Contact:

Re: [Mod] Protector Redo [3.2] [protector]

by MeseCraft » Post

Another when player2 placing inside a protector owned and shared by player1.

Code: Select all

2020-12-24 19:33:31: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback item_OnPlace(): /usr/share/games/minetest/builtin/game/auth.lua:13: assertion failed!
2020-12-24 19:33:31: ERROR[Main]: stack traceback:
2020-12-24 19:33:31: ERROR[Main]:       [C]: in function 'assert'
2020-12-24 19:33:31: ERROR[Main]:       /usr/share/games/minetest/builtin/game/auth.lua:13: in function 'get_auth'
2020-12-24 19:33:31: ERROR[Main]:       /usr/share/games/minetest/builtin/game/misc.lua:87: in function 'player_exists'
2020-12-24 19:33:31: ERROR[Main]:       ...es/minetest/games/mesecraft/mods/playerfactions/init.lua:51: in function 'player_is_in_faction'
2020-12-24 19:33:31: ERROR[Main]:       ...e/games/minetest/games/mesecraft/mods/protector/init.lua:87: in function 'is_member'
2020-12-24 19:33:31: ERROR[Main]:       ...e/games/minetest/games/mesecraft/mods/protector/init.lua:312: in function 'can_dig'
2020-12-24 19:33:31: ERROR[Main]:       ...e/games/minetest/games/mesecraft/mods/protector/init.lua:363: in function 'is_protected'
2020-12-24 19:33:31: ERROR[Main]:       /usr/share/games/minetest/builtin/game/item.lua:299: in function 'item_place_node'
2020-12-24 19:33:31: ERROR[Main]:       /usr/share/games/minetest/builtin/common/misc_helpers.lua:340: in function </usr/share/games/minetest/builtin/common/misc_helpers.lua:286>
🌎 Website | ⛏️ MeseCraft Game | πŸ“° News | πŸ–ŒοΈ ContentDB

User avatar
MeseCraft
Member
Posts: 47
Joined: Wed Nov 04, 2020 22:52
GitHub: MeseCraft
Contact:

Re: [Mod] Protector Redo [3.2] [protector]

by MeseCraft » Post

MisterE did most of this, he said I'll try to make an issue in your repo.

We were able to resolve the problems as far as we can tell and its working well now. Ended up with a protector init file as below that is working correctly with playerfactions and protector.

https://notabug.org/MeseCraft/mesecraft ... r/init.lua
🌎 Website | ⛏️ MeseCraft Game | πŸ“° News | πŸ–ŒοΈ ContentDB

User avatar
MeseCraft
Member
Posts: 47
Joined: Wed Nov 04, 2020 22:52
GitHub: MeseCraft
Contact:

Re: [Mod] Protector Redo [3.2] [protector]

by MeseCraft » Post

now a conflict with mobs redo
2020-12-24 20:11:40: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback LuaABM::trigger(): ...e/games/minetest/games/mesecraft/mods/protector/init.lua:85: bad argument #1 to 'ipairs' (table expected, got boolean)
2020-12-24 20:11:40: ERROR[Main]: stack traceback:
2020-12-24 20:11:40: ERROR[Main]: [C]: in function 'ipairs'
2020-12-24 20:11:40: ERROR[Main]: ...e/games/minetest/games/mesecraft/mods/protector/init.lua:85: in function 'is_member'
2020-12-24 20:11:40: ERROR[Main]: ...e/games/minetest/games/mesecraft/mods/protector/init.lua:312: in function 'can_dig'
2020-12-24 20:11:40: ERROR[Main]: ...e/games/minetest/games/mesecraft/mods/protector/init.lua:363: in function 'is_protected'
2020-12-24 20:11:40: ERROR[Main]: ...re/games/minetest/games/mesecraft/mods/mobs_redo/api.lua:3935: in function 'spawn_action'
2020-12-24 20:11:40: ERROR[Main]: ...re/games/minetest/games/mesecraft/mods/mobs_redo/api.lua:4015: in function <...re/games/minetest/games/mesecraft/mods/mobs_redo/api.lua:4014>
🌎 Website | ⛏️ MeseCraft Game | πŸ“° News | πŸ–ŒοΈ ContentDB

User avatar
MeseCraft
Member
Posts: 47
Joined: Wed Nov 04, 2020 22:52
GitHub: MeseCraft
Contact:

Re: [Mod] Protector Redo [3.2] [protector]

by MeseCraft » Post

🌎 Website | ⛏️ MeseCraft Game | πŸ“° News | πŸ–ŒοΈ ContentDB

User avatar
TenPlus1
Member
Posts: 3700
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Update:

by TenPlus1 » Post

- Player Factions issue fixed (thanks MisterE)
- Protector display removal tidied up

Git and ContentDB both updated :)

User avatar
MeseCraft
Member
Posts: 47
Joined: Wed Nov 04, 2020 22:52
GitHub: MeseCraft
Contact:

Re: [Mod] Protector Redo [3.2] [protector]

by MeseCraft » Post

Merry Christmas everyone!

I woke up this morning to a new bug but it's within the scope of playerfactions so I'll report it within that thread. Translate is not working.
🌎 Website | ⛏️ MeseCraft Game | πŸ“° News | πŸ–ŒοΈ ContentDB

hlqkj
Member
Posts: 38
Joined: Wed Dec 11, 2019 20:10
GitHub: hlqkj
IRC: hlqkj
In-game: hlqkj

Re: [Mod] Protector Redo [3.2] [protector]

by hlqkj » Post

Hello, and happy new year to everyone!

Being inspired by the areas-based protection, where you can set an area name and have it displayed on the hud, I thought that would be nice to have the same feature in the protector mod too! :)

The use case that gave me this idea is a player that's building beautiful PoIs and he nicely names them too, though the only place those names are displayed are in poorly-visible signs at their entrances.

I think it should easily be feasible by adding a new text field to the protector formspec and adding that field value to the hud too, where it already shows the owner.

The placer tool would also need to copy the value as it does with members when used with sneak pressed.

What do you think about this?
Quando omni flunkus, moritati.

User avatar
TenPlus1
Member
Posts: 3700
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Re: [Mod] Protector Redo [3.2] [protector]

by TenPlus1 » Post

@hlqkj - Protector Redo already displays the owner's name in the bottom left of the screen using HUD and placing a protector using the tool while holding sneak already copies all of the members across to the new one.

hlqkj
Member
Posts: 38
Joined: Wed Dec 11, 2019 20:10
GitHub: hlqkj
IRC: hlqkj
In-game: hlqkj

Re: [Mod] Protector Redo [3.2] [protector]

by hlqkj » Post

TenPlus1 wrote: ↑
Sun Jan 03, 2021 08:17
@hlqkj - Protector Redo already displays the owner's name in the bottom left of the screen using HUD and placing a protector using the tool while holding sneak already copies all of the members across to the new one.
I know all this of course, indeed, I wasn't talking about the player name but the "area name", that is an additional text field that players could use to name their places...

Note that this wasn't meant to be a feature request, rather more like an opinion poll :)
Quando omni flunkus, moritati.

User avatar
TenPlus1
Member
Posts: 3700
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Re: [Mod] Protector Redo [3.2] [protector]

by TenPlus1 » Post

Ah okie :P

User avatar
Miniontoby
Member
Posts: 616
Joined: Fri Mar 01, 2019 19:25
GitHub: Miniontoby
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: [Mod] Protector Redo [3.2] [protector]

by Miniontoby » Post

I got an public server, but some user spammed the protector block all over the island,

How to remove all the blocks and the areas?
Working on mtctl ---- Check my mod "Doorbell" -- Stay safe

User avatar
TenPlus1
Member
Posts: 3700
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Re: [Mod] Protector Redo [3.2] [protector]

by TenPlus1 » Post

Admin can remove protection blocks by using the command: /protector_remove <name>

User avatar
Miniontoby
Member
Posts: 616
Joined: Fri Mar 01, 2019 19:25
GitHub: Miniontoby
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: [Mod] Protector Redo [3.2] [protector]

by Miniontoby » Post

TenPlus1 wrote: ↑
Sun Feb 14, 2021 21:03
Admin can remove protection blocks by using the command: /protector_remove <name>

thanks, that worked
Working on mtctl ---- Check my mod "Doorbell" -- Stay safe

amadin
Member
Posts: 549
Joined: Tue Jun 16, 2015 16:23

Re: [Mod] Protector Redo [3.2] [protector]

by amadin » Post

Relative to HUD_TEXT =S (Owner: @ 1, NodeOwner) in Hud.lua. For me, it's better with a minimum of information on the screen that I don't need right now. Perhaps it is better to display the HUD_TEXT only if the Protector is in Hotbar?
Last edited by amadin on Tue Apr 20, 2021 08:51, edited 2 times in total.

User avatar
TenPlus1
Member
Posts: 3700
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Re: [Mod] Protector Redo [3.2] [protector]

by TenPlus1 » Post

@amadin - set 'protector_hud_interval' to 0 and it disables that feature.

sangeet
Member
Posts: 49
Joined: Sat Feb 13, 2021 12:15

Re: [Mod] Protector Redo [3.2] [protector]

by sangeet » Post

Hi. I have this totally strange bug.

I have protectors set so that they damage players for trying to break protected areas of other players. I have two players, who get messages about being damaged in random places by protectors of another player. It happens on any protected territory randomly. I saw it with my own eyes. Player gets a message "This area is owned by" with another player name. This player in example below always gets a message about area owned by player name 0bits, for example.

I run a multicraft 2.0.0 server.

when a player gets damaged, it looks like this:
2021-07-06 15:44:08: ACTION[Server]: PC007 damaged by 1 hp at (-3634.16,8.914,129.845)

full server log looks like this when it happens:
2021-07-06 15:44:07: ACTION[Server]: Mirameer digs flowers:tulip at (-3401,8,1331)
2021-07-06 15:44:07: INFO[Server]: Server: Mirameer started digging (32767,32767,32767) and completed digging (-3401,8,1331); not digging.
2021-07-06 15:44:07: INFO[Server]: Server: Mirameer completed digging (-3401,8,1331), which is not diggable with tool; not digging.
2021-07-06 15:44:07: INFO[Server]: Server: MapEditEvents:
2021-07-06 15:44:07: INFO[Server]: MEET_ADDNODE . . . . . . . . . . . . . . . 1x 2
2021-07-06 15:44:07: INFO[Server]: MEET_BLOCK_NODE_METADATA_CHANGED . . . . . 1x 59
2021-07-06 15:44:07: INFO[Server]: MEET_REMOVENODE . . . . . . . . . . . . . . 1x 1
2021-07-06 15:44:08: ACTION[Server]: PC007 damaged by 1 hp at (-3634.16,8.914,129.845)
2021-07-06 15:44:08: INFO[Server]: Server: MapEditEvents:
2021-07-06 15:44:08: INFO[Server]: MEET_ADDNODE . . . . . . . . . . . . . . . 1x 3
2021-07-06 15:44:08: INFO[Server]: MEET_BLOCK_NODE_METADATA_CHANGED . . . . . 1x 29
2021-07-06 15:44:08: INFO[Server]: Server: MapEditEvents:
2021-07-06 15:44:08: INFO[Server]: MEET_ADDNODE . . . . . . . . . . . . . . . 1x 58
2021-07-06 15:44:08: INFO[Server]: Server: MapEditEvents:
2021-07-06 15:44:08: INFO[Server]: MEET_ADDNODE . . . . . . . . . . . . . . . 1x 1
2021-07-06 15:44:08: INFO[Server]: MEET_BLOCK_NODE_METADATA_CHANGED . . . . . 1x 4
2021-07-06 15:44:09: ACTION[Server]: LadyK digs default:leaves at (-4469,22,362)
2021-07-06 15:44:09: INFO[Server]: Server: MapEditEvents:
2021-07-06 15:44:09: INFO[Server]: MEET_ADDNODE . . . . . . . . . . . . . . . 1x 2
2021-07-06 15:44:09: INFO[Server]: MEET_BLOCK_NODE_METADATA_CHANGED . . . . . 1x 46
2021-07-06 15:44:09: INFO[Server]: MEET_REMOVENODE . . . . . . . . . . . . . . 1x 1
2021-07-06 15:44:09: INFO[Server]: Server: MapEditEvents:
2021-07-06 15:44:09: INFO[Server]: MEET_ADDNODE . . . . . . . . . . . . . . . 1x 4
2021-07-06 15:44:09: INFO[Server]: MEET_BLOCK_NODE_METADATA_CHANGED . . . . . 1x 24
2021-07-06 15:44:09: INFO[Server]: ServerMap: Unloaded 388 blocks from memory, of which 139 were written, 8336 blocks in memory.
2021-07-06 15:44:09: INFO[Server]: ServerMap: Blocks modified by:
2021-07-06 15:44:09: INFO[Server]: setTimestamp . . . . . . . . . . . . . . . 1x 9
2021-07-06 15:44:09: INFO[Server]: setTimestamp, Timestamp expired (step) . . 1x 130
2021-07-06 15:44:09: INFO[Server]: Server: MapEditEvents:
2021-07-06 15:44:09: INFO[Server]: MEET_ADDNODE . . . . . . . . . . . . . . . 1x 1
2021-07-06 15:44:09: INFO[Server]: MEET_BLOCK_NODE_METADATA_CHANGED . . . . . 1x 9
2021-07-06 15:44:10: INFO[Server]: ServerMap: Written: 42 blocks, 8340 blocks in memory.
2021-07-06 15:44:10: INFO[Server]: ServerMap: Blocks modified by:
2021-07-06 15:44:10: INFO[Server]: NodeMetaRef::reportMetadataChange . . . . . 1x 4
2021-07-06 15:44:10: INFO[Server]: addActiveObjectRaw . . . . . . . . . . . . 1x 1
2021-07-06 15:44:10: INFO[Server]: deactivateFarObjects: Static data changed considerably 1x 2
2021-07-06 15:44:10: INFO[Server]: setLightingExpired, setNodeNoCheck . . . . 1x 1
2021-07-06 15:44:10: INFO[Server]: setNodeNoCheck . . . . . . . . . . . . . . 1x 23
2021-07-06 15:44:10: INFO[Server]: setNodeNoCheck, NodeMetaRef::reportMetadataChange 1x 7
2021-07-06 15:44:10: INFO[Server]: setNodeNoCheck, addActiveObjectRaw, removeRemovedObjects/remove 1x 4
2021-07-06 15:44:10: INFO[Server]: Server: MapEditEvents:
2021-07-06 15:44:10: INFO[Server]: MEET_ADDNODE . . . . . . . . . . . . . . . 1x 2
2021-07-06 15:44:10: INFO[Server]: MEET_BLOCK_NODE_METADATA_CHANGED . . . . . 1x 30

User avatar
TenPlus1
Member
Posts: 3700
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Re: [Mod] Protector Redo [3.2] [protector]

by TenPlus1 » Post

This isn't a bug, it's the log info in console showing that a player has tried to do something inside a protected area and the damage they received shortly after, you can alter settings in minetest to only show actions instead so it doesn't show everything that happens, and protector redo has a setting to turn off messages.

sangeet
Member
Posts: 49
Joined: Sat Feb 13, 2021 12:15

Re: [Mod] Protector Redo [3.2] [protector]

by sangeet » Post

That is what I am saying. The player does nothing like that. I will add a video.

sangeet
Member
Posts: 49
Joined: Sat Feb 13, 2021 12:15

Re: [Mod] Protector Redo [3.2] [protector]

by sangeet » Post

OK, I will not add a video, since forum does not allow it. I put it on YouTube, access by link only.

It was provided by the second player, Moon_X, who is jumping under their own protector and viewing messages about area being owned by another player and getting damaged.

https://youtu.be/Vresbh7WcW4

I have the latest protector redo mod installed.

User avatar
TenPlus1
Member
Posts: 3700
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Re: [Mod] Protector Redo [3.2] [protector]

by TenPlus1 » Post

I've tried to re-create the issue with no effect, it all seems to work fine. What other mods are in use ?

sangeet
Member
Posts: 49
Joined: Sat Feb 13, 2021 12:15

Re: [Mod] Protector Redo [3.2] [protector]

by sangeet » Post

i have quite a few. most of them have been around for some time. the only thing i added prior to this bug is dmobs from your repository.

3d_armor caverealms_lite filter item_drop mobs_skeletons newhand stoneworks u_skinsdb
antispam cblocks gemstones lavastuff mobs_sky pie stripped_tree wielded_light
areas chat3 geocache liquid_protection mobs_water plantlife_modpack techpack wine
artdeco cool_trees glass_stained mail_mod protector teleport_potion worldedit
awards darkage handle_schematics markers moreblocks quartz teleport-request worldwditadditions
bakedclay dmobs hbsprint mesecons more_chests rainbow_ore terraform xban2
basic_materials drawers homedecor_modpack minetest-balloonblocks morelights ranks tools_obsidian xdecor
basic_signs ethereal home_workshop_modpack mob_horse moreores regrow ts_furniture
biome_lib facade hopper mobs_animal mute server_news tubelib2
bonemeal fachwerk ilights mobs_monster mychisel signs_lib unifieddyes
caps_alert fancy_vend irc mobs_npc names_per_ip simple_streetlights unified_inventory
castle_tapestries farming irc_commands mobs_redo nether stamina unified_inventory_plus

User avatar
TenPlus1
Member
Posts: 3700
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Re: [Mod] Protector Redo [3.2] [protector]

by TenPlus1 » Post

Stamina mod has it's own sprint included so hbsprint is not required, and as for the issue at hand, it seems that something is checking for minetest.is_protected() for Moon_X but in a totally different area which is owned by PC007 so you have a rogue mod somewhere.

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests