Subrace System

Development for CoPaP
Post Reply
marcush
World Leader: Greyhawk West
Posts: 40
Joined: Fri Dec 10, 2004 3:47 pm
Contact:

Subrace System

Post by marcush »

I am trying to get the Red Golem stuff setup for our module. I have the avlis_sr.jar up and running with the module however the avlis base mod doesn't have a conversation or npc for handling the subraces. I was wondering is there a total package that i could grab for integration.


Someone
World Leader - World of Greyhawk
teleri
World Leader: The Outlands
Posts: 497
Joined: Thu Jul 01, 2004 2:24 pm
Location: Sigil
Contact:

Re: Subrace System

Post by teleri »

marcush wrote:I am trying to get the Red Golem stuff setup for our module. I have the avlis_sr.jar up and running with the module however the avlis base mod doesn't have a conversation or npc for handling the subraces. I was wondering is there a total package that i could grab for integration.


Someone
World Leader - World of Greyhawk
The avlis_sr.jar is a replacement for the Red Golem l404_sr.jar it also requires a few modifications to the watcher.properties file as well as some changes elsewhere (I am not where I can look at it at the moment) to get the entire Red Golem system look here ... AUTOBIC
Cheers,
teleri

Building the Outlands one GateTown at a Time
[url=http://www.greatring.net][color=blue][u][b]The Outlands[/color][/u][/b][/url]
[url=http://www.diterlizzi.com/art/games/planescape/index.html][color=blue][u][b]The Look of PlaneScape[/color][/u][/b][/url]
marcush
World Leader: Greyhawk West
Posts: 40
Joined: Fri Dec 10, 2004 3:47 pm
Contact:

Post by marcush »

So I seem to have a piece of the system working

The Java App is connecting to the DB and loading files and when logging in the ELC is being checked and the characters are passing and such. However i just imported .erf for the Golem/conv for setting subraces and that doesn't seem to be working.

Any thoughts?


UPDATE:

So checking with the database seems to be writing the record for pass/fail on ELC

so that is good

but the conversation on the golem still isn't working basically whatever character i login with does not allow subraces to work


Someone
World Leader - World of Greyhawk
teleri
World Leader: The Outlands
Posts: 497
Joined: Thu Jul 01, 2004 2:24 pm
Location: Sigil
Contact:

Post by teleri »

marcush wrote:but the conversation on the golem still isn't working basically whatever character i login with does not allow subraces to work
I was having a similar error Kombinat helped me out I know nothing about java.
Cheers,
teleri

Building the Outlands one GateTown at a Time
[url=http://www.greatring.net][color=blue][u][b]The Outlands[/color][/u][/b][/url]
[url=http://www.diterlizzi.com/art/games/planescape/index.html][color=blue][u][b]The Look of PlaneScape[/color][/u][/b][/url]
marcush
World Leader: Greyhawk West
Posts: 40
Joined: Fri Dec 10, 2004 3:47 pm
Contact:

Post by marcush »

Okay now i have the conversation working required modifing the OnLoad event to enable the subrace system (in the base mod it is only enabled on one of the avlis servers i guess)

so now i can select my race and it says everything is applied and boots you but when you log back in your characters bic file hasn't changed.

*output from nwserverlog1.txt

[Tue Aug 09 19:33:11] L404_SR: Booting marcush to modify saved character file (Drow).
[Tue Aug 09 19:33:11] L404_SR: Command to follow this line:
L404EXECUTE:autobic -subrace Drow -player marcush
[Tue Aug 09 19:33:11] marcush Left as a Player (0 players left)
[Tue Aug 09 19:33:12] 60 Timestamp
Connection Attempt made by marcush (QVRT3P9V)
[Tue Aug 09 19:33:32] marcush (QVRT3P9V) Joined as Player 1
[Tue Aug 09 19:33:35] Locationtracking: Player marcush has logged into right server.
[Tue Aug 09 19:33:35] Locationtracking: Player marcush has already logged in before.
[Tue Aug 09 19:33:35] HIDE VARIABLE ERROR: Delolas Gallent does not have a hide.

Someone
World Leader - World of Greyhawk
teleri
World Leader: The Outlands
Posts: 497
Joined: Thu Jul 01, 2004 2:24 pm
Location: Sigil
Contact:

Post by teleri »

check and see if it saved your character to the localvault of your machine.
Cheers,
teleri

Building the Outlands one GateTown at a Time
[url=http://www.greatring.net][color=blue][u][b]The Outlands[/color][/u][/b][/url]
[url=http://www.diterlizzi.com/art/games/planescape/index.html][color=blue][u][b]The Look of PlaneScape[/color][/u][/b][/url]
marcush
World Leader: Greyhawk West
Posts: 40
Joined: Fri Dec 10, 2004 3:47 pm
Contact:

Post by marcush »

Only the initial character creation char is in the localvault.
Someone
World Leader - World of Greyhawk
terror2001
Ambassador: Greyhawk West
Posts: 70
Joined: Tue Jan 11, 2005 5:49 pm
Location: GMT -7(-6)

Post by terror2001 »

Probably you guys have already thought of this, but being a linux system, does NWN have rights set to write in the target folders?
marcush
World Leader: Greyhawk West
Posts: 40
Joined: Fri Dec 10, 2004 3:47 pm
Contact:

Post by marcush »

this is on a windows box
Someone
World Leader - World of Greyhawk
teleri
World Leader: The Outlands
Posts: 497
Joined: Thu Jul 01, 2004 2:24 pm
Location: Sigil
Contact:

Post by teleri »

Well I am out of ideas at this point without seeing th system...

Anyone else?
Cheers,
teleri

Building the Outlands one GateTown at a Time
[url=http://www.greatring.net][color=blue][u][b]The Outlands[/color][/u][/b][/url]
[url=http://www.diterlizzi.com/art/games/planescape/index.html][color=blue][u][b]The Look of PlaneScape[/color][/u][/b][/url]
kombinat
Planar Sage
Posts: 50
Joined: Tue Mar 02, 2004 9:50 am

Post by kombinat »

marcush wrote:Okay now i have the conversation working required modifing the OnLoad event to enable the subrace system (in the base mod it is only enabled on one of the avlis servers i guess)

so now i can select my race and it says everything is applied and boots you but when you log back in your characters bic file hasn't changed.

*output from nwserverlog1.txt

[Tue Aug 09 19:33:11] L404_SR: Booting marcush to modify saved character file (Drow).
[Tue Aug 09 19:33:11] L404_SR: Command to follow this line:
L404EXECUTE:autobic -subrace Drow -player marcush
[Tue Aug 09 19:33:11] marcush Left as a Player (0 players left)
[Tue Aug 09 19:33:12] 60 Timestamp
Connection Attempt made by marcush (QVRT3P9V)
[Tue Aug 09 19:33:32] marcush (QVRT3P9V) Joined as Player 1
[Tue Aug 09 19:33:35] Locationtracking: Player marcush has logged into right server.
[Tue Aug 09 19:33:35] Locationtracking: Player marcush has already logged in before.
[Tue Aug 09 19:33:35] HIDE VARIABLE ERROR: Delolas Gallent does not have a hide.

Someone
World Leader - World of Greyhawk
This line:

L404EXECUTE:autobic -subrace Drow -player marcush

is read in as a command by the Java program. Any problems it encounters trying to execute that command will get written to the Java program's log file, not to nwserverLog1.txt, so you need to find that file and post up the messages from that.

If you look in your NWN folder and your logs.0 folder, you should find the logwatcher log somewhere.

Are you running the Java program in Windowed or command-line mode?

Cheers,
kombinat
marcush
World Leader: Greyhawk West
Posts: 40
Joined: Fri Dec 10, 2004 3:47 pm
Contact:

Post by marcush »

So got it.

the issue was trying to use the avlis_sr.jar with the DBwatcher and the base red golem Golem/Conv which writes stuff to the log file expecting the java app to be reading it. So since the avlis zero mod doesn't include the conv or the Golem - I just rewrote the few scripts I needed to use the DB instead.

Seems to work great now
Someone
World Leader - World of Greyhawk
teleri
World Leader: The Outlands
Posts: 497
Joined: Thu Jul 01, 2004 2:24 pm
Location: Sigil
Contact:

Post by teleri »

marcush wrote:So got it.

the issue was trying to use the avlis_sr.jar with the DBwatcher and the base red golem Golem/Conv which writes stuff to the log file expecting the java app to be reading it. So since the avlis zero mod doesn't include the conv or the Golem - I just rewrote the few scripts I needed to use the DB instead.

Seems to work great now
Humm could you make those scripts avalible?
Cheers,
teleri

Building the Outlands one GateTown at a Time
[url=http://www.greatring.net][color=blue][u][b]The Outlands[/color][/u][/b][/url]
[url=http://www.diterlizzi.com/art/games/planescape/index.html][color=blue][u][b]The Look of PlaneScape[/color][/u][/b][/url]
marcush
World Leader: Greyhawk West
Posts: 40
Joined: Fri Dec 10, 2004 3:47 pm
Contact:

Post by marcush »

So what i did to get this all working

if you want the files
http://box.dweeb.net/nwn/files

Grab the l404_b6.zip
extract the l404_sr.erf out of the zip

Install Java VM
Get the following java packages

these 2 are from sun
mail.jar
activation.jar

this is from mysql
mysql-connector-java-3.1.10-bin.jar

make a directory
c:\NeverwinterNights\nwn\New2das

open up a hak editor of your choice and open the copap hak
extract all the 2da's and place them in the New2das directory

Grab the avlis_sr.jar watcher.properties startDBWatcher.cmd from the ftp site

Place them wherever (i just dropped them in the nwn directory)
Edit watcher.properties (here is mine - change the db username and pass to be yours)

# Properties file for Abyss404 Log Watcher and extensions

# INSTRUCTIONS: Go through this file and customize the settings for your server.
# At bare minimum, make sure the vault_path is set to your server's server vault.
#
# Comments can be added by preceeding a line with a '#' character.
#
# Path separators can use either the native path separator for your operating
# system or the java path separator which is a '/' character.


# This is the path to the nwn server's servervault.
# Make sure there is no slash at the end of the path
server_vault_path=C:\\NeverwinterNights\\NWN\\servervault

override_path=C:\\NeverwinterNights\\NWN\\override

validation_results_file=l404_validation.2da
database_connect_string=jdbc:mysql://localhost/nwn?user=<username>&password=<password>

default_log_path=C:\\NeverwinterNights\\NWN\\logs.0\\nwserverlog1.txt
auto_log_path1=C:\\NeverwinterNights\\NWN\\logs.0\\nwserverlog1.txt
#auto_log_path2=c:/NeverwinterNights/nwn/logs.1/nwserverLog1.txt
#auto_log_path3=c:/NeverwinterNights/nwn/logs.2/nwserverLog1.txt

tda.path=c:/NeverwinterNights/NWN/New2das

command_autobic=l404.autobic.DBAutoBic
command_autoelc=l404.autobic.DBEnforcer

command_autolog=l404.transcriber.AutoScribe

autoscribe.storagefile=transcript.txt
autoscribe.mailserver=box.dweeb.net
autoscribe.mailsender=box.dweeb.net
autoscribe.mailsubject=World of Greyhawk Autoscribe Conversation Transcript
autoscribe.mailcc=marcus@box.dweeb.net
autoscribe.mailbcc=marcus@box.dweeb.net
autoscribe.mailtop=This is a conversation transcript saved from within the World of Greyhawk.\n-----\n
autoscribe.mailbottom=-----\

Edit startDBWatcher.cmd (whereever you installed the .jar files to edit the path to include them

echo "Manual restart..." >> watcher.log
:start
date /t >> watcher.log
time /t >> watcher.log
echo "DBWatcher restart.">> watcher.log

java.exe -classpath l404_sr.jar;avlis_sr.jar;"c:\program files\java\mail.jar";"c:\program files\java\activation.jar";"c:\program files\java\mysql-connector-java-3.1.10-bin.jar" l404.watcher.DBCheckerThread watcher.properties
goto start

rem pause


Okay done with all the external stuff now for the internal scripts

Import l404_sr.erf

This will add the golem / conversation / subrace creation area / scripts that start with l404* for handling the conversation

so to switch this to support the db

Open up l404_sr_include
edit the bootLogSubrace

void bootLogSubrace(object oPlayer, object oSubraceDef){
string sPlayer = SQLEncodeSpecialChars(GetPCPlayerName(oPlayer));
string sCharname = ConvertToFilename(SQLEncodeSpecialChars(GetName(oPlayer)));
string sSpaceFormattedPlayerName = replaceSubString(sPlayer, " ", "*", TRUE);
string sRaceCode = replaceSubString(getSubraceDefField(oSubraceDef, FIELD_NAME), " ", "%20", TRUE);

SQLExecDirect("INSERT into " + ELC_TABLE_NAME + " (player,charname,message,done) values (" +
"'" + sSpaceFormattedPlayerName + "'," +
"'" + sCharname + "'," +
"'L404EXECUTE:autobic -subrace " + sRaceCode + " -player " + sSpaceFormattedPlayerName +"',0)");
DelayCommand(FETCH_RESULT_DELAY, processResult(oPlayer));
WriteTimestampedLogEntry("Booting " + sPlayer + " to modify saved character file (" + sRaceCode + ")");
// Do not export characters just now as this interferes with the checker
SetLocalInt(oPlayer, "ExportReady", 1);
DelayCommand(BLOCK_PLAYER_SAVE, DeleteLocalInt(oPlayer, "ExportReady"));
BootPC(oPlayer);
}

This makes when you go through the conv it will send an entry to the DB instead of writing it to the logfile

Add the following scripts

Module OnLoad
ExecuteScript("l404_sr_init", OBJECT_SELF);

Module OnActivate
ExecuteScript("l404_sr_activate", OBJECT_SELF);

Module OnUnAquire
ExecuteScript("l404_sr_unacquir", OBJECT_SELF);

Module OnClientEnter (should already be there if you use avlis zeromod)
ExecuteScript("avlis_sr_verify", OBJECT_SELF);


I believe this is it

*UPDATE*

of course as soon as i put this on our linux server it doesn't quite work since for whatever braintrust of a reason nwn behaves differently for windows / linux on file names - so it wants all CAPS for some .2da files also it lets you have greater than 16 char filenames.
Someone
World Leader - World of Greyhawk
teleri
World Leader: The Outlands
Posts: 497
Joined: Thu Jul 01, 2004 2:24 pm
Location: Sigil
Contact:

Post by teleri »

did you get a resolution to this and have it work?

I ask as I am getting compile errors on

Code: Select all

string sCharname = ConvertToFilename(SQLEncodeSpecialChars(GetName(pc)));


8/16/2005 9:44:51 PM: Error. 'l404_sr_include' did not compile.
l404_sr_include.nss(1010): ERROR: PARSING VARIABLE LIST

and

Code: Select all

DelayCommand(FETCH_RESULT_DELAY, processResult(pc));


8/16/2005 9:42:24 PM: Error. 'l404_sr_include' did not compile.
l404_sr_include.nss(1015): ERROR: UNDEFINED IDENTIFIER (processResult)
is the processResult a function you wrote?
Cheers,
teleri

Building the Outlands one GateTown at a Time
[url=http://www.greatring.net][color=blue][u][b]The Outlands[/color][/u][/b][/url]
[url=http://www.diterlizzi.com/art/games/planescape/index.html][color=blue][u][b]The Look of PlaneScape[/color][/u][/b][/url]
marcush
World Leader: Greyhawk West
Posts: 40
Joined: Fri Dec 10, 2004 3:47 pm
Contact:

Post by marcush »

Actually this is an avlis_sr_inc function from the zero mod
I actually combined the l404_sr_inc and avlis_sr_inc together since they are for the same thing
Someone
World Leader - World of Greyhawk
Post Reply