PDA

View Full Version : Message of the Day (MOTD) Extension



Trenloe
October 21st, 2014, 02:59
Should be FG v3.2.0 compatible. Note: The MOTD story entry will now appear in front of the character selection screen.

As requested here (http://www.fantasygrounds.com/forums/showthread.php?22365-Any-Way-to-Create-a-Welcome-Banner-to-Players-When-They-Connect) I quickly put together a message of the day extension for CoreRPG and CoreRPG based (layered) rulesets.

It allows a GM to make a story entry and call it MOTD (it has to be called MOTD all in capitals). In this story entry put info you want your players to see when they log in. Then share the story entry (even if no one is logged in) and it will pop up when they join the session.

V0.1 download at the bottom of this post. Extension name "Message of the Day".

How to use:

Open the campaign story list.
Create a story entry called MOTD
Share it (this will make it public) - make sure the (P) icon appears to the right of the story entry list to show that it is public.


https://www.fantasygrounds.com/forums/attachment.php?attachmentid=27982

When the players log in, the MOTD story entry will appear in front of the character selection screen:

https://www.fantasygrounds.com/forums/attachment.php?attachmentid=27983

The message will be fully visible and can be interacted with:

https://www.fantasygrounds.com/forums/attachment.php?attachmentid=27984

Trenloe
October 21st, 2014, 03:00
Techie stuff.

Relies on the User.onLogin event on the GM side to trigger searching of the Story entries for the first one called MOTD. The databasenode reference is then passed to the player logging in via OOB messaging and the story entry is displayed on the player desktop.

Compatibility
Uses the CoreRPG OOBManager functionality, but no code is extracted/incorporated for this extension. Therefore, as long as OOBManager is not removed from a future version of CoreRPG (unlikely) this extension should continue to function through future CoreRPG upgrades.

dr_venture
October 21st, 2014, 03:13
NIIICEEE!! This is a *much* needed extension -- BRAVO!

Mistamichal
October 21st, 2014, 07:57
This is brilliant! Well done and thank you!

damned
October 21st, 2014, 08:24
Woot! Nice one Trenloe. I think I shall start using this one right away.

Callum
November 15th, 2014, 15:30
Just a quick question, Trenloe. In your example MOTD, you have a URL for FG Con at the bottom - but the players reading it won't be able to click on that link, or even copy the text, will they?

Trenloe
November 15th, 2014, 15:34
Just a quick question, Trenloe. In your example MOTD, you have a URL for FG Con at the bottom - but the players reading it won't be able to click on that link, or even copy the text, will they?
Correct. If you make the link a chat frame the players can press the chat bubble icon which puts the link in the chat window where they can click on the link.

Qoff
September 18th, 2016, 00:25
Any way to make it work in 5e 3.1.7?

Zacchaeus
September 18th, 2016, 00:30
It does work in 5e. 5e is based on the CORE rule set.

Qoff
September 18th, 2016, 00:41
Sorry I forgot to enable it.

Teknykk
December 2nd, 2016, 14:10
Hey Trenloe, is there a way to change the title of the MOTD to something else more suited to a campaign? I guess an example would be "Previously on Curse of Strahd", but basically anything to suit a campaign being run instead of a plain old MOTD. While I'm okay with XML code now, I'm not too much up on LUA stuff yet, even though it does look somewhat similar.

If possible I'd like you to walk me through the process needed to change it from MOTD to anything I so desire, or a DM in a group I play in also wishes too. I have Notepad++ so I know how to easily edit files after changing extensions and modules to ZIP files and opening the LUA and XML files to change things, I just don't quite understand what I'm looking at entirely yet, and a bit of practice would make perfect, so to speak.

NotRussellCrowe
December 2nd, 2016, 14:17
Hey Trenloe, is there a way to change the title of the MOTD to something else more suited to a campaign? I guess an example would be "Previously on Curse of Strahd", but basically anything to suit a campaign being run instead of a plain old MOTD. While I'm okay with XML code now, I'm not too much up on LUA stuff yet, even though it does look somewhat similar.

If possible I'd like you to walk me through the process needed to change it from MOTD to anything I so desire, or a DM in a group I play in also wishes too. I have Notepad++ so I know how to easily edit files after changing extensions and modules to ZIP files and opening the LUA and XML files to change things, I just don't quite understand what I'm looking at entirely yet, and a bit of practice would make perfect, so to speak.

Looks like the following line in manager_motd_extension.lua is what you need to change:
if DB.getValue(vNode, "name", "") == "MOTD" then

Actually not the whole line, just the MOTD between quotes.

Whatever title you want to use on your story entry has to match exactly with what is between those quotes.

Teknykk
December 2nd, 2016, 14:31
Hah, yeah I had a feeling it'd be as simple as a single line of code or one section of it. I'm just not exactly an expert in the field and only dabble when I want something done. It's always the way though, one little thing, but it did the trick when I tested it via Local Host.

Thanks for jumping in for me, it'll be useful to both myself as a GM and for the DM who runs another game for me.

NotRussellCrowe
December 2nd, 2016, 14:37
Hah, yeah I had a feeling it'd be as simple as a single line of code or one section of it. I'm just not exactly an expert in the field and only dabble when I want something done. It's always the way though, one little thing, but it did the trick when I tested it via Local Host.

Thanks for jumping in for me, it'll be useful to both myself as a GM and for the DM who runs another game for me.

And now you've done some Lua programming and will be pumping out the extensions in no time!

GainunX
December 28th, 2016, 16:20
Looks like the following line in manager_motd_extension.lua is what you need to change:
if DB.getValue(vNode, "name", "") == "MOTD" then

Actually not the whole line, just the MOTD between quotes.

Whatever title you want to use on your story entry has to match exactly with what is between those quotes.

Noob question: How do I open the file to change this line? Notepad did not work

Zacchaeus
December 28th, 2016, 16:28
Noob question: How do I open the file to change this line? Notepad did not work

Notepad does work. You need to change the .ext to .zip and then unzip the file to get at the files first. Then open up the file manager_motd_extension.lua file.

GainunX
December 28th, 2016, 16:47
Notepad does work. You need to change the .ext to .zip and then unzip the file to get at the files first. Then open up the file manager_motd_extension.lua file.

Thanks!

Vishera
August 8th, 2017, 07:49
I can verify it works with 5e. Thanks for the extension!

Nickademus
August 8th, 2017, 18:23
Thanks for the confirm.

dragonheels
August 9th, 2017, 09:36
That's a great extension ! Very usefull ! Thanks a lot :)

Caelen
September 28th, 2017, 20:02
I just tried this out on 3.3.2 and it works great ^^ Thanks!

drkvoid
November 25th, 2018, 19:51
Just tried adding this to a campaign in FG 3.3.7. Player get an empty New Story box though, not the MOTD story. Any ideas what may be the issue?

Trenloe
November 25th, 2018, 19:57
Just tried adding this to a campaign in FG 3.3.7. Player get an empty New Story box though, not the MOTD story. Any ideas what may be the issue?
Welcome to the forums.

Did you follow all 3 steps mentioned in post #1? MOTD must be all upper case and you must manually share the story entry.

drkvoid
November 25th, 2018, 23:31
Sorry. Missed the share part. Working now.