Left 4 Dead 2

Left 4 Dead 2

Gnome Magic Turret
65 Comments
kurochama  [author] 18 Jul @ 10:23am 
@君を三年待つ. , afaik, he's no longer active for months. Probably he has retired from L4D2 modding. Well, the upcoming update would be from this mod instead, after I finish checking the latest copilot's version from @Sultan Abu Al Pepsi
君を三年待つ. 18 Jul @ 10:07am 
sw1ft I have given up this MOD maintenance. I went to him in the first half of the year and asked him if he could repair it. He said that four MODS with 2 died on the left side of the maintenance.
L_M 23 May @ 9:53pm 
i see, damn sw1ft really need attention for this mod :(
kurochama  [author] 23 May @ 5:35pm 
@L_M , if it's a bug when picking turrets, I think that comes from the original too, as I didn't modify the turret pickup mechanisms.
L_M 23 May @ 5:18pm 
found another bug

if you place 2 or 3 turret nearby and want take one of em, it will pick both and if you pick up another turret while hold the gnome, it will gone and you just have 2 gnome now
L_M 7 May @ 6:55am 
for my case, the turret suddenly stop if one of them out of ammo and making gnome cant be use and be saved, it possible at official map too
kurochama  [author] 7 May @ 4:32am 
@L_M , I tested just recently in atrium in Dead Center by spawning 3 turrets around the car & let bots do the scavenge slowly, & the 3 turrets worked till the end of finale. I set the turret ammo to 9999 though.
So, probably the could be some conflicts with other mods. Sometimes in custom campaigns with big file size, the turret also stops working. Last time I tested in Cold Front about last year, & the turret stopped working in certain maps. Probably as an alternative, you can also use Sentry Floating Turret if this one stops working in certain custom campaigns.
L_M 6 May @ 6:38pm 
AN ERROR HAS OCCURED [Accessed null instance]

CALLSTACK
*FUNCTION [GetDistance()] scripts/vscripts/lib_utils.nut line [1405]
*FUNCTION [OnUsePress()] scripts/vscripts/turret.nut line [832]
*FUNCTION [CheckButtons()] scripts/vscripts/lib_utils.nut line [2624]
*FUNCTION [ButtonsListener_Think()] scripts/vscripts/lib_utils.nut line [2609]
*FUNCTION [acall()] NATIVE line [-1]
*FUNCTION [OnTickCall()] scripts/vscripts/lib_utils.nut line [2449]

LOCALS
[flDistance] NULL
[bMethod2D] true
[bSquared] true
[hTarget] INSTANCE
[this] INSTANCE
[turret] INSTANCE
[@INDEX@] 0
[flMaxRadiusUseSqr] 8100
[hPlayer] INSTANCE
[this] INSTANCE
[idx] 1
[button_type] 0
[buttons] 32
[button] INSTANCE
[hPlayer] INSTANCE
[this] INSTANCE
[button] INSTANCE
[@INDEX@] 1
[team] 1
[hPlayer] INSTANCE
[this] INSTANCE
0
[max] NULL
[min] NULL
[CurrentValue] NULL
[NewValue] NULL
[bProhibitChangeHook] NULL
[bException] false
[this] TABLE
L_M 6 May @ 4:39pm 
try like 2 or 3 turret near out of ammo when you hold gnome, when one of it done and yeah cant deploy anymore

and sometimes another turret didnt run anymore
kurochama  [author] 6 May @ 12:45pm 
@L_M , last time I tested was when I fixed the bug where gnome said goodbye suddenly after deploying the turret. Usually I only spawned one turret as it's already OP enough to wipe almost all common out. I'll try to check multiple turret spawns later.
L_M 6 May @ 9:36am 
idk its bug or no

when you already deploy the turret and out of ammo(im try deploy 2 turret), the gnome you hold cant be deploy anymore

even you try save at virtual inven, it still cant until end chapter
KauaFelipe 11 Apr @ 7:48pm 
@kurochama. Yeah, I wanted to change several things about the status, such as the angle, the distance, the dmg, among others, but apparently the file doesn't allow me to modify it. Anyway, thanks for your attention and help <3.
kurochama  [author] 11 Apr @ 9:06am 
@KauaFelipe , which weapon stat? If it's the damage, there's no need to modify as it's already available on the cfg file. For the keys to pick/ store gnome, you can try to check other script file. Look for "player_jump" & "entity_shoved". I think there's something like "GetButtonPressed" there.
KauaFelipe 11 Apr @ 5:58am 
@kurochama, I managed to modify the file, thanks ;). But would there also be a way to change the weapon's status? I tried, but it doesn't change. And is there also a way to change the keybind?
kurochama  [author] 10 Apr @ 1:34pm 
@KauaFelipe , you can try to open the ".nut" file in the vpk file with "Notepad++". & if you just want to change the sniper turret to m60 turret, just look for the military sniper model on the script file & change it to m60 model.
KauaFelipe 9 Apr @ 7:33pm 
@kurochama. But if you don't make the modification, could you give me any tips on how to do this? I don't know anything about modifying scripts XD
KauaFelipe 8 Apr @ 5:37pm 
@kurochama, the original version uses the M60 to place the turret, so it is not standalone.
KauaFelipe 8 Apr @ 11:37am 
Can you make the original mod https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1972318220 a standalone version? or use the gnome to spawn the sentry?
kurochama  [author] 8 Apr @ 11:24am 
@KauaFelipe , isn't the original version already a standalone version? It can be used immediately just after subscribing, without any required items. The only differences from this mod are the changes on the item to trigger the turret (this one is by using gnome), the skin model of the turret (this one uses military sniper), & an additional cfg file.
kurochama  [author] 4 Mar @ 6:49pm 
@L_M , incendiary ammo pack spawns randomly in each map, & I think incendiary pack has higher chance to spawn than explosive pack. You can combine with "Lil Gnome Warrior" if you want gnome to spawn more frequently, by converting the medical cabinets to a special gnome.
L_M 4 Mar @ 6:03pm 
looks like the rate of spawn gnome is bug(?), i still can found incen ammo and gnome like nowhere to see
Unsants 15 Jan @ 8:25pm 
And maybe you could make it a little less complicated with the combination of the keys?
The original mod was not in this way somewhat complicated or good at least for me, perhaps an option could be added on the gnome's turret to prefer to simply carry the gnome for a while in your hands to reload it where you edit the ammo and damage, and a message that it is being reloaded would be fine, that is, it would be like a simpler option to recharge it and if you want you can increase the recharge time.
But well, it's your decision, I think it's better for me to keep the original.
kurochama  [author] 15 Jan @ 8:05pm 
@Gumbs , it's the point no. 8 on the description. Picking gnome on the ground won't refill ammo. You'll need to store it to virtual inventory & pick it up again. If the gnome is stored to virtual inventory, the ammo will be refilled to max instantly.
Unsants 15 Jan @ 7:55pm 
So, as I understand it, if I find a gnome and put it on the ground, that message pops up for me, because I first had to keep it in the virtual inventory for a while and then I have to use it? Since the gnome comes without ammo?
kurochama  [author] 15 Jan @ 7:40pm 
@Yek , that usually happens only when ammo runs out. If you use it for long time without storing to virtual inventory to refill ammo, the gnome will say like that & disappear.
Unsants 15 Jan @ 7:40pm 
I put it on the floor and the same thing appears to me
Jugs 15 Jan @ 6:46pm 
He tells me that my mission to protect you is over without even using the gnome I don't understand
L_M 13 Jan @ 9:36pm 
maybe make it local/personal notification, like just that player that get notification and tellin if you want to turn off the notif chat !(anything)

