APS/NWNX released

Avlis Headlines - www.avlis.org

Moderator: Event DM

Dukar_Rizulin
Newbie
Posts: 8
Joined: Tue Jan 28, 2003 7:53 pm

sorry i couldn't edit my obove post to put the Link

Post by Dukar_Rizulin » Thu Jan 30, 2003 8:14 am

Papillon
Team Member; Retired with Honors
Posts: 3155
Joined: Thu Jul 18, 2002 11:17 pm
Contact:

Post by Papillon » Thu Jan 30, 2003 9:00 am

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?
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.
Papillon
Team Member; Retired with Honors
Posts: 3155
Joined: Thu Jul 18, 2002 11:17 pm
Contact:

Post by Papillon » Thu Jan 30, 2003 9:04 am

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!
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.

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 !
Papillon
Team Member; Retired with Honors
Posts: 3155
Joined: Thu Jul 18, 2002 11:17 pm
Contact:

Post by Papillon » Thu Jan 30, 2003 9:07 am

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...
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.

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.
Papillon
Team Member; Retired with Honors
Posts: 3155
Joined: Thu Jul 18, 2002 11:17 pm
Contact:

Post by Papillon » Thu Jan 30, 2003 9:13 am

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
Newbie
Posts: 8
Joined: Tue Jan 28, 2003 7:53 pm

kool thanks Papillon!

Post by Dukar_Rizulin » Thu Jan 30, 2003 9:15 am

your a great help to the community

Sorry it is a little sloppy code wise hope i'm not going to bore you :D
FastFrench
Whiney Peasant
Posts: 15
Joined: Wed Jan 29, 2003 10:42 am

Post by FastFrench » Thu Jan 30, 2003 9:40 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).
Dukar_Rizulin
Newbie
Posts: 8
Joined: Tue Jan 28, 2003 7:53 pm

Problems With APS_Banker Warning Don't Use

Post by Dukar_Rizulin » Thu Jan 30, 2003 10:01 am

i'll upload a better copy in a hour or three

shows what happens when you don't test your creations first
Dukar_Rizulin
Newbie
Posts: 8
Joined: Tue Jan 28, 2003 7:53 pm

NWNX/APS script APS_Banker [Updated]

Post by Dukar_Rizulin » Thu Jan 30, 2003 10:41 am

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
User avatar
DreaM
Newbie
Posts: 5
Joined: Tue Jan 28, 2003 5:37 pm
Contact:

Post by DreaM » Thu Jan 30, 2003 11:45 am

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.
by DreaM
Dukar_Rizulin
Newbie
Posts: 8
Joined: Tue Jan 28, 2003 7:53 pm

Post by Dukar_Rizulin » Thu Jan 30, 2003 12:23 pm

Originally 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.
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 other
Murci?lago
Newbie
Posts: 1
Joined: Thu Jan 30, 2003 3:45 pm

Post by Murci?lago » Thu Jan 30, 2003 3:48 pm

Fantastic job!
Are you working to a Linux version? Do you know when it will be ready?
FastFrench
Whiney Peasant
Posts: 15
Joined: Wed Jan 29, 2003 10:42 am

Post by FastFrench » Thu Jan 30, 2003 4:54 pm

BTW, what language did you use to make the NWN extender ?

Hope you'll download the sources soon, so I can integrate it in my NWserver monitoring tool :)
FastFrench
Whiney Peasant
Posts: 15
Joined: Wed Jan 29, 2003 10:42 am

Post by FastFrench » Thu Jan 30, 2003 5:06 pm

Also, as you have found a way to communicate with NWN in the 2 directions, we could imagine other kind of extension for NWN, like better treasure or monster generation.
User avatar
Mikel of Avalon
Newbie
Posts: 8
Joined: Wed Jan 29, 2003 11:05 am
Contact:

Post by Mikel of Avalon » Fri Jan 31, 2003 12:01 pm

Please can you specify it's true a linux version of this great extension is comming and when - how long i must wait for a linux version. I don`t willing turn the server back to Windows ...
Papillon
Team Member; Retired with Honors
Posts: 3155
Joined: Thu Jul 18, 2002 11:17 pm
Contact:

Post by Papillon » Fri Jan 31, 2003 4:48 pm

I think there will be a Linux version. I don't have the slightest idea when it will be ready. This is probably the last time I answered this question :-)
User avatar
Mikel of Avalon
Newbie
Posts: 8
Joined: Wed Jan 29, 2003 11:05 am
Contact:

Post by Mikel of Avalon » Fri Jan 31, 2003 5:47 pm

Thanx for answer - we have wait so long for a extension like this - so i have time to wait you release a linux version ...

Gerat work, Thanx
User avatar
MAsKrA
Newbie
Posts: 2
Joined: Sat Feb 01, 2003 8:19 pm
Location: Hell Near KHNUM
Contact:

Post by MAsKrA » Sat Feb 01, 2003 8:42 pm

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 :)
Stormsong
Whiney Peasant
Posts: 12
Joined: Mon Jan 20, 2003 3:34 am

Post by Stormsong » Sat Feb 01, 2003 8:59 pm

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?
Stormsong
Whiney Peasant
Posts: 12
Joined: Mon Jan 20, 2003 3:34 am

Post by Stormsong » Sat Feb 01, 2003 10:10 pm

Got this answered elsewhere. Thanks.
User avatar
MAsKrA
Newbie
Posts: 2
Joined: Sat Feb 01, 2003 8:19 pm
Location: Hell Near KHNUM
Contact:

Post by MAsKrA » Sat Feb 01, 2003 10:38 pm

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?
I know you got it solved but for the sake of whoever else wonders...

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.
slabar
Whiney Peasant
Posts: 14
Joined: Sun Feb 02, 2003 1:08 am
Contact:

Post by slabar » Sun Feb 02, 2003 1:11 am

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.
Dregan
Newbie
Posts: 5
Joined: Sun Feb 02, 2003 11:37 pm

Serious flaw in NWNX

Post by Dregan » Sun Feb 02, 2003 11:43 pm

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
Chiatroll
Scholar of Fools
Posts: 494
Joined: Mon Oct 21, 2002 7:52 am

Post by Chiatroll » Sun Feb 02, 2003 11:57 pm

Isn't this Avlis a large PW?

I don't rememebr hearing avlis gets any more CPU usage from it.
Give a man a match and he will be warm for a short while.
Burn a man to death and he will be warm for life.
User avatar
tindertwiggy
Legacy DM
Legacy DM
Posts: 6905
Joined: Tue Jul 16, 2002 12:20 am
Location: Newish England
Contact:

Post by tindertwiggy » Mon Feb 03, 2003 12:04 am

Mikona in itself is larger than a lot of PW mods out there... But pap will have to address this because I know nothing :)
Happiness is baked with one part bat guano, one part sulfur.
Post Reply