Project Zomboid

Project Zomboid

Starlit Library
98 Comments
albion  [author] 4 Jun @ 7:55pm 
MonkeyShark 4 Jun @ 7:43pm 
Did you add support for progress bars in the tooltips?
albion  [author] 3 Jun @ 5:04am 
you can ignore it, it fails safe and just disables the module, and the module it disables (afaik) isn't actually used by any mods yet - it's caused by mod incompatibility (some other mod has corrupted the global namespace, and now starlit can't do what it needs to do) but it's very difficult to diagnose which mod is causing it. if you haven't checked, there will sometimes be extra info in your console.txt a little bit above the error (but this is only when the library can detect which mod fucked up, which isn't always the case)
vegan food user 2 Jun @ 8:25pm 
sorry, read from bottom to top
vegan food user 2 Jun @ 8:24pm 
at se.krka.kahlua.integration.LuaCaller.pcall(LuaCaller.java:76)
at se.krka.kahlua.integration.LuaCaller.protectedCall(LuaCaller.java:117)
at zombie.Lua.LuaManager.RunLuaInternal(LuaManager.java:564)
at zombie.Lua.LuaManager.RunLua(LuaManager.java:510)
at zombie.Lua.LuaManager.RunLua(LuaManager.java:496)
at zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:342)
at zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:264)
at zombie.Lua.LuaManager.LoadDirBase(LuaManager.java:392)
at zombie.GameWindow.init(GameWindow.java:1206)
at zombie.GameWindow.mainThreadInit(GameWindow.java:576)
at zombie.GameWindow.mainThread(GameWindow.java:489)
at java.base/java.lang.Thread.run(Unknown Source)
`
vegan food user 2 Jun @ 8:24pm 
`Callframe at: error
function: __call -- file: Logger.lua line # 37 | MOD: Starlit Library
function: Traits.lua -- file: Traits.lua line # 20 | MOD: Starlit Library
se.krka.kahlua.vm.KahluaException: [Starlit Library] [Error] Unable to get trait metatable. Sandbox options affecting traits will not work. See previous messages for info.
at se.krka.kahlua.stdlib.BaseLib.error(BaseLib.java:292)
at se.krka.kahlua.stdlib.BaseLib.call(BaseLib.java:120)
at se.krka.kahlua.vm.KahluaThread.callJava(KahluaThread.java:182)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:1007)
at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:163)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1980)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1782)
vegan food user 2 Jun @ 8:24pm 
hi so I've been getting this weird error nearly everytime I boot up my game and start playing it which is kinda weird, I suppose I have quite some lot of trait mods that possibly may have caused this but I just have a question, should I ignore this? it only happens on game startup and never again. but I'm afraid it might conflict with the trait mods.

(gotta make post 2 messages, error screen too big)
Tank5168 27 May @ 9:09am 
@albion OK
albion  [author] 27 May @ 4:55am 
the second error is caused by Dynamic Backpack Upgrades (B42) unfortunately you'll have to report it to them
the first error seems straight up impossible, if it's not happening regularly just ignore it
Tank5168 26 May @ 10:22pm 
function: render -- file: ToolTipInvOverride.lua line # 29 | MOD: Dynamic Backpack Upgrades (B42)
function: render -- file: InventoryUI.lua line # 21 | MOD: Starlit Library

ERROR: General f:198188, t:1748323011417> ExceptionLogger.logException> Exception thrown
java.lang.RuntimeException: Object tried to call nil in render at KahluaUtil.fail(KahluaUtil.java:100).
Tank5168 25 May @ 2:31am 
function: render -- file: InventoryUI.lua line # 82 | MOD: Starlit Library

