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. ^^
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 at 2006-01-1009: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 at 2006-01-0806: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 at 2005-12-1421:53:52
Don't know how I missed that... it's: CREATE TABLE player_status ( data TEXT )
Posted by Terry at 2005-12-1305: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 19:26:30 Voted10.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
Posted by GhostNWN at 2005-11-1011:41:57
How resource intensive is this plug in? Will it cause noticable on the server?
Posted by Vladiat0r at 09:13:36 Voted10.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 at 2005-08-0602:46:01
0wnag3 Vlad, I give it 10/10
Posted by Vladiat0r at 22:32:34 Voted10.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