Garry's Mod

Garry's Mod

4,064 ratings
Amnesia Lantern Rework
3
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Weapon, Effects, Model
Addon Tags: Fun, Movie, Roleplay, Realism
Tags: misc, coop
File Size
Posted
Updated
3.318 MB
Feb 5, 2018 @ 2:55pm
Feb 21, 2018 @ 1:49am
8 Change Notes ( view )

Subscribe to download
Amnesia Lantern Rework

Description
A complete rework (from the ground up) of my original Amnesia: TDD Lantern Swep. This is an incredible improvement over my old mod, and I think it shows well just how much passion and willingness to keep trying and improve can affect someone's work. I barely could work with Lua, much less even edit a model back when I released that addon. Now look how much that thing has changed. I think this serves an awesome lesson that people should keep trying the things they like, no matter how much other people say that your work is terrible. It's only a matter of time until you get get the hang of it, and I'm sure you'll be able to release something really cool.

Comes with 2 weapons (placed in the Lantern Category of your Q Menu). You have the choice between a lantern which works forever, or a lantern that runs on Oil (which can be spawned via the entities tab, Lantern Catergory, in your Q menu). The oil lasts up to 5 minutes, and each jar increases your current oil by 75 seconds (Not going over). These settings can be easily changed by decompiling the .gma and editing the lua of the swep and entity.

You spawn with no oil, and upon equipping the lantern, you must left click to raise it.

Controls
- Left Click to Raise/Lower the lantern.
- Right click to Enable/Disable the HUD showing the amount of Oil left

Features
- Two lanterns, one that runs on oil and one that runs forever
- Oil entity to fill up the lantern with
- Networked code, for multiplayer use. Works almost perfectly for players with 300+ ping!
- Viewmodel/Worldmodel that glows in the dark.
- Custom viewmodel animations with playermodel based hand support.
- Custom viewmodel movement. Your hand bobs up and down when moving, your model gets closer to your screen when crouching, etc...
- Jigglebones that react to gravity
- Worldmodel with Jigglebones
- Proper thirdperson hold. Your playermodel is actually holding the swep like a lantern.
- HUD scales with screen size.
- No game/addon requirements. Runs straight out of the box.

Credits
- Original Model, textures and sounds taken from Amnesia: The Dark Descent, by Frictional Games
- Everything else by me (coding, animation)

FAQ
Q: No oil :(
A: Spawn it in the Entities->Lantern tab of the Q Menu

Q: No viewmodel/Light :(
A: Try left clicking to raise the lantern. If using the oil version, make sure you have oil.

Q: No HUD/Don't want HUD :(
A: HUD is only for the Oil lantern. Right click to hide/show the hud.

Q: No Father :(
A: Ok.

Q: Where have you been?
A: Dead

Q: Can't pick up objects with E while the lantern is out
A: Yes. It's on purpose. Lower the lantern or holster the swep.

Q: I have FPS issues with the lights
A: Blame whoever runs GMod. It's a problem with Dynamic Lights. If this SWEP causes FPS problems, so will the light tool in Sandbox

Q: Gmod says "Amnesia Lantern Rework is Creating Script Errors"
A: Watch this video.

Q: What playermodel?
A: https://steamcommunity.com/sharedfiles/filedetails/?id=875385709

Q: What map?
A: Video 1 + Screenshots Video 2

Q: Can you please make X
A: No. I'm fine with taking suggestions but don't ask me to make stuff for you. I have my own projects and things to do, and making something for someone I've never met for no incentive whatsoever is not one of them. I am perfectly fine with adding additional content to my current work, however.
Popular Discussions View All (5)
1
Apr 20, 2023 @ 3:30pm
Lantern model not showing up
MGR #FixTF2
1
Apr 9, 2022 @ 11:08pm
Placing the Lantern
Lazlo!!!
0
Feb 10, 2018 @ 11:27am
PINNED: Code and model source
Buu342
270 Comments
ballistic_beanie Jun 16 @ 4:50pm 
it keeps falling out of my hand for some reason
SteemMan 2 🗿 Apr 14 @ 4:47am 
This addon is 6 years old, i don't think the creator is gonna update or change it or read these comments.
SinnerKnight Mar 10 @ 12:30am 
Can you maybe be able to use the lantern on left hand?
Xaviar.smg Mar 1 @ 11:42am 
will you do the flashlight from the bunker next?
The Empire of BRISTIAN Nov 18, 2023 @ 11:12am 
why isn't there any walking animation for the lantern anymore for me? it used to work before
Khaiø Sep 27, 2023 @ 6:43pm 
Found a slight bug:

[Amnesia Lantern Rework] lua/weapons/buu_lantern.lua:381: attempt to call method 'GetLantern_Holstered' (a nil value)
1. v - lua/weapons/buu_lantern.lua:381
2. unknown - lua/includes/modules/hook.lua:96
Jaquavious Aug 29, 2023 @ 6:46pm 
when i have it equipped it just looks like my hand is creating light with no lantern
Mekphen Aug 1, 2023 @ 9:46am 
Also a small advice for the light position:
Currently you do
local ent = v:GetShootPos()
local pos = ent
pos = pos + v:GetForward() * 30
pos = pos + v:GetRight() * 5
pos = pos + v:GetUp() * -20

A better solution would be to do something like
local pos = v:GetBonePosition( v:LookupBone("ValveBiped.Bip01_R_Hand") )

(and from that position you can move it a bit if needed).
The Shooting pos does not move with the player correctly
Mekphen Aug 1, 2023 @ 7:53am 
I don't think you need to pay attention to players hitboxes when just manipulating finger bones.
Also i did performance test and already with 5 players this was the hook which took most calculation time. A *single* think hook is *one* think hook to much, since there is almost never a valid reason for a think hook, especially not in this case as you use it.
There is no downside in putting this clientside, but i just wanted to mention it for other users, i have edited it on my server files so we don't have that performance impact.
Buu342  [author] Aug 1, 2023 @ 7:26am 
@Mekphen
1) If the manipulation is done clientside only, it won't affect the player hitboxes.
2) A *single* think hook that loops through all players once is not going to cause a significant impact in performance, especially since it will only be called once per server tick.
3) Said loop also tries its best to filter out anyone who is not affected by the bone manipulations (which are a heavy operation), so it won't really be an issue even in a large server, unless literally everyone is using the lantern (and even then, players are likely to be GPU bound because dynamic lights in GMod are shitty shit shit).