Giter Site home page Giter Site logo

derexscript / psychostats-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from drek282/psychostats

0.0 1.0 0.0 27.14 MB

This is an update to Stormtrooper's PsychoStats to fix obsolete and deprecated code as well as fix as many issues as possible and add support for games that interest me.

License: GNU General Public License v3.0

Pawn 0.13% Python 0.13% SourcePawn 1.15% Perl 15.80% Raku 0.05% Batchfile 0.05% PHP 63.26% HTML 9.67% CSS 3.23% JavaScript 6.46% Smarty 0.08%

psychostats-1's Introduction

This is, yet another, unofficial version of PsychoStats by Stormtrooper. Updated to work with PHP 5.3.0+ and MySQL 4.1.13+.

This version has been tested on PHP 7.4.11 and MariaDB 10.3.24 but it should work on any version of PHP and MySQL from 5.3.0 and 4.1.13, respectively, up.

This version was created without any input from Stormtrooper. The only objective was to get a pretty terrific piece of old software working again. I am Drek, the author of the updates. I am not a coder. I know enough about scripting to have managed most of the fixes without too much trouble. However, I can make no guaratees about security or best practices. Use this software at your own risk.

All of the versions on this repository should be considered beta software as at this time I simply do not have the capacity or the access to game servers to thoroughly test releases. I know that prior to 2010 PsychoStats was tested on thousands of websites with logs from thousands of game servers. The base PsychoStats code should be robust and stable, and as stated, the changes I have made have been relatively minor, so it stands to reason that the code is still robust and stable, but again, I can make no guarantees.

There was one serious security vulnerability that I am aware of, and that has been fixed. Most of the "fixes" were already present in the code, as Stormtrooper was aware of some of the changes to PHP that had, at that time, recently been made, or had been announced. Very little had to actually be rewritten, and where rewriting was required the changes were pretty minor. There were a few minor changes with regard to mysqli syntax. As far as I am aware all the obsolete and deprecated code has been fixed.

Flag icon images have been converted from png to gif. There is a slight decrease in image quality that I don't think is noticeable unless you are specifically looking for it, and know what to look for. The trade off is that the gif images are about half the size, require less bandwidth and will load faster.

This version of PsychoStats currently supports the following Half-Life and Source mods and games as well as Call of Duty 4 and Soldat:

  • The Battle Grounds III
  • Counter-Strike
  • Counter-Strike: Source
  • Day of Defeat
  • Day of Defeat: Source
  • Firearms 3.0
  • Gun Game
  • Half-Life 2 Death Match
  • Half-Life Death Match
  • Natural Selection
  • Team Fortress 2
  • Team Fortress Classic

I have, for the most part, tried not to make changes that change the way Psychostats works, by default. However, I have made one or two changes that reflect my own personal biases, and for my own convenience when faced with reinstalling Psychostats hundreds of times as I worked on it. One of those is that the bonus for an ffkill is now -10. I also believe that winning the game or round is really the entire point, far more important than k:d ratios, this is reflected in the bonuses I have added for team wins.

If you don't like those changes they are easy to edit in the Admin CP. One other significant change is that I have changed the resolution for bonuses to one decimal place, so you can now create bonuses that are 0.1 etc. There were bonuses for events that can happen very often, such as medic heals in TFC, that were too large if they were a full point or more.

Most of the links and references to psychostats.com have been removed as that domain is no longer actively maintained. The only exception is the xml database that provides GeoIP data for the flags functionality. That appears to still be hosted. All of the references to Stormtrooper's email address have been removed.

Known Issues

  • Occassionally GeoIP assigns the wrong nationality to a player. There is nothing that can be done about this.

The plan for the following issues is to either fix them, or improve them, in future versions:

  • One of the biggest problems with PsychoStats is that psychostats.com no longer hosts the documentation that it once did.

  • The events for Firearms and Team Fortress Classic have not been thoroughly analyzed and tested. Some of them are definitely not working as hoped and expected, many of them are, but some are unknowns, especially in TFC. The reasons for this range from my not understanding the events themselves, and what they mean, because I'm not an experienced TFC player, to my weak coding skills, especially with Perl.

  • The team wins and losses for Firearms, as well as rounds, don't work extremely well or consistently. But I'm not sure there is much more I can do with them. The log support for wins and losses in Firearms just isn't very good. At this time there is no bonus support for Firearms wins and losses, and no way of changing that that I am aware of.

  • The Flash hit box graphic no longer works on most browsers because Flash is about to become entirely extinct.

  • The Firearms, TFC and a few Natural Selection heatmaps are mostly untested. I won't be able to ensure that they are all working as intended until I have data for all of them.

  • Roles support is broken in The Battle Grounds III.

  • PsychoStats is decidedly not mobile friendly.

  • The live server views can be flakey and unreliable.

  • Lots of obsolete and deprecated html to still be cleaned up.

Stuff that Remains Untested

  • Most of the mods have not been tested, although my guess is that most of them will work. The only games and mods that have been tested so far are The Battle Grounds III, Firearms 3.0, Natural Selection and Team Fortress Classic.

  • The contents of the "scripts" folder are largely unexplored. Most of them should be self explanatory but they should be considered untested.

Future Plans

  • Map images for Team Fortress Classic.
  • Add COD4X support.
  • Add Fistful of Frags support.
  • Heatmap support for The Battle Grounds III.
  • Map images for The Battle Grounds III.
  • Improve display on mobile devices.
  • Fix roles support for The Battle Grounds III.
  • Replace the PsychoQuery code with a more up to date query library.
  • I have found the old PsychoStats documentation on The Wayback Machine, thanks to QuakerOates. I will be spending some time with that and seeing how it directs further efforts to restore and update functionality. I will also be looking into transferring the old PsychoStats Wiki to GitHub.
  • Full PHP 8.x compatibility.
  • Clean up obsolete and deprecated html.

Credits

I want to express my admiration and gratitude to Jason Morriss, a.k.a. Stormtrooper, for all his work. This software deserves to be used. The period between 2000 and 2005 and all the old Half-Life and Source mods represent a golden age in pc game modding. Those games deserve to be played. With a little massaging most of them still run very well on new hardware and new operating systems.

Kudos to Valve as well for maintaining their back catalogue.

Credit to wakachamo, Rosenstein and Solomenka for their contributions. Thanks also to RoboCop from APG and QuakerOates for their support and encouragement.

psychostats-1's People

Contributors

drek282 avatar solomenka avatar

Watchers

James Cloos avatar

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.