summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstolenvw <stolenvw@hotmail.com>2021-04-06 19:19:16 -0400
committerstolenvw <stolenvw@hotmail.com>2021-04-06 19:19:16 -0400
commitd66d0f60fe04372f9149e946fedc1a651e12ba7e (patch)
tree299eae92ba3ffb2f9c7f74cc8ae5df1d9931615f
parent66784b2591deff8261fab9880fc748d23a48edfd (diff)
Updated to work with differnt log output for Valheim Plus 0.9.7
-rw-r--r--README.md2
-rw-r--r--code/plusbot.py18
2 files changed, 10 insertions, 10 deletions
diff --git a/README.md b/README.md
index 5fe3556..a01f95c 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@ Edit this file with your info. Setting should be self-explanitory.
Add `-logfile /location/to/file.log` to your start command to get a logfile.
-**Warning:** If using the `BepInEx/LogOutput.log` file you need to edit the **BepInEx.cfg** file `AppendLog = true` *If you do not set this and server is started before bot, or restarted without restarting bot it will not work.* When using the `LogOutPut.log` Extra Server Info World Zdos save info **will not be available**
+**Warning:** Using the `BepInEx/LogOutput.log` file will not work
For `WORLDSIZE` user running the bot must have read permissions to the world.db.old file
diff --git a/code/plusbot.py b/code/plusbot.py
index e03659e..708d1e7 100644
--- a/code/plusbot.py
+++ b/code/plusbot.py
@@ -23,16 +23,16 @@ import pandas as pd
#Color init
colorama.init()
-pdeath = '^\[Info\s+:\s+Unity Log\].*? Got character ZDOID from (\w+) : 0:0$'
-pevent = '^\[Info\s+:\s+Unity Log\].*? Random event set:(\w+)$'
-pjoin = '^\[Info\s+:\s+Unity Log\].*? Got character ZDOID from (\w+) : ([-0-9]*:[-0-9]*)$'
-pquit = '^\[Info\s+:\s+Unity Log\].*? Destroying abandoned non persistent zdo ([-0-9]*:[0-9]*) owner [-0-9]*$'
-pfind = '^\[Info\s+:\s+Unity Log\].*? Found location of type (\w+)$'
+pdeath = '^[0-9]{2}\/[0-9]{2}\/[0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2}: Got character ZDOID from (\w+) : 0:0'
+pevent = '^[0-9]{2}\/[0-9]{2}\/[0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2}: Random event set:(\w+)'
+pjoin = '^[0-9]{2}\/[0-9]{2}\/[0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2}: Got character ZDOID from (\w+) : ([-0-9]*:[-0-9]*)$'
+pquit = '^[0-9]{2}\/[0-9]{2}\/[0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2}: Destroying abandoned non persistent zdo ([-0-9]*:[0-9]*) owner [-0-9]*$'
+pfind = '^[0-9]{2}\/[0-9]{2}\/[0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2}: Found location of type (\w+)'
# Extra Server Info
-ssaved1 = '.*? Saved ([0-9]+) zdos$'
-ssaved2 = '.*? World saved \( ([0-9]+\.[0-9]+)ms \)$'
-sversion = '^\[Info\s+:\s+Unity Log\].*? Valheim version:([\.0-9]+)@([\.0-9]+)$'
-gdays = '^\[Info\s+:\s+Unity Log\].*? Time [\.0-9]+, day:([0-9]+)\s{1,}nextm:[\.0-9]+\s+skipspeed:[\.0-9]+$'
+ssaved1 = '^[0-9]{2}\/[0-9]{2}\/[0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2}: Saved ([0-9]+) zdos$'
+ssaved2 = '^[0-9]{2}\/[0-9]{2}\/[0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2}: World saved \( ([0-9]+\.[0-9]+)ms \)$'
+sversion = '^[0-9]{2}\/[0-9]{2}\/[0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2}: Valheim version:([\.0-9]+)@([\.0-9]+)$'
+gdays = '^[0-9]{2}\/[0-9]{2}\/[0-9]{4} [0-9]{2}:[0-9]{2}:[0-9]{2}: Time [\.0-9]+, day:([0-9]+)\s{1,}nextm:[\.0-9]+\s+skipspeed:[\.0-9]+$'
bot = commands.Bot(command_prefix=config.BOT_PREFIX, help_command=None)