[Mod] Protector Redo [3.4] [protector]

Post Reply
User avatar
Kilarin
Member
Posts: 896
Joined: Mon Mar 10, 2014 00:36
GitHub: Kilarin

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

by Kilarin » Post

how does it work against someone standing on a roof and digging down?

auouymous
Member
Posts: 195
Joined: Sun Dec 07, 2014 09:39
GitHub: auouymous
IRC: air
In-game: auouymous

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

by auouymous » Post

Kilarin wrote:how does it work against someone standing on a roof and digging down?
If it doesn't already, it could do something like this:

Code: Select all

local pos = player:getpos()
if block.y < pos.y then
    player:setpos({x=pos.x, y=pos.y+1.0, z=pos.z})
    player:set_look_pitch(-player:get_look_pitch())
end
It moves the player up one block and inverts pitch, so if player is looking straight down, player will then be looking straight up. It could also use moveto instead of setpos, I don't know the difference, but moveto might take longer to move the player up one block, which would be good.

auouymous
Member
Posts: 195
Joined: Sun Dec 07, 2014 09:39
GitHub: auouymous
IRC: air
In-game: auouymous

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

by auouymous » Post

Just looked at the source and it doesn't handle the above case. The yaw flipping code could also be simplified. The pitch could also be inverted to add a little extra annoyance, or put it inside the if statement with setpos.

Code: Select all

if protector.flip and player then
    -- yaw + 180°
    local yaw = player:get_look_yaw() + math.pi
    if yaw > 2*math.pi then yaw = yaw - 2*math.pi end
    player:set_look_yaw(yaw)

    -- invert pitch
    player:set_look_pitch(-player:get_look_pitch())

    -- move player up 1 block, if block is below player
    local pla_pos player:getpos()
    if pos.y < pla_pos.y then
        player:setpos({x=pla_pos.x, y=pla_pos.y+1.0, z=pla_pos.z})
    end
end

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

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

by TenPlus1 » Post

auouymous: Thanks dude, this works better :) Mod updated.

auouymous
Member
Posts: 195
Joined: Sun Dec 07, 2014 09:39
GitHub: auouymous
IRC: air
In-game: auouymous

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

by auouymous » Post

I see now that *_look_pitch() and *_look_yaw() are deprecated, how come you only used *_look_vertical() and not also *_look_horizontal()?

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

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

by TenPlus1 » Post

Whoops, forgot to update git when I replaced that one :) ahahaha... Done!

twoelk
Member
Posts: 1482
Joined: Fri Apr 19, 2013 16:19
GitHub: twoelk
IRC: twoelk
In-game: twoelk
Location: northern Germany

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

by twoelk » Post

cool feature

I saw an interesting flower, tried to pick it and was flipped around.
way better than the old getting banned for flower picking problem on Landrush
and more fun.
I had not noticed the protection but was flipped to see the protection block.
might have been unintended but I wondered if it might not be worthwhile to have the responding protection block in question be highlighted for a few moments.
not the whole area, just the block.

User avatar
maikerumine
Member
Posts: 1420
Joined: Mon Aug 04, 2014 14:27
GitHub: maikerumine
In-game: maikerumine

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

by maikerumine » Post

Help me please. :)

Which lua does require look horz?

Code: Select all

2016-08-15 19:30:16: ERROR[Main]: ServerError: Lua: Runtime error from mod '' in callback node_on_dig(): ...T\bin\..\games\just_test_tribute\mods\protector\init.lua:255: attempt to call method 'get_look_horizontal' (a nil value)
2016-08-15 19:30:16: ERROR[Main]: stack traceback:
2016-08-15 19:30:16: ERROR[Main]: 	...T\bin\..\games\just_test_tribute\mods\protector\init.lua:255: in function 'is_protected'
2016-08-15 19:30:16: ERROR[Main]: 	D:\JUSTTEST\bin\..\builtin\game\item.lua:448: in function <D:\JUSTTEST\bin\..\builtin\game\item.lua:439>
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959

auouymous
Member
Posts: 195
Joined: Sun Dec 07, 2014 09:39
GitHub: auouymous
IRC: air
In-game: auouymous

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

by auouymous » Post

maikerumine wrote:Help me please. :)

Code: Select all

...T\bin\..\games\just_test_tribute\mods\protector\init.lua:255:
 attempt to call method 'get_look_horizontal' (a nil value)
Are you using 0.4.14-dev or something older? If older, edit the init.lua file and change *_look_horizontal and *_look_vertical to *_look_yaw and *_look_pitch.

User avatar
Fixer
Member
Posts: 904
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer
Location: Ukraine

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

by Fixer » Post

Ah yes, this probably explains the problem, this feature requires 0.4.14-dev to work, or by changing that lines manually.

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

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

by TenPlus1 » Post

Update:

