Better Keys Updated 1.2.3

Please do not ask when mod authors will update their mods to v3.8.3. Bothering mod authors will lead to warnings and repeat offenses will lead to eventual bans.

Better key information for SPT-AKI. Originally by SirTyler, updated by maxloo2.

There will be NO support from me in the SPT HUB (#general-support), I have removed myself from the discord server for the time being due to "circumstances", and probably will not return any time soon. Please report your bugs and problems here in the comment section, or ping me on discord me in some other SPT modding communities.


Features & Changes

  • Colored background for keys and keycards according to which map they belongs to.
  • Maps, Extracts, Quests and Loot information in the item descriptions.
  • **[New]** Add description for junk keys (previously keys that are not used anywhere are not indicated as such by the mod)

  • **[New]** All features can be toggled on/ off in `config.json` (see below).

  • **[Updated]** Auto-update from GitHub: key information and locales can be updated without redownloading the whole mod.
  • **[Removed]** Key Tier List (I don't think it was actually enabled anyway).

Please refer to the original mod for more/ legacy descriptions: Better Keys [Most of the code have since be rewritten, but the idea of the mod is the same]


Config.json

JSON
{
  "enableAutoUpdate": true, // enable auto update from GitHub
  "backgroundColor": true, // toggle background colors
  "descriptionInfo": true, // toggle item descriptions
  "yellowMarkedKeys": true, // when true, marked keys are always yellow (vanilla behavior)
  "requiredInQuests": true, // Toggle Quests Info
  "requiredForExtracts": true, // toggle Extracts Info
  "behindTheLoock": true, // toggle Loot Info
  "backgroundColors": {...} // Please refer to config/README.md
}

Help Needed!


If you find any problems please comment or ping me on SPT discord: maxloo2


Feel free to make pull requests on GitHub if you find anything outdated/ broken, I will be actively maintaining this repository even if I don't have time to make new updates.


I do not have too much experiences with Unity/ C# modding so any help in that regard will be much appreciated!

Images

  • Version 1.2.3

    Fixed: Extracts not showing in item description due to a typo.

  • Version 1.2.2

    FOR THE LOVE OF GOD PLEASE MAKE SURE YOU READ THE MOD PAGE CAREFULLY BEFORE ASKING WHY THE MOD IS NOT WORKING.


    Fixed an issue in which "Underground parking utility room key" shows "undefined" loot due to a typo (thanks keeboz!). You don't need to redownload the mod if you use auto-update.

  • Version 1.2.1

    Fixed the problem that config files not being in the correct folder. Sorry for the bug!

  • Version 1.2.0

    1. Fully functional auto-update feature.

    2. Updated Chinese locales.

    2. Removed now unused client plugin.

  • Version 1.1.0

    NEW FEATURE: added configs for ALL features, check updated mod description for more information.

    FIXED: Woods keys are not correctly labelled.


    - feat: update _versions.json
    - fix: missing newlines in added key info, extra newlines before item description
    - fix: background colors not applying to keys
    - feat: allow users to toggle enable for backgroundColor and descriptionInfo, some minor refactors
    - fix: add missing entry for Woods in _constants.json

  • Version 1.0.1

    - feat: add "rusted bloody key" to list of marked keys

    - fix: fix marked keys not having yellow background due to mistake in if-logic

  • Version 1.0.0

  • If you see "Error checking for updates: SyntaxError: Unexpected non-whitespace character after JSON at position 3", check if you have updated the mod to the latest version (v1.2.1).


    If you are upgrading from before 1.2.0: remove the old mod folder in user/mods/, and also delete the old client plugin in BepinEx/SirTyler-BetterKeys.dll.


    READ THE MOD PAGE AGAIN IF YOU NEED ANY HELP & SUPPORT. I WILL NOT ANSWER TO STUPID QUESTIONS. THANK YOU FOR YOUR COOPERATION.

    • new version same problem.


      Need delete from BepInEx SirTyler-BetterKeys.dll

  • The description does not indicate which keys are used for which output.

    ( "requiredForExtracts": true, )


    in this case there are 2 keys:

    591afe0186f77431bd616a11

    5448ba0b4bdc2d02308b456c

    • Sorry about that! I made a typo in the code, should be fixed in the latest update!

      Thumbs Up 1
    • Version 1.2.3 did not help

    • I just checked again and I think I uploaded the wrong file on GitHub, sorry about that, can you try downloading again?

    • Now everything works :thumbup:, Thank you

      Thumbs Up 1
  • I'm not sure what the issue is exactly, The mod seems to work just fine but I keep getting this error when I load up the server. I've read through the other comments and tried other solutions I've seen but alas it persists. Any information would be super helpful, Thanks for the great mod!



    ModLoader: Error when loading async mod: Item 627a137bf21bc425b06ab944 still not found in base cache after regeneration

    Error: Item 627a137bf21bc425b06ab944 still not found in base cache after regeneration

    at ItemBaseClassService.itemHasBaseClass (C:\snapshot\src\services\ItemBaseClassService.ts:110:23)

    at ItemHelper.isOfBaseclasses (C:\snapshot\src\helpers\ItemHelper.ts:94:42)

    at C:\SPT 3.8.3\user\mods\maxloo2-betterkeys-updated\src\mod.ts:167:22

    at Array.filter (<anonymous>)

    at Mod.main (C:\SPT 3.8.3\user\mods\maxloo2-betterkeys-updated\src\mod.ts:162:64)

    at Mod.postDBLoadAsync (C:\SPT 3.8.3\user\mods\maxloo2-betterkeys-updated\src\mod.ts:36:12)

    at PostDBModLoader.executeModsAsync (C:\snapshot\src\loaders\PostDBModLoader.ts:63:60)

    at processTicksAndRejections (node:internal/process/task_queues:95:5)

    at PostDBModLoader.onLoad (C:\snapshot\src\loaders\PostDBModLoader.ts:31:13)

    at App.load (C:\snapshot\src\utils\App.ts:56:13)

    • I have no idea what this is honestly... I think you need to ask on SPT discord because this is something I have never seen before ;(

    • Hey, at least I feel better knowing I'm not just crazy! As I said, the mod works just fine and throws no other errors during gameplay or any other time than just at the server startup. If I manage to figure out whats causing it ill update you here!! Thanks again.

    • i have the same thing, ye is work fine

    • I have seen mentions of this error from the SPT devs on discord and they said the issue was fixed back in 3.8.1, other than that it seems to be a harmless error that not just only my mod have ;(

  • for some reason i'm not seeing any description on the keys stating what's behind the lock like in photo 2

    it will change the colors, show what map it's for/required in quests but it does not show behind the lock info.


    this is the only key mod i have installed, it may be conflicting with MoreCheckmarks because it changes the color of the FiR icon? not sure.


    EDIT: setting enableAutoUpdate to false and backgroundColor to false fixed the issue. although "Underground parking utility room key" shows "undefined" as one of the loot options in Behind the Lock.

    • Are you using the latest verison? If you are upgrading, have you cleaned the old files and folders from the old versions? Did you read all the notices on the overview page and this page?

      Update: Sorry I didn't see that you mentioned MoreCheckmarks, but I also use both mods together so I am pretty sure they work.


      I am not actually not too sure about why you just dont't see the loot information but everything else works, it is indeed an interesting problem, but I will need more information on that since I will need to be able to reproduce the problem myself in order to be able to find a fix for it.

    • For the Underground parking utility room key, it was due to a typo in the key db, it has since be fixed, if you enable auto update you should get the latest db files. I will upload a fix here later but if your auto update is broken you probably need to update the mod anyway.

    • yes i have the latest version, morecheckmarks mod also uses the color api so i had to disable the color in this mod to make it work properly, thanks for keeping it updated it's a great mod

    • Again, I have More Checkmarks and Color Converter API running alongside this mod, nothing specific was required to make them work together.


      More Checkmarks, as far as I understand, only adds checkmarks and the hover information, and Color Converter API shouldn't break anything, in fact, I suspect that my work actually works with the custom color, which you can configure in config.json as well.


      Even if you have mods that edit the item background color or description text, in theory my mod only overwrite previous edited color values and add extra information to item description, in short, it depends on your mod load order but nothing should conflict... I put my bet on some other mods doing something stupid ;(

    • probably. but atleast it works now!

      Thumbs Up 1
  • I don't know what this is but it just happened.


    [UNHANDLED][/BetterKeys/GetInfo]

    • its happen to me to, and you have to eliminate the betterkey in the carpet bepInEx and it disappear the error

      Heart 1
    • Remove SirTyler-BetterKeys.dll from your /BepinEx/ folder and the problem will be fixed.


      Explaination: I included the client plugin in the earlier versions since I was still figuring out what it does, once I figured that the client plugin was not requried I have sinced removed it including the server route /BetterKeys/GetInfo, therefore if you still have the client mod it will send a request to the now non-existent route.

  • turned auto update to false to prevent the space at line 3 error

    Thinking 1
    • Hi! Thanks for the feedback, have you followed the instructions pinned here? Are you playing on a fresh install of the latest version of this mod? Is the mod still working despite the error logged? I cannot reproduce the problem myself, will need more information to investigate this error.

    • it was me updating to a new build a few updates ago, none the less this is voided.
      new update all fixed. as always great work, keep it up dude.

      Thumbs Up 1
  • Hey there, I got an SyntaxError with the newest version 1.2.0 on SPT 3.8.3

    Seems to be connected to the auto-update feature, the core functionality of the mod works.


    • Hey, I think you still have the old client plugin installed, you will need to remove it, but otherwise the mod should work just fine.

    • i'm getting the same thing. I dont seem to have any old "better keys" folders/files in mods or in plugins

      Thinking 1
    • @mattybrown33 Besides the error log, does the mod still work? I am receiving reports of this problem but I have no idea how or why this is happening, since I cannot reproduce the problem myself, I cannot investigate for a fix for the problem ;(


      PS: Does the mod still work for you after showing the error? Or does it break everything else as well?

    • I was getting this error in the console, the game would start but before getting to the main screen it would flag an error in game with something about the colour brown. I was told in discord to delete a colorapi plugin which I did but had also deleted your mod by then, everything is now working as it was but i haven't reinstalled your mod so can't say for ssure if that was the issue, sorry

    • Update: I'm an idiot! :rolleyes:


      Re-installed you mod, works perfectly fine!

      I didn't realise I already had another key colour coded mod installed which need the colorconverterapi plugin, have since deleted that because yours has more info, all working fine, my apologies, i'm an idiot!

      Thumbs Up 1
  • maxloo2-betterkeys-updated.zip\user\mods\maxloo2-betterkeys-updated has two config folders, config and configs



    'configs' has the files needed, renaming 'configs' to 'config' fixed the problem.

    Thumbs Up 3 Heart 2
    • true, good job mate o/

    • My god how I made this stupid mistake :( Thanks for the feedback and sorry so much for the inconvenience.

  • [UNHANDLED][/BetterKeys/GetInfo]


    I get this every time i load, should i be concerned?

    • Looking at the mod.ts it looks like its just part of the auto-update function, because its targeting a url; that features probably not functioning properly. Rest of the mod seems fine.


      Thumbs Up 1
    • yeah i forgot to edit and say nothing was broken, haha took a nap instead... seems like everything is solid tho!

    • I think I know why this is happening, I never updated the client mod since I am still learning about Unity modding, and when I refactored the code I changed the route name in the server code but not the client mod...


      I have plans for rewriting the autoupdate part, so I guess since the rest of the mod is not affected, I will leave this problem for the next release instead of asking every one to redownload the mod. Thanks for all your feedback!

  • Code: log
    [Запрос Клиента] /BetterKeys/GetInfo
    [НЕОБРАБОТАННЫЙ][/BetterKeys/GetInfo]
    {}

    1.1.0 why is this the case when launching the client?


  • This mod is shaping up nicely. keep up the great work.

  • Thanks a lot maxloo. Would also love without background coloring.

  • Could you possibly add an option to disable background colors? I love the added information, however.


    Also, for the 'SSK' Key (Shturman's stash key), It states that it is junk.


    Thank you for the update and the work that you've put into this.

    Thumbs Up 1
    • Quote

      Also, for the 'SSK' Key (Shturman's stash key), It states that it is junk.

      The same happens for the other Woods keys. Woods is missing from the list of maps in _constants.json, should be an easy fix.

    • @IssacSin Good catch, I didn't even notice since there's only a total of 3 keys for Woods. Will work the fix right away.


      @TimmyGG I will actually add configs for enbling/ disabling both descriptions and and background colors, thanks for the feedback.

  • Holy moly updated finally!

    Heart 1