[Mod] Personal logs [1.2][personal_log]

FaceDeer
Member
Posts: 506
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

[Mod] Personal logs [1.2][personal_log]

by FaceDeer » Post

Image

This mod adds a "Personal Logs" feature to the Unified Inventory or the SFInv Minetest interfaces. There's also an option (disabled by default) to add a craftable item players can use to access the log screen, if that's preferred or if this mod is being used with an unsupported inventory interface.

Personal logs are private notes that players can keep for themselves. There's also the ability to export or import them to and from the default mod's "book" items, allowing players to share their notes with others if they want.

Logs can be entered into three different categories:

- Locations
- Events
- General

Location logs will automatically have the player's coordinates saved with them when they're created. If the ccompass mod is installed there will be an interface that allows players to set a compass to track the location of one of these entries. Players can also read and write maps belonging to the compassgps mod. If a player has the teleport privilege they will also be presented with a "teleport" button for locations they've logged.

Event logs automatically have the current date saved with them when they're created. They're intended to allow a player to keep a diary of sorts, tracking the story of their game over time.

General logs have a free-form text field for their topic, players can use these to record any other sort of general information they desire.

There's no limit to how many logs a player can write.

This mod is released under the MIT license

Dependencies

optional_depends = unified_inventory, sfinv_buttons, sfinv, ccompass, default, compassgps, mcl_books, mcl_formspec

Links
Last edited by FaceDeer on Mon Nov 30, 2020 08:12, edited 6 times in total.

ThorfinnS
Member
Posts: 311
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

Re: [mod] Personal logs [personal_logs] 0.1

by ThorfinnS » Post

Very nice. I've been thinking of doing something like this for a while, but never got around to it. This is much better than mine would have been anyway.

Thanks!

FaceDeer
Member
Posts: 506
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

Re: [mod] Personal logs [personal_logs] 0.1

by FaceDeer » Post

No problem. I wrote this after a player tragically rage-quit from a server I was on because she lost a default:book_written that she'd been using to keep track of where all her houses and other places of interest were, and I noticed that whenever I played Minetest myself I always had Notepad open in another window to jot down this kind of stuff. Seems like a needed sort of functionality.

There's a bit of polish I put off doing last night, this interface isn't currently "embedded" in sfinv or unified_inventory's framework and exiting it takes you back to the main game. And every once in a while opening the copy to/from book formspec gives me a weird "invalid listring element" error I haven't figured out (reopening the formspec again seems to make the error go away). But it's fully functional, and if server admins want me to add ways to balance this a bit I could make it into something you need a craftable item to access. The important point being that if you lose that item you just need to craft another to get access to your data again.

Edit: never mind, just found and fixed the "invalid listring element" error. Detached inventories take time to send to the client, so creating the detached inventories at the same time as opening the item formspec was too late. They get created when the main formspec opens now, instead.
Last edited by FaceDeer on Tue Feb 04, 2020 17:56, edited 1 time in total.

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: [mod] Personal logs [personal_logs] 0.1

by runs » Post

Oh, I am going to use it. :-)

User avatar
Jhalman
Member
Posts: 15
Joined: Sat Sep 29, 2018 13:51
IRC: Jhalman
In-game: Jhalman

Re: [mod] Personal logs [personal_logs] 0.1

by Jhalman » Post

wow this looks realy cool im going to test it out and install it on my server right away
another great mod!

ThorfinnS
Member
Posts: 311
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

Re: [mod] Personal logs [personal_logs] 0.1

by ThorfinnS » Post

We have been using compassgps to accomplish a similar function.You can log locations to a map fairly early on, particularly if you use the lakes mod, but the compass requires a mese fragment, so they don't much help those who need it the most -- people who are just learning the game, especially those who, rather than popping something down near the spawn, spend some time looking around for the ideal spot to build a house. Those looking for a good view, y'know.

But the "notes" capability in compassgps is very limited. Might consider supporting compassgps, as I'm not sure it's going to be easy to migrate established worlds from compassgps to ccompass.

FaceDeer
Member
Posts: 506
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

Re: [mod] Personal logs [personal_logs] 0.1

by FaceDeer » Post

I wasn't aware of compassgps, I'll take a look and see how easy it'd be to support. I only just recently discovered ccompass, it's inspired a lot of other mods like this one (such as Death Compass, which might also be of interest to server admins who want to be merciful towards players losing their way :)

Edit: Did some digging around in compassgps and I've added partial support so far. The ability to read/write the "map" items turned out to be pretty easy, but setting a compass directly looks like it might prove trickier so I've put if off to this evening to look more closely into it. For now you can use compassgps:cgpsmap items for transferring locations between these systems.

I also added a "teleport" button for players who have the teleport priv.

FaceDeer
Member
Posts: 506
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

