APS/NWNX released
Moderator: Event DM
-
- Newbie
- Posts: 8
- Joined: Tue Jan 28, 2003 7:53 pm
Rush, I added you to my ICQ client. Let's talk about your problem next time your on. Alternatively, you can send me your mod and I'll have a look at it.Originally posted by Rush
When I start my module up, I'm getting 0 bytes reserved for requests, but 4000+ bytes reserved for responses. This obviously keeps me from asking the Database to store and retrieve info... Any ideas?
I actively disabled stackable items because the current implementation of persistent containers makes use of the OnDisturbed event. This Event is buggy when it comes to stackable items: take a stackable item from the container (say a potion) and make sure you already have some of these potions in your inventory. The event won't fire.Originally posted by GorbGuy
What a great and hopefully promising addition to NWN. This was very much needed as BioWare seemed to think that their product wouldn't be used for ongoing and ever changing world. Thanks a lot to all the people responsible for this....
Now for the question; you knew that was coming. We're trying to place stackable objects (ie - GP, bullets, etc.) into test persistant containers, but keep getting an error message saying no Stackables allowed. How do we change this? Or work around it?
Thanks again!
This means that the code wouldn't be able to deduct the potion from the database and so this would be an effective way of duping stackable items.
You can do something about it: Ask Bioware to fix this bug !
Ok first of all, we need to find out why NWNX finds 0 bytes for requests. Otherwise it never will be able to read the requests APS makes.Originally posted by Rush
I've got a heartbeat script to save character locations....
[...]
but it doesn't seem to be working at all. I'm not sending any requests to the database... I tried doing it when the character was exiting but it saves null values because characters that have left have no location to save.... Any suggestions? I'm looking to save character locations to improve persistence...
Second, I wouldn't recommend putting this in a heartbeat event. What about OnAreaEnter or Exit event ? This would be more easy on the server and would save only the characters that actually move around. Or you could save the location OnRest, this is what Silk did for Avlis.
Zeruel, your post is a nice description of the included persistent container description. The only feature missing from it (the description) is a column for the identified state of the item. I explained in another post why stackable items are not supported.
Dukar_Rizulin, thanks for the Banker ! I'll have a look at it later today.
Dukar_Rizulin, thanks for the Banker ! I'll have a look at it later today.
-
- Newbie
- Posts: 8
- Joined: Tue Jan 28, 2003 7:53 pm
kool thanks Papillon!
your a great help to the community
Sorry it is a little sloppy code wise hope i'm not going to bore you
Sorry it is a little sloppy code wise hope i'm not going to bore you

