f2 / f2s-sourcemod-plugins Goto Github PK
View Code? Open in Web Editor NEWF2's SourceMod plugins for competitive Team Fortress 2
F2's SourceMod plugins for competitive Team Fortress 2
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"
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.
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.
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.
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.
I am having troubles uploading logs. While pinging logs.tf
is fine, I would like to know the status code that cause the failure of it.
[logstf.smx] Error uploading logs
The "unpause" game log could log duration as an attribute. TFTrue does it.
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
Fix the pause plugin such that uber percentages are retained during pause
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
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.
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.
Plugin should check if the logs folder exists before printing a generic error message indicating that there was failure when writing to log file.
Mirrors a TFTrue feature
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!
I have logstf in a subfolder in a subfolder in my plugins directory ( plugins/disabled/comp ) and I load it as needed. It does not play nice with that, for some reason.
It's unclear if #25 fixed this or not, but I will get back to you on that after running the latest version.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.