Stardew Valley
0 of 0

File information

Last updated

Original upload

Created by

funny-snek and Zuberii

Uploaded by

funnysnek

Virus scan

Safe to use

Documentation

Readme

View as plain text

��Always On Server



This is a "Headless Server" mod allowing the host and thus the game world to remain online always, much the way Minecraft and other online games function. It accompliches this by automating the Host's day-to-day activities.





Shameless Plug



Created a 100 slot 24/7 server using this mod. Join us: https://discord.gg/YN2sJ9M





How to Use:



Pres the "F9" button on your keyboard to turn server on/off.

Warning! - The server will not click through the "Level-Up" screen. Because of this, if you've done any activity during the day that might cause you to gain XP, it is recommended you go to sleep for the night and turn the server on first thing in the morning.

Warning! - The server will hang on the shipping menu if the game is minimized in windows. It doesn't have to have focus, you can go do other things, but IT CAN NOT BE MINIMIZED!









How to Use Additional Features:



You can also type "server" into the SMAPI console to toggle the server on/off.

The Mod will create a "config.json" file in "Stardew Valley\Mods\Always On Server" folder after it is first run.



��

������You can change the hotkey to start/stop the server.

����You can change when the host sleeps in military time.

����You can turn on/off (true/false) if the host goes to festivals.

����You can allow clients to pause and unpause the game by typing (!pause or !unpause) into the chatbox in game.

����You can turn on/off (true/false) if the server copies the current invite code to the clipboard.

����You can adjust (in seconds) how long between the start of Festivals and their events.









The server will copy the most up-to-date invite code to the clipboard (on by default in the config.json file) whenever it changes. You can then use a macro program of your choice to paste that code into the chat service of your choice so that your non-steam friends can always have access to the most up-to-date invite code even when you are not there. For your convenience I've included an AutoHotkey script under the Files Tab> Optional Files�� here on Nexus that you can use. Run the Game Server>Run the AutoHotKey�� Script>Open Discord or other chat service and click into the chatbox of that service. The current invite code for your game will be pasted and sent every two minutes. Do not close the chat window of your chat service or click out of the chat box or it will not work. When the game server is turned off it will no longer copy the key so be sure to turn off AutoHotKey as well.

The server will also copy the invite code to an "InviteCode.txt" file in the same folder. You can use this to make various bots to display your code. I'm not going to go into a ton of detail on how to do that here but I will provide this link�� to the code you will need and this link to a youtube tutorial�� about how to create your own Discord Bot.

Also in the Optional Files�� I have added a Server Reset Mod. I use this to allow my Discord admins (on a private channel) to remotely reset the server connection through a Discord Bot. Here is the source code for the Discord Bot.��













Features:



Only the host needs to install the mod



Host Teleports to bed and Auto-Sleeps every day at ~6:30 A.M. in game (Or within 0:30 in-game clock minutes, ~21seconds, of the "server" starting, except on Holidays) so that other players can keep playing without the host having to be at their computer. Other players can go to bed when they're ready and won't be stuck waiting on the host.

Clicks "OK" on the end of day Shipping Menu allowing the game to save and sync with the clients.

Pauses the game when all clients disconnect. Resumes when at least 1 client rejoins. This prevents the farm from falling into disrepair and years of game time passing with no one around.

Freezes Relationship Heart Loss for Host while "server" is running

Full Festival Support! - Events like Egg Hunt, Ice Fishing, etc begin 4 minutes after festival starts so players have some time to look around. Host will not go to sleep until after Festival time window is over. Clients can choose to go to festival or not, server will still work. All clients must go to festival to trigger it to start just like normal game-play.

Full Event Support! - Grampa Evaluation, Kent arrival, etc etc will all click through if they pop-up allowing the server to stay online and not get locked up.

Server On/Off and Festival and Event Warnings sent to clients via chat.

Turns off "Pause When Game Window Is Inactive" so you no longer have to.

Config file for timing adjustments of Festival Events and changing the on/off Hotkey.

Copies most up-to-date Invite Code to clipboard

Copies most up-to-date Invite Code to "InviteCode.txt" file inside the "Always On Server" mod folder









This is my first mod! WooHoo!



Huge thanks to Zuberii who co-authored much of the Festival and Events code.



Source Code for anyone who wants to dig through my spaghetti. It's pretty ugly. This is one of the first things I've ever coded.



Requires SMAPI by Pathoschild+ and SDV 1.3+.