Jump to content

Liiw

Very Important Vintarian
  • Posts

    8
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Liiw's Achievements

Wolf Bait

Wolf Bait (1/9)

2

Reputation

  1. Hello! Unfortunately I have not had much luck with this. It might be possible to getting it working by hooking up a monitor to the headless machine or use a HDMI dummy dongle (which some GPU miners use to circumvent the hash rate limitations). I ended up using Th3Essentials mod and running the server with the script I posted earlier. The mod makes a world backup before shutdown, these can be made multiple times a day and it will also give a warning message to the players. The script will then restart the server. This .bat file can also be configured to run at system startup in case of windows updates or other restarts.
  2. When playing with many mods, the constant updating of the search results often impedes with typing on the item searchbar. Perhaps it would be better to carry out the query after the player presses "enter" after typing to search for an item or a topic in the handbook? It would be nice if right clicking on the search bar would select the whole text entered there. This way, new text could immediately be typed and it would clear the last text in the process. It would be extra nice if this functionality could be extended to the world name text bar. I would also like a search bar on the knapping/clayforming/smithing interfaces. Especially smithing. Sometimes I spend way too much time looking for the right recipe while the ingot is getting cold
  3. Hello! This is an awesome tool! I used V1.2 previously and it worked as intended. When I tried using V1.3, I configured the config file and after trying to run it, it crashes. I managed to get this error message when running it via CMD:
  4. I am a bit busy with work at the moment so cannot come to Discord right now. The file should be called [Date]_[TimeH]_[TimeMin].zip. For example 22.02.2024_13_29.zip. The date format depends of your regional settings etc. I have not considered that the file indeed could be too large for powershell to handle it. So the copying and renaming option would probably work better in this case. I will look into it later on how to handle this. Perhaps there is a workaround to be able to compress it still. If you have the time, you could delete the "@echo off" from the start of backuphandler.bat. Then in BackupManager.bat, on line 43 replace "nul" with "output.txt" so that it would look like this: call backuphandler.bat %savePath% %backupPath%>output.txt This should create a file called output.txt in the same folder where the scripts are at and this file should contain the powershell error message. Post this file here please.
  5. @MishkaSnep I think I know what the problem is. The "\" character is doing funky stuff in the script perhaps. Please try the following: Remove the backshlash from the end of backupPath. So in your case it would look like "E:\VSBackups" Open up "backuphandler.bat with a text editor. On line 8 there is a set backup= command. Insert the backslash between the two percent signs of backupPath and date. So it would look like this: set backup="%backupPath%\%date%_%time:~0,2%_%time:~3,2%.zip" Perhaps this will work out.
  6. Thanks for the suggestion! I have not yet used this mod, but it might work. I was thinking about making a stand-alone mod for the autobackup and this would give me the information from where to start. But since that will take an unforeseen amount of time (because of life and all other stuff regarding it), I believe it would be possible to use Th3Essentials in the meantime. It seems that this does not backup any additional data, like Xskills for example, but that might not be even that much of an issue. Back when I was running a Minecraft modded server, I used a nifty little script to run the server. This script could restart the server when it crashed or was shut down for some other reason. After I set it up in the Windows Startup section, it would even start the server after the PC restarted for whatever reason. I have changed the script a little to work with VS. Namely some echo text and the actual EXE path to be started. So this script would handle the restart of the server and the backup could be configured and handled by Th3Essentials mod. @choice /t 10 /d N /m "Cancel server start?" @if %errorlevel% == 1 goto yes goto start :start @echo Starting Vintage Story Server... @echo (%date% %time%) Starting Server. >> restart.log :VSStart "C:\Games\Vintagestory\VintagestoryServer.exe" @echo. @echo. @echo. @choice /t 10 /d N /m "Stop server start?" @if %errorlevel% == 1 goto yes goto no :no @echo. @echo (%date% %time%) Server Crash/Restart. >> restart.log @echo. @goto VSStart :yes So the line after :VSStart would need to reflect your actual server exe location. This script will first ask if the user wants to cancel the launch. If the server is running the script is basically paused in that spot. Once the server is stopped, the script will contiune and ask if the user wants to cancel. The default of these prompts is "no" so once the 10 second timer is up, the script loops back to where it needs to start the server. It also outputs these events into a file called "restart.log", which is just a text file. To make it work, one could just create an empty txt file and paste the code in there. After that the txt file would need to be saved as a .bat file (e.g. ServerStart.bat). File extensions need to be visible for it to successfully turn into a .bat file (the sheet icon would turn into a small window icon with a couple of gears in it). If file extensions are not visible, these can usually be turned on from the "View" tab on the top of the explorer window. There is a checkbox called "File name extensions" which needs to be checked.
  7. Apparently getting this script working via Task Scheduler on a headless machine is not that straightforward. It is running properly when I am connected to the machine via Remote Desktop, but refuses to run while I'm not connected. I've tried multiple ways, but it will not cooperate. It seems to be a problem with Powershell and GUI interaction while there is no display output. I'm gonna look for alternative solutions to the backup issue.
  8. I've been running a separate Windows machine as a dedicated server. It was a pretty modified session and unfortunately the world got corrupted and since the last actual backup was from a while ago, I've decided to reassemble the pack on a newer version of the game etc. Because of this, I was looking for ways to automate backing up the world files. I decided to write a batch script to handle this for me. I've attached the script files to this post in case anyone else is interested in using it. To get it working, I will tell the Windows task scheduler to run BackupManager.bat at 04:55 (five minutes before 5AM), which will call for the other bat files in order. The server instance needs to be running for the script to work. Otherwise it will shut itself down. BackupManager.bat has some parameters that need to be customized: set savePath="C:\Users\Liiw\AppData\Roaming\VintagestoryData\Saves" set backupPath="D:\VS Server backup\Saves\" set exePath="C:\Games\Vintagestory\VintagestoryServer.exe" set EXE=VintagestoryServer.exe savePath - where the server "Saves" folder is located. backupPath - where the backups will be stored. exePath - where the server exe is. EXE - server process name, probably don't need to change that one. Basically the script works as follows: Searches through the tasklist for an active server process (the EXE). If it does not find it, it will display a message and shut down after 5 seconds. If it finds a server instance, it will activate it and send a message to the server console that the server will shut down in 5 minutes. This is to warn any players online. Repeat the warning for 1 minute and 10 seconds as well. Shut down the server. After waiting 10 seconds, it will create the backup as a [DATE][TIME].zip file in the defined folder. Restart the server. There is a Y/N prompt with a ten second delay in case the user wants to cancel server start. I've included the whole "Saves" folder because in my case the mod "XSkills" also keeps the leveling data in this folder as a separate file. The server built-in backup command would only backup the world file and not the extra data. I've given the backup command a ten second delay to make sure that the server instance is able to close. I've tested it a couple of times and it seemed to work ok. In certain cases, the delay might need to be longer. I've used Notepad++ for easier editing. The number on line 40 (TIMEOUT /T 10 /NOBREAK>nul) of BackupManager.bat represents the seconds. VS BACKUP MANAGER.zip
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.