- Switched back to get_look_yaw, get_look_pitch, set_look_yaw, set_look_pitch for older clients.

CuriousNoob
Member
Posts: 73
Joined: Wed Jan 27, 2016 09:43

Pink Grid Fails To Display

by CuriousNoob » Post

TenPlus1 wrote:If area protection is set to 5 (default) then 5 blocks all around the protection node (up/down, left/right, back/forward) is protected... You can punch the protector to see the purple field of the area protected also...
Hi Again

Just to report an odd phenomenon...

Not all protection-blocks display the pink/magenta/purple grid when punched!

I'm using the latest daily version from the minetest-devs ppa, doing a local server in singleplayer survival mode, with the default minetest-game world.

The chosen mapgen is ''valleys'' but subject to landscaping mods including ethereal and mg_villages and random_buildings.

The 0,0,0 spawn point (actually 0,2.5,0) was inside solid rock so, after the requisite ''/grant singleplayer all'' I've manually dug outwards from there four long straight flat tunnels to the compass-points until breaking the surface.

Every 11th ceiling-block along these tunnels I'm installing a bog-standard Protector-Block (not a Logo).

Mostly, on punching, they've shown the helpful glowing-magenta boundary grid, all as expected.

Last night however, after placing the eighth protection-block along the Southbound tunnel, it staunchly refused to display the glowing grid, no matter how many times it was punched, or dug and re-placed, or the game restarted.

Much slower progress, laboriously counting every block in the middle, I continued placing protectors.

The ninth, tenth and eleventh protection-blocks along this tunnel were similarly no-glow, no-grid, but...

The twelfth protector-block was back to behaviour-as-normal, punch and glow !!!

Then at the (if I've counted correctly, long tunnel) 39th protector-block it's started again, no glow-grid on punch, and it's continued that way. I've placed several more, all of which fail to light up on being punched.

At this point I decided to come here to report the phenomenon, as the tunnels are so long that manual counts of every single ''one-two-three-four-five-five-four-three-two-one-zero dig place'' will take forever ... particularly when the no-glow means having to double-double-check everything ... as per the carpenter's ''measure twice cut once.''

Those no-glow blocks 8-11 and 39-plus consistently repeatably don't show the grid, even while the others adjacent cheerfully do light up.

Any ideas..?

Cheers.
.

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

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

by TenPlus1 » Post

So long as your username either owns or is listen on the protector you should be able to punch it and display the purple boundary area... I will double check just to make sure there's no glitch.

CuriousNoob
Member
Posts: 73
Joined: Wed Jan 27, 2016 09:43

re Glowing Purple Boundary-Grid Fails To Display

by CuriousNoob » Post

TenPlus1 wrote:So long as your username either owns or is listen on the protector you should be able to punch it and display the purple boundary area... I will double check just to make sure there's no glitch.
Yep, it's a newly-created local world, and as the default ''singleplayer'' I'm the only account! :)

It's the ''most-do some-don't'' thing I find odd.

And that re-placing, waiting, restarting... nothing kickstarts them back to glowing when punched.

I even tried changing the radius from 5 to 12 but that didn't solve it. Nor did ''/mapfix.''

In case it's relevant, its world.mt file shows the mods for this world, all of which are the latest versions I could find (GitHub etc) as at the last week or so :

Code: Select all

