Project Zomboid

Project Zomboid

44 个评价
Show Key Origin
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
2.430 MB
6 月 17 日 上午 4:04
8 月 4 日 上午 5:46
6 项改动说明 ( 查看 )

订阅以下载
Show Key Origin

描述
This mod helps you locate the building or vehicle that a key belongs to. When hovering over a key in the inventory, the distance and direction to its origin are shown. Additionally, a right-click on the key opens a context menu where you can activate a visual vector pointing toward the key's origin.

🧭 New feature: In the Sandbox Options, you can optionally enable the requirement to have a compass to access this information — both the tooltip and the vector will only be available if a compass is in your inventory.

Optionally, the vector can appear thicker by enabling the mod TchernoLib .

Compatibility

✅ Works on Build 42. Safe to enable or disable at any time — in existing saves or new games.
🔁 Not incompatible with other mods, except with some that also modify inventory tooltips.

Compatible mods that modify inventory tooltips:
  • [B42] Show Weapon Stats Plus
  • [B42/41] Better Clothing Info Comparison
  • [B42] More Item Information — Better if you put it before Show Key Origin. If you use it with one of the above, disable "Show Weapon Info" or "Show Clothing Info" in ESC > OPTIONS > MODS



ESPAÑOL

Este mod te ayuda a encontrar el edificio o vehículo que abre una llave. Al pasar el cursor sobre una llave en el inventario, se muestra la distancia y dirección hacia su origen. Además, al hacer clic derecho sobre la llave, aparece una opción para activar un vector que señala gráficamente hacia ese origen.

🧭 Nueva característica: Opcionalmente puedes habilitar en las opciones de mundo abierto (Sandbox Options) que se requiera tener una brújula en el inventario. Sin ella, no se mostrará la información del origen ni el vector.

Opcionalmente, el vector puede mostrarse con mayor grosor habilitando el mod TchernoLib .

Compatibilidad

✅ Funciona en la Build 42. Puedes activarlo o desactivarlo sin problemas en partidas guardadas o nuevas.
🔁 No es incompatible con otros mods, salvo con algunos que también modifican la herramienta de ayuda del inventario.

Mods compatibles que modifican la herramienta de ayuda:
  • [B42] Show Weapon Stats Plus
  • [B42/41] Better Clothing Info Comparison
  • [B42] More Item Information: Mejor si se pone antes que Show Key Origin en el orden de carga de mods. Si lo usas con uno de los anteriores deshabilita "Show Weapon Info" y "Show Clothing Info") respectivamente

Workshop ID: 3501701205
Mod ID: ShowKeyOrigin
26 条留言
Parrowlili 8 月 31 日 上午 6:15 
This is an amazing mod, however when transferring/looking at any liquids, hovering over the bar would cause a spam of errors to show up.
Not sure what the incompatibility is, but it's probably something on my end. :ss3dHeart2:
Zerberus 8 月 4 日 下午 2:56 
@afymo Thanks for the explanation, but my point wasnt, that the origin opens doors, but if a key and the origin of a key share the same ID one sould be able to find the other and give xyz coordinates of its current position, right? So while I get that's a feature of b42 to save the xyz of the origin on the key, wouldn't it be possible via script to find the IDs holder at any point in time? But thats not what you're trying to do, sorry, I was just thinking...
Afyrmo  [作者] 8 月 4 日 上午 7:47 
@Zerberus, You're right about the keys that spawned before the Weightless Keys mod was updated in your PC (when it was preventing the origin from being saved) won't have an origin. And any new keys that spawn after that update will have their origin correctly saved.

To answer your question, keys and locks share an ID. This ID is what tells the game which key opens which lock. So even without an origin, if a key's ID matches the locks in a building, it will open all the lockable doors for that building (typically exterior doors and reinforced doors). The origin isn't what makes the key work; it's what allows the game to know where the key came from, which is what my mod uses.

I also appreciate you pointing out the tooltip issue. I've corrected a small part of the code, so the coordinates should appear correctly now.

Thanks for the feedback and for testing the mod.
Zerberus 8 月 3 日 下午 8:06 
@Afyrmo yes it works for newly generated keys in my savegame. I'm not sure if I understood you right, but keys that don't have an origin don't have a vector function in the context menu.
Also after the last update of your mod the coordinates are not inside the tooltipbox anymore. (not sure if it was before, but I think it was)
apart from that, do you know how keys know their origin? I mean it has to be stored somewhere or else how would the game know what key unlocks what lock. Wouldn't it be possible to trace the origin back from there?
Afyrmo  [作者] 8 月 3 日 下午 5:40 
Ok, I saw late your last message. I'm glad it worked.
Afyrmo  [作者] 8 月 3 日 下午 5:39 
@Zerberus, I uploaded a more robust version for the use of ISToolTipInv:render. Try by changing Show Key Origin at the top or at the end of the Mod Load Order. If a key has origin (none other mod has avoided to save the key origin), even though other mod don't give back the original ISToolTipInv:render fuction properly, the option "Show Key Origin Vector" should appear when you right-click on the key. Once you have the Key Origin Vector, it will change by hovering the cursor over a key that has origin.
Zerberus 8 月 3 日 下午 5:28 
Update: Okay it works on newly generated keys, nice, thanks
Zerberus 8 月 3 日 下午 4:34 
@Afyrmo So I tried this and sadly this didn't work for me. I edited the files in /42/media and in /media (just to be sure) but not even a newly found key showed coordinates in tooltip. But since it didn't work for me on the same savefile with no other mods active I guess thats my life now ^^
Unless the weightless key somehow deleted the origin of every key generated in the game so far. If so I might see it work at some point....maybe
Zerberus 8 月 3 日 下午 3:36 
good god that was quick, damn man thanks, Im gonna try this.
Had suspected weightless keys was to blame, but after testing it with the new savefile didn't bother with it anymore.
Afyrmo  [作者] 8 月 3 日 下午 3:24 
@Zerberus, i made a simple test and it seems that Weightless Keys eliminates origins of all the keys you find when the mod is enabled, but not the origins of the keys you have before you enable the mod. I found a solution that may works for you. You can edit C:\Program Files (x86)\Steam\steamapps\workshop\content\108600\3408222483\mods\Weightless Keys\42\media\scripts\items\items_security.txt so that Weightless Keys doesn't eliminate keys origins by changing the code for item Key1 to this code:

item Key1
{
DisplayName = Key,
DisplayCategory = Security,
Type = Key,
Weight = 0.00,
IconsForTexture = Key1;Key2;Key3;Key4;Key5,
MetalValue = 5,
WorldStaticModelsByIndex = Key;Key2;Key3;Key3;Key2,
Tags = BuildingKey;MoreWhenNoZombies;FitsWallet;HasMetal,
OriginX = 0,
OriginY = 0,
originZ = 0,
}

For vehicle keys you can add in items\items_vehicle.txt these lines to item CarKey:
OriginX = 0,
OriginY = 0,
originZ = 0,

It will work for the next time you resume the game.