New for 1.69

Edit: the GeSHi file can be found here.

The site’s back from over a year of it just sitting here collecting spam. I’ll try to post a bit more often (every 6 months maybe :D ). Like NWN1, it’s back and shiny and looks prettier than before. It also has proper nwscript highlighting thanks to Jasperre kindly giving me a copy of the nwscript pastebin’s GeSHi file.

So here’s the new functions from 1.69 as a test…
Continue reading this entry »


PRC Server Pack Install

The server pack contains many useful utilities for running a server with the PRC. It is available as a Windows installer or a rar archive for manual installation. This covers manually installing the server pack and what to do with the components. While it is designed for a server running on Windows, the server pack is still useful for Linux servers because it contains the precacher.

The current version of the server pack is 1.7.

Continue reading this entry »


MySQL version of the PRC precacher data: part 2

Updated 5th August 2007

Now that the precacher generates the correct mySQL syntax, it’s a lot easier to create. It now only takes a few minutes, but here’s the one for NWN1.68 + PRC3.1d anyway:

outprc31e_mysql.rar

Importing it into mySQL

For Windows, assumes mySQL is in the PATH:

  1. open a command prompt
  2. go to the directory you unRARed the file
  3. type: mysql -u user -p databasename < out.sql > out.log (er…replace the user and databasename with whatever it should be)
  4. enter the password when prompted
  5. go do something else for 5 minutes (the sql instructions are 50MB uncompressed)

For Linux (with thanks to Tom), the command line is:
cat out.sql| mysql -u user -p databasename

There are several arguements that mysql takes, eg -u username and –user=username are equivalent, see the MySQL manual.

The log file will be empty, but it stops mySQL echoing a confirmation after every line of the sql file (it has a lot of lines) and it stops if it encounters an error.

(and the sqlite one for the super lazy: outprc31e_sqlite.rar)


Controlling PRC Classes

It is possible to ban players from levelling in a specific PRC class. Both base classes and prestige classes can be restricted. This is based on the Bioware Prestige Class control variables script.

This example uses the OA Samurai, but will work for any class. A variable is set on the PC in the OnClientEnter script to stop leveling in that class.

Step 1: Go looking for the variable name

The variable name can be found by looking through the PRC 2da files. Which you will have handily extracted to run the precacher. If not, open prc_2das.hak in nwnexplorer.

You need the 2da called cls_pres_xxx.2da, where xxx is an abbreviation of the class name. For OA samurai, it is cls_pres_samur.2da. Browse/open this file.

Step 2: Find the variable name

The 2da should look like:

2DA V2.0

  LABEL     ReqType ReqParam1        ReqParam2
0 ScriptVar VAR     PRC_AllowSamurai 0

This one is nice and simple – the only line there is what we want. Other classes have more entries in their cls_pres_xxx 2da. The one you want will have the label ScriptVar and be called something like PRC_Allow[...] in the ReqParam1 column. The variable name we use is PRC_AllowSamurai.

Step 3: Add the code to onClientEnter

object oPC = GetEnteringObject();
 
// bans PCs from taking OA samurai levels
SetLocalInt(oPC, "PRC_AllowSamurai", 1);

It can also be used to make leveling in a certain class conditional on, for example, having completed a quest.