Author Topic: Automatic Server Messages.  (Read 1939 times)

0 Members and 1 Guest are viewing this topic.

Offline pete99

  • First Sergeant
  • *
  • Posts: 71
  • Gang Warily
    • View Profile
  • Nick: Drummond
  • Side: Confederacy
Automatic Server Messages.
« on: March 22, 2018, 11:52:23 pm »
Hi,
 Does anyone know how to script in automatic messages/admin messages for a server? Also, I would like to make these messages show up every 15 minutes or something, but i'm unsure how you would add this into the code. Would appreciate any answers.
Thanks!

Offline Thunderstormer

  • FSE Developer
  • ****
  • Posts: 6309
  • Worse than Hotler
    • View Profile
  • Side: Neutral
Re: Automatic Server Messages.
« Reply #1 on: March 23, 2018, 05:00:06 am »
well, one way would be to write in the MT file to have a message be broadcasted after so much time as passed in a round. (say 15min)
Should you need to talk to me regarding NA1 or or something regarding admining or the admins, PM me here on the forums and not on steam.  *

*This does not include Official Server Admins.

Offline pete99

  • First Sergeant
  • *
  • Posts: 71
  • Gang Warily
    • View Profile
  • Nick: Drummond
  • Side: Confederacy
Re: Automatic Server Messages.
« Reply #2 on: April 08, 2018, 07:23:50 am »
Would this work from a server side alone, or would it require a server side mod too? Also, sorry if it sounds stupid, but what file is the MT?

I'm guessing you would put such a script in the scripts section, but i'm not sure if I would have to override an already existing script, or if I can create an entirely new one from scratch--that will also work on the server.

Offline Thunderstormer

  • FSE Developer
  • ****
  • Posts: 6309
  • Worse than Hotler
    • View Profile
  • Side: Neutral
Re: Automatic Server Messages.
« Reply #3 on: April 08, 2018, 08:57:07 am »
mission templates is a file with all the different game modes among other things.  depending on what you want to do exactly, you could go about it different ways.  you could just write in the game mode that the server will be on normally(say battle) the code to have it broadcast a message at a certain time of the round or every so often.  you dont need a client side change to make it work.  you dont have to make a new script in the script file.(you can make a new script if you want) 

basically make a timer and have it broadcast the message when you want it to. 


here is a thread i used a lot when i was learning how to code period let alone for NW. 

https://forums.taleworlds.com/index.php/topic,142422.0.html

i found it pretty handy anyways.    while this forum does have quite a bit of info on how to do stuff, the taleworlds forum will have a lot more.   those forums have been around longer, with tons and tons of posts on how to do stuff, questions, or just mods in general.  i know their search engine sucks, but if you can suffer it, it may answer a lot of questions you have. 
Should you need to talk to me regarding NA1 or or something regarding admining or the admins, PM me here on the forums and not on steam.  *

*This does not include Official Server Admins.

Offline pete99

  • First Sergeant
  • *
  • Posts: 71
  • Gang Warily
    • View Profile
  • Nick: Drummond
  • Side: Confederacy
Re: Automatic Server Messages.
« Reply #4 on: April 08, 2018, 11:37:00 am »
Thanks. Sorry for asking so many questions, but if i wanted to broadcast an admin message, would I use  the actual script 'broadcast_message', or simply 'display_message', or something like the 'send_message_to player' line?

Offline Thunderstormer

  • FSE Developer
  • ****
  • Posts: 6309
  • Worse than Hotler
    • View Profile
  • Side: Neutral
Re: Automatic Server Messages.
« Reply #5 on: April 08, 2018, 12:30:53 pm »
TBH, i dont like seeing automatic messages being broadcasted in admin chat when i am in a server.  They get really annoying fast.   Those should be saved for admins actually writing a message.(and hopefully a message that is worth reading.)  i personally prefer messages in the bottom left side of the screen. 

anyways, the best advice i can give is look at the existing code. use your in game knowledge, and compare how things work in code to in game.   you'll find most things you need in the scripts, MT, presentation, or scene props file.  you can find the operations that you can use in the header operations file.  Search for stuff in the files and see how they are done.
Should you need to talk to me regarding NA1 or or something regarding admining or the admins, PM me here on the forums and not on steam.  *

*This does not include Official Server Admins.

Offline tired

  • First Lieutenant
  • *
  • Posts: 1082
    • View Profile
  • Nick: [BBG] tired
  • Side: Neutral
Re: Automatic Server Messages.
« Reply #6 on: April 20, 2018, 03:47:02 pm »
I just wrote one for admin messages, based off one here I found that did small left hand corner server messages. I can post it if you want.

Offline pete99

  • First Sergeant
  • *
  • Posts: 71
  • Gang Warily
    • View Profile
  • Nick: Drummond
  • Side: Confederacy
Re: Automatic Server Messages.
« Reply #7 on: April 21, 2018, 03:02:19 am »
I managed to get the top admin messages working, but have been having some difficulty making one that will post a small left corner message. So I would appreciate it if you could post that.
Thanks!

Offline tired

  • First Lieutenant
  • *
  • Posts: 1082
    • View Profile
  • Nick: [BBG] tired
  • Side: Neutral
Re: Automatic Server Messages.
« Reply #8 on: April 21, 2018, 04:37:59 am »
 well if you already wrote code that puts the admin message top, the server message on the left hand corner is called multiplayer_event_show_server_message
so I would just copy and paste your code again, and rename it server message instead of admin message for example, and then use multiplayer_event_show_server_message instead of multiplayer_event_return_admin_chat


multiplayer_event_show_server_message: puts the small server message
multiplayer_event_return_admin_chat: puts the purple chat up top.

Offline pete99

  • First Sergeant
  • *
  • Posts: 71
  • Gang Warily
    • View Profile
  • Nick: Drummond
  • Side: Confederacy
Re: Automatic Server Messages.
« Reply #9 on: April 21, 2018, 05:31:24 am »
Ok, thanks ;)