[MOD] BasilMod::MotD

Place for sharing your game modifications for Life is Feudal: Your Own
User avatar
Custodian
Mod Developer
 
Posts: 655
Joined: 08 Jun 2015, 14:58
Location: Lisbon

[MOD] BasilMod::MotD

Post by Custodian » 03 Aug 2015, 15:36

Message of the Day.
This is server-side only mod. No client side modifications are required. :Yahoo!:

Configure messages for MotD greetings when player joins server.
Add periodic messages to be sended by the server to the players.

Current version (standalone BasilMod::motd without BasilMod::pack) limits message length to 230 letters.
You can have multiple messages added. Message order is preserved.

This mod is part of BasilMods pack.

Screenshot demonstation.
Spoiler


Server-side installation.
Spoiler
Last edited by Custodian on 22 Dec 2015, 06:27, edited 7 times in total.


Alakar
Beta Tester
 
Posts: 202
Joined: 23 Jan 2015, 07:39

Re: [MOD] BasilMod::MotD

Post by Alakar » 03 Aug 2015, 21:55

Looking Great Basil =)

-Alakar

User avatar
Azzerhoden
Alpha Tester
 
Posts: 1621
Joined: 08 May 2014, 17:44

Re: [MOD] BasilMod::MotD

Post by Azzerhoden » 09 Aug 2015, 18:33

Looking Fantastic!
| - Alpha Tester and Zealous Believer
Image

Kingdom of Hyperion founding Duchy - A practical RP Community est. 1999 - Apply Today!

User avatar
Rjmspoel
True Believer
 
Posts: 69
Joined: 01 Oct 2014, 12:44

Re: [MOD] BasilMod::MotD

Post by Rjmspoel » 11 Aug 2015, 00:55

Awesome!!

Does it also support color coding inside the messages like this?

Code: Select all
BasilMod::motd_registerWelcome(true, false, "This server supports BasilMod::Pack. To enable TradeWindow and other mods, visit <spush><color:C65F5F> http://my-kickass-server.earth/modpacks.");<spop>

User avatar
Custodian
Mod Developer
 
Posts: 655
Joined: 08 Jun 2015, 14:58
Location: Lisbon

Re: [MOD] BasilMod::MotD

Post by Custodian » 11 Aug 2015, 05:57

Rjmspoel wrote:Awesome!!
Does it also support color coding inside the messages like this?

Yes, it does support coloring, font altering, and other decorations.
But you made a mistake (misplaced) spop tag in your example.
Also, you dont need to use spush/spop if coloring goes till the end. this will save you some chars.

User avatar
Rjmspoel
True Believer
 
Posts: 69
Joined: 01 Oct 2014, 12:44

Re: [MOD] BasilMod::MotD

Post by Rjmspoel » 11 Aug 2015, 12:35

Ok cool thanks!


Roye29
Zealous Believer
 
Posts: 4
Joined: 22 Sep 2014, 19:23

Re: [MOD] BasilMod::MotD

Post by Roye29 » 12 Aug 2015, 12:13

Hello,

I'm not familiar with english language and don't understand very good the gived instruction. More precisely, i want to know wich one of the "config.cs" or "modt.cs.dso" i have to modify.

Can you explain me simply how to proceed please ?

User avatar
Custodian
Mod Developer
 
Posts: 655
Joined: 08 Jun 2015, 14:58
Location: Lisbon

Re: [MOD] BasilMod::MotD

Post by Custodian » 12 Aug 2015, 12:24

Roye29 wrote: More precisely, i want to know wich one of the "config.cs" or "modt.cs.dso" i have to modify.

Can you explain me simply how to proceed please ?

You need to modify config.cs file.

You can load it as is (provided configuration), and see the results on your server.
After that, you can remove/add/alter messages in quotes in function calls BasilMod::motd_registerWelcome and BasilMod::motd_registerPeriodic.


Roye29
Zealous Believer
 
Posts: 4
Joined: 22 Sep 2014, 19:23

Re: [MOD] BasilMod::MotD

Post by Roye29 » 12 Aug 2015, 12:32

Thanks.


Xhodan
 
Posts: 15
Joined: 10 Mar 2014, 19:54

Re: [MOD] BasilMod::MotD

Post by Xhodan » 17 Oct 2015, 19:59

So when I go to exec the file in the command console. I get an error saying the motd.cs file is missing from BasilMod/motd/motd.cs the only files I have in here are the motd.cs.dso and the config.cs files which you said to have in here.

I don't have the entire mod pack installed on my server. Just this particular script.

User avatar
Custodian
Mod Developer
 
Posts: 655
Joined: 08 Jun 2015, 14:58
Location: Lisbon

Re: [MOD] BasilMod::MotD

Post by Custodian » 18 Oct 2015, 13:41

Xhodan wrote:So when I go to exec the file in the command console. I get an error saying the motd.cs file is missing from BasilMod/motd/motd.cs

You have placed mod files into wrong directory, or misspelled the name of folders. Make sure you place files into server, which you will start.

Server side installation documentation describes 4 steps:
Spoiler


Xhodan
 
Posts: 15
Joined: 10 Mar 2014, 19:54

Re: [MOD] BasilMod::MotD

Post by Xhodan » 18 Oct 2015, 15:53

For clarification when you say "server" you're talking about the scripts folder, and the server folder within that? Or you talking about the root folder for all the files on the server?

I've tried both, and neither has worked. Nothing is spelt wrong and when I go in game to enter the command on the line it says the motd.cs file is missing.

User avatar
Custodian
Mod Developer
 
Posts: 655
Joined: 08 Jun 2015, 14:58
Location: Lisbon

Re: [MOD] BasilMod::MotD

Post by Custodian » 18 Oct 2015, 17:31

Xhodan wrote:For clarification when you say "server" you're talking about the scripts folder, and the server folder within that? Or you talking about the root folder for all the files on the server?

First instruction post, and my previous post, contains same info:
Place these 2 files (config.cs and motd.cs.dso) in "BasilMod/motd" folder of server root.

Xhodan wrote:I go in game to enter the command on the line it says the motd.cs file is missing.

This means, that your LiF server does not have file motd.cs.dso installed.

For example:
If you start your server from folder c:\games\LiF Server, then you should install mod to c:\games\LiF Server\basilmod\motd folder and full path of mod file will be c:\games\LiF Server\basilmod\motd\motd.cs.dso.


You should run "exec" command at server console, and not client console. For mod autoload, edit server main.cs file.


Xhodan
 
Posts: 15
Joined: 10 Mar 2014, 19:54

Re: [MOD] BasilMod::MotD

Post by Xhodan » 18 Oct 2015, 17:40

Currently my server is hosted by BlackBlox. So unless this process is the same on that end, then I'm lost at what to do. I have access to the file manager on my admin panel. Which is from my understanding the root server folder. Then there are all the other server files and contents within it.

User avatar
Custodian
Mod Developer
 
Posts: 655
Joined: 08 Jun 2015, 14:58
Location: Lisbon

Re: [MOD] BasilMod::MotD

Post by Custodian » 18 Oct 2015, 18:34

Xhodan wrote:Currently my server is hosted by BlackBlox.

You have placed files.

As I said: you should run "exec" command at server console, and not client console. For mod autoload, edit server main.cs file.


Xhodan
 
Posts: 15
Joined: 10 Mar 2014, 19:54

Re: [MOD] BasilMod::MotD

Post by Xhodan » 19 Oct 2015, 19:23

Your instructions are clear.. but the issue isn't resolved.

motd.cs is missing from the motd folder when I try running the exec. When I downloaded the files, there was no motd.cs file other then the already compiled motd.cs.dso file extension.

User avatar
Custodian
Mod Developer
 
