[mod] Simple Anchor [simple_anchor]

Post Reply
zing269
Member
Posts: 109
Joined: Sat Apr 30, 2016 19:10

[mod] Simple Anchor [simple_anchor]

by zing269 » Post

A node that keeps the map block it is in loaded when players are not near by.

Image

Image

Place the node to add its location to the force load list. Remove the node to remove it from the list. Punch it to see the area.

Area display based on Protector Redo by TenPlus1

Download: https://github.com/zing269/simple_ancho ... master.zip
Source: https://github.com/zing269/simple_anchor

Licenses: MIT and CC BY
Attachments
simple_anchor_2.png
simple_anchor_2.png (366.34 KiB) Viewed 755 times
simple_anchor_1.png
simple_anchor_1.png (502.66 KiB) Viewed 755 times

Chem871
Member
Posts: 999
Joined: Sat Aug 19, 2017 21:49
GitHub: Chemguy99
In-game: Chem Nyx
Location: My Basement's Attic

Re: [mod] Simple Anchor [simple_anchor]

by Chem871 » Post

Sounds useful for singleplayer farms, nice.
What is SCP-055?

zing269
Member
Posts: 109
Joined: Sat Apr 30, 2016 19:10

Re: [mod] Simple Anchor [simple_anchor]

by zing269 » Post

Chem871 wrote:Sounds useful for singleplayer farms, nice.
That is the reason I wrote it. All the other mods I found seemed overly complicated for my usage.

User avatar
TechNolaByte
Member
Posts: 465
Joined: Wed May 10, 2017 21:00
GitHub: TechNolaByte

Re: [mod] Simple Anchor [simple_anchor]

by TechNolaByte » Post

does it load the area EXCACLTLY like a player would, or is it pseudo loading?(

also love the area grid
The great quest of alchemy neither failed nor attained gold; programmers are those great alchemists who transmute caffeine into code.

zing269
Member
Posts: 109
Joined: Sat Apr 30, 2016 19:10

Re: [mod] Simple Anchor [simple_anchor]

by zing269 » Post

RSLRedstonier wrote:does it load the area EXCACLTLY like a player would, or is it pseudo loading?(

also love the area grid
Honestly, that is pure speculation on my part. I call get_voxel_manip on the position of the node and use get_emerged_area to get the pmin and pmax of the actual loaded area. I'm assuming that the engine loads areas in a similar manner to get_voxel_manip but I could easily be wrong. I haven't looked through the actual engine code to confirm my suppositions.

I can't take credit for the area grid, I took that almost entirely from TenPlus1's Protection Redo.

User avatar
TechNolaByte
Member
Posts: 465
Joined: Wed May 10, 2017 21:00
GitHub: TechNolaByte

Re: [mod] Simple Anchor [simple_anchor]

by TechNolaByte » Post

zing269 wrote:I can't take credit for the area grid, I took that almost entirely from TenPlus1's Protection Redo.
but it was YOUR idea to include it which means while TenPlus1 made the original code you decided to modifi and use it
The great quest of alchemy neither failed nor attained gold; programmers are those great alchemists who transmute caffeine into code.

User avatar
cx384
Member
Posts: 654
Joined: Wed Apr 23, 2014 09:38
GitHub: cx384
IRC: cx384

Re: [mod] Simple Anchor [simple_anchor]

by cx384 » Post

Nice mod, there is already a forceload mod but the show area function is very helpful.
viewtopic.php?t=10006
Can your read this?

zing269
Member
Posts: 109
Joined: Sat Apr 30, 2016 19:10

Re: [mod] Simple Anchor [simple_anchor]

by zing269 » Post

cx384 wrote:Nice mod, there is already a forceload mod but the show area function is very helpful.
viewtopic.php?t=10006
Thanks. I looked at that mod but decided I wanted a simpler mechanism.

That mod keeps a list of force loaded positions in a file and uses a globalstep to validate each position. This method is undoubtedly more robust than my implementation since the validation will remove a position if the anchor node is removed by any means.

In my mod the node is only removed if the anchor node's on_destruct callback fires, but there is no globalstep or additional file involved.

Starbeamrainbowlabs
Member
Posts: 66
Joined: Sat May 26, 2018 11:25
GitHub: sbrl
Location: Nowhere, Everywhere, and Somewhere inbetween
Contact:

Re: [mod] Simple Anchor [simple_anchor]

by Starbeamrainbowlabs » Post

Cool mod! Have you considered listing it on ContentDB (content.minetest.net), and adding a crafting recipe?

DoyleChris
Member
Posts: 265
Joined: Sat Jul 25, 2015 19:54
In-game: DoyleChris

Re: [mod] Simple Anchor [simple_anchor]

by DoyleChris » Post

I am having a problem with the simple anchor. I am running it on my server it is 5.5.0-dev. It dosen't seem to be completely loading the area. Some of the crops are growing but not all of them. The picture below shows the grid area it covers but also the un grown wheat.

Image
screenshot_20210827_170930.jpg
screenshot_20210827_170930.jpg (825.55 KiB) Viewed 755 times

Post Reply

Who is online

Users browsing this forum: No registered users and 28 guests