Project Zomboid

Project Zomboid

[B42] Lantern Fix
89 条留言
NamelessDude77  [作者] 10 月 26 日 上午 5:27 
@Don (PYR0) Maverick I'll add some configuration options, so you can adjust radius, color, enable flashlight etc
Don (PYR0) Maverick 10 月 26 日 上午 2:00 
Massive win! Now if you could also fix Flashlight poles that would be everything I needed. If you don't know the issue with flashlight poles the Heavy Flashlight is glitched and only gives you 15 tiles like the normal one. I love lanterns for smaller rooms but I need something with more range in my main room (Living under the school in Rosewood, Week One mod OP). Maybe if you work on the flashlight fix you could also find a way to make lantern poles? :3 Even if you can't/don't want to fix that you get 10/10 for this, thank you!
NamelessDude77  [作者] 10 月 16 日 下午 12:42 
@无聊的栀子 I'm adding this in my TODO for next update
无聊的栀子 10 月 16 日 上午 11:02 
Could you please add localized text support for the right-click context menu? Thank you very much!
NamelessDude77  [作者] 10 月 14 日 下午 8:27 
@DocPeabody Yes, you can enable/disable it at any time. Looks like the mod is disabled or didn't load properly, the option should just show up in the context menu as the first option if you clicked close to a lantern. To make sure it's not a conflict with other mods, you can create a new game and enable only this mod, use debug mode to give yourself a lantern and see if it works.
DocPeabody 10 月 14 日 下午 7:58 
The context menu for me does not appear when I right-click on the lantern after placing it on the ground. Is this mod able to be added during a save? or is this a different issue.

Again, I place the lantern, whether hurricane or propane, and get no option to light it like in the screenshot.
Vrael 10 月 13 日 下午 9:44 
I third the candle idea! This mod is perfect, but candles would take it to another level!
Shiro 10 月 8 日 下午 4:13 
I second the candle idea, I have been searching for a similar mod for years now, we absolutely need a non-electric light source in B42, and what better candidate than the humble candle
Rhinehart666 9 月 28 日 下午 5:24 
Thanks, this is so helpful, I'm surprised there aren't more mods for placeable, non-electric lighting. Candles would also be super useful since they're easier to replace late game than fuel.
NamelessDude77  [作者] 8 月 25 日 下午 4:46 
@Harry there's a chance for candles to made it into the mod, not sure about flashlights and glow sticks though. If you can't find one, maybe you could try crafting an improvised lantern.
Harry 8 月 25 日 下午 4:01 
any chance of doing the same with flash lights, glow sticks and candles? I tried looking for one and can't find any. also i cant wait to find a lantern in my game!
Nu_man 8 月 8 日 下午 7:18 
they won't add MP but they'll add a lantern you can't have lit on the ground. already insane you can't be holding a torch and drop that while its on, thank you for making the game what it should be in this area.
NamelessDude77  [作者] 8 月 6 日 上午 8:12 
@pimatstudio the workaround used to turn the lanterns on is spawning a light object at the same square the lantern is, same with the propane lantern sound. On the other hand, walkie-talkies are always carried with the player, so I don't think there are any similarities you could use. I don't understand walkie-talkies code, but if I could guess, I'd first try making the radio stay on when unequipping and then keep the "Device Options" in the menu when unequipped, but I think you have already tried those :P
pimatstudio 8 月 6 日 上午 4:41 
@NamelessDude77
Hey, would you also be able to make a walkie-talkie work while holstered by the belt for example? I've been wondering if it's even possible, and since your mod does something similar, maybe you've got an answer to that? I was trying to find any possible way to do that but to no avail so far.
NamelessDude77  [作者] 8 月 5 日 下午 3:05 
@skylars8311 yes
skylars8311 8 月 5 日 下午 2:54 
can this be added and used mid save?
The 8th Victim 8 月 5 日 下午 2:17 
Thx !
NamelessDude77  [作者] 8 月 5 日 下午 1:20 
Fixed the rest.

@Migs thanks! :D

@Gimbo I'm considering it, but right now I don't have time
Gimbo 8 月 5 日 下午 1:16 
dude thanks a lot........your mod is essential, can i ask if u were thinking to make similar for candles?
Migs 8 月 5 日 下午 12:03 
Thank you for updating the mod, may your pillow always be cozy and cold on both sides :lunar2025snakeinablanket:
Bulletmagnet 8 月 5 日 上午 8:36 
Was literally about to post the same error. Thanks for the quick response!
NamelessDude77  [作者] 8 月 5 日 上午 7:16 
@Calamity I don't think so.
NamelessDude77  [作者] 8 月 5 日 上午 7:12 
Should be fixed now. But will make detecting lanterns more difficult, you'll have to right click the same square the lantern is placed for it to show up in menu until I find a better solution.
Phil 8 月 5 日 上午 2:57 
Having this error:

function: findLanterns -- file: LanternFix_main.lua line # 36 | MOD: [B42] Lantern Fix
Callframe at: se.krka.kahlua.integration.expose.MultiLuaJavaInvoker@20f4705b
function: createMenu -- file: ISWorldObjectContextMenu.lua line # 214 | Vanilla
function: createMenu -- file: ISMenuContextWorld.lua line # 50 | Vanilla
function: createWorldMenu -- file: ISContextManager.lua line # 28 | Vanilla
function: doRClick -- file: ISObjectClickHandler.lua line # 63 | Vanilla
function: onObjectRightMouseButtonUp -- file: ISObjectClickHandler.lua line # 428 | Vanilla
Ziodyne967 8 月 4 日 下午 9:29 
Dang, I just tried it with the mod off. Can't turn the lantern on while it's unequipped and on the ground again. I liked using lanterns when I have to go out camping on the side of the road, so this mod was really good. At least I dont get errors every time I right-click now. Just gotta wait until all the mods update, as usual.
Ziodyne967 8 月 4 日 下午 9:24 
huh, there appears to be an issue with the mod. Did the devs integrate this into the main game like they did with resizing map symbols? Either way, every time I right click, the game gives me an error.
Calamity 8 月 4 日 下午 8:36 
is this compatible with lantern mods?
卷毛Jed 8 月 4 日 下午 6:14 
Additionally, this issue occurs with other actions as well, not just this mod, and it may have been caused by the latest update.
卷毛Jed 8 月 4 日 下午 6:12 
Thank you for your reply. Right-clicking the “Cigarette” on my character to “Smoke” will trigger the error. The error message is as follows:[B42] Lantern Fix Error:
function: findLanterns -- LanternFix_main.lua line 36
Triggered by: Right-clicking a world object
Error: Object tried to call nil
NamelessDude77  [作者] 8 月 4 日 下午 5:46 
@卷毛Jed does right clicking in the inventory trigger the error? I'm still unable to reproduce this. I'll see if the code used in that function has changed tomorrow, I'm very tired now.
卷毛Jed 8 月 4 日 下午 4:55 
After the newest Project Zomboid B42 patch, smoking a cigarette triggers a Lua error related to [B42] Lantern Fix. When I right‑click to smoke, the error pops up: function: findLanterns -- file: LanternFix_main.lua line #36 | java.lang.RuntimeException: Object tried to call nil in findLanterns. Game version: B42 latest patch. Other mods: [list here or “None besides Lantern Fix”]. Hope this helps identify the issue.
NamelessDude77  [作者] 8 月 4 日 下午 4:45 
@Codemonkey3 just checked it, but no issues on my side with my current set of mods. You can post your stack trace in the bugs discussion so I can see what it could be.
Codemonkey3 8 月 4 日 下午 3:52 
There appears to be some sort of conflict with the newest patch. Right clicking the ground creates a lua error regarding it.
MrFrenglitch 7 月 29 日 下午 7:41 
Thanks for the fix @NamelessDude77