Re: [mod] Personal logs [personal_logs] 0.2

by FaceDeer » Post

After fiddling with compassgps some more I think it makes sense to leave personal_logs with just the ability to import/export the map items individually like I've already implemented. The compass item itself just acts as an interface to the database of bookmarks a player has, it doesn't get "set" to a particular destination in the same way that calibrated compass does.

However, if someone is interested in migrating an existing game away from compassgps to using a combination of personal_logs and ccompass, it looks like I could write up some code that would be able to do a one-time mass-migration of compassgps' saved bookmark data into personal_logs' data. I'd want it to be something that a server administrator has to manually trigger, not an automatic import, and I could make it work for all players simultaneously so you could theoretically uninstall compassgps and not lose any data. Is that something that's desired?

Bearing in mind that personal_logs is only a couple of days old, still pretty alpha compared to long-running mods like compassgps. Might want to hold off on transitioning away from existing mods to entirely depend on it on a production server just yet. The whole point of this mod is to make it harder for players to lose their precious data, after all, I wouldn't want to hear that someone had migrated hundreds of players' stuff to my mod and then it blew up.

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] Personal logs [personal_logs] 0.2

by Miniontoby » Post

looks good and helpful
Working on mtctl ---- Check my mod "Doorbell" -- Stay safe

ThorfinnS
Member
Posts: 311
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

Re: [mod] Personal logs [personal_logs] 0.2

by ThorfinnS » Post

Oh, I think what you did is great. I don't think we'd migrate away from compassgps anyway. I don't remember why we went with that over ccompass, but there must have been some reason. Simply having the ability to tie a location to a log entry, and share that with other players is awesome!

Thanks.

FaceDeer
Member
Posts: 506
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

Re: [mod] Personal logs [personal_logs] 0.2

by FaceDeer » Post

Okay, I'll leave it be, then. It doesn't look terribly hard to do (compassgps stores its data in a serialized lua table that'd be easy to read and interpret) but a full import feature could easily make a mess if someone wasn't careful using it.

I did do a bunch of work generalizing the import/export code for individual log entries while pondering the situation, though. Do you (or anyone else) know of any compass-like mods beyond these two that I should add support for? I've already decided that Death Compass probably doesn't warrant inclusion, that one is intended as a transient sort of thing.

User avatar
v-rob
Developer
Posts: 970
Joined: Thu Mar 24, 2016 03:19
GitHub: v-rob
IRC: v-rob
Location: Right behind you.

Re: [mod] Personal logs [personal_logs] 0.2

by v-rob » Post

Hmm, can you mark a position note as something that will show an HUD line with the title of the note when you approach within, say 10 blocks from the position? That would be useful to warn yourself about dangerous things, like lava.

And I am so happy to see someone taking advantage of the new formspec features instead of hacking with the old stuff :)
Core Developer | My Best Mods: Bridger - Slats - Stained Glass

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: [mod] Personal logs [personal_logs] 0.2

by runs » Post

Please, could you make the locale with the 5.0 system, not .po?
It is a oudated system I believe

FaceDeer
Member
Posts: 506
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

Re: [mod] Personal logs [personal_logs] 0.2

by FaceDeer » Post

v-rob wrote:Hmm, can you mark a position note as something that will show an HUD line with the title of the note when you approach within, say 10 blocks from the position? That would be useful to warn yourself about dangerous things, like lava.
Heh. I just got finished messing about with a system like that with the named_waypoints library, now I have to do it all over again? Sigh. :) I'll look into it. AreaStores make this sort of thing much easier to do well than it used to be.
v-rob wrote: And I am so happy to see someone taking advantage of the new formspec features instead of hacking with the old stuff :)
Don't look too closely at the other formspec in this mod, the one that pops open when you click import or export. :) I actually just grabbed that out of an old mod I had lying around and decided not to bother updating it since it was so simple and worked out of the box. Code reuse, yay!
runs wrote:Please, could you make the locale with the 5.0 system, not .po?
It is a outdated system I believe
I'd love to, but I'm still suffering PTSD from the ordeal years ago of getting a one-click "generate translation file" solution using xgettext set up on my Windows machine. So I've been putting off doing that all over again and telling myself "obsolete's better than nothing, at least all the S() calls are in place."

Do you know of a convenient localization toolchain for use in a Windows environment that I can drop in place?

User avatar
FreeGamers
Member
Posts: 650
Joined: Sat May 25, 2019 00:15
GitHub: is proprietary I use NotABug
Location: United States
Contact:

Re: [mod] Personal logs [personal_logs] 0.2

by FreeGamers » Post