Posts: 655
Joined: 08 Jun 2015, 14:58
Location: Lisbon

Re: [MOD] BasilMod::MotD

Post by Custodian » 19 Oct 2015, 21:52

Xhodan wrote:When I downloaded the files, there was no motd.cs file other then the already compiled motd.cs.dso file extension.

That is correct. you execute ".cs" file, while folder contains ".cs.dso" file.

Please provide screenshot where you execute command
Code: Select all
exec("basilmod/motd/motd.cs");

and result of this command.


Bigsteve
 
Posts: 88
Joined: 07 Feb 2014, 03:53

Re: [MOD] BasilMod::MotD

Post by Bigsteve » 06 Nov 2015, 02:44

Request:

Would it be possible to able to set messages to be sent at a certain time of the day,
we want to send message before our server auto restarts.

User avatar
Custodian
Mod Developer
 
Posts: 655
Joined: 08 Jun 2015, 14:58
Location: Lisbon

Re: [MOD] BasilMod::MotD

Post by Custodian » 06 Nov 2015, 10:01

Bigsteve wrote:Request:

Would it be possible to able to set messages to be sent at a certain time of the day,
we want to send message before our server auto restarts.

Your server restarts are automated with modification or external software?
You can setup motd to show messages on long intervals, i.e. every 11 housr and 55 minutes.
That will give 5 min warning before every 12 hour time restart.


Schdohni
 
Posts: 5
Joined: 20 Nov 2015, 12:19

Re: [MOD] BasilMod::MotD

Post by Schdohni » 26 Nov 2015, 12:12

hey there, nice script, but for the moment i have an Problem.

The periodic messages works fine, but the welcome message dont work, hope someone can help me.

Spoiler

User avatar
Custodian
Mod Developer
 
Posts: 655
Joined: 08 Jun 2015, 14:58
Location: Lisbon

Re: [MOD] BasilMod::MotD

Post by Custodian » 26 Nov 2015, 14:51

Schdohni wrote:The periodic messages works fine, but the welcome message dont work, hope someone can help me.

Hi there.
First of all, you syntax error at your config.cs file: you should comment or remove line with "http://my-kickass-server.earth/modpacks" text, as it is chopped, and missing "); on its end.

Also, you have configured 30 seconds delay on player spawn, before welcome messages are shown. Did you wait for that period of time?


Schdohni
 
Posts: 5
Joined: 20 Nov 2015, 12:19

Re: [MOD] BasilMod::MotD

Post by Schdohni » 27 Nov 2015, 12:41

Custodian wrote:
Schdohni wrote:The periodic messages works fine, but the welcome message dont work, hope someone can help me.

Hi there.
First of all, you syntax error at your config.cs file: you should comment or remove line with "http://my-kickass-server.earth/modpacks" text, as it is chopped, and missing "); on its end.

Also, you have configured 30 seconds delay on player spawn, before welcome messages are shown. Did you wait for that period of time?



sure, i wait for this time, it was just vor test, i also tried it with the common setting (5 seconds).

User avatar
Leaf
 
Posts: 76
Joined: 01 Feb 2014, 16:47

Re: [MOD] BasilMod::MotD

Post by Leaf » 22 Dec 2015, 23:24

My messages are not updating. I have // out a few old messages and added new ones in the basilmod/motd/config.cs, restarted a few times, even tried that exec("basilmod/motd/motd.cs"); in the console and nothing changes. How can I force the game to read and use the basilmod/motd/config.cs again?

User avatar
Custodian
Mod Developer
 
Posts: 655
Joined: 08 Jun 2015, 14:58
Location: Lisbon

Re: [MOD] BasilMod::MotD

Post by Custodian » 23 Dec 2015, 06:30

Leaf wrote:exec("basilmod/motd/motd.cs");

Always reloads the config.

Make sure that you dont have syntax errors in config.cs, and no error messages shown after reloading.
Also note, that all messages should be shorter than ~230 symbols.