I had the same issue where errors would pop when trying to pick stuff on the ground. I had the deactivate and reactivate each mod one by one and figured out the errors popped only when the lantern fix mod was enabled. So I came here and read your comment and it worked! No more errors. Thanks.
NamelessDude77  [作者] 7 月 27 日 上午 7:22 
@Smurf∞¸.•'¯) The place option will turn off your lantern, it's a known modding limitation, there's no way to hook into manually placed objects, so there's nothing I can do about it, unfortunately. It should work when using the drop function while you hold them, though. If it still doesn't work, tell me how are you doing it and I'll see what I can do.
Smurf∞¸.•'¯) 7 月 27 日 上午 6:42 
i try place or drop the lantern but it won't lit up , only hold on hand it lit
Smurf∞¸.•'¯) 7 月 24 日 下午 9:36 
can u make more light item such as candle and etc can be place on the world instead of holding them
Cosmo 7 月 21 日 下午 3:30 
@NamelessDude77 you my hero no errors and auto logging mod work without error too
Cosmo 7 月 21 日 下午 3:24 
@NamelessDude77 let me check
NamelessDude77  [作者] 7 月 21 日 下午 3:22 
@Cosmo Try loading Bodily Functions after Lantern Fix, it should fix your issue.
FusionPhoenix 7 月 21 日 上午 11:57 
i have tons of candles and there are mods to make more. Can you make this work with candles too? it would allow me to save generator fuel and also it would make a good early game alternative to adding batteries to lamps
Cosmo 7 月 20 日 下午 3:12 
at zombie.gameStates.IngameState.update(IngameState.java:1464)
at zombie.gameStates.GameStateMachine.update(GameStateMachine.java:87)
at zombie.GameWindow.logic(GameWindow.java:382)
at zombie.GameWindow.frameStep(GameWindow.java:916)
at zombie.GameWindow.mainThreadStep(GameWindow.java:642)
at zombie.MainThread.mainLoop(MainThread.java:76)
at java.base/java.lang.Thread.run(Unknown Source)
`
Cosmo 7 月 20 日 下午 3:12 
at zombie.MovingObjectUpdateSchedulerUpdateBucket.update(MovingObjectUpdateSchedulerUpdateBucket.java:71)
at zombie.MovingObjectUpdateScheduler.update(MovingObjectUpdateScheduler.java:158)
at zombie.iso.IsoCell.ProcessObjects(IsoCell.java:3054)
at zombie.iso.IsoCell.updateInternal(IsoCell.java:5959)
at zombie.iso.IsoCell.update(IsoCell.java:5892)
at zombie.iso.IsoWorld.updateWorld(IsoWorld.java:4197)
at zombie.iso.IsoWorld.updateInternal(IsoWorld.java:4317)
at zombie.iso.IsoWorld.update(IsoWorld.java:4231)
at zombie.gameStates.IngameState.updateInternal(IngameState.java:1699)
Cosmo 7 月 20 日 下午 3:12 
at se.krka.kahlua.vm.KahluaUtil.fail(KahluaUtil.java:100)
at se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:954)
at se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:173)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1963)
at se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1760)
at se.krka.kahlua.integration.LuaCaller.pcall(LuaCaller.java:85)
at zombie.characters.CharacterTimedActions.LuaTimedActionNew.perform(LuaTimedActionNew.java:143)
at zombie.characters.IsoGameCharacter.updateInternal(IsoGameCharacter.java:10617)
at zombie.characters.IsoGameCharacter.update(IsoGameCharacter.java:10255)
at zombie.characters.IsoPlayer.updateInternal1(IsoPlayer.java:2287)
at zombie.characters.IsoPlayer.update(IsoPlayer.java:2266)
Cosmo 7 月 20 日 下午 3:11 
Hey @NamelessDude77 dont know why but "Auto logging mode" when u trying to auto gather logs and u have lantern in your inventory generate errors preventing "Auto logging mode" form working. Honestly, I don't know what the connection is here, but if you can, look at the building.

`function: transferItem -- file: BodilyFunctions.lua line # 1235 | MOD: Bodily Functions (0.12.3)
function: transferItem -- file: LanternFix_actions.lua line # 221 | MOD: [B42] Lantern Fix
function: transferItem -- file: TMRadio.lua line # 1096 | MOD: True Music Radio
function: perform -- file: ISGrabItemAction.lua line # 105 | Vanilla
java.lang.RuntimeException: Object tried to call nil in transferItem
Agent 34 7 月 10 日 上午 10:15 
Could u do this with candles as well?
Space Donuts 7 月 4 日 下午 4:08 
Do you think it is possible to add the bulb/lamp glow? sometimes i forget my lamp since it blends to the grass lol.
NamelessDude77  [作者] 7 月 2 日 上午 11:21 
@Zergyt Are you sure you didn't forget to disable invisible cheat in debug mode? Pressing N in debug mode also toggles invisible which disables/enables sounds.
Zergyt 7 月 2 日 上午 11:09 
This mod breaks sounds. Any sound of walking, actions, and other things is lost.
NamelessDude77  [作者] 7 月 2 日 上午 8:03 
@Zarigani-san good catch, these tiles could work like a placeable objects, but I think you wouldn't be able to hold them as a 3D object. Well, I think it's better than nothing, I might look into adding them as a separate mod, just need some time, coz I'm busy right now.

@RunYouCleverBoy yeah, I don't think I can change the colors of lit lanterns in your hands. I could, however, add options to change the color of placed lanterns, so you can try and match with the default color.