SirPlease / L4D2-Competitive-Rework

Just refreshing and optimizing the core files a bit, eh?
GNU General Public License v3.0
248 stars 134 forks source link

Witch and tankifier malfunction ? #375

Closed lunatixxx closed 3 years ago

lunatixxx commented 3 years ago

It does not respect ban ranges in mapinfo but only the cvar value from the server it seems, any help ? It erases missions files too but i guess this one is intended. (spawn_pos_min, spawn_pos_max)

I have all necessary plugins in last versions and theses folders, confogl is installed but i'm not loading any config because i don't need: configs/l4d2lib/mapinfo.txt configs/confogl/mapinfo.txt

Without confogl but with with_and_tankifier installed i have many errors and game does not spawn tank, i don't understand why there is a dependency to confogl in the first place.

L 09/16/2021 - 19:46:21: [SM] Exception reported: Invalid key value handle 0 (error 4) L 09/16/2021 - 19:46:21: [SM] Blaming: confogl.smx L 09/16/2021 - 19:46:21: [SM] Call stack trace: L 09/16/2021 - 19:46:21: [SM] [0] KvJumpToKey L 09/16/2021 - 19:46:21: [SM] [1] Line 204, extra/MapInfo.sp::MI_KV_UpdateMapInfo L 09/16/2021 - 19:46:21: [SM] [2] Line 45, extra/MapInfo.sp::MI_OnMapStart L 09/16/2021 - 19:46:21: [SM] [3] Line 114, plugin.sp::OnMapStart L 09/16/2021 - 19:46:21: [SM] Exception reported: Invalid key value handle 0 (error 4) L 09/16/2021 - 19:46:21: [SM] Blaming: l4d2lib.smx L 09/16/2021 - 19:46:21: [SM] Call stack trace: L 09/16/2021 - 19:46:21: [SM] [0] KvJumpToKey L 09/16/2021 - 19:46:21: [SM] [1] Line 191, extra/mapinfo.inc::MI_KV_UpdateMapInfo L 09/16/2021 - 19:46:21: [SM] [2] Line 42, extra/mapinfo.inc::MapInfo_OnMapStart_Update L 09/16/2021 - 19:46:21: [SM] [3] Line 98, plugin.sp::OnMapStart L 09/16/2021 - 19:46:22: [SM] Exception reported: Invalid key value handle 0 (error 4) L 09/16/2021 - 19:46:22: [SM] Blaming: l4d2lib.smx L 09/16/2021 - 19:46:22: [SM] Call stack trace: L 09/16/2021 - 19:46:22: [SM] [0] KvGetNum L 09/16/2021 - 19:46:22: [SM] [1] Line 290, extra/mapinfo.inc::GetMapValueInt L 09/16/2021 - 19:46:22: [SM] [2] Line 242, plugin.sp::_native_GetMapValueInt L 09/16/2021 - 19:46:22: [SM] [4] L4D2_GetMapValueInt L 09/16/2021 - 19:46:22: [SM] [5] Line 185, plugin.sp::AdjustBossFlow L 09/16/2021 - 19:59:47: [SM] Exception reported: Invalid key value handle 0 (error 4) L 09/16/2021 - 19:59:47: [SM] Blaming: confogl.smx L 09/16/2021 - 19:59:47: [SM] Call stack trace: L 09/16/2021 - 19:59:47: [SM] [0] KvRewind L 09/16/2021 - 19:59:47: [SM] [1] Line 50, extra/MapInfo.sp::MI_OnMapEnd L 09/16/2021 - 19:59:47: [SM] [2] Line 124, plugin.sp::OnMapEnd

lunatixxx commented 3 years ago

It does not even respect cvar "versus_boss_flow_min_intro" which is quite useful, but using versus_boss_flow for everything. This plugin need improvements.

jensewe commented 3 years ago

L4D2 Lib is basically a clone of confogl's mapinfo module, and it depends on confogl to know where it should find the mapinfo.txt (🤡). I'm not quite sure what happens to your plugins there but it seems L4D2 Lib was not able to find the mapinfo.txt.

Tankifier itself doesn't modify any file, making no sense to modify mission files as well. It only uses Left4DHooks to make changes to boss spawns.

As for various boss flow convars, I think mapinfo.txt is the reason why they are abandoned (missed). Banned ranges and overriding allowed flows are more likely evtended approaches to accomplish such customizations.

lunatixxx commented 3 years ago

Actually i figured out that you are forced to load a config, if you don't it will not use mapinfo file.

lunatixxx commented 3 years ago

It will be great if l4d2lib works on his own without having to use confogl.

C0REX commented 3 years ago

