• Latest news

Avlis Team cracks the persistance barrier with real-time dat


Who needs to wait for Bioware? Five days ahead of Bioware?s database connectivity announcement, the Avlis Team went into a secret

closed-beta test. In the months since Neverwinternights (NWN) went gold, the elusive goal of true

persistence has been all but achievable. The beginning of that beta test was to finally push that

effort over the edge.



We are happy to announce to the NWN Community that the Avlis Team has developed a real-time Open

Database Connectivity (ODBC) persistence system which is now undergoing internal-beta testing.

Unlike current systems, which utilize either tokens to hold information or creatively read the

log file and re-compile it into the module, the Avlis Persistence System (APS) and the underlying

NWN Extender (NWNX) read information from a database on the fly and change special local variables

inside NWN in real-time. This revolutionary feat was accomplished by Avlis Team Member Papillon, a

NWN community contributor and resident Avlis Team genius.



In short, the NWNX works by running the NWN server application as a child process and tracking some

special local variables that are set in game. It uses no hakpaks, and the only in-game NWN modification

necessary is the addition of either the scripts for the APS, or your own custom modified SQL

functions. Whenever a script wants to generate a SQL query, it calls our functions and the Extender

pulls the query out of the memory of the NWN server. It then passes it to the database, and writes

the result of the query back into the memory of the server. The database has been tested with Microsoft

Access and MySQL so far. Conceivably, any database with a decent ODBC driver will work. Also, because

of the nature of ODBC logistics, multiple servers can be linked up to one database file to produce

100% reliable cross- server persistence. A variable can be set on one server and checked on another.



The NWNX application takes up nearly 0% CPU usage and it adapts to internal changes in the NWN server

application as they occur. It does not depend on a specific version of the server (1.27 as of this

writing) and thus will work with upcoming releases, too. We have a version for Windows NT/XP and plan

to implement a Linux port of NWNX after the initial release.



Another useful feature of NWNX is the ability to use result sets in a query. This means that for some

queries it is possible to send back more than one piece of information to the NWN server. A good

example of where this would be useful is persistent chests. A normal chest?s contents are wiped out on

server restart. With NWNX, items in the chest can be set as local persistent objects on the chest.

When someone opens the chest, a single open chest query is made and all the objects inside the chest

are returned in the query. Again, this is just one example of what can be done with this program.



This technology opens up many possibilities for persistent worlds in the NWN Community. The number of

possible offshoot ideas are limitless.



Papillon and the Avlis Team will release this software to the community and continue to develop and

improve it. The release will occur after the internal beta-testing is completed. We have many ideas

of our own about what we can do next, now that the possibilities for NWN have just been blown wide open.

Views: 21614  •  Comments: 15  •  Write comments [ Back ]