gameid = minetest
backend = sqlite3
creative_mode = false
enable_damage = true
load_mod_3d_armor = true
load_mod_3d_armor_stand = true
load_mod_3dmushrooms = true
load_mod_adv_spawning = true
load_mod_along_shore = true
load_mod_ambience = true
load_mod_bakedclay = true
load_mod_bell = true
load_mod_biome_lib = true
load_mod_bookmarks = true
load_mod_boost_cart = true
load_mod_bridges = true
load_mod_builtin_item = true
load_mod_bushes = true
load_mod_bushes_classic = true
load_mod_castle = true
load_mod_cavestuff = true
load_mod_cblocks = true
load_mod_clams = true
load_mod_concrete = true
load_mod_cottages = true
load_mod_craftguide = true
load_mod_digilines = true
load_mod_doors = true
load_mod_droplift = true
load_mod_dropondie = true
load_mod_dryplants = true
load_mod_ethereal = true
load_mod_extranodes = true
load_mod_farming = true
load_mod_ferns = true
load_mod_flowers_plus = true
load_mod_handle_schematics = true
load_mod_hazmat_suit = true
load_mod_hbarmor = true
load_mod_hbhunger = true
load_mod_hopper = true
load_mod_hudbars = true
load_mod_junglegrass = true
load_mod_mapfix = true
load_mod_maptools = true
load_mod_mesecons = true
load_mod_mesecons_alias = true
load_mod_mesecons_blinkyplant = true
load_mod_mesecons_button = true
load_mod_mesecons_commandblock = true
load_mod_mesecons_delayer = true
load_mod_mesecons_detector = true
load_mod_mesecons_doors = true
load_mod_mesecons_extrawires = true
load_mod_mesecons_gates = true
load_mod_mesecons_hydroturbine = true
load_mod_mesecons_insulated = true
load_mod_mesecons_lamp = true
load_mod_mesecons_lightstone = true
load_mod_mesecons_luacontroller = true
load_mod_mesecons_materials = true
load_mod_mesecons_microcontroller = true
load_mod_mesecons_movestones = true
load_mod_mesecons_mvps = true
load_mod_mesecons_noteblock = true
load_mod_mesecons_pistons = true
load_mod_mesecons_powerplant = true
load_mod_mesecons_pressureplates = true
load_mod_mesecons_random = true
load_mod_mesecons_receiver = true
load_mod_mesecons_solarpanel = true
load_mod_mesecons_stickyblocks = true
load_mod_mesecons_switch = true
load_mod_mesecons_torch = true
load_mod_mesecons_walllever = true
load_mod_mesecons_wires = true
load_mod_mg_villages = true
load_mod_mobf = true
load_mod_molehills = true
load_mod_more_chests = true
load_mod_moreblocks = true
load_mod_moreores = true
load_mod_moresnow = true
load_mod_nature_classic = true
load_mod_noairblocks = true
load_mod_nssb = true
load_mod_nssm = true
load_mod_nyan_tools = true
load_mod_painting = true
load_mod_pipeworks = true
load_mod_playeranim = true
load_mod_playerplus = true
load_mod_poisonivy = true
load_mod_protector = true
load_mod_quartz = true
load_mod_random_buildings = true
load_mod_screwdriver = true
load_mod_seacobble = true
load_mod_seacoral = true
load_mod_seaglass = true
load_mod_seagravel = true
load_mod_sealamps = true
load_mod_seaplants = true
load_mod_seastone = true
load_mod_seastonebrick = true
load_mod_seawrecks = true
load_mod_sedimentology = true
load_mod_shields = true
load_mod_signs_lib = true
load_mod_spawn_command = true
load_mod_stairsshine = true
load_mod_technic = true
load_mod_technic_armor = true
load_mod_technic_chests = true
load_mod_technic_worldgen = true
load_mod_throwing = true
load_mod_torches = true
load_mod_travelnet = true
load_mod_treecapitator = true
load_mod_trunks = true
load_mod_unified_inventory = true
load_mod_unifieddyes = true
load_mod_vector_extras = true
load_mod_village_modern_houses = true
load_mod_village_sandcity = true
load_mod_vines = true
load_mod_whiteshell = true
load_mod_wieldview = true
load_mod_wine = true
load_mod_woodsoils = true
load_mod_wool = true
load_mod_wrench = true
load_mod_xdecor = true
load_mod_youngtrees = true
server_announce = false
Hope that helps.

As always, much appreciation and respect for your contributions to the community. :)

.

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

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

by TenPlus1 » Post

Hrm, on a newly created 0.4.14 world I placed 20 protectors at varying lengths and went back to punch them all which resulted in purple fields showing for each and every one ?!?!?! It works ok...

What version of minetest are you using ? and do you have latest Protector Redo mod: https://github.com/tenplus1/protector

CuriousNoob
Member
Posts: 73
Joined: Wed Jan 27, 2016 09:43

re Glowing Purple Boundary-Grid Fails To Display

by CuriousNoob » Post

TenPlus1 wrote:Hrm, on a newly created 0.4.14 world I placed 20 protectors at varying lengths and went back to punch them all which resulted in purple fields showing for each and every one ?!?!?! It works ok...

What version of minetest are you using ? and do you have latest Protector Redo mod: https://github.com/tenplus1/protector
CuriousNoob wrote: ... the latest daily version from the minetest-devs ppa
Presently seems to be : 201609040731-0~5000~ubuntu14.04.1

Protector downloaded from GitHub on 2016-08-25

.

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

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

by TenPlus1 » Post

Silly question, but... are you trying to punch the protector node while holding a protector node ? If so, that doesn't work as holding a protector node while punching will use it as a tool and show you the coords for the closest protector.

CuriousNoob
Member
Posts: 73
Joined: Wed Jan 27, 2016 09:43

re Glowing Pink Boundary-Grid Not Lighting Up

by CuriousNoob » Post

TenPlus1 wrote:Silly question, but... are you trying to punch the protector node while holding a protector node ? If so, that doesn't work as holding a protector node while punching will use it as a tool and show you the coords for the closest protector.
Not silly at all, perfectly valid question ... and as the Americans would say, ''My Bad'' that I didn't think to include such a basic piece of troubleshooting information to help the diagnostic process of elimination.

The answer is, however, a firm ''No'' ... this is not punching while holding a protector-node.

In fact, that actually reminds me :

