GithubHelp home page GithubHelp logo

f2 / f2s-sourcemod-plugins Goto Github PK

View Code? Open in Web Editor NEW
13.0 5.0 8.0 329 KB

F2's SourceMod plugins for competitive Team Fortress 2

SourcePawn 95.29% C++ 3.97% PowerShell 0.74%
sourcepawn team-fortress-2 tf2 sourcemod-plugin sourcemod

f2s-sourcemod-plugins's People

Contributors

agrastios avatar f2 avatar leighmacdonald avatar sapphonie avatar shigbeard avatar thebv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

f2s-sourcemod-plugins's Issues

Pause events not logged correctly

It seems that waiting 5 seconds before unpausing is causing the logs to be wrong (there's an extra "pause"):

L 10/01/2022 - 21:03:49: World triggered "Game_Paused"
L 10/01/2022 - 21:06:12: World triggered "Game_Unpaused"
L 10/01/2022 - 21:06:17: World triggered "Game_Paused"
L 10/01/2022 - 21:06:17: "ONCE kosuke<21><[U:1:137240493]><Blue>" picked up item "ammopack_medium"
L 10/01/2022 - 21:06:18: "once stan<18><[U:1:127171744]><Blue>" say "what if we werent ready..."
L 10/01/2022 - 21:06:20: World triggered "Round_Start"

Example logs: Log / Log

[LogsTF] Alter link print to use PrintToChatAll instead of MC_PrintToChatAll

Issue:

Currently, the LogsTF plugin uses morecolors for printing to chat. For morecolors, before it sends the message, it adds a flag to block hooks from HookUserMessage as seen here. This stops other plugins from hooking onto any of the LogsTF plugin's messages, like my own plugin for the competitive 4v4 PASS Time community.

Solution:

https://github.com/F2/F2s-sourcemod-plugins/blob/master/logstf/logstf.sp#L803
MC_PrintToChatAll("%s%s", "{lightgreen}[LogsTF] {blue}Logs were uploaded to: ", g_sLastLogURL);

Change to:

PrintToChatAll("%s%s", "\x0799FF99[LogsTF] \x0799CCFFLogs were uploaded to: ", g_sLastLogURL);

I've personally compiled and tested this and it appears to work and look the exact same. I pulled the hex codes for the colors from here, so they should match perfectly. With the proposed change, I am able to hook onto the message.

Context:

What part of my plugin is supposed to do is pull from the LogsTF print statement where it prints the full logs.tf URL, get the log number, then put it on the end of a more.tf link so then players can type /more and view the log with 4v4 PASS Time stats shown (more.tf supports 4v4 PASS Time). This is done because logs.tf refuses to provide support for our gamemode, which doesn't focus on DM or ubers, so logs.tf is functionally useless for us without that custom support. Since we are a competitive gamemode which commonly uses serveme.tf to play pugs and matches, compiling our own version of the LogsTF plugin is only a solution for private servers, and not serveme.

Further Context:

Due to working off of such a unique gamemode, we did not originally have logging support for game events. I added it about five months ago and attempted to contact Zoob to obtain support for showing these stats on logs.tf. He was unresponsive to repeated messages over Discord and email over weeks, and with logs.tf being closed source, it meant that our community cannot use logs.tf, as our gamemode does not focus on DM or ubers.

However, more.tf, an actively developed open source alternative to logs.tf, was happy to assist us and offer full support. In its current state, it uses logs.tf's API to parse log files and display all the information on their site (they do not currently have a backend that you can directly upload logs to). This also means they use the same exact URL number IDs for logs.

Since we are a competitive gamemode, anyone who plays the gamemode likely uses serveme.tf, a free temporary worldwide server provider for TF2. This is an essential service for tournaments and cups as players are required to host their own matches on RGL and other competitive leagues. The 4v4 PASS Time plugin is on serveme.tf, but in order to work 100%, the LogsTF plugin needs to be updated with the proposed changes.

To add to our legitimacy, we are a 700 member strong Discord partnered with TF2CC and have had a cup in RGL with another RGL cup happening next month. We have official gamemode support from more.tf, as seen here. We have our plugin and configs on serveme.tf.

are the http requests run in the background to avoid stutter?

in the sourcemod built in sql plugin, it allows for running the queries in the background to avoid stutters.

https://wiki.alliedmods.net/SQL_(SourceMod_Scripting)#Threading

If your database server is remote or requires a network connection, queries can cause noticeable gameplay lag, and supporting threading is often a good idea if your queries occur in the middle of gameplay.

in the mgemod source, all of the sql queries take callbacks, as they are executed in background, avoiding stutters.

logs upload method http req does have a callback, but i'm not sure if it's running the request in a different thread. I don't understand cpp/sp enough to say if the steamworks http lib runs the thread in the background.

In some matches with the default rgl config, there is a noticeable stutter as a client to the server, as well as the stv on round end. From the stv, this is undesirable as it spoils the result of the upcoming last push. Is a synchronous http request from logstf_midgameupload 1 the culprit? LMK if i'm missing something

SteamWorks logs upload broken / buggy

L 08/24/2022 - 21:56:27: [SM] Exception reported: invalid handle 0 (error: 4)
L 08/24/2022 - 21:56:27: [SM] Blaming: logstf.smx
L 08/24/2022 - 21:56:27: [SM] Call stack trace:
L 08/24/2022 - 21:56:27: [SM] [0] WriteFileString
L 08/24/2022 - 21:56:27: [SM] [1] Line 592, logstf.sp::FlushLog
L 08/24/2022 - 21:56:27: [SM] [2] Line 258, logstf.sp::StartMatch
L 08/24/2022 - 21:56:27: [SM] [3] Line 277, ../includes/match.inc::Match_StartMatch
L 08/24/2022 - 21:56:27: [SM] [4] Line 127, ../includes/match.inc::Match_Event_round_restart_seconds
L 08/24/2022 - 21:56:36: [SM] Exception reported: invalid handle 0 (error: 4)
L 08/24/2022 - 21:56:36: [SM] Blaming: logstf.smx
L 08/24/2022 - 21:56:36: [SM] Call stack trace:
L 08/24/2022 - 21:56:36: [SM] [0] WriteFileString
L 08/24/2022 - 21:56:36: [SM] [1] Line 592, logstf.sp::FlushLog
L 08/24/2022 - 21:56:36: [SM] [2] Line 576, logstf.sp::AddLogLine
L 08/24/2022 - 21:56:36: [SM] [3] Line 560, logstf.sp::GameLog
L 08/24/2022 - 21:56:36: [SM] Exception reported: Wrong log buffer
L 08/24/2022 - 21:56:36: [SM] Blaming: logstf.smx
L 08/24/2022 - 21:56:36: [SM] Call stack trace:
L 08/24/2022 - 21:56:36: [SM] [0] SetFailState
L 08/24/2022 - 21:56:36: [SM] [1] Line 570, logstf.sp::AddLogLine
L 08/24/2022 - 21:56:36: [SM] [2] Line 560, logstf.sp::GameLog
L 08/24/2022 - 21:56:36: [SM] [4] LogToGame
L 08/24/2022 - 21:56:36: [SM] [5] Line 389, supstats2.sp::Event_PlayerSpawned
L 08/24/2022 - 22:03:09: Error log file session closed.

etc

Incorrect Medic Stats

Hi. I put in the medic stats script for my server, however it does not log things properly. The main thing I've noticed is that it underestimates uber times.
The following logs provide examples of these underestimations.

https://logs.tf/2608435
https://logs.tf/2608334
https://logs.tf/2612750
https://logs.tf/2612881

This did not occur until recently, and it's seemingly been for no reason. There was no update or change in scripts in between the time that the stats were and were not being correctly displayed.

Precompiled plugins are broken

link to download all plugins given in readme (http://sourcemod.krus.dk/f2-sourcemod-plugins.zip) seems broken - my server won't load these at all.

I recompiled locally using your powershell script and all work fine, so can't really provide any insight into what went wrong, but I think it's worth letting you know since some server admins might not have the knowhow/tenacity/etc to do this themselves.

publish plugins on github

Is there a specific reason why you upload the plugins to a FTP server? Can we just publish them here as release? If no, can we at least make versions for them on the FTP Server?

Thank you!

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.