I was going to make a mod where each player could cut down tree nodes. They player would then own it, could name it, send messages to it, sit on it, and keep it as a pet. But now that you stole the name of that project I'll have to can it. Thanks a lot. It was going to be great.
FreeGamers.org has moved to MeseCraft.net | FreeGamers on this forum is now MeseCraft

FaceDeer
Member
Posts: 506
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

Re: [mod] Personal logs [personal_logs] 0.2

by FaceDeer » Post

FreeGamers wrote:I was going to make a mod where each player could cut down tree nodes. They player would then own it, could name it, send messages to it, sit on it, and keep it as a pet. But now that you stole the name of that project I'll have to can it. Thanks a lot. It was going to be great.
How about calling it "dogwood"? Or "tamarackgotchi"? "sawhorse"? Lots of options still out there.

ThorfinnS
Member
Posts: 311
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

Re: [mod] Personal logs [personal_logs] 0.2

by ThorfinnS » Post

FaceDeer wrote:
FreeGamers wrote:I was going to make a mod where each player could cut down tree nodes. They player would then own it, could name it, send messages to it, sit on it, and keep it as a pet. But now that you stole the name of that project I'll have to can it. Thanks a lot. It was going to be great.
How about calling it "dogwood"? Or "tamarackgotchi"? "sawhorse"? Lots of options still out there.
So long as he doesn't take the name I'm using for the exact same idea (I know, what are the odds?) -- pet-rified wood.

FaceDeer
Member
Posts: 506
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

Re: [Mod] Personal logs [0.2][personal_log]

by FaceDeer » Post

Just a quick note, I've added basic Mineclone2 compatibility to this mod. It's not integrated into Mineclone's inventory screen but you can use the craftable item to access the personal log interface.

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] Personal logs [0.2][personal_log]

by Miniontoby » Post

Please add this to content.minetest.net
Working on mtctl ---- Check my mod "Doorbell" -- Stay safe

User avatar
FreeLikeGNU
Member
Posts: 280
Joined: Tue Oct 28, 2014 02:50
GitHub: FreeLikeGNU
IRC: freelikegnu
In-game: FreeLikeGNU

Re: [mod] Personal logs [personal_logs] 0.2

by FreeLikeGNU » Post

FaceDeer wrote:
Thu Feb 06, 2020 06:33
FreeGamers wrote:I was going to make a mod where each player could cut down tree nodes. They player would then own it, could name it, send messages to it, sit on it, and keep it as a pet. But now that you stole the name of that project I'll have to can it. Thanks a lot. It was going to be great.
How about calling it "dogwood"? Or "tamarackgotchi"? "sawhorse"? Lots of options still out there.
I like "Otik"

Ignaramico
Member
Posts: 78
Joined: Fri Sep 04, 2020 21:23
GitHub: ignaramico

Re: [Mod] Personal logs [0.2][personal_log]

by Ignaramico » Post

any chances to make it compatible with smart inventory? or to make it usable from a chat command?

FaceDeer
Member
Posts: 506
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

Re: [Mod] Personal logs [0.2][personal_log]

by FaceDeer » Post

I haven't looked at smart_inventory before, I don't know how easy it'll be. I'll put that on my to-do list, hopefully it'll be straightforward.

In the meantime I've added a "/log" chat command and a "personal_log" privilege to allow this mod to be used without needing to craft an item. Note that both of these are disabled by default - you'll need to go into the mod's settings and set "personal_log_chat_command" true to enable the "/log" chat command.

If the /log command is available and the "personal_log_chat_command_priviledge" setting is false then anyone can use that command to access their log at will. If "personal_log_chat_command_priviledge" is set to true then there will be a "personal_log" privilege created that only admins will have by default. This lets administrators use their personal_log more easily as a tool, while still requiring players to craft an item if you prefer to limit them that way.

Edit: Oh, and if anyone knows of any other compass-type mods similar to the ones that this mod is already compatible with, I can take a crack at adding compatibility with those too. Or calendar-type mods, even, for the "event" logs.

Ignaramico
Member
Posts: 78
Joined: Fri Sep 04, 2020 21:23
GitHub: ignaramico

Re: [Mod] Personal logs [1.2][personal_log]

by Ignaramico » Post

for my self i find it good with just the command, i asked about the smart inventory because the mod didnt had any other way to access it aside from crafting the item if you used anything but sfinv

u34

Re: [Mod] Personal logs [1.2][personal_log]

by u34 » Post

please make it available for contentDB !!

Ignaramico
Member
Posts: 78
Joined: Fri Sep 04, 2020 21:23
GitHub: ignaramico

Re: [Mod] Personal logs [1.2][personal_log]

by Ignaramico » Post

cHyper wrote:
Tue Jan 19, 2021 14:15
please make it available for contentDB !!
dude, its already on the content xD

https://content.minetest.net/packages/F ... sonal_log/

Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests