RealtimeWipeInfo

Moved

Total Downloads: 1,533 - First Release: May 19, 2017 - Last Update: Mar 16, 2018

5/5, 8 likes
  1. I believe the lack of the hours showing as well as the days in the title may also be the issue you're having. The title will show "1 day ago" regardless of if the server wiped on 6/6 and it's currently 6/8, if the actual TIME you wiped hasnt been reached that day. For example, it'll show "1 day ago" even if the actual amount of time since the wipe is 1 day and 23 hours.


    Ryan I love you! Thank you so much for all the changes! It is incredibly appreciated!
     
  2. Can you add the ResourceId property for auto update please

    [Info("RealtimeWipeInfo", "Ryan", "1.0.5", ResourceId = 2473)]
     
  3. Yup, sorry about that. I'll add that in the next update. I don't particularly want to update the plugin just to add the resource ID though. So just wait :D
    [DOUBLEPOST=1497137636][/DOUBLEPOST]
    I'm not quite sure how to do that honestly but I'll do my research. I'm new to C# and pretty much programming as a whole :p
     
  4. Hey, nice plugin.
    However, I have an issue, my server description does not change, and i get this error:
    Code:
    (12:48:36) | [RealtimeWipeInfo] Resetting servers hostname/description to original hostname.
    (12:48:37) | Unloaded plugin RealtimeWipeInfo v1.0.5 by Ryan
    (12:48:37) | Loaded plugin RealtimeWipeInfo v1.0.5 by Ryan
    (12:48:37) | Failed to call hook 'OnServerInitialized' on plugin 'RealtimeWipeInfo v1.0.5' (FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.)
    (12:48:37) | at System.String.FormatHelper (System.Text.StringBuilder result, IFormatProvider provider, System.String format, System.Object[] args) [0x00000] in <filename unknown>:0
      at System.String.Format (IFormatProvider provider, System.String format, System.Object[] args) [0x00000] in <filename unknown>:0
      at System.String.Format (System.String format, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.RealtimeWipeInfo.Lang (System.String key, System.String id, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.RealtimeWipeInfo.FormatDescription () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.RealtimeWipeInfo.OnServerInitialized () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.RealtimeWipeInfo.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00000] in <filename unknown>:0
    Here's my config [JSON] RealtimeWipeInfo.json - Pastebin.com

    Edit: It seems it's
    Code:
    "Enable Description Refresh": true,
    that causes problem cause without it no errors, but my description does not seem to change?
     
    Last edited by a moderator: Jun 12, 2017
  5. Send your whole config file please
     
  6. I did? I put it on pastebin and linked it, but here it is anyways:

    Code:
    {
      "Title configuration": {
        "Full Title/Hostname": "(EU) RustVanilla++ [x1|BetterLoot|50% Craft] {0}",
        "Date format": "dd/MM",
        "Title Refresh Interval (minutes)": 10.0,
        "Enable Title Refresh": true,
        "Enable the use of time in the title": false,
        "Enable the use of date in the title": true
      },
      "Phrase configuration": {
        "Enable Phrases": true,
        "Phrases": {
          "wipe": true,
          "when wipe?": true,
          "wiped?": true
        },
        "Date format": "dd/MM",
        "Enable the use of time in the phrase reply": true,
        "Enable the use of date in the phrase reply": true
      },
      "Wipe msg configuration": {
        "Use wipe schedule in phrase reply": true,
        "Wipe schedule (days)": 7,
        "Next wipe format": "dddd dd/MM"
      },
      "Description settings": {
        "Description Refresh Interval (minutes)": 10.0,
        "Enable Description Refresh": true,
        "Use seed and mapsize": true,
        "Description date format": "dddd dd/MM/yyyy",
        "Full server description": "{0}\nPlugins:\n -CraftingController\n -BetterLoot\n"
      },
      "General plugin settings": {
        "Send a last wipe message to a player when they connect": true
      }
    }
     
  7. I have a feeling it's something to do with your Description date time format, play around with it to see if it solves the issue.
     
  8. Description does also not work for me, even with the default configuration it does not work. Same error message like Ryan as soon as I activate description refresh. Please fix the error.

    At least the default configuration should work with description refresh activated.
     
  9. Yup it's the lang messages, as a temporary fix until I update it tomorrow you can remove the {1} from the "Description_Lastwipe" lang message.

    Sorry about that, will update ASAP.
     
  10. This plugin rocks! I have it installed on all servers despite the bugs!

    Please fix the last issues! I can't get the BetterChat phrases to work. The plugin does not react to any message.
     
  11. What other plugins have you got on your server, as mentioned in the overview, the phrases may not be compatible with some other chat based plugins.
     
  12. Thanks for your fast answer. The problem is not any other plugin but the following instruction
    Code:
    if (bPlayer.IsAdmin) return null;
    in methods OnBetterChat and OnPlayerChat. So I wasn't really able to test the feature myself as admin.

    I advice to remove this or make it configurable.
    [DOUBLEPOST=1497694280][/DOUBLEPOST]I always like to add the time to the title and description like "Next wipe is 19 pm CEST" or "Wipe 15.05. 18:00 (CEST)". The problem: The plugin runs solely on UTC and does not consider the server's time zone.

    I changed the time message routine

    Code:
    SaveRestore.SaveCreatedTime.ToString
    to

    Code:
    SaveRestore.SaveCreatedTime.ToLocalTime().ToStrin
    In methods: FormatMsg, GetFormattedTitle and FormatDescription. It would be awesome if you can consider this in your next plugin version.
     
  13. Here is the fix for the desxcription refresh:

    Code:
    private string FormatDescription()
            {
                string output;
                if (_Config.WipeInfoConfig.UseWipeSchedule)
                {
                    output = string.Format(Lang("Description_Lastwipe", null, SaveRestore.SaveCreatedTime.ToLocalTime().ToString(_Config.Description.DescriptionFormat)) + "\n");                output += string.Format(Lang("Description_NextWipe", null, SaveRestore.SaveCreatedTime.ToLocalTime().AddDays(_Config.WipeInfoConfig.WipeSchedule).ToString(_Config.Description.DescriptionFormat)));
                }
                else
                    output = Lang("Description_Lastwipe", null, $"{SaveRestore.SaveCreatedTime.ToLocalTime().AddDays(_Config.WipeInfoConfig.WipeSchedule).ToString(_Config.Description.DescriptionFormat)}");
                if (_Config.Description.SeedSize)
                    output = string.Format("{0}\n{1}", output, Lang("Description_SeedSize", null, ConVar.Server.worldsize, ConVar.Server.seed));
                return string.Format(_Config.Description.Description, output);
            }
    Note: You need to remove the "{1}"-parameter entry in Description_NextWipe and Description_Lastwipe in file "../lang/en/RealtimeWipeInfo.json"
     
    Last edited by a moderator: Jun 17, 2017
  14. Oooh cheers for this, I'll take a look when I get to updating this. I already had fixed the description though, all it took was removing the {1} indexing as you said. I'll definitely take on your contribution for the local time though. I was struggling to find something to accomplish that. Thanks a lot. :D
     
  15. Ryan updated RealtimeWipeInfo with a new update entry:

    1.0.6

     
  16. hello great -plugin, i was wondering i cannot seem to get the phrases to work, does anyone else have a similar problem?
     
  17. It doesn't work for admins, it bypasses them. I will add a bypass permission in, in the next update
     
  18. tyvm...excellent!
     
  19. Code:
    (22:42:58) | [Oxide] 21:43 [Error] Failed to call hook 'OnBetterChat' on plugin 'RealtimeWipeInfo v1.0.5' (NullReferenceException: Object reference not set to an instance of an object)
    (22:42:58) | [Oxide] 21:43 [Stacktrace]   at Oxide.Plugins.RealtimeWipeInfo.OnBetterChat (System.Collections.Generic.Dictionary`2 data) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.RealtimeWipeInfo.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.CSharpPlugin.InvokeMethod (HookMethod method, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x00000] in <filename unknown>:0
      at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00000] in <filename unknown>:0
     
  20. Wulf

    Wulf Community Admin

    Update to Oxide 2.0.3343 or higher; should be fixed.