AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D & L4D2] Coop Markers - Flow Distance (1.11) [01-Dec-2021] (https://forums.alliedmods.net/showthread.php?t=321288)

Silvers 02-03-2020 11:45

[L4D & L4D2] Coop Markers - Flow Distance (1.11) [01-Dec-2021]
 
17 Attachment(s)


About:
  • Displays messages when Survivors progress through certain distances of the map.
  • Customise distance percentage to display. Game default: 25.
  • L4D1 cannot display the top message box like L4D2, so it's displayed in chat or another style panel.
  • This calculates all alive players progress, rather than Versus style which uses the player furthest ahead.
  • Supports translations and comes with 24 languages from Valves translation files.
  • Bug: Finales only display the flow distance progress and not actual finale progress. Now disabled in the finale.
  • Bug: Survival is also pointless to use in, there is no progress as such.


Thanks:
  • Vit_amin - Helped testing and for the request.
  • ProdigySim and raziEiL - For L4D2Direct and L4D1Direct port.
  • Stepan Zolotarev - For Russian translation.


Cvars:

Saved to l4d_coop_markers.cfg in your servers \cfg\sourcemod\ folder.

PHP Code:

// 0=Plugin off, 1=Plugin on.
l4d_coop_markers_allow "1"

// (L4D1 only) Turn on the plugin in these game modes. 0=All, 1=Coop, 2=Survival, 4=Versus. Add numbers together.
l4d_coop_markers_modes "5"

// 0=Print to chat. 1=Display panel.
l4d_coop_markers_panel "1"

// After what percentage of progress to display the marker.
l4d_coop_markers_percent "25"

// How often the timer fires to check progress
l4d_coop_markers_timer "2.0"

// Coop Markers plugin version.
l4d_coop_markers_version 



Changes:
Code:

1.11 (01-Dec-2021)
    - Changes to fix warnings when compiling on SourceMod 1.11.
    - Minor change to fix bad coding practice.

1.10 (29-Jun-2021)
    - Fixed the plugin not always deactivating in finales. Thanks to "KoMiKoZa" for reporting.

1.9 (15-Feb-2021)
    - Fixed flow distance being tracked in some finales. Thanks to "Xanaguy" for reporting.

1.8a (10-Oct-2020)
    - Compatibility update for L4D2's "The Last Stand" update.
    - GameData .txt file updated.

1.8 (10-May-2020)
    - Added better error log message when gamedata file is missing.
    - Extra checks to prevent "IsAllowedGameMode" throwing errors.
    - Various changes to tidy up code.

1.7 (05-Apr-2020)
    - Added translations support with 24 languages by default. Thanks to "Stepan Zolotarev" for requesting.
    - Added ding sound when printing to chat in L4D2.
    - Changed ding sound volume to SNDLEVEL_NORMAL from SNDLEVEL_RAIDSIREN and pitch to normal.
    - Fixed "IsAllowedGameMode" from throwing errors when the "_modes" cvar was changed before MapStart.

1.6 (04-Mar-2020)
    - Fixed potential server hanging/crashing on map change with the error:
        "Host_Error: SV_CreatePacketEntities: GetEntServerClass failed for ent 2."
    - This was caused by spawning the "info_gamemode" entity in OnMapStart. Fixed by adding a 0.1 delay.

    - Changed the GetFlowDistance method to prevent crashing on server start. Not sure why this didn't affect others.
    - Fixed late loading not working.
    - Plugin and GameData file updated.

1.5 (02-Mar-2020)
    - Fixed server freezing on map start. Thanks to "Alex101192" for reporting.

1.4 (06-Feb-2020)
    - Panel in L4D1 can block 1,2,3,4,5 keys from changing weapons. But closes when pressed once.
    - Added cvar "l4d_coop_markers_panel" to control displaying a panel or printing to chat.
    - Fixed counting dead players distance toward the total. Thanks to "BHaType" for reporting.

1.3 (05-Feb-2020)
    - Removed support for Listen servers. Get a real server.

1.2 (05-Feb-2020)
    - Disabled displaying in the Finale.
    - L4D1: Changed from printing to chat to displaying in a Panel. Thanks to "Aya Supay".

1.1 (04-Feb-2020)
    - Fixed setting the wrong mode if not "coop".

1.0 (04-Feb-2020)
    - Initial release.



Installation:
  1. Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.
  2. Download the .txt gamedata file and put into your servers \addons\sourcemod\gamedata\ folder.
  3. Download the phrases.txt translation file and put into your servers \addons\sourcemod\translations\ folder.


Updating from 1.3 or older:
  • New cvars have been added: use the Cvar Configs Updater, or delete the old cvars config or manually add them.

Current Translations: English (en), Brazilian (pt), Bulgarian (bg), Czech (cze), Danish (da), Dutch (nl), Finnish (fi), French (fr), German (de), Greek (el), Hungarian (hu), Italian (it), Japanese (jp), Korean (ko), Norwegian (no), Polish (pl), Portuguese (pt_p), Romanian (ro), Russian (ru), Schinese (chi), Spanish (es), Swedish (sv), Tchinese (zho), Thai (th), Turkish (tr).

Vit_amin 02-03-2020 11:48

Re: [L4D & L4D2] Coop Markers - Flow Distance (1.0) [04-Feb-2020]
 
It's very cool !!! Thanks

Vit_amin 02-03-2020 11:50

Re: [L4D & L4D2] Coop Markers - Flow Distance (1.0) [04-Feb-2020]
 
Quote:

// (L4D1 only) Turn on the plugin in these game modes. 0=All, 1=Coop, 2=Survival, 4=Versus, 8=Scavenge, 15=All. Add numbers together.
l4d_coop_markers_modes "15"
L4D1 doesn't has Scavenge GameMode

Silvers 02-03-2020 11:52

Re: [L4D & L4D2] Coop Markers - Flow Distance (1.0) [04-Feb-2020]
 
Well it's 'legacy', for lack of a better word, from L4D2 which if requested could have the cvars ported over. Currently only enabled for coop in L4D2.

Alex101192 02-03-2020 15:52

Re: [L4D & L4D2] Coop Markers - Flow Distance (1.0) [04-Feb-2020]
 
Plugin failed to compile

Silvers 02-03-2020 16:06

Re: [L4D & L4D2] Coop Markers - Flow Distance (1.0) [04-Feb-2020]
 
Quote:

Originally Posted by Alex101192 (Post 2682624)
Plugin failed to compile

Thanks, fixed. Forum defaulted to compiler versions 1.1, again. Now set to 1.10. Now set to 1.9 because the forum keeps resetting to 1.1.



This might not be accurate for finales, since it's based on flow distance and not finale progression. Looking into a fix. Also this might bug clients in all modes that are not "coop". Will fix in next version. Updated.

Vit_amin 02-03-2020 16:11

Re: [L4D & L4D2] Coop Markers - Flow Distance (1.0) [04-Feb-2020]
 
I hope. You will add support for finale maps

Alex101192 02-03-2020 16:21

Re: [L4D & L4D2] Coop Markers - Flow Distance (1.0) [04-Feb-2020]
 
Quote:

Originally Posted by Silvers (Post 2682626)
Thanks, fixed. Forum defaulted to compiler versions 1.1, again. Now set to 1.10. Now set to 1.9 because the forum keeps resetting to 1.1.



This might not be accurate for finales, since it's based on flow distance and not finale progression. Might change, dunno yet.

It's ok, I compiled it by myself and it works good.

Spirit_12 02-03-2020 18:09

Re: [L4D & L4D2] Coop Markers - Flow Distance (1.0) [04-Feb-2020]
 
Quote:

Originally Posted by Silvers (Post 2682626)
This might not be accurate for finales, since it's based on flow distance and not finale progression. Looking into a fix. Also this might bug clients in all modes that are not "coop". Will fix in next version. Updated.

Curious to know how would you get the finale stage count. I was looking at CDirectorScriptedEventManager::GetFinaleData, but reading up vscript files might be a better option.

Silvers 02-03-2020 18:15

Re: [L4D & L4D2] Coop Markers - Flow Distance (1.0) [04-Feb-2020]
 
Quote:

Originally Posted by Spirit_12 (Post 2682646)
Curious to know how would you get the finale stage count. I was looking at CDirectorScriptedEventManager::GetFinaleData, but reading up vscript files might be a better option.

Yeah I have a test script reading CDirectorScriptedEventManager + m_CurrentFinaleStage + m_FinaleType. The type is 5 until later on in the round when activated (after elevator - testing c1m4) so not accurate to begin with, but the stage changes every so often going up and down in value. Either I've read it wrong or the games just screwed like that.

Want to avoid VScripts because L4D1 support.

Think it would just be better to disable in finale, nice not knowing how far along the progress is, to keep intensity high.


All times are GMT -4. The time now is 20:11.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.