User avatar
Leaf
 
Posts: 76
Joined: 01 Feb 2014, 16:47

Re: [MOD] BasilMod::MotD

Post by Leaf » 24 Dec 2015, 03:23

I have verified the data in Main.cs, have not touched it since I added it and it began working.

Overwrote with new downloaded vanilla files for config and motd.
Copied the overwritten files back to my computer and verified that they are still the vanilla versions and not the old versions.

Ran the command in remote server console at bluefang host.
exec("BasilMod/motd/motd.cs");

ECHO 2015-12-23 21:21:00.439 {00} # stdin:> exec(\&#34;BasilMod/motd/motd.cs\&#34;);
ERRR 2015-12-23 21:21:00.439 {00} # syntax error

And even with new vanilla files, it is sending out the old motd messages somehow. But I also changed my world_5.xml to add decay, restarted server, closed and started LiF and decay is not showing on the server info. Think I a bigger problem somewhere.

User avatar
Custodian
Mod Developer
 
Posts: 655
Joined: 08 Jun 2015, 14:58
Location: Lisbon

Re: [MOD] BasilMod::MotD

Post by Custodian » 24 Dec 2015, 06:32

Leaf wrote:Ran the command in remote server console at bluefang host.
exec("BasilMod/motd/motd.cs");

ECHO 2015-12-23 21:21:00.439 {00} # stdin:> exec(\&#34;BasilMod/motd/motd.cs\&#34;);
ERRR 2015-12-23 21:21:00.439 {00} # syntax error

As you can see here, command was not executed, because "(quote) symbol was replaced to \&#34;
Ask bluefang support why they replace data you are typing into console.

User avatar
Osovich
Beta Tester
 
Posts: 29
Joined: 16 Dec 2015, 13:06
Location: Russia, Moscow

Re: [MOD] BasilMod::MotD

Post by Osovich » 24 Dec 2015, 11:52

Hi Basil! I have a similar problem.
Xhodan wrote:So when I go to exec the file in the command console. I get an error saying the motd.cs file is missing from BasilMod/motd/motd.cs


I tested on two different servers. An execute command under GM. Here are the screenshots folder, where is the configuration file.
(Images increase click-through.)

Server one.
Spoiler

Server two.
Spoiler


The screenshot with the GM.
Spoiler


A screenshot from the command line.
Spoiler


Screenshots of the execution result of the command line.
Server one.
Spoiler

Server two.
Spoiler


The modification itself is working, not working command execution.

p.s. Василий, большое спасибо за вашу работу! :beer:

User avatar
Custodian
Mod Developer
 
Posts: 655
Joined: 08 Jun 2015, 14:58
Location: Lisbon

Re: [MOD] BasilMod::MotD

Post by Custodian » 24 Dec 2015, 12:20

Osovich wrote:The modification itself is working, not working command execution.

p.s. Василий, большое спасибо за вашу работу! :beer:

This happens because you are typing command at client console.
You need to execute this command at server console, not client.

Server console window example (random image from the internet)
Spoiler


MasterChief
True Believer
 
Posts: 55
Joined: 04 Oct 2014, 11:11

Re: [MOD] BasilMod::MotD

Post by MasterChief » 24 Dec 2015, 12:30

lol, yea, made the same mistake often, and restarted the server all the time, typing the line to server console works works fine, client just have to relog to read the new messages

User avatar
Leaf
 
Posts: 76
Joined: 01 Feb 2014, 16:47

Re: [MOD] BasilMod::MotD

Post by Leaf » 24 Dec 2015, 12:37

Figured out my problem. You'll love this noob mistake.

I recently changed hosting locations from GE to US. My server dashboard, console, etc were for the new host. I didn't change my ftp settings and it was still connecting to the old hosting location so naturally I could change the files to anything I wanted and they wouldn't do anything....

Doh!

Return to Game mods

cron