ERROR: General f:32298, t:1748165418738> ExceptionLogger.logException> Exception thrown
java.lang.reflect.InvocationTargetException at GeneratedMethodAccessor824.invoke(null:-1).
진지사피언스 20 May @ 4:38pm 
error
mard1 27 Mar @ 5:01am 
@Mitchel Vories: I had same issue. After albion's hint I removed Capacity Limit Bypass (part of Customizable Containers) changes from "zombie" directory and all errors disappeared.
albion  [author] 26 Mar @ 6:48pm 
the cause is almost certainly a java mod (any mod that requires manual installation is probably a java mod) that modifies the item class, it's outdated for 42.6.0 and would cause this error even without my mod (or literally any lua mod) enabled
albion  [author] 26 Mar @ 6:28pm 
thanks, i spoke with chuck about it and my mod doesn't appear in every error he's been sent so it's probably not on my end but another mod's
Cushy 13 Mar @ 10:20pm 
Wrong thread, sorry.
Meant to post in Named Literature.
Thanks for the quick response, though.
albion  [author] 13 Mar @ 9:02pm 
no, are you sure it's this mod causing it? i can't see how it could possibly be related
Cushy 13 Mar @ 8:57pm 
Reading a book reduces Stress to 0 and not the stated value.
Is this normal?
albion  [author] 25 Feb @ 1:29pm 
this error is harmless, as the library detects it and fails safely, just disabling the module that errored (which isn't actually used by any mod yet). unfortunately this is caused by other mods being poorly written, there may be more information in your log pointing to which mod is causing the issue. however for now there is no reason to disable the mod because of it
CS7 25 Feb @ 11:20am 
Had to disable the mod.
Callframe at: error
function: __call -- file: Logger.lua line # 37 | MOD: Starlit Library
function: Traits.lua -- file: Traits.lua line # 20 | MOD: Starlit Library
se.krka.kahlua.vm.KahluaException: [Starlit Library] [Error] Unable to get trait metatable. Sandbox options affecting traits will not work.
Si-Cafe 21 Feb @ 10:15pm 
The issue of the tooltip box extending too far to the right was resolved by disabling ”Show mod info in item tooltip” in the UI tab of vanilla options. Was that extra lines causing the problem...?
Si-Cafe 21 Feb @ 6:12pm 
It would be great to be able to insert or replace elements.
albion  [author] 21 Feb @ 10:59am 
yeah, for some reason adding a key/value item after a label causes this: i can't work out any code reason for it but i think it's a bug with the vanilla tooltip rendering code (they just don't do this so it's not apparent)

i'm adding api to move tooltip elements around, so you can place your key/value above the label and the issue won't occur (i imagine this is probably where you'd want it to be anyway)
albion  [author] 21 Feb @ 12:51am 
that's very strange, nothing like that happens to me - i'll take a closer look tomorrow. the item script tooltip could indeed be related since none of my test items had one
Si-Cafe 21 Feb @ 12:38am 
Here is the reference image. https://imgur.com/a/ue2M3K6
Changing the tooltip text size in the options does not seem to make a difference.
Si-Cafe 20 Feb @ 10:44pm 
Thanks for the update. It's now right-justified just like I hoped.
However, there's now also some extra space on the right side of the box.
It's extending further to the right than necessary. Could this be because of the tooltip coming from the item script?
Alabeo 20 Feb @ 11:24am 
Many thanks for that <3
albion  [author] 20 Feb @ 10:33am 
42-1.4.2
- Reverted to older tooltip code for containers only, as they have special handling that the new code didn't account for.
-- This means the improvements in the previous update won't apply to them anymore. This will be fixed in a future patch.
albion  [author] 20 Feb @ 10:18am 
thanks for the reports, will patch this in a second
Alabeo 20 Feb @ 10:01am 
Same issue as @Fatty

Cannot look into bags anymore after hovering on them.
Horhyzon 20 Feb @ 3:05am 
Same issue as Fatty. I lost the UI feature that shows container contents when you hover over the inventory with your mouse. I went through all my mods to find which one was causing the issue. I narrowed it down to this one. Removing it allows my inventory UI to display correctly.
Fatty 20 Feb @ 2:19am 
i think the newest update broke the tooltip when you mouse over bags as it doesnt show the contents within bag in tooltip anymore
albion  [author] 19 Feb @ 10:57pm 
there isn't any code on this line in the latest version of the mod, please update and let me know if the issue continues
Kitiket 19 Feb @ 10:31pm 
Hi! Most of the hints on subjects don't work. Including on basic subjects, errors pour in endlessly.

function: DoTooltip -- file: InventoryUI.lua line # 18 | MOD: Starlit Library
function: DoTooltip -- file: InventoryUI.lua line # 18 | MOD: Starlit Library
function: render -- file: ISToolTipInv.lua line # 78 | Vanilla
function: render -- file: BusinessCardsToolTip.lua line # 340 | MOD: Business Cards
function: render -- file: CWTitleVehicleUITooltip.lua line # 193 | MOD: CarWanna
function: render -- file: Skill Recovery Journal Tooltip.lua line # 297 | MOD: Skill Recovery Journal
function: render -- file: InventoryUI.lua line # 27 | MOD: Starlit Library
albion  [author] 19 Feb @ 12:41pm 
42-1.4.1
- Added InventoryUI.removeTooltipElement for removing existing tooltip elements.
- Fixed the modded section of a tooltip using a separate key/value width from the vanilla section.
- Fixed an occasional error when using the Transfer Fluid menu.
- General performance improvements to the InventoryUI module.
albion  [author] 19 Feb @ 11:33am 
@Ratamus just tested, progress bars are working fine for me - if you're *only* adding a progress bar the bar will be one pixel wide, this is fixed in the next patch (the game decides the length of values by the longest tooltip element but currently vanilla ones aren't counted)
thanks for the bug report, i've fixed it in my local build

@Si-Cafe i've fixed both issues with modded tooltips being too short and vanilla tooltips being too long, expect a patch soon: and i can confirm you will not need to change anything about your code

@Professor Futura while fixing the bugs i mention above, i'm pretty sure i did find a way to remove vanilla tooltip elements
Ratamus 19 Feb @ 11:17am 
@albion there might be an issue when using the transfer fluids menu.

When transferring liquid between two bottle pushing the slider all the way towards one side can throw an error from line 25 in your InventoryUI.lua
Ratamus 18 Feb @ 11:55pm 
Are progress bars for tooltips just borked? Can't seem to get the actual bar to fill
Si-Cafe 15 Feb @ 3:56am 
Thank you. That's good to know.
albion  [author] 15 Feb @ 2:06am 
it is actually meant to be right justified, but currently it ignores the vanilla parts of the tooltip, so it can be much further to the left than it should (and conversely if yours is longer than the vanilla tooltip the vanilla elements will be too far to the left): that's something i'm hopeful can be fixed, and if it is fixed, you probably won't need to make any changes to your code
Si-Cafe 15 Feb @ 1:59am 
By the way, are there any plans to implement the function to right-justify the value?
albion  [author] 15 Feb @ 1:45am 
thanks! i repeatedly thought to myself while writing that yesterday 'i should really test this code to be 100% sure' and still didn't LOL
Si-Cafe 15 Feb @ 12:45am 
In the Github Wiki, the last line of Examples on Inventory UI page, the first letter of onFillItemTooltip is written in capital letters.
I just copied and pasted this example and started writing my code, but I kept getting errors and spent over an hour trying to figure out what was wrong. This is not meant as a complaint, just a report. Thank you for this mod and wiki.
albion  [author] 13 Feb @ 12:11pm 
sorry, no - there's just no way to get into there from lua. i'm considering rewriting tooltips entirely to get around that (you're far from the first person to ask) but the maintenance cost may just be too heavy
Professor Futura 13 Feb @ 12:08pm 
Can this library also be used to remove vanilla tooltip entries? Specifically I am looking for a way to remove the debug info that was added to item descriptions in B42.
BossOfCats 28 Jan @ 5:32pm 
I'm having trouble with the mod prerequisites, in which starlitlibrary is, and i cannot figure out why. Is this something on my end, or is it some other thing?
albion  [author] 27 Jan @ 3:16pm 
update on that: today i got around to expanding the tooltip api and yes, it is very easy, there will be a function for it in the next update, though it can already be done quite similarly to the existing keyvalue example (which itself will have a function to simplify it next update)
albion  [author] 26 Jan @ 9:33am 
i'd expect it to be possible ,and probably even easy, but i haven't had to try it before
MonkeyShark 26 Jan @ 3:45am 
Are sliders for the custom tooltips possible at all, or have you just not gone through the effort to try to do it? (completely understandable, just curious)
albion  [author] 22 Jan @ 2:45pm 
what makes you think this is related to this mod? that's a vanilla file mentioned in the warning, and nothing in this mod interacts with it in any way