Not only...

I did punch while holding tools, torches, blocks and naked hand and they do all work as expected on the other, working, punch-and-glow blocks.

But also...

I noticed that when punching while holding a protection-block --- which works as a protection-detector, identifying block-owner and the x,y,z where the relevant protector-node is located --- then, from the message-stream, it seems that these non-lighting-up blocks do still seem to be protecting their environs (and themselves).

e.g.

Code: Select all

This area is owned by singleplayer.
Protection located at: (0,5,-483)
That suggests they're functional as protectors ... although of course there's only ''singleplayer'' and no one else to test it.

No, it's just that they're not lighting-up when punched.

- First to seventh along the Southbound tunnel = lighting-up as expected

- Eight to eleventh along the Southbound tunnel = not lighting-up

- Twelfth to thirty-eighth along the Southbound tunnel = lighting-up as expected

- Thirty-ninth onward for a few along the Southbound tunnel = not lighting-up

I stopped at about the 44th (0, 5, -483) to report this odd phenomenon yesterday, and haven't played it today.

This is all manual-build first-person real-time tunnelling (no WorldEdit or anything) and so I haven't investigated outside, whether there's anything obviously visually-different and out-of-the-ordinary above or below or to the sides of this tunnel in the locations where these blocks won't light up ... maybe some weird edge-case mapgen or mod conflict..? But I'm totally out of my depth and would need guidance to really investigate this.

I realise ''repeatability'' or ''direct observation'' are best for Troubleshooting, but unfortunately with data-caps in place I cannot offer to send you the world's folder (including map.sqlite) nor the relevant mods listed above, as we're over 100 MB in total. What I can say is it's the standard game, the valleys mapgen, the mods listed earlier, the seed 6742744353736818480, the tunnels just the minimum 1-wide x 2-high from standing at 0, 2.5, 0 digging outwards N S E & W straight and flat and hundreds/thousands long with the protector-nodes in the ceiling every 11th block in the West and so far along the South tunnel.

To me, the baseline weird thing is that only some of them fail, it's not an all-or-nothing failure like we'd see or expect from other typical conflicts. That's what, more than anything else, prompted me to report it.

HTH :)
.

CuriousNoob
Member
Posts: 73
Joined: Wed Jan 27, 2016 09:43

re Glowing Purple Boundary-Grid Not Lighting Up

by CuriousNoob » Post

CuriousNoob wrote:I stopped at about the 44th (0, 5, -483) to report this odd phenomenon yesterday, and haven't played it today.
Update :

With today's minetest-dev version from Linux Mint Update-Manager, fired it up, previous blocks same as above, most light up, same ones fail.

Placed 45th Protector-Block at 0, 5, -494 and that lights up when punched.

Then the 46/47/48/49/50th at 0, 5, -505/516/527/538/549 and those light up too.

So, summary, along this tunnel so far, seven do (1 to 7), four don't (8 to 11), twenty-seven do (12 to 38), five don't (39 to 44), now back to lighting up (45 to 50 so far).

Enabled ''noclip'' and ''free_move'' and flew through the mostly-stone around the tunnel, but saw no obvious structures nor any correlations with biomes above.

Odd, very odd.
.

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

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

by amadin » Post

protector_flip is cool and very the right thing. I think rotation angle is enough 50-60 degrees but now it is 90 degrees.

luizrpgluiz
Member
Posts: 20
Joined: Thu Mar 19, 2015 18:11
IRC: luizrpgluiz
In-game: luizinho

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

by luizrpgluiz » Post

Because that even using the stick in 0.4.14, it does not show that entity that shows what is the size of the land that can be protected as the landrush? When I clicked the mouse button, it showed the pink space of the protected area.
cdb_HTWLEyTsySH8

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

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

by amadin » Post

.
Last edited by amadin on Wed May 26, 2021 11:15, edited 1 time in total.

User avatar
Andrey01
Member
Posts: 2577
Joined: Wed Oct 19, 2016 15:18
GitHub: Andrey2470T
In-game: Andrey01
Location: Russia, Moscow

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

by Andrey01 » Post

Very usefull mod!

User avatar
Hybrid Dog
Member
Posts: 2834
Joined: Thu Nov 01, 2012 12:46
GitHub: HybridDog

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

by Hybrid Dog » Post

amadin wrote:50% texture transparent "Protection logo" node https://github.com/amadin/protector/com ... a637aa07a9 if someone needs. Download link https://github.com/amadin/protector/archive/master.zip
l didn't test if because l don't use protector mod. l assume the semitransparent "logo" looks great.

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪

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

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

by TenPlus1 » Post

amadin: using the semi transparent logo texture may look nice but the use of alpha textures has problems when viewed from underwater, the blocks using it tend to disappear.

Post Reply

Who is online

Users browsing this forum: No registered users and 20 guests