Custom kits, perks AND VIP ranks :D

Discussion in 'Releases' started by MiniMuleNZ, Sep 18, 2014.

  1. krys101

    krys101 N00b

    2
    0
    51
  2. krys101

    krys101 N00b

    2
    0
    51
    i cant use the mod i dont know why when i install it modloader says cant load this mod or something and in game it says cant find this command pls help!!!!!
     
  3. whatelse

    whatelse N00b+

    35
    2
    58
    where is vip information stored i would like to manualy add player vip levels then work on an auto add mod for websites similar to how the whitelist adder works
     
  4. MiniMuleNZ

    MiniMuleNZ Moderator Staff Member Moderator

    876
    128
    193
    The VIP information is hideously stored in the timestamps.txt file. The format is roughly something like this:

    START <SteamID>
    VIP=#

    But then there are also all of the cooldowns for the perks there so... I wish you luck

    Follow the bug report guidelines under the Server Support forum
     
    whatelse likes this.
  5. Jory M.

    Jory M. N00b

    3
    0
    51
    How do i make it so only a certain group of people can get it and not ALL of the VIPs?
     
  6. MiniMuleNZ

    MiniMuleNZ Moderator Staff Member Moderator

    876
    128
    193
    I haven't added exclusive VIP level perks yet unfortunately. This is on hold for a while too as I'm taking a bit of a break
     
  7. whatelse

    whatelse N00b+

    35
    2
    58
    is there a link to the source code?
    I'm starting to try modding and would like to take a look maybe i can sort out the VIP list to a separate file.
     
  8. Yocas

    Yocas Rookie

    117
    13
    68
    The VIP levels don't seem to save after the server restarts. I have to keep giving the vIP players back their level every time the server restarts.
     
  9. whatelse

    whatelse N00b+

    35
    2
    58
    i would like to try to help on this mod. i just used the old admin source to reconfigure admin levels on my server,
    and added 5 kits at levels 1 & 2 but i have yet to figure out how to decompile any thing successfully yet so working source code is what i need.
    i thought there was a place here to download source code for all mod released here but i cant find it
     
  10. Yocas

    Yocas Rookie

    117
    13
    68
    Could you explain how you were able to reconfigure the admin levels for your server? I've been trying to figure that out for a while now.
     
  11. Yocas

    Yocas Rookie

    117
    13
    68
    @MiniMuleNZ Soooo, are VIP levels suppose to reset every time the server restarts or is that a flaw in the code?
     
  12. whatelse

    whatelse N00b+

    35
    2
    58
    this was the easy with the original admin source you open it with visual studio, and it is pretty easy to read and edit
    then save and rebuild, im trying to combined admin commands and this mod in to one but with out the source files im haveing some issues
     
  13. whatelse

    whatelse N00b+

    35
    2
    58
    from what i have seen i think this is from the "private void GDCRecheck(CommandArgs args)"and "private void GDCForceRecheck(CommandArgs args)"they both have this line
    {
    File.Delete("Unturned_Data/Managed/mods/UnturnedKits/timestamps.txt");
    }
    but i cant test because i cant get this recompiled, the source would help immensely or if someone could tell me how to decompile and recompile
     
  14. MiniMuleNZ

    MiniMuleNZ Moderator Staff Member Moderator

    876
    128
    193
    The only reason I haven't uploaded the source code for this version is because I don't have it anymore. I've already started working on the next set of changes, but they are incomplete. It's sort of "beta code" which I am happy to upload, it just may not even work in its current state.

    EDIT: To clarify the deletion behaviour, whenever a recheck occurs (once a minute (the GDCForceRecheck isn't meant to be in there as it was for testing, but does the same thing)) the plugin rebuilds the timestamps file from the live data in memory.

    Code:
    if (File.Exists("Unturned_Data/Managed/mods/UnturnedKits/timestamps.txt"))
                {
                    File.Delete("Unturned_Data/Managed/mods/UnturnedKits/timestamps.txt");
                }
                StreamWriter file = new StreamWriter("Unturned_Data/Managed/mods/UnturnedKits/timestamps.txt", true);
                foreach (string PerkName in new List<string>(GCDTimes.Keys))
                {
                    if (DateTime.FromBinary(GCDTimes[PerkName]) < DateTime.Now)
                    {
                        if (!Perks[PerkName].ContainsKey("Announce") || Perks[PerkName]["Announce"].Equals("true"))
                        {
                            NetworkChat.sendAlert("Perk '" + PerkName + "' has been reset!");
                        }
                        string modifier = Perks[PerkName]["Time"][0].ToString();
                        switch (modifier)
                        {
                            case "S":
                                GCDTimes[PerkName] = DateTime.Now.AddSeconds(Convert.ToDouble(Perks[PerkName]["Time"].Substring(1))).ToBinary();
                                break;
                            case "M":
                                GCDTimes[PerkName] = DateTime.Now.AddMinutes(Convert.ToDouble(Perks[PerkName]["Time"].Substring(1))).ToBinary();
                                break;
                            case "H":
                                GCDTimes[PerkName] = DateTime.Now.AddHours(Convert.ToDouble(Perks[PerkName]["Time"].Substring(1))).ToBinary();
                                break;
                            case "D":
                                GCDTimes[PerkName] = DateTime.Now.AddDays(Convert.ToDouble(Perks[PerkName]["Time"].Substring(1))).ToBinary();
                                break;
                            default:
                                break;
                        }
                    }
                    file.WriteLine("GCD=" + PerkName + ":" + GCDTimes[PerkName]);
                }
                foreach (string user in PlayerTimeDB.Keys)
                {
                    file.WriteLine("START=" + user);
                    foreach (string perk in PlayerTimeDB[user].Keys)
                    {
                        file.WriteLine(perk + "=" + PlayerTimeDB[user][perk]);
                    }
                }
                file.Close();
     
    Last edited: Nov 17, 2014
  15. whatelse

    whatelse N00b+

    35
    2
    58
    ok thanks any ways
    I've almost got this one working, I just cant get the timestamps file to create at all.
    I've got the perks and kits files and got them to quit rewriting on restarts.

    update
    ok so i have all files being created and saved but now perks isnt working /name tells options for perk "name", but /name # dose nothing like i just hit enter twice
    going to keep at it almost there but any ideas where to look would be appreciated
     
    Last edited: Nov 17, 2014
  16. Ok so we have used this plug-in for awhile now. It works great and have never had any problems. Just yesterday I was adding in some new perks and set them up the same way I have before when they worked and even watched the video to make sure. After I set them up we tested them and now the commands /perk and /kits are not to even working. They were working fine a hour before and we did not make any changes to the server up other things either. I have redownloaded this and re-tryed it and still it does not work. Please help me, thanks!
     
  17. MiniMuleNZ

    MiniMuleNZ Moderator Staff Member Moderator

    876
    128
    193
    It would be appreciated if you could provide an output log of this occurrence. I think I might have seen this before but never got a response about it
     
  18. Where would I find the output log? Is this the one that is in the Unturned_Data Folder? Or somewhere else?
     
  19. MiniMuleNZ

    MiniMuleNZ Moderator Staff Member Moderator

    876
    128
    193
    Yeah just in that folder. Preferably a copy of it with the erroneous setup. I'll take a look and see if it threw any errors
     
  20. Alright here you go ^_^. Oh and there was a server crash the day before it stopped working. Im sure that had something to do with it if you would like the crash report too.

    Initialize engine version: 4.5.2p1 (2d660ec05104)
    Forcing GfxDevice: 4
    NullGfxDevice:
    Version: NULL 1.0 [1.0]
    Renderer: Null Device
    Vendor: Unity Technologies
    Begin MonoManager ReloadAssembly
    Platform assembly: C:\Program Files (x86)\Steam\SteamApps\common\Unturned\Unturned_Data\Managed\UnityEngine.dll (this message is harmless)
    Loading C:\Program Files (x86)\Steam\SteamApps\common\Unturned\Unturned_Data\Managed\UnityEngine.dll into Unity Child Domain
    Platform assembly: C:\Program Files (x86)\Steam\SteamApps\common\Unturned\Unturned_Data\Managed\Assembly-CSharp-firstpass.dll (this message is harmless)
    Loading C:\Program Files (x86)\Steam\SteamApps\common\Unturned\Unturned_Data\Managed\Assembly-CSharp-firstpass.dll into Unity Child Domain
    Platform assembly: C:\Program Files (x86)\Steam\SteamApps\common\Unturned\Unturned_Data\Managed\Assembly-CSharp.dll (this message is harmless)
    Loading C:\Program Files (x86)\Steam\SteamApps\common\Unturned\Unturned_Data\Managed\Assembly-CSharp.dll into Unity Child Domain
    Platform assembly: C:\Program Files (x86)\Steam\SteamApps\common\Unturned\Unturned_Data\Managed\Assembly-UnityScript-firstpass.dll (this message is harmless)
    Loading C:\Program Files (x86)\Steam\SteamApps\common\Unturned\Unturned_Data\Managed\Assembly-UnityScript-firstpass.dll into Unity Child Domain
    Platform assembly: C:\Program Files (x86)\Steam\SteamApps\common\Unturned\Unturned_Data\Managed\NSpeex.dll (this message is harmless)
    Loading C:\Program Files (x86)\Steam\SteamApps\common\Unturned\Unturned_Data\Managed\NSpeex.dll into Unity Child Domain
    - Completed reload, in 0.087 seconds
    Platform assembly: C:\Program Files (x86)\Steam\SteamApps\common\Unturned\Unturned_Data\Managed\ModLoader.dll (this message is harmless)
    Platform assembly: C:\Program Files (x86)\Steam\SteamApps\common\Unturned\Unturned_Data\Managed\System.dll (this message is harmless)
    desktop: 1366x768 60Hz; virtual: 1366x768 at 0,0
    Non platform assembly: C:\Program Files (x86)\Steam\SteamApps\common\Unturned\Unturned_Data\Managed\mods\Server mods\AdminCommands.dll (this message is harmless)
    Non platform assembly: C:\Program Files (x86)\Steam\SteamApps\common\Unturned\Unturned_Data\Managed\mods\Server mods\AutoSave 2.1.dll (this message is harmless)
    Non platform assembly: C:\Program Files (x86)\Steam\SteamApps\common\Unturned\Unturned_Data\Managed\mods\Server mods\DeathMessages 1.2.dll (this message is harmless)
    Non platform assembly: C:\Program Files (x86)\Steam\SteamApps\common\Unturned\Unturned_Data\Managed\mods\Server mods\feast.dll (this message is harmless)
    Platform assembly: C:\Program Files (x86)\Steam\SteamApps\common\Unturned\Unturned_Data\Managed\System.Core.dll (this message is harmless)
    Non platform assembly: C:\Program Files (x86)\Steam\SteamApps\common\Unturned\Unturned_Data\Managed\mods\Server mods\MiscMethods.dll (this message is harmless)
    Non platform assembly: C:\Program Files (x86)\Steam\SteamApps\common\Unturned\Unturned_Data\Managed\mods\Server mods\ReputationCommand.dll (this message is harmless)
    Non platform assembly: C:\Program Files (x86)\Steam\SteamApps\common\Unturned\Unturned_Data\Managed\mods\Server mods\UnturnedKits.dll (this message is harmless)
    FormatException: Input string was not in the correct format
    at System.Int32.Parse (System.String s) [0x00000] in <filename unknown>:0

    at System.Convert.ToInt32 (System.String value) [0x00000] in <filename unknown>:0

    at UnturnedKits.UnturnedKits.LoadConfig () [0x00000] in <filename unknown>:0

    at UnturnedKits.UnturnedKits.Start () [0x00000] in <filename unknown>:0

    (Filename: Line: -1)

    UnloadTime: 0.497411 ms
    Unloading 5 Unused Serialized files (Serialized files now loaded: 0 / Dirty serialized files: 0)

    Unloading 125 unused Assets to reduce memory usage. Loaded Objects now: 36158.
    Total: 14.736164 ms (FindLiveObjects: 4.402511 ms CreateObjectMapping: 0.287901 ms MarkObjects: 6.321698 ms DeleteObjects: 3.062860 ms)
     

Share This Page