Jump to content

DCS Stats: How-to-Guide, List of Various Stats Work, & Easy Hosting Stats Webserver


Which DCS stats programs/elements are useful to you?  

5 members have voted

  1. 1. Which DCS stats programs/elements are useful to you?

    • Slmod
      4
    • Perun
      0
    • DCS Stats
      2
    • Slbot
      1
    • MINT
      0
    • DCS Server Stats
      2


Recommended Posts

(NOTICE - I did not create any of these ... I do not claim any rights to any of these different works)

UPDATE: As I learn things, I will update this as I learn. 
Currently Working on: Iwill hopefully be getting the radar map stats to work from DCS Stats Server 🙂


Summary: This is a list and instructions set for DCS Stats; pulling stats, posting to server, posting to discord
Note: Please comment back on guides you've learned or fixing certain files or elements or additions of code and elements to help every DCS server be able to post stats results as they please. 😃
This new post is meant to be a questions and guide forum post.
-------------------------------------------------------
How to Add Slmod (in game stats, easiest one to display in game )
1. Download latest file here: https://github.com/mrSkortch/DCS-SLmod
2. Put the Scripts file in on you server build of the user ... saved games ... dcs openbeta ... scripts folder
3. load dcs server
4. rest of files will populate
5. take down dcs server
6. then edit the 'config' file inside the new slmod folder that populated for your options (including folder for missions you can load) I will add my file if you want to start off with those options
7. put dcs server back up
8. type in commands in chat, only in MP (Tab)
-help
Note: be sure to setup admin password and register yourself as admin first so you can have all the powers!
-------------------------------------------------------
DCS Stats(2 parts, A & B): A) Pulling Stats + B)Hosting those Stats on a server Methods: (3 different ways ... or create it yourself 

1: (SLSC[i] [pulling stats via lua converting to json] + Stats Server Hosting https://github.com/Bango1999/SLSC
(SLbot[ii][discord + stats server hosting] https://github.com/flying-huckleberry/SLbot
OR S3 Server[iii][stats server hosting]))  https://github.com/Bango1999/S3

2: Perun[iv] (sql stats saving to mySQL DB and you have to host your own webserver and code your output it)
https://github.com/szporwolik/perun

3: DCS Server Stats [v] which saves data to sql file and then sends to server via PHP / java, and then you can also have a live map of what's alive or dead??? still working on this one (you have to run mySQL, PHP, Apache, & Java ... probably should use XAMPP which integrates all of these into one app) 
https://github.com/cbacon93/DCSServerStats

4: DDC2[vi] ... complete dcs server control from discord + slmod stats integration in the future ... request has been sent
https://github.com/ozdeadmeat/DDC2
-------------------------------------------------------
SLSC[i]: https://github.com/Bango1999/SLSC
- put folder wherever you want (i put it in my dcs server ... user... saved games folder)
- edit config.js file
a) const serverURL = 'http://localhost:4000/';
to whatever port you want and OPEN your port on your router
b) add 'servertoken' (you can generate a token from token generator in folder),
c) adjust paths; names user, dcs ver, statspath
d) adjust schedule of how often you want it to run
- important note: you want to host these stats locally to yourself with SLSC and then have a stats server broadcast them to the outside
- run Update_SLSC.bat
- run SLSC.bat (RUN THIS BEFORE starting your dcs server)
  a. script will now run pulling slmod data --> convert lua to json
-------------------------------------------------------

SLbot[ii]: https://github.com/flying-huckleberry/SLbot
(in order to run this you must have node.js installed) : https://nodejs.org/en/download/
- put folder where you want (i put it in my dcs server ... user... saved games folder)
- copy examples and configure 2 files 'tokens.json' & 'config.json'
- edit config.json and add your external ip address ex: "url": "http://123.456.789.119/",
- edit tokens.json and add token for server 0 (generator in main folder) and add token for discord bot (discord bot creation, i used two youtube vids to create it, will list below)
- once finished editing those files, run update_SLbot.bat
- run SLbot.bat
- flip switch 'Web Server' and 'Bot Server' , (NOT DCS Server)
- (server host) open browser (on server) goto --> localhost:4000
- (external people) open browser and goto http://123.456.789.119/

- you need to replace or update electron with latest version use -npm install electron  https://www.electronjs.org/docs/tutorial/installation
- WORKING IN GOOGLE CHROME NOTE: table-functions.js are the functions that output the data (right now this is broken and only displays hours and not deaths or kills ... if any of you could correct this and display it accurately, PLEASE post it as I would be very grateful of this help)
Note: Bot Creation & Configuration I used these two you tube videos on how to do it
1. https://www.youtube.com/watch?v=DcPSgh7hC34
2. https://www.youtube.com/watch?v=BmKXBVdEV0g&t=1496s
- just beginning part for 2.
-------------------------------------------------------
S3 Server[iii]: https://github.com/Bango1999/S3
- put folder where you want (i put it in my dcs server ... user... saved games folder)
- edit config.js --> name, port, and add a token (from token generator in main folder)
- whatever port you use, must open that port on your router
- run Update_S3.bat
- (serverhost) open browser --> your external ip:1234 (1234 is the port) or figure out getting dns hosting
- (external users) open browser to port or full ip address
- s3_functions.js --> file that needs adjustment, website outputs only hours and not kills or deaths ... if someone could figure this code out and update it ... PLEASE post it as I would be very grateful of this help
------------------------------------------------------
DCS Server Stats [v]: https://github.com/cbacon93/DCSServerStats
(warning: this process is more advanced and takes more patience ... also below is just one way to achieve the goal, many other ways)
- put folder where you want (i put it in my dcs server ... user... saved games folder)
- get Xampp; integrated - mysql, apache/php, webhosting, email
- copy php folder into C:\xampp\htdocs --> rename it dcsserverstats
- configure root password and mysql password https://stackoverflow.com/questions/24566453/resetting-mysql-root-password-with-xampp-on-localhost
- start apache and mysql
- be able to hit admin to configure mysql database (If you have errors on this part ... then you need to configure the root password from up above and then change the config.inc.php file with the the same password in C:\xampp\phpMyAdmin
- create a database in mysql named 'dcsserverstats'
- import .sql file from main dcs server stats folder into mysql db in xampp https://makitweb.com/how-to-import-sql-file-to-mysql-using-command-line/
- configure host file for php site to work https://www.paperstreet.com/blog/how-to-transfer-your-php-mysql-site-to-xampp-for-local-development-and-debugging/
- configure config.inc.php in dcsserverstats in xampp htdocs with correct password and settings
- now lastly configure the DCSServerStats.bat file below with the correct info in the readme file
(Status: currently stuck on this ... i run it, it says 1 line and i don't think it's pulling stats)
- if you goto http://localhost/DCSServerStats/ in browser you should see the frame all pop up
------------------------------------------------------
-Random other githubs, not sure if they work
MINT: World Mission Intel - Displays a map using .js to outside server of where elements are
https://github.com/jkhoel/dcs-mission-intel
---------------------------------------------------
... Historically the earliest stats work I've seen work is from xcom in May, 2014.
Who still runs his server today ... and that map on his website for his squadron 'buddyspike' .... looks like an advanced version of MINT
However, as xcom stated below, he doesn't use any of this information I've provided above so it must be all custom made.
Just goes to show how far you can take this, I would use http://gadget.buddyspike.net/ as an iconic example of using dcs stats to it's fullest.
DCS Server Stats[v] uses this post below as a basis reference to create theirs so that's something!

 


Edited by DoctorNo
Link to comment
Share on other sites

  • DoctorNo changed the title to DCS Stats: How-to-Guide, List of Various Stats Work, & Easy Hosting Stats Webserver

First off, I can't believe you responded ... thank you!
Really! well darn I'll edit that then, still have to thank you for your original post way back with the huge page of information.
I'm trying to post something for people who don't code at all to be able to put up a stats to a web server + a radar map like you've got going there.
I think if this sort of thing was more accessible maybe more mods and additions would come out of it.

Can you share any more information than the page or any github references you know about to try for someone who doesn't code as deeply as you do xcom?

Link to comment
Share on other sites

  • 1 month later...

I would be better to have an official solution rather than all these third party solutions that are either outdated or easily broken by constant updates. Or perhaps some improvements and added functionality to the already existing logbook. I can also see why this would be a low priority as I'm sure there are some that could care less about have every single statistic recorded somewhere as if this was one of those AAA games.

Link to comment
Share on other sites

  • 4 months later...
On 3/14/2021 at 3:28 AM, DoctorNo said:

(NOTICE - I did not create any of these ... I do not claim any rights to any of these different works)

UPDATE: As I learn things, I will update this as I learn. 
Currently Working on: Iwill hopefully be getting the radar map stats to work from DCS Stats Server 🙂


Summary: This is a list and instructions set for DCS Stats; pulling stats, posting to server, posting to discord
Note: Please comment back on guides you've learned or fixing certain files or elements or additions of code and elements to help every DCS server be able to post stats results as they please. 😃
This new post is meant to be a questions and guide forum post.
-------------------------------------------------------
How to Add Slmod (in game stats, easiest one to display in game )
1. Download latest file here: https://github.com/mrSkortch/DCS-SLmod
2. Put the Scripts file in on you server build of the user ... saved games ... dcs openbeta ... scripts folder
3. load dcs server
4. rest of files will populate
5. take down dcs server
6. then edit the 'config' file inside the new slmod folder that populated for your options (including folder for missions you can load) I will add my file if you want to start off with those options
7. put dcs server back up
8. type in commands in chat, only in MP (Tab)
-help
Note: be sure to setup admin password and register yourself as admin first so you can have all the powers!
-------------------------------------------------------
DCS Stats(2 parts, A & B): A) Pulling Stats + B)Hosting those Stats on a server Methods: (3 different ways ... or create it yourself 

1: (SLSC[i] [pulling stats via lua converting to json] + Stats Server Hosting https://github.com/Bango1999/SLSC
(SLbot[ii][discord + stats server hosting] https://github.com/flying-huckleberry/SLbot
OR S3 Server[iii][stats server hosting]))  https://github.com/Bango1999/S3

2: Perun[iv] (sql stats saving to mySQL DB and you have to host your own webserver and code your output it)
https://github.com/szporwolik/perun

3: DCS Server Stats [v] which saves data to sql file and then sends to server via PHP / java, and then you can also have a live map of what's alive or dead??? still working on this one (you have to run mySQL, PHP, Apache, & Java ... probably should use XAMPP which integrates all of these into one app) 
https://github.com/cbacon93/DCSServerStats

4: DDC2[vi] ... complete dcs server control from discord + slmod stats integration in the future ... request has been sent
https://github.com/ozdeadmeat/DDC2
-------------------------------------------------------
SLSC[i]: https://github.com/Bango1999/SLSC
- put folder wherever you want (i put it in my dcs server ... user... saved games folder)
- edit config.js file
a) const serverURL = 'http://localhost:4000/';
to whatever port you want and OPEN your port on your router
b) add 'servertoken' (you can generate a token from token generator in folder),
c) adjust paths; names user, dcs ver, statspath
d) adjust schedule of how often you want it to run
- important note: you want to host these stats locally to yourself with SLSC and then have a stats server broadcast them to the outside
- run Update_SLSC.bat
- run SLSC.bat (RUN THIS BEFORE starting your dcs server)
  a. script will now run pulling slmod data --> convert lua to json
-------------------------------------------------------

SLbot[ii]: https://github.com/flying-huckleberry/SLbot
(in order to run this you must have node.js installed) : https://nodejs.org/en/download/
- put folder where you want (i put it in my dcs server ... user... saved games folder)
- copy examples and configure 2 files 'tokens.json' & 'config.json'
- edit config.json and add your external ip address ex: "url": "http://123.456.789.119/",
- edit tokens.json and add token for server 0 (generator in main folder) and add token for discord bot (discord bot creation, i used two youtube vids to create it, will list below)
- once finished editing those files, run update_SLbot.bat
- run SLbot.bat
- flip switch 'Web Server' and 'Bot Server' , (NOT DCS Server)
- (server host) open browser (on server) goto --> localhost:4000
- (external people) open browser and goto http://123.456.789.119/

- you need to replace or update electron with latest version use -npm install electron  https://www.electronjs.org/docs/tutorial/installation
- WORKING IN GOOGLE CHROME NOTE: table-functions.js are the functions that output the data (right now this is broken and only displays hours and not deaths or kills ... if any of you could correct this and display it accurately, PLEASE post it as I would be very grateful of this help)
Note: Bot Creation & Configuration I used these two you tube videos on how to do it
1. https://www.youtube.com/watch?v=DcPSgh7hC34
2. https://www.youtube.com/watch?v=BmKXBVdEV0g&t=1496s
- just beginning part for 2.
-------------------------------------------------------
S3 Server[iii]: https://github.com/Bango1999/S3
- put folder where you want (i put it in my dcs server ... user... saved games folder)
- edit config.js --> name, port, and add a token (from token generator in main folder)
- whatever port you use, must open that port on your router
- run Update_S3.bat
- (serverhost) open browser --> your external ip:1234 (1234 is the port) or figure out getting dns hosting
- (external users) open browser to port or full ip address
- s3_functions.js --> file that needs adjustment, website outputs only hours and not kills or deaths ... if someone could figure this code out and update it ... PLEASE post it as I would be very grateful of this help
------------------------------------------------------
DCS Server Stats [v]: https://github.com/cbacon93/DCSServerStats
(warning: this process is more advanced and takes more patience ... also below is just one way to achieve the goal, many other ways)
- put folder where you want (i put it in my dcs server ... user... saved games folder)
- get Xampp; integrated - mysql, apache/php, webhosting, email
- copy php folder into C:\xampp\htdocs --> rename it dcsserverstats
- configure root password and mysql password https://stackoverflow.com/questions/24566453/resetting-mysql-root-password-with-xampp-on-localhost
- start apache and mysql
- be able to hit admin to configure mysql database (If you have errors on this part ... then you need to configure the root password from up above and then change the config.inc.php file with the the same password in C:\xampp\phpMyAdmin
- create a database in mysql named 'dcsserverstats'
- import .sql file from main dcs server stats folder into mysql db in xampp https://makitweb.com/how-to-import-sql-file-to-mysql-using-command-line/
- configure host file for php site to work https://www.paperstreet.com/blog/how-to-transfer-your-php-mysql-site-to-xampp-for-local-development-and-debugging/
- configure config.inc.php in dcsserverstats in xampp htdocs with correct password and settings
- now lastly configure the DCSServerStats.bat file below with the correct info in the readme file
(Status: currently stuck on this ... i run it, it says 1 line and i don't think it's pulling stats)
- if you goto http://localhost/DCSServerStats/ in browser you should see the frame all pop up
------------------------------------------------------
-Random other githubs, not sure if they work
MINT: World Mission Intel - Displays a map using .js to outside server of where elements are
https://github.com/jkhoel/dcs-mission-intel
---------------------------------------------------
... Historically the earliest stats work I've seen work is from xcom in May, 2014.
Who still runs his server today ... and that map on his website for his squadron 'buddyspike' .... looks like an advanced version of MINT
However, as xcom stated below, he doesn't use any of this information I've provided above so it must be all custom made.
Just goes to show how far you can take this, I would use http://gadget.buddyspike.net/ as an iconic example of using dcs stats to it's fullest.
DCS Server Stats[v] uses this post below as a basis reference to create theirs so that's something!

 

 

Did you ever get the DCS Server Stats option working? I see your last status was that you were stuck on it. 

PC: ASUS TUF 4090oc - Ryzen 7950X3D - 32gb DDR5 6000 - Quest Pro

Sims: DCS, IL2, MSFS

Pilot Skill: Drunk guy from Independence Day

RIO Skill: Goose (post neck-break) 

Link to comment
Share on other sites

  • 3 weeks later...

Ah so DCS Server Stats I got to load in SQL and their webpage worked a somewhat but it was broken overall and I couldn't figure out how to fix it. Their code was too complex for me.
I ended up moving on to Perun. This has been VERY VERY successful and have built everything upon that at this point. I try to take some pointers from others, but it's difficult. If you want stats ... my suggestion is go with Perun. It took a lot of time to built the stats page and such though. Huge time sync for me but I learned a lot.


Edited by DoctorNo
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...