Unfortunately, I cannot set a flow via the mapinfo.txt even when the config is loaded. Even if I also adjust the mapinfo.txt in the config and l4d2lib folder, nothing changes. Only the general flow can be adjusted via cvar. Would be great if someone can test that.

jensewe commented 3 years ago

Unfortunately, I cannot set a flow via the mapinfo.txt even when the config is loaded. Even if I also adjust the mapinfo.txt in the config and l4d2lib folder, nothing changes. Only the general flow can be adjusted via cvar. Would be great if someone can test that.

Can I have your mapinfo file and the map where you ran into issue? With those I might be clear with what's going wrong.

C0REX commented 3 years ago

Hey

"c8m1_apartment"
{
    "start_point"       "1888.341675 917.455017 476.342407"
    "start_dist"        "267.108032"
    "start_extra_dist"  "605.247620"
    "end_point"         "2883.220703 2962.613037 -204.742737"
    "end_dist"          "336.442200"
    "tank_ban_flow"
    {
        "1"
        {
            "min"       "80"
            "max"       "90"
        }
    }
}

We want the tank to be between 80 and 90 on c8m1. Min 80 = spawn blocked up to 80% of the map and max spawn up to 90% of the map, right? I'm a little confused after the many attempts .. some time ago when we changed that :D I wasn't sure whether the syntax is currently valid cuz there was some changes in last few repos. I try the old one again, but without any result.

"c8m1_apartment"
{
    "start_point"       "1888.341675 917.455017 476.342407"
    "start_dist"        "267.108032"
    "start_extra_dist"  "605.247620"
    "end_point"         "2883.220703 2962.613037 -204.742737"
    "end_dist"          "336.442200"
    "tank_ban_flow_min" "80"
    "tank_ban_flow_max" "90"
    "witch_flow_min"    "10"
    "witch_flow_max"    "99"
}

What I noticed is that the tank always spawns between 20 and 80%. as indicated in the cvar and its looks like the mapinfo does not overwrite the cvar data. The l4d2lib.smx is also loaded. Maybe I'm completely on the wrong track?

C0REX commented 3 years ago

Oh my...

"c8m1_apartment"
{
    "start_point"       "1888.341675 917.455017 476.342407"
    "start_dist"        "267.108032"
    "start_extra_dist"  "605.247620"
    "end_point"         "2883.220703 2962.613037 -204.742737"
    "end_dist"          "336.442200"
    "tank_ban_flow_min" "0"
    "tank_ban_flow_max" "79"
}

found in an old backup -.- immediately tested with the new syntax ..works. I had to join the server via lobby so that it would take effect ... I was on the server with connect * ip all the time. Looks like it will not be updated this way -.- My mistake, sry guys and thanks :D

jensewe commented 3 years ago

Good to see you've solved it. Whilst I'd like to make it clear that the min/max flow set in the mapinfo is banned flow percentage, which means the plugin will remove this inclusive range of flow from allowed flow percentage.

What I noticed is that the tank always spawns between 20 and 80%. as indicated in the cvar and its looks like the mapinfo does not overwrite the cvar data.

So that's why you're getting only 20%-80% tank, while the actually allowed flow is 20%-85%. Plugins were functioning and removed the last 5%.

By the way, I think we were using witch_flow_min / witch_flow_max in mapinfo before, and it seems you've proved me right. However, recent updates to Tankifier made it accept witch_ban_flow instead, so you might want to convert those old keys to new ones.

lunatixxx commented 3 years ago

I tried to strip configs from confogl into l4d2lib to load directly mapinfo but it will still not use ban ranges, i forgot something or? https://pastebin.com/TqzMfujg https://pastebin.com/aUMnF8ZV

jensewe commented 3 years ago

I tried to strip configs from confogl into l4d2lib to load directly mapinfo but it will still not use ban ranges, i forgot something or? https://pastebin.com/TqzMfujg https://pastebin.com/aUMnF8ZV

Seems fine, I don't find any possible flaw. You might want to make sure the following:

  1. No error logged ("[MI] Couldn't load MapInfo data!")
  2. Your tankifier is up to date (because I used confogl dependency for a time and later updated to back for l4d2lib)
  3. Your mapinfo is using the correct format of ban flow settings
lunatixxx commented 3 years ago

Even with confogl it was only using mapinfo when i loaded a custom cfg, so i don't know. I'm using the last version on the repo of MI and witch_and_tankifier. No errors.

lunatixxx commented 3 years ago

https://github.com/SirPlease/L4D2-Competitive-Rework/blob/master/addons/sourcemod/scripting/witch_and_tankifier.sp https://github.com/SirPlease/L4D2-Competitive-Rework/blob/master/cfg/cfgogl/zonemod/mapinfo.txt

lunatixxx commented 3 years ago

Could it be because confogl loaded after witch and tankifier? I think i fixed it