its help for any player that hoster use this mod
kurochama  [author] 13 Jan @ 8:42pm 
@K_N , actually it's possible to put a notification with timer like that, but not all people will like that. It's also possible to make a feature so it can be turned on/ off. But probably instead of a timer, combo buttons would be more flexible to use.
L_M 13 Jan @ 7:22pm 
nice, already try it and workly fine. thx

for suggestion
maybe you can put notification at chat every 1 minute for reminding that player have gnome that ready to deploy at virtual inventory
kurochama  [author] 13 Jan @ 3:38pm 
@K_N , yes. Road, wall, anything around that can be shoved & produce sounds when shoved.
L_M 13 Jan @ 3:13pm 
ah i see

but i must shove to any object first right like road?
kurochama  [author] 13 Jan @ 12:55pm 
@K_N , just press E (Use) on the turret & it will transform to a gnome. When holding gnome, press TAB + SHOVE, & the gnome will be stored to virtual inventory.
L_M 13 Jan @ 10:05am 
im tying to making this turret to virtual invent but always fail

so i must press tab + shove and shove nearby turret or can from every distance?
kurochama  [author] 26 Dec, 2024 @ 8:25am 
@JM , one main problem is, when you pick the turret to transform it back as gnome, it spawns a new gnome instead. The mechanisms are like this:
1. Spawn turret = gnome is removed (let's say gnome no.1)
2. Pick turret= turret is removed & a gnome is spawned (gnome no.2, a new gnome).

The same mechanisms are applied to the virtual inventory, but with slight differences of the gnome ammo getting refilled.

There's another way, like registering all of the spawned gnome only in the beginning of the round. This method will make any new gnomes spawned later by picking the turret won't affect the remaining gnome ammo, but once the ammo runs out, you can only pick the registered gnomes to get the turret with full ammo. However, this method will change many scripts.

As for balancing, you can change the ammo & damage via cfg file to make it less OP.
JM 26 Dec, 2024 @ 7:27am 
@kurochama, I'm aware of ammo refilling mechanic, but let's say for the sake of game balancing (as well as the whole gameplay style.), it's basically treated as temporary power-up like adrenaline, where the only way to "refill" its ammo pool is finding a new one.

Because trust me, being able to keep what's essentially another teammate that can't pinned down by specials, is also perfect aimbot as long as you want can make the game a complete walk in the park and just makes you question why you need your actual teammates in the first place.

and that's not even mentioning its untapped potential for dead-stopping chargers charging, tf2 style, stunning tanks and witches (basically forcing them to climb over it if placed right.) or just straight up preventing horde coming to you through that small door-frame thanks to your well placed turret at the entrance.
kurochama  [author] 26 Dec, 2024 @ 6:48am 
@JM , normally it should be possible by detecting the entity index (each object/ entity has different entity indexes even if there are 2 same entities, like 2 gnomes). But it might take more work to modify the existing scripts. Actually you can refill gnome ammo by storing the gnome to the virtual inventory, so you can use this method instead to refill gnome ammo.
JM 26 Dec, 2024 @ 6:35am 
not sure if it's too much work since I'm new at modding but is it possible to make it so that gnomes freshly spawned on the map starts with full ammo without having to dependent on previously used gnome turrets ammo pool?
sanj_x 13 Aug, 2024 @ 1:03am 
:steamthumbsup:
kurochama  [author] 2 Mar, 2024 @ 4:27am 
@Narco , probably some other mods with lots of cvars caused the steam validation rejected in your case.

As for the turret attack range, yeah, you can also change that manually. There's also fire rate setting near that one. The value is 0.2 if I'm not mistaken. You can reduce it to 0.1 if you want faster fire rate (the minimum value is 0.03, I think, as scripts can't go faster than that).
Narco 2 Mar, 2024 @ 3:00am 
@Kurochama Ive contacted Everice about the compability issue, ive been informed that when the game is overloaded with custom-cvars the game kicks you out with steam validation fail

Yes deffinetly make it 3x melee range, as of now the turret autosniper ANYTHING that moves ANYWHERE and it gets annoying

Also ive myself altered the values in turret.nut and there is a "range" setting you set to 16666, setting this one alone worked for me
kurochama  [author] 1 Mar, 2024 @ 7:02pm 
@Narco , I'm not sure about which one triggered the "steam validation failed", this or super tanks. There haven't been many changes since the older version, as I only added one new feature about turret ammo.

As for a feature to edit range, I can add it, but I'll need to set the minimum range too so the turret won't become a joke/ prank (imagine if the shooting range is just about meler range or narrower than that, turret would become just a decoration). Probably higher than 200 (3x melee range), as range lower than that would make turret less effective than flamethrower.
Narco 1 Mar, 2024 @ 6:42pm 
Im getting "STEAM validation failed" when combined with Super Tanks addon, seemingly breaking the whole game
Narco 1 Mar, 2024 @ 9:53am 
Maybe the option to change range would be neat too, making it infinite makes it pretty overkill even after turning its dmg down and demolitionist off, maybe a range of 5-10 meters to make it more of a area denial than a random zombie shooter, now thats a prank.
kurochama  [author] 1 Mar, 2024 @ 7:09am 
@Narco , I added "Gnome Turret Ammo Base" in the cfg file. You can now change max ammo with this feature. The changes on cfg file are loaded when starting a round & also when putting gnome to virtual inventory. As for the fire rate, probably I'll add it next time on the next update, after some tests & I also need to add a minimum value to fire rate, to prevent bug when setting the value too low.
Narco 28 Feb, 2024 @ 3:54pm 
I want to be able to set the turrets ammo, ive gone trough and set the fire rate myself (you maybe could add that into cfg too) but ammo seems to be mysterious, ive wanted to make a turret with 500 ammo that deals mere 5 damage per 0.1 secs, wich makes it great for a backbuddy to cover you from commons, while also makes it useless against specials
kurochama  [author] 28 Feb, 2024 @ 2:18pm 
@Narco , do you want to reduce the max ammo via cfg file? Ammo values here are a bit tricky compared to the original turret. I can add it, but it might take some time to test it several times first.
Narco 28 Feb, 2024 @ 1:06pm 
Could you also be able to put "turret ammo" in your cfg too? As ive to re-write the values and i cannot get the ammo to coordinate itself at all
I STAPLE TAPEWORMS ON MY 24 Feb, 2024 @ 11:54am 
awesome mod
kurochama  [author] 19 Feb, 2024 @ 5:30pm 
@KittyKatMaeve , I added "Gnome Turret Damage" feature on the new version. So, now you can set your own desired turret damage, like, if you don't like a too strong turret, you can reduce the damage to only 20 or even lower.