-
- Whiney Peasant
- Posts: 15
- Joined: Wed Jan 29, 2003 10:42 am
To save position of char:
what I do, it's a function that calls itself every 2 minutes, and update permanent position (with tokens for now, will move to APS as soon as the code will be available, looks really great) only if the PC is at least 10 meters (or < 0.0 = changed area) from his presiously saved location.
It's the most 'precision vs lag' efficient solution I've found so far. As APS saving should be faster than token update, you could want to decrease the delay down to 1 min.
I feel that just doing it on Rest is not often enough, and on each Area enter, not precise (you basically only have area information, but never position inside the area), and a bit annoying to implement on a 200+ areas module. I also don't suggest doing it on Heartbeat, every 6 seconds is far too often (=lot of lag if many players).
what I do, it's a function that calls itself every 2 minutes, and update permanent position (with tokens for now, will move to APS as soon as the code will be available, looks really great) only if the PC is at least 10 meters (or < 0.0 = changed area) from his presiously saved location.
It's the most 'precision vs lag' efficient solution I've found so far. As APS saving should be faster than token update, you could want to decrease the delay down to 1 min.
I feel that just doing it on Rest is not often enough, and on each Area enter, not precise (you basically only have area information, but never position inside the area), and a bit annoying to implement on a 200+ areas module. I also don't suggest doing it on Heartbeat, every 6 seconds is far too often (=lot of lag if many players).
-
- Newbie
- Posts: 8
- Joined: Tue Jan 28, 2003 7:53 pm
Problems With APS_Banker Warning Don't Use
i'll upload a better copy in a hour or three
shows what happens when you don't test your creations first
shows what happens when you don't test your creations first
-
- Newbie
- Posts: 8
- Joined: Tue Jan 28, 2003 7:53 pm
NWNX/APS script APS_Banker [Updated]
it works perfectly except i canna get the <CUSTOM001> token will not work with your system i guess
papillon hope it works really and i'm just doofy
Click here
papillon hope it works really and i'm just doofy
Click here
-
- Newbie
- Posts: 8
- Joined: Tue Jan 28, 2003 7:53 pm
Don't worry about it in fact you won't need setIntPersistent if you have this Butt for some reason ii'm thinking your not sure so just don't remove those unless your sure but they won't mess up each otherOriginally posted by DreaM
I use the HC 2.0, and there are functions called setIntPersistent and so on, can it get in conflict with the APS?? I'm a bit worried.
-
- Newbie
- Posts: 1
- Joined: Thu Jan 30, 2003 3:45 pm
-
- Whiney Peasant
- Posts: 15
- Joined: Wed Jan 29, 2003 10:42 am
-
- Whiney Peasant
- Posts: 15
- Joined: Wed Jan 29, 2003 10:42 am
- Mikel of Avalon
- Newbie
- Posts: 8
- Joined: Wed Jan 29, 2003 11:05 am
- Contact:
- Mikel of Avalon
- Newbie
- Posts: 8
- Joined: Wed Jan 29, 2003 11:05 am
- Contact:
Have thanks been said beofer? 
Anyways I hope to save some time for some who may be using a remote MySQL server. This is for the MySQL server that comes with RedHat 8:
Description of problem:
Remote connections to mysql fail.
Steps to Reproduce:
1.Try a remote connection to an 8.0 box running mysql. not only with this system but any remote MySQL connections to server.
Solution:
You might want to upgrade to MySQL-3.23.53a-1.
or
Add the following to /etc/my.cnf in the [mysqld] section:
set-variable = thread_stack=256k
Hope that saves someone some time. I have tested this connecting from Windows XP NWN server to a remote RH 8 server running MySQL 3.23.54
Again have I said thanks

Anyways I hope to save some time for some who may be using a remote MySQL server. This is for the MySQL server that comes with RedHat 8:
Description of problem:
Remote connections to mysql fail.
Steps to Reproduce:
1.Try a remote connection to an 8.0 box running mysql. not only with this system but any remote MySQL connections to server.
Solution:
You might want to upgrade to MySQL-3.23.53a-1.

or
Add the following to /etc/my.cnf in the [mysqld] section:
set-variable = thread_stack=256k
Hope that saves someone some time. I have tested this connecting from Windows XP NWN server to a remote RH 8 server running MySQL 3.23.54
Again have I said thanks

Guys, this is a great thing and has worked well in testing with a local access database.
Now to the part where I feel like a total dope.
My problem now is that I want to connect to a MySQL database on another computer out there in the internet cloud. I didn't find instructions on this. Two problems that immediatly come to mind.
Where do I find an ODBC driver for MySQL? There isn't one by default in XP Pro.
How do I go about connecting to the remote database?
Is there an install set of instructions out there for this?
Can you help a poor lost coder?
Now to the part where I feel like a total dope.
My problem now is that I want to connect to a MySQL database on another computer out there in the internet cloud. I didn't find instructions on this. Two problems that immediatly come to mind.
Where do I find an ODBC driver for MySQL? There isn't one by default in XP Pro.
How do I go about connecting to the remote database?
Is there an install set of instructions out there for this?
Can you help a poor lost coder?
I know you got it solved but for the sake of whoever else wonders...Originally posted by Stormsong
Guys, this is a great thing and has worked well in testing with a local access database.
Now to the part where I feel like a total dope.
My problem now is that I want to connect to a MySQL database on another computer out there in the internet cloud. I didn't find instructions on this. Two problems that immediatly come to mind.
Where do I find an ODBC driver for MySQL? There isn't one by default in XP Pro.
How do I go about connecting to the remote database?
Is there an install set of instructions out there for this?
Can you help a poor lost coder?
On your Windows system you have to install MySQL Connector/ODBC
Then follow the instructions but using the MyODBC driver. Everything else should be just fill in the blanks.
I am new to persistent worlds and am an average scripter so I need a little help in setting up some things. I had an easy time setting the PW database up and the persistent chests but am now stuck.
1) How do I script a persistent variable into the table? I assume I would use SetPersistentVariable but then how do I get that data into my table.
2) I want to keep track of starting locations when the PC logs off or rests. How do I script that?
3) I would love to keep the world time from game to game. This is something I wish to do as we are only semi-persistent (playing once a week). How do I do this?
Thanks for both your help and your patience.
1) How do I script a persistent variable into the table? I assume I would use SetPersistentVariable but then how do I get that data into my table.
2) I want to keep track of starting locations when the PC logs off or rests. How do I script that?
3) I would love to keep the world time from game to game. This is something I wish to do as we are only semi-persistent (playing once a week). How do I do this?
Thanks for both your help and your patience.
Serious flaw in NWNX
Hello there,
I have found a SERIOUS flaw with this system. Basically
the cpu usage is increased by a massive amount from the
standard server. This is related to the cpu usage of the
world to begin with. The system works quite excellent,
but is not usable on the very larger persistent world that
I work with. To verify this problem, a large MOD must be
used.
To give you an idea of the cpu usage difference, I use and
AMD 2000 XP system with 512 MB, and I a large module
available for download on NWVault called "White Plume
Mountain". When I run it directly with the nwserver.exe
program, and no one on the server, the cpu is roughly 4%
usage, with a small bounce of around +/- 3%. When I run
it through the NWNX application, it sits at 45% cpu usage
with very predictable bounces of +/-10%, again with no one
on the server.
This problem exists on the two machines that I have
tested, and it proves to be unacceptable for a larger PW
world. I would greatly love to use this system, but
without this resolved, it may prove unavailable.
I have also located several smaller flaws in the APS system, and determined work-around. The first is a resolution to the problem mentioned earlier about finding 0 bytes for requests. This is caused by using the OnSpawn event for APS functions. These events occur prior to the OnModuleLoad, and are therefore out of the desired sequence. I set a local variable flag on the creature, and then execute it later when a heratbeat fires off. A better solution would be to create the buffers automatically on the first call to any of the APS functions, instead of relyin upon the SQL_INIT function. Another problem is used the APS with the OnClientLeave function, where a player's object is no longer flagged as a PC and does not have a name or tag. A fix for this is to store a PC's name, tag, and PC status into a local variable, and only use local variables in the APS scripts.
Thanks for any help,
Dave
I have found a SERIOUS flaw with this system. Basically
the cpu usage is increased by a massive amount from the
standard server. This is related to the cpu usage of the
world to begin with. The system works quite excellent,
but is not usable on the very larger persistent world that
I work with. To verify this problem, a large MOD must be
used.
To give you an idea of the cpu usage difference, I use and
AMD 2000 XP system with 512 MB, and I a large module
available for download on NWVault called "White Plume
Mountain". When I run it directly with the nwserver.exe
program, and no one on the server, the cpu is roughly 4%
usage, with a small bounce of around +/- 3%. When I run
it through the NWNX application, it sits at 45% cpu usage
with very predictable bounces of +/-10%, again with no one
on the server.
This problem exists on the two machines that I have
tested, and it proves to be unacceptable for a larger PW
world. I would greatly love to use this system, but
without this resolved, it may prove unavailable.
I have also located several smaller flaws in the APS system, and determined work-around. The first is a resolution to the problem mentioned earlier about finding 0 bytes for requests. This is caused by using the OnSpawn event for APS functions. These events occur prior to the OnModuleLoad, and are therefore out of the desired sequence. I set a local variable flag on the creature, and then execute it later when a heratbeat fires off. A better solution would be to create the buffers automatically on the first call to any of the APS functions, instead of relyin upon the SQL_INIT function. Another problem is used the APS with the OnClientLeave function, where a player's object is no longer flagged as a PC and does not have a name or tag. A fix for this is to store a PC's name, tag, and PC status into a local variable, and only use local variables in the APS scripts.
Thanks for any help,
Dave
- tindertwiggy
- Legacy DM
- Posts: 6905
- Joined: Tue Jul 16, 2002 12:20 am
- Location: Newish England
- Contact: