Code Monkey home page Code Monkey logo

Comments (29)

smilz0 avatar smilz0 commented on July 23, 2024 1

Ok got it. Sounds like a typical case of "not worth bother, better rollback" to me.
Well... RIP Dark Messiah.

from left4bots.

smilz0 avatar smilz0 commented on July 23, 2024 1

After seeing how to replicate the issue i realized that the fix was easier than rolling back the change to all my addons, so here we go:
smilz0/Left4Lib@7c4044a
Hopefully it works for everyone this time.
Let me know.

from left4bots.

LilLovebird avatar LilLovebird commented on July 23, 2024 1

Commands/bots using chat not working
Console log:
console_log.txt
I opened the game and started a singleplayer campaign on Dead Center
Mods installed: Left 4 Bots 2, Left 4 Bots, Bots T3, NavFixes, Left 4 Lib, Detailed Pipebomb with Animated Lightbulb, Informal Skyboxes, Cinematic Lighting Effects, Remove Explosion Flash, Improved Blood Textures

from left4bots.

noahsamaX avatar noahsamaX commented on July 23, 2024 1

I tested the parish. In chapter 1, bots warp worked correctly but in chapter 2, it didn't work correctly at all.
Here is console log.
console log.txt

from left4bots.

smilz0 avatar smilz0 commented on July 23, 2024 1

@LilLovebird i think i found the problem. Apperently there is a bug that only happens when you play in single player mode and you are not yet in the admins.txt file. I will fix it, in the meantime you can solve by starting a local host lobby (even private), that will add you to the admins.txt file and you will notice that the commands work. After loading the map you can even quit and start single player, that should work too.

from left4bots.

LilLovebird avatar LilLovebird commented on July 23, 2024 1

@smilz0 There was some progress. I started a Play with Friends server hosted locally and I did get a response to the commands, but the bots didn't do anything.
`
[L4L][DEBUG] HooksHub.InterceptChat - speaker: LilLovebird #FixTF2 - text: ellis lead

[L4L][DEBUG] HooksHub.InterceptChat - ret: true

LilLovebird #FixTF2 : ellis lead
`
Edit: After leaving that server and starting Singleplayer like I was doing before, I got a message in chat saying I joined as an admin and everything works as intended.

from left4bots.

4512369781 avatar 4512369781 commented on July 23, 2024 1

@smilz0
find one issue, should reset SecondRun to false after set hooks, otherwise if the round restart, "HooksHub.Init()" will run twice.

from left4bots.

smilz0 avatar smilz0 commented on July 23, 2024 1

@smilz0 find one issue, should reset SecondRun to false after set hooks, otherwise if the round restart, "HooksHub.Init()" will run twice.

Done. I also added a check 5 seconds after round_start to see if hooks are ok.

from left4bots.

smilz0 avatar smilz0 commented on July 23, 2024

How do you reproduce the issue? I've never had this issue with L4B2, no matter what.

from left4bots.

4512369781 avatar 4512369781 commented on July 23, 2024

So am I, also never had this problem either l4b1 or l4b2.
but my mod had this problem before, it took me a lot of time to figure out.

according to report, I thought it might be the same bug, so I manually make HooksHub.Init() only run once when director_base_addon.nut loading. The first map works well, and after transition to next, chat commands not work.

from left4bots.

smilz0 avatar smilz0 commented on July 23, 2024

director_base_addon is called 2 times per map so, even if for some reason L4L is called before L4B, the second time HooksHub is surely loaded and HooksHub.Init will run. Plus it's called again in the round_start event which, in my logs, it's always called after everything else.
Most reports were for L4B1 which had a vscript error on a Log line into its director_base_addon.nut, the error prevented the hooks to init correctly after a map transition/restart but after commenting the log line there error is gone and now it's always working like L4B2 (at least for me).
We'll see if other people still report the problem or not.

from left4bots.

4512369781 avatar 4512369781 commented on July 23, 2024

after map transition or round restart, every hooks change not applied because round_start event fired too late.
there is a test way:
only call HooksHub.Init() in round_start event twice, if the map is first load, hooks should be work. then transition to next level, and hooks will break, also chat command.

Infact, even has that "Log line error", l4b1 still work fine for me, I really don't know why the loading sort is reversed.

from left4bots.

4512369781 avatar 4512369781 commented on July 23, 2024

That's a good way too.
RIP Dark Messiah.

from left4bots.

RB490 avatar RB490 commented on July 23, 2024

Yay! Appreciate the rollback, i was having this issue since the recent updates a few days back. Looking forward to it

from left4bots.

RB490 avatar RB490 commented on July 23, 2024

After seeing how to replicate the issue i realized that the fix was easier than rolling back the change to all my addons, so here we go: smilz0/Left4Lib@7c4044a Hopefully it works for everyone this time. Let me know.

It's working again :-)

from left4bots.

smilz0 avatar smilz0 commented on July 23, 2024

@LilLovebird @noahsamaX it's likely another vscript addon overwriting the hooks. Can you disable all the vscript addons (excluding l4b1/2 and l4l) and enable one by one to find which ones are doing it?

from left4bots.

4512369781 avatar 4512369781 commented on July 23, 2024

@LilLovebird @noahsamaX it's likely another vscript addon overwriting the hooks. Can you disable all the vscript addons (excluding l4b1/2 and l4l) and enable one by one to find which ones are doing it?

with @LilLovebird 's log, he only use left 4 lib and left 4 bots 2, I can't find any error in the log. Basically it same as my log, not sure why this doesn't work.

from left4bots.

4512369781 avatar 4512369781 commented on July 23, 2024

@LilLovebird @noahsamaX
try this test version, unzip to "\Left 4 Dead 2\left4dead2\addons\workshop" folder, bakcup the same name file first.
left4lib_tryfix.zip

If it still doesn't work, so... rollback.

from left4bots.

LilLovebird avatar LilLovebird commented on July 23, 2024

@smilz0 @4512369781
Still nothing sadly. I disabled all addons except for Left 4 Lib, L4B2, and NavFixes, then tried also disabling NavFixes. Not sure if it'll be relevant but my launch options are:
-novid -high -threads 8 -dxlevel 81 -refresh 240 -mat_queue_mode 2 -cl_disablehtmlmotd 1 -forcenovsync +mat_motion_blur_percent_of_screen_max 0 -useforcedmparms -noforcemaccel -noforcemparms -noforcemspd -nojoy -useallavailablecores -fullscreen -w 1920 -h 1080
Yes I know they're not great I just combined stuff I found

from left4bots.

noahsamaX avatar noahsamaX commented on July 23, 2024

@LilLovebird @noahsamaX try this test version, unzip to "\Left 4 Dead 2\left4dead2\addons\workshop" folder, bakcup the same name file first. left4lib_tryfix.zip

If it still doesn't work, so... rollback.

In my game, it seems that test fix version works correctly. I was able to use bots warp after transition (I tested The Parish) without any turning off other addons.

from left4bots.

4512369781 avatar 4512369781 commented on July 23, 2024

@LilLovebird So before this update, everything was working fine, right?

@noahsamaX Good news.

from left4bots.

4512369781 avatar 4512369781 commented on July 23, 2024

@LilLovebird
I tested your launch options, it does not cause problem for me.
Try this two fix:

Tell me which one works.

from left4bots.

smilz0 avatar smilz0 commented on July 23, 2024

@LilLovebird get the console log when you use the commands and post it here pls.

from left4bots.

LilLovebird avatar LilLovebird commented on July 23, 2024

@4512369781 At this point I feel like it's just my L4D2 that's the issue, neither of those work
@smilz0 Nothing additional shows up in console, just shows the chat message with no response from addons

from left4bots.

4512369781 avatar 4512369781 commented on July 23, 2024

@4512369781 At this point I feel like it's just my L4D2 that's the issue, neither of those work

Are you using the sourcemod plugins? If so, try disabling it, also verify integrity of game files.

from left4bots.

LilLovebird avatar LilLovebird commented on July 23, 2024

@4512369781
I don't know anything about sourcemod plugins so I'd assume not, I've also already verified game files to no avail

from left4bots.

smilz0 avatar smilz0 commented on July 23, 2024

@smilz0 There was some progress. I started a Play with Friends server hosted locally and I did get a response to the commands, but the bots didn't do anything. ` [L4L][DEBUG] HooksHub.InterceptChat - speaker: LilLovebird #FixTF2 - text: ellis lead

[L4L][DEBUG] HooksHub.InterceptChat - ret: true

LilLovebird #FixTF2 : ellis lead ` Edit: After leaving that server and starting Singleplayer like I was doing before, I got a message in chat saying I joined as an admin and everything works as intended.

Yep, in fact the bug wasn't restricted to singleplayer but it affected the first round of multiplayer too.
Btw i think i fixed it, if you want to try it before i release it on workshop you can download this version:
https://github.com/smilz0/Left4Lib/blob/main/out/Left4Lib.vpk

@4512369781 i also made a little change to the loading method. I moved the init back into director_base_addon but this time it will run only once in the second run waiting for other addons (like vslib) to set their hooks. Most addons won't overwrite the hooks if they already set so the loading order doesn't matter. In the case that you have an addon that does overwrite the hooks in the second run you just need to move it before L4L into addonlist.txt and everything should work. Let me know what you think.

from left4bots.

LilLovebird avatar LilLovebird commented on July 23, 2024

@smilz0
Works perfectly! I did notice the bots don't say "Medkit here!" in text chat like in L4B1, but that might be intentional as I reported these issues almost right after installing the mod and had no way to figure it out. Sorry it took so long to get to the issue's details, the only game I've ever (successfully) modded is TF2.

from left4bots.

4512369781 avatar 4512369781 commented on July 23, 2024

Yep, in fact the bug wasn't restricted to singleplayer but it affected the first round of multiplayer too.
Btw i think i fixed it, if you want to try it before i release it on workshop you can download this version:

that's why I does not has this problem, I always use "map xx" to test mod.

@4512369781 i also made a little change to the loading method. I moved the init back into director_base_addon but this time it will run only once in the second run waiting for other addons (like vslib) to set their hooks. Most addons won't overwrite the hooks if they already set so the loading order doesn't matter. In the case that you have an addon that does overwrite the hooks in the second run you just need to move it before L4L into addonlist.txt and everything should work. Let me know what you think.

yeah, this way seems like the old one, but more stable, it works pretty.

from left4bots.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.