View previous topic :: View next topic |
Author |
Message |
pixelord
Joined: 24 Oct 2011 Posts: 15
|
Posted: Mon Oct 24, 2011 18:10 Post subject: Some newbie question regarding plugin platfrom |
|
|
Hi,
I am a PhD student working on Role Playing game-play. As part of my research work I need to modify the NerverWinter Night Server (with scripts or plugin, I am not sure) so that we can log different game activity in the server.
Now our requirement demands that we log different details of data and event (from very granular level to high level) while games are being played.
Now, Can anyone give me any idea, where I should start looking into? Is it possible to write plugin that can log server side data, events and actions? If yes where can I get the resources (SDK documentation/scripting/functions)?
Is there any existing system/plugin available to do the job? Is there anysample code/plugin available that may help me to start my job?
Thanks a million in advance. |
|
Back to top |
|
|
Squatting Monk
Joined: 28 Jun 2007 Posts: 76
|
Posted: Tue Oct 25, 2011 0:24 Post subject: |
|
|
What sorts of game activity are you looking to log? My guess is that most of the important stuff could be done inside NWScript itself. |
|
Back to top |
|
|
pixelord
Joined: 24 Oct 2011 Posts: 15
|
Posted: Tue Oct 25, 2011 7:17 Post subject: |
|
|
Hi,
I think the kind of activities I need to log is like player acticity (Attack, picking objects, initiating a quest, using an weapon, etc.), Player and NPC status (health, skill, invenroty, etc.), Game status (Quest completed, milestone reached, etc.)
Thanks for replying. |
|
Back to top |
|
|
Squatting Monk
Joined: 28 Jun 2007 Posts: 76
|
Posted: Tue Oct 25, 2011 21:16 Post subject: |
|
|
Yeah, all of that could be done with vanilla NWScript, depending on how granular you want your data to be. You just need to put your logging in the script for the correct event for things like attacking creatures or picking up or equipping items. Starting a quest... you'd wanna handle the logging in the script that gives the quest. Checking player hit points and stuff is a little harder. If you wanna check it regularly, you can use a timer (usually a pseudo-heartbeat); otherwise, just check it during the events when you need to know it (OnCombatRoundEnd might be good if you wanna track how a fight is going). Check the Lexicon for the events you can use and see if those fit your needs.
The logging functions you wanna look at are PrintString() and WriteTimestampedLogEntry().
If you really wanna get funky, you can add XML markup to your log entries and generate folding XML logs (I do this for debugging; makes it easier to see things in terms of game events rather than a long series of scripts):
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|