logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Utility PLugin

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Development
View previous topic :: View next topic  
Author Message
Grinning Fool



Joined: 12 Feb 2005
Posts: 264

PostPosted: Wed May 23, 2007 2:47    Post subject: Utility PLugin Reply with quote

I just wanted a place to put my thoughts together, and of course get some feedback. I'm working on a utility plugin that has an ever-expanding feature list. If you have thoughts or suggestions on how what I post can be improved upon, please make them here.

1. script call to shutdown the server, by going to the actual server window and exiting it (thanks to Grumalg for tracking down the info I need to make that happen)
2. language translations. Currently DMFI does this by building a string in game, one character at a time. The one currently in the plugin uses a translation table, and builds it as a C char[] that is allocated only once. (Actually it currently uses the spacer, but that will have to change with the newer version of nwnx). Much faster as it only allocs once as opposed to the nwn string concat, which makes two new strings for each character that is evaluated and added to the translated text.
3. Array support. I am undecided as to whether to include this -- I planned on it, but haven't actually needed it so far, and so have not written it.
4. String Tokenizer - parse a string into tokens
5. regex matching
6. An interface that allows scheduled running of full scripts. For example schedule a recurring save of all PCs every 90 seconds.
7. ability to run arbitrary system commands and/or schedule commands -- is this even needed any longer? Does Gryphyn's plugin fill this gap?

ANyway, thoughts or suggestions are appreciated.
_________________
Khalidine, a NWN2 persistent world

Looking for volunteers.
Back to top
View user's profile Send private message
Gryphyn



Joined: 20 Jan 2005
Posts: 431

PostPosted: Wed May 23, 2007 5:24    Post subject: Re: Utility PLugin Reply with quote

Grinning Fool wrote:
I just wanted a place to put my thoughts together, and of course get some feedback. I'm working on a utility plugin that has an ever-expanding feature list. If you have thoughts or suggestions on how what I post can be improved upon, please make them here.

1. script call to shutdown the server, by going to the actual server window and exiting it (thanks to Grumalg for tracking down the info I need to make that happen)
2. language translations. Currently DMFI does this by building a string in game, one character at a time. The one currently in the plugin uses a translation table, and builds it as a C char[] that is allocated only once. (Actually it currently uses the spacer, but that will have to change with the newer version of nwnx). Much faster as it only allocs once as opposed to the nwn string concat, which makes two new strings for each character that is evaluated and added to the translated text.
3. Array support. I am undecided as to whether to include this -- I planned on it, but haven't actually needed it so far, and so have not written it.
4. String Tokenizer - parse a string into tokens
5. regex matching
6. An interface that allows scheduled running of full scripts. For example schedule a recurring save of all PCs every 90 seconds.
7. ability to run arbitrary system commands and/or schedule commands -- is this even needed any longer? Does Gryphyn's plugin fill this gap?

ANyway, thoughts or suggestions are appreciated.


2. I was looking at using the google/babelfish web translator for this. It's pretty easy post the original and receive the translation. I found most has to go via English so the end results can be 'amusing'.
Catches: It's an online service - so could be a little slow.
and It's not really good if you have a lot of translations required.

4. Nice - but findstring/substring covers most uses.

5. Overkill. If you have a need you'd build it into a plugin - not NWScript.

6. Can be managed in-code with user-defined events.

7. As long as you're not interested in a returned result

Cheers
Gryphyn
Back to top
View user's profile Send private message
Grinning Fool



Joined: 12 Feb 2005
Posts: 264

PostPosted: Wed May 23, 2007 16:17    Post subject: Reply with quote

2) I meant elf/gnome/custom world languages, etc which all do a straight text replacement. It would be cool though, to have actual language translations, but I think not fast enough for real-time use on a medium-traffic PW server.

4) For you perhaps Smile I do a lot of string tokenizing when parsing spoken text, and testing with the timer plugin has shown using this tokenizer to be faster (few dozen ms) iirc. The built in substring functions are fine for most uses, but they are relatively slow if you have to use them heavily. (Though I do need to rerun my tests under the new arch for nwnx)

As I said, these are all things that I'm using/have need of in my own PW for various reasons, so plan on making available. Feel free to use or not use them as suits you. Mostly, I'm looking for suggestions to improve them, or for additional ideas that this list may have triggered.
_________________
Khalidine, a NWN2 persistent world

Looking for volunteers.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Development All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
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