Generate a live server status webpage with a list of all players in a sortable grid. Doesn't need nwnx, odbc or mysql. Easy to add additional fields like gold, hours online, etc.
See NBDE by Knat Grid control by ActiveWidgets Cookies by Jason Davies A special thanks to Jantima for suggesting to release this.
This script is released under the GPL license (see gpl.txt).
Prerequisites: At least an ftp/http server on the gameserver, and a web server with PHP to display the status page (preferably on the same machine).
Note: the zip includes a /sql subfolder for those who want to use the NWNX/ODBC/MySQL-based system. If you want to use the /sql version, I will refer to the Database setup instructions of Lanthar D'Alton.
Module Instructions 1. Download and import player_status.erf into your module.
2. Download NBDE and import nbde.erf into your module.
3. Add ExecuteScript("player_status", OBJECT_SELF); to your module heartbeat.
If the web server and game server on separate machines, you will need to host the database/playerstatus.fpt file anonymously and set $fptfile in status.php to the URL of the hosted file as in "ftp://gameserver/playerstatus.fpt"
Web server Instructions 1. Download Grid control to your web folder.
2. Download Cookies.js script to your web folder.
3. Copy status.php to your web folder and edit the settings in it, including the paths to ActiveWidgets and cookies.js
To add additional fields you need to edit the player_status.txt and status.php in marked locations. Contact me for assistance: [email protected]
Please post links here if you implement it for your server. Feedback, comments, suggestions, questions, bug reports and votes welcome. ^^
Posted by Vladiat0r at 2010-01-22 20:43:32 Voted 10.00
File Locked is not something that can be fixed. Windows does that on purpose. The application that is running (nwn server) keeps a lock on the file and disallows all other programs to read it. The new version of nwn server had a patch to do this, I think. _________________________ Link
Posted by Mordengaard at 2009-02-08 09:15:33 Voted 10.00 on 02/08/09
Excellent script, as someone who codes 99.9% of my own systems it's one of the few to make the grade and go into my modules. Kudos! _________________________ Mordengaard
Posted by energia at 2008-10-28 11:13:36 Voted 10.00 on 09/23/08
I can't access to file PLAYERSTATUS.FPT and I can't read. Error is "File in use. Locked". I'm using Win XP sp3.
How can I access to file and read info?
I have got a Linksys NAS200 and if I use it I can read the file. Thanks
Non riesco ad accedere al file perché risulta in uso e bloccato. Ho Win XP. Come mai non riesco ad accedere e come posso leggere il contenuto del file per pubblicare le info sul sito? Ho anche un Linksys NAS200 e quando metto i file in questo sistema, il file è accessibile. Grazie
Posted by energia at 2008-09-23 11:59:20 Voted 10.00 on 09/23/08
Funziona
Posted by Aez at 2008-01-23 18:38:25 Voted 10.00 on 01/23/08
Posted by sysg0d at 2006-08-29 11:03:57 Voted 10.00 on 08/29/06
This is awesome! Thx! _________________________ Sysgod
Builder/Admin
World of Ugas Daos Link
Posted by Viper01 ( 24.109.xxx.xxx ) at 2006-05-27 01:08:14
If anyone figured out a good linux solution for this please let me know. I know it´s just adding to the file instead of replacing it, so the only way to get the new data is to delete the file. I incorporated this into the END of the status PHP file, but it´s a dam pain cause half of my viewers get a ¨Can´t find file¨ error when they go to view the page. There has to be a way to get NWN to properly delete the file before it writes. Anyone? If you figure it out PLEASE drop me an E-Mail.
Posted by Rami_Ahmed at 2006-03-09 04:23:31 Voted 9.75 on 03/09/06
Posted by Anonymous ( 63.237.xxx.xxx ) at 2006-01-13 10:58:02
Changing the campaign name changes the resulting filename of the FPT file. You need to update the status.php script (or status2.php for the second server) to read the new file.
Posted by Breebo ( 213.205.xxx.xxx ) at 2006-01-10 09:04:31
My bad, got the link and everything works great so far. One question though if I may:
Is it possible to change the Campaign name. I have tried several times, however each time I do it shows on my player Status page as if an additional account is logged in. The account name is identicle to the new campaign name with a "0" tagged on the end.
i.e. Campaign name = "myserverstatus"
Strange Account name = "myserverstatus0"
I am trying to use the serverstatus on a machine hosting 2 NWN games, and as such would like to display the status for both. They share the same Database directory, hence require 2 different campaign names. Hope you can be of help. Awesome tool.
Posted by Breebo ( 213.205.xxx.xxx ) at 2006-01-08 06:37:36
This looks great, but the player status.erf ling appears to be dead. Do you have a copy you could send me please?
Posted by Anonymous ( 69.110.xxx.xxx ) at 2005-12-14 21:53:52
Don't know how I missed that... it's:
CREATE TABLE player_status ( data TEXT )
Posted by Terry ( 169.139.xxx.xxx ) at 2005-12-13 05:10:53
Do you have the DB create statements. To be honest I'm too lazy to look through the code and figure it out ;)
Posted by Vladiat0r at 2005-11-11 19:26:30 Voted 10.00
I'll answer like this. Every little thing you add will contribute to the overall performance degradation. I'd say this script is extremely fast and optimized. We use the sql version on Antiworld where we need to reduce every bit of lag and it works great. _________________________ Link
How resource intensive is this plug in?
Will it cause noticable on the server?
Posted by Vladiat0r at 2005-10-16 09:13:36 Voted 10.00
The playerstatus.fpt file has to be accessible by anonymous Link
You must set the database folder as the home folder for an anonymous FTP user.
If you have other FPT files in the database folder, then it's tricker to setup permissions to only allow access to that one file. You would need to deny IUSR_ account to all the other files on Windows, but I'm not quite sure how to do it on Linux. _________________________ Link
Posted by GDX ( 203.45.xxx.xxx ) at 2005-08-06 02:46:01
0wnag3 Vlad, I give it 10/10
Posted by Vladiat0r at 2005-07-23 22:32:34 Voted 10.00
You need to edit status.php file and set all the settings to their correct values for your system. E-mail me, what is your $fptfile set to? btw, it looks like your are hosting this on linux... Linux functionality is broken and causes performance problems because the fpt file does not get cleaned but grows every time the status is updated. Blame Bioware for not fixing the DeleteCampaignDatabase function. :( _________________________ Link
Posted by Anonymous ( 66.215.xxx.xxx ) at 2005-07-23 21:16:37
I'm getting the following error.. I'm sure its something simple.
fopen(pathto/database/playerstatus.fpt): failed to open stream: Permission denied in /var/www/localhost/htdocs/status.php on line 97
ERROR: Could not open fpt file
Posted by Anonymous ( 66.215.xxx.xxx ) at 2005-07-23 21:08:41
I'm getting the following error.. I'm sure its something simple.
fopen(pathto/database/playerstatus.fpt): failed to open stream: Permission denied in /var/www/localhost/htdocs/status.php on line 97
ERROR: Could not open fpt file
Posted by Anonymous ( 66.215.xxx.xxx ) at 2005-07-23 20:59:44
I'm getting the following error.. I'm sure its something simple.
fopen(pathto/database/playerstatus.fpt): failed to open stream: Permission denied in /var/www/localhost/htdocs/status.php on line 97
ERROR: Could not open fpt file
Posted by Tatus at 2005-07-19 06:56:17 Voted 10.00 on 07/19/05
This is an awesome script. Had some issues I was unsure of (not a script kid I am :D ).. Mailed Vlad for help.. 5 minutes after he replied and within 20 minutes I had all the info I needed that were specific for the module I was trying to add a status page to.. Awesome script and great help.. Deffo a 10 score from me..
Posted by Vladiat0r at 2005-06-26 15:43:57 Voted 10.00
Apparently, NWN doesn't like it when the FPT file is being read at the same time as NWN is writing to it--causing a crash. -_-
If you set INTERVAL to 10 (to update every once a minute) it alleviates the issue somewhat.
The alternative is to setup and configure NWNX, ODBC and MySQL and use the /sql version of the script, which unfortunately isn't exactly as simple. :S
The only alternative I can think of is using the nwserverLog1.txt file instead, but that has its own issues... _________________________ Link
Posted by Vladiat0r at 2005-06-24 19:57:23 Voted 10.00
New release: 1.6
* Fixed performance issue by using NBDE.
* Added setting to specify status update interval to improve performance.
* Added override setting to disable udp server status check if port 5121 is blocked.
* DeleteCampaignDatabase isn't working on Linux, so removing support for Linux. _________________________ Link
Posted by OOA-Forge at 2005-06-23 21:37:42 Voted 10.00 on 06/23/05
Wow this is some great work. it functions flawlessly. Genius.
Posted by Lord_Alexander at 2005-06-22 04:36:11 Voted 10.00 on 06/22/05