Player Resource Consortium

Neverwinter Nights => Builders => Topic started by: Silvercloud on January 15, 2012, 03:59:02 PM

Title: Precacher - Missing file errors
Post by: Silvercloud on January 15, 2012, 03:59:02 PM
Im running the precacher to make an sqlite db. I'm getting some missing file errors and I'm just wondering if they are anything to worry about. In particular this concerns:

appearance.2da
portraits.2da
soundset.2da
wingmodel.2da
tailmodel.2da
gender.2da
Title: Re: Precacher - Missing file errors
Post by: xwarren on January 16, 2012, 02:23:48 AM
Those files are used by ConvoCC, so it's not really good that they are missing. If you instlled PRC ServerPack correctly, than all those files are in bioware2das.7z. They should be extracted during precache process:
Quote
del precacher2das\*.2da
mkdir precacher2das
7za x bioware2das.7z -oprecacher2das
erf -x hak\prc_2das.hak
erf -x hak\prc_race.hak
...

That's the only place where 7za.exe is used. Do you have both files (bioware2das.7z and 7za.exe) in your NWN directory? You could extract files manually and modify 'precacher sqlite prc.bat'.
Title: Re: Precacher - Missing file errors
Post by: Silvercloud on January 17, 2012, 02:16:51 AM
Hmmm, I do have the 7a.exe and the bioware2das.7z in there.... maybe its something to do with running windows 7?
Title: Re: Precacher - Missing file errors
Post by: xwarren on January 17, 2012, 02:30:01 AM
Hmmm, I do have the 7a.exe and the bioware2das.7z in there.... maybe its something to do with running windows 7?

It's possible. Try this:
1. edit "precacher sqlite prc.bat" file in notepad:
Quote
rem del precacher2das\*.2da
rem mkdir precacher2das
rem 7za x bioware2das.7z -oprecacher2das
erf -x hak\prc_2das.hak
erf -x hak\prc_race.hak
...
2. save the file
3. extract bioware2das.7z to precacher2das folder (you should already have it, if not create one)
4. run "prechacher sqlite prc.bat"
Title: Re: Precacher - Missing file errors
Post by: Silvercloud on January 22, 2012, 07:50:25 AM
Ah i found that the precacher2das folder already had the bioware files. However the precacher hiccups with the appearance.2da i supplied from CEP into the custom2das folder, giving an error on applying the SQL, that ":" unrecognized token. However by using default bioware appearance.2da it works... so for now I will use that...
Title: Re: Precacher - Missing file errors
Post by: xwarren on January 22, 2012, 08:08:55 AM
Ah i found that the precacher2das folder already had the bioware files. However the precacher hiccups with the appearance.2da i supplied from CEP into the custom2das folder, giving an error on applying the SQL, that ":" unrecognized token. However by using default bioware appearance.2da it works... so for now I will use that...
appearance.2da from CEP can't be imported into sql because some labes contain single quote marks ('). I usually replace them with apostrophe marks (`- near Esc button).
Title: Re: Precacher - Missing file errors
Post by: Silvercloud on January 22, 2012, 10:01:42 AM
I have attached my edited files... the precacher seems to be able to precache the default PRC RC1 3.5, but not once i put these in custom2das folder... any ideas?
Title: Re: Precacher - Missing file errors
Post by: xwarren on January 22, 2012, 10:24:20 AM
I have attached my edited files... the precacher seems to be able to precache the default PRC RC1 3.5, but not once i put these in custom2das folder... any ideas?
Always use space in 2da files (no tabs).
The entry for Halari Rakshasa in racialtypes and racialappear is a bit wrong. the label should be Halari_Rakshasa or HalariRakshasa (without space) otherwise that's two entries and it makes that 2da line too long.
Title: Re: Precacher - Missing file errors
Post by: DM Heatstroke on January 22, 2012, 10:42:24 AM
I have attached my edited files... the precacher seems to be able to precache the default PRC RC1 3.5, but not once i put these in custom2das folder... any ideas?

You left a space between halari & rakshasa in the label fields of both 2das.  This is wrong.  They need to be"Halari_Rakshasa".  The underscore is important.
Title: Re: Precacher - Missing file errors
Post by: Silvercloud on January 22, 2012, 11:03:44 AM
Yep thanks, that did it!

It all works like it should now... only question I have remaining is about the ConvoCC... it seems the feat selection needs a long loadtime (even though it is precached), I assume this is to do with the enormous amount of feats the PRC has, but if a char gets to select 2 feats, the loadtime is twice 5 mins to load it (e.g. t doesn't get faster for the second feat selection). Anything I can do to speed this up?
Title: Re: Precacher - Missing file errors
Post by: DM Heatstroke on January 22, 2012, 12:11:19 PM
Yep thanks, that did it!

It all works like it should now... only question I have remaining is about the ConvoCC... it seems the feat selection needs a long loadtime (even though it is precached), I assume this is to do with the enormous amount of feats the PRC has, but if a char gets to select 2 feats, the loadtime is twice 5 mins to load it (e.g. t doesn't get faster for the second feat selection). Anything I can do to speed this up?

It shouldn't take anywhere near that long.  It's about 10-15 seconds on my server.  Are you using SQLite or MySQL?  Are you getting any ODBC errors in the log?  Can you list the PRC switches you are using?
Title: Re: Precacher - Missing file errors
Post by: Silvercloud on January 22, 2012, 03:34:18 PM
Sqlite, no ODBC errors and running on windows 7, dual core processor 2.2 ghz, 8 GB RAM (so above spec)
here is my nwnx.ini:


Quote
[NWNX]
ServerPort = 5121
ModuleName = "Dark Crystal Reborn"
WatchdogProcess = yes
UpdateIntervalProcess = 5
WatchdogGamespy = no
UpdateIntervalGamespy = 20
GamespyRetries = 5
OldGamespyProtocol = no
RestartDelay = 5
PVP Setting=None

[ODBC2]
; Log file
MaxLogSize = 512 ; in KByte
LogLevel = 2 ; 0=nothing, 1=only errors, 2=everything

; Use these two settings for the SQLite internal database
source = sqlite
file   = sqlite.db

; Use these two settings for ODBC connections
;source = odbc
;dsn    = nwn

; Use these five settings for MySQL connections
;source = mysql
;server = localhost
;user   = nwn
;pwd    = password
;db     = nwn

; Set hookscorco to false if you want to disable hooking of
; StoreCampaignObject and RetrieveCampaignObject entirely
hookscorco = true

[PROFILER]
MaxLogSize = 512 ; in KByte
LogLevel = 1 ; 1=overall statistics, 2=full script callstack

and my nwplayer.ini

Quote
[Game Options]
Heartbeat Logging=0
Difficulty Level=2
Log Model Errors=0
Death Logging=0

[Control Options]

[Profile]

[Server Options]
MPEnabled=1
Game Port=*************
Max Players=12
MinCharLevel=1
MaxCharLevel=40
Server Name=Dark Crystal
DMPassword=*************
PlayerPassword=*************
Reload Module When Empty=0
GameSpy Enabled=1
Game Type=10
PVP Setting=0
PauseAndPlay=0
Disable AutoSave=1
Auto Save Interval=0
AllowLocalChars=0
Game Region=0
ServerDownTimer=180
One Party Only=0
Enforce Legal Characters=0
ItemLevelRestrictions=0
Suppress Base Servervault=1
CD Banned Behavior=0
Disallow Shouting=0
ShowDMJoinedMessage=1
Saving Throw Automatic Failure On 1=0
BackupSavedChars=0
Validate Spells=1
Examine CR On Creatures=1
Examine Effects On Creatures=1
Max Hit Points=1
Hide Hit Points Gained=0
Restore Spell Uses On Login=1
Always Reset Encounter Spawns=1
Master Server Authentication Required For Player Login=0
Account validation required during Master Server down times=0
2DA Cache Size=10


[Banned Ips]
0=

[Banned Players]
0=

[Banned CD Keys]
0=
[Script Options]
Enable Profiling=0
Enable Logging=0

As for module switches... i got a bunch, but im guessing these are the ones that matter:
PRC_CONVOCC_ALLOW_SKILL_POINT_ROLLOVER
PRC_CONVOCC_ALLOW_TO_KEEP_PORTRAIT
PRC_CONVOCC_ALLOW_TO_KEEP_VOICESET
PRC_CONVOCC_BONUS_FEATS (2)
PRC_CONVOCC_ENABLE
PRC_CONVOCC_ENCRYPTION_KEY
PRC_CONVOCC_ENFORCE_FEATS
PRC_CONVOCC_MAX_STAT(20)
PRC_CONVOCC_ONLY_PLAYER_VOICESETS
PRC_CONVOCC_SKILL_BONUS
PRC_CONVOCC_SKILL_MULTIPLIER
PRC_CONVOCC_STAT_POINTS
PRC_CONVOCC_USE_RACIAL_PORTRAIT
PRC_DB_SQLITE
PRC_LETOSCRIPT_FIX_ABILITIES
PRC_LETOSCRIPT_NWN_DIR (no errors so it IS communicating with the DB)
PRC_PW_PC_AUTOEXPORT
PRC_PW_MAPPIN_TRACKING
PRC_PW_LOCATION_TRACKING
PRC_PW_SPELL_TRACKING
PRC_PW_HP_TRACKING
PRC_PW_DEATH_TRACKING
PRC_USE_DATABASE
PRC_USE_LETOSCRIPT

that should be the important switches...




Title: Re: Precacher - Missing file errors
Post by: Silvercloud on January 22, 2012, 03:52:30 PM
Did another test with a stopwatch... CPU maxes out for approximately 3 mins.... then allows you to pick a feat and the same happens again.... another 3 mins before you can do something...

Once its done, the module also does not generate an updated BIC, logging in allows you to recreate the char all over again and checking the servervault for any changes also shows nothing has happened...

I checked the letoscript logs and the last entry shows:

Quote
<29.18ms> Req:"SCRIPT", Param:"%LETOTEST = q{D:/NWserver/servervault/Silvertje/giliahgoodman.bic}; print /FirstName;print ' ';print /LastName;close %LETOTEST; "

dont know if it something is wrong there, but does that q belong there?
Title: Re: Precacher - Missing file errors
Post by: DM Heatstroke on January 22, 2012, 04:30:10 PM
Did another test with a stopwatch... CPU maxes out for approximately 3 mins.... then allows you to pick a feat and the same happens again.... another 3 mins before you can do something...

Once its done, the module also does not generate an updated BIC, logging in allows you to recreate the char all over again and checking the servervault for any changes also shows nothing has happened...

I checked the letoscript logs and the last entry shows:

Quote
<29.18ms> Req:"SCRIPT", Param:"%LETOTEST = q{D:/NWserver/servervault/Silvertje/giliahgoodman.bic}; print /FirstName;print ' ';print /LastName;close %LETOTEST; "

dont know if it something is wrong there, but does that q belong there?

Turn off PRC_CONVOCC_ENCRYPTION_KEY & turn on PRC_CONVOCC_USE_XP_FOR_NEW_CHAR to see if it will stop running you thru the ConvoCC.
Title: Re: Precacher - Missing file errors
Post by: Silvercloud on January 23, 2012, 10:30:19 AM
Yes that stops me running thru the convocc, but it doesnt affect feat loadtimes, nor does it result in a properly screated character (e.g. the BIC still stays the same).
Title: Re: Precacher - Missing file errors
Post by: xwarren on January 23, 2012, 10:48:03 AM
Yes that stops me running thru the convocc, but it doesnt affect feat loadtimes, nor does it result in a properly screated character (e.g. the BIC still stays the same).
could you post nwclientLog1, odbc and letoscript logs somewhere (like pastebin or sth).
Title: Re: Precacher - Missing file errors
Post by: Silvercloud on January 23, 2012, 11:45:24 AM
Yeas I have posted that here:

http://pastebin.com/MYdsfNyg (http://pastebin.com/MYdsfNyg)

I didnt post the clientlog as it is empty...
Title: Re: Precacher - Missing file errors
Post by: xwarren on January 23, 2012, 12:00:20 PM
Hmm... odbc and letoscripts are worknig...
Is 'Local Characters Allowed' turned off in nwserver?
Title: Re: Precacher - Missing file errors
Post by: Silvercloud on January 23, 2012, 01:24:43 PM
Yes it is.... this is my server options from nwnplayer.ini (which is what I assume you are referring to):

[Server Options]
MPEnabled=1
Game Port=5120
Max Players=12
MinCharLevel=1
MaxCharLevel=40
Server Name=Dark Crystal
DMPassword=121178
PlayerPassword=
Reload Module When Empty=0
GameSpy Enabled=1
Game Type=10
PVP Setting=0
PauseAndPlay=0
Disable AutoSave=1
Auto Save Interval=0
AllowLocalChars=0
Game Region=0
ServerDownTimer=180
One Party Only=0
Enforce Legal Characters=0
ItemLevelRestrictions=0
Suppress Base Servervault=1
CD Banned Behavior=0
Disallow Shouting=0
ShowDMJoinedMessage=1
Saving Throw Automatic Failure On 1=0
BackupSavedChars=0
Validate Spells=1
Examine CR On Creatures=1
Examine Effects On Creatures=1
Max Hit Points=1
Hide Hit Points Gained=0
Restore Spell Uses On Login=1
Always Reset Encounter Spawns=1
Master Server Authentication Required For Player Login=0
Account validation required during Master Server down times=0
2DA Cache Size=10
Title: Re: Precacher - Missing file errors
Post by: Silvercloud on January 23, 2012, 01:43:43 PM
Just grabbed the PRC tester from the vault... edited the file according to the convocc parameters in the server guide... and let it run with my current DB. That still has the 3 min for feat selection issue, but leto is at least able to create a correct BIC, which suggests its something in my module, not in the settings outside of it, as i used the same ones for the PRCtest module.... that should be helpful in tracking that down....

so two issues:
-something in MOD is causing leto not to generate a char file
-something in settings outside of MOD is causing the insane 3 min wait for feat selection....

Title: Re: Precacher - Missing file errors
Post by: DM Heatstroke on January 23, 2012, 11:56:10 PM
I'm at a loss.  I use MySQL on a PC with nowhere near those specs (1Ghz, 758MB RAM, 5400 RPM SATA Drive) & it takes about 4 minutes total to make a new PC, if you rush thru it.
Title: Re: Precacher - Missing file errors
Post by: Silvercloud on January 24, 2012, 05:10:56 AM
Well there's two things I can think of to try... one is to run on MYSQL instead and the other is to replace some of the files as present in the server pack (like updating the ODBC file to a newer version).... I think i remember something about this from the last time i made a convocc server that something was either amiss with the files or you could only fix it by using mysql. Any insight into this?
Title: Re: Precacher - Missing file errors
Post by: Silvercloud on January 24, 2012, 10:18:06 AM
3 min issue was resolved by replacing the nwnx2 file and odbc file from server pack with the newest versions from the nwnx2.org website.... why this helps i have no idea as they seem to be the same version... however that is now resolved... on to hunting for the reason characters wont generate with leto...
Title: Re: Precacher - Missing file errors
Post by: Silvercloud on January 24, 2012, 10:53:15 AM
Well guess i was wrong about the 3 min issue being solved... its just less... last test put me at 100% CPU for about 1.5 minutes... better but still nothing like the 10-15 seconds you reported... hmmm...

leto now properly generates a character as well, I went into my mod and moved all the PRC scripts to the top if they werent already there (wasn't in 1 file) and removed the prc_onchat event to be inline with install instructions... that seemed to do the trick there...


I'm efffectively down to one issue....

how can i speed up the feat caching....
Title: Re: Precacher - Missing file errors
Post by: xwarren on January 24, 2012, 11:00:39 AM
I guess you could edit the convocc script and disable some feat ranges. ie if you see
####START_OF_*
and
####END_OF_*
it means that those feats were automatically generated by prc.jar utility and are not available at character creation.

Edit: Could you test this script? I disabled checks for over 20000 rows from feat.2da. Should be faster (it may TMI, because I don't know how sql commands are handeled by NWN engine. if it does use script from prc_ccc_main_alt.7z)
Title: Re: Precacher - Missing file errors
Post by: Silvercloud on January 24, 2012, 03:36:55 PM
Yes I will test the script tomorrow xwarren... today has been mostly used to try to get mysql to work... which i now have working, but I cannot get the pwdata setup nor do i understand how the precacher for mysql gets it into the DB... Could DM heatstroke point me in the right direction how to setup pwdata in the db (e.g. the correct syntax to execute on an SQL query) as well as how to use the precacher with this....

I have the 5.5.20 version of mysql running with the nwn database setup...
Title: Re: Precacher - Missing file errors
Post by: DM Heatstroke on January 24, 2012, 07:38:54 PM
Yes I will test the script tomorrow xwarren... today has been mostly used to try to get mysql to work... which i now have working, but I cannot get the pwdata setup nor do i understand how the precacher for mysql gets it into the DB... Could DM heatstroke point me in the right direction how to setup pwdata in the db (e.g. the correct syntax to execute on an SQL query) as well as how to use the precacher with this....

I have the 5.5.20 version of mysql running with the nwn database setup...

The precacher that comes with the PRC should work just fine.  You will have to add your 2da hak to it if you are using custom content however.

Something like this:
Code: [Select]
erf -x -v hak\AR_PRC3_2DA.hak
You'll also may want to change the last line in the precacher to this to allow more memory:
Code: [Select]
java -Xmx1024m -jar prc.jar 2datosql precacher2das MySQL
When you are done you should have had no errors (run the batch file from the command line to make sure you can see them) and a file called out.sql.

Here is the batch file I use to import the data from out.sql into my DB.

Code: [Select]
@echo off
SETLOCAL
set PARENT=C:\Games\NWN\
set IMPORT=C:\Games\NWN\_MySQLImport\
set MYBIN=C:\Games\NWN\
echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
echo MySQL importer executing @
echo Started @ ^(%DATE% ^| %TIME% ^) 
pushd %PARENT%
pushd %IMPORT%
echo Importing out.sql
mysql -u root --q -v -C -p[YOURDBPASSHERE] [YOURDBNAMEHERE]< out.sql
echo Process Complete. ^(%DATE% ^| %TIME% ^)                               
echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
ENDLOCAL

Note you'll have to change your paths at the top of the batch file to match your system.  Out.sql goes into the "_MySQLImport" folder before you run it.
Title: Re: Precacher - Missing file errors
Post by: Silvercloud on January 25, 2012, 10:07:41 AM
Okay xwarren... i didn't find any effect from placing your changed file to the top hak.. and it also did not TMI... tried the second file as well.... no result either...

basically it takes 2 mins 40 seconds to run through the code needed to generate a feat list.... which i guess would be ok for 1 feat, but not for 3.... (like i want on my server)... so time to try mysql to see if it helps
Title: Re: Precacher - Missing file errors
Post by: Silvercloud on January 25, 2012, 11:26:37 AM
DM heatstroke --> as to Mysql and using your file to import that is also not working is there some GUI i can use to import a file on windows on a mysql db?
Title: Re: Precacher - Missing file errors
Post by: DM Heatstroke on January 25, 2012, 01:30:10 PM
DM heatstroke --> as to Mysql and using your file to import that is also not working is there some GUI i can use to import a file on windows on a mysql db?

Did you change all the paths & passwords & such?

You should be able to use the MySQL Administrator or Workbench or something like that to admin the DB in a GUI.
Title: Re: Precacher - Missing file errors
Post by: Silvercloud on January 25, 2012, 01:35:58 PM
got it imported with heidiSQL... thats a nice GUI.... running test in MYSQL now...
Title: Re: Precacher - Missing file errors
Post by: Silvercloud on January 25, 2012, 01:40:55 PM
Ok now the feat queue time is down to a mere 10 seconds.... so yes... something in sqlite isn't that happy about the way the PRC convocc works...

guess i could change everything to mysql to solve the issue...
Title: Re: Precacher - Missing file errors
Post by: Silvercloud on January 25, 2012, 02:20:26 PM
Hmmm... heatstroke could you help me out with the other SQL i dont know what is different between SQLite and MYSQL, and I exported my tables into SQL format, but it is being denied as not being correct format... If you could be so kind to help me insert these tables i would be all done...
Quote
CREATE TABLE bankdata(
player varchar(64) NOT NULL default '~',
tag varchar(64) NOT NULL default '~',
name varchar(64) NOT NULL default '~',
val text,
expire int(11) default NULL,
last timestamp(14) NOT NULL default current_timestamp,
PRIMARY KEY (player,tag,name)
);
CREATE TABLE pwdata(
player varchar(64) NOT NULL default '~',
tag varchar(64) NOT NULL default '~',
name varchar(64) NOT NULL default '~',
val text,
expire int(11) default NULL,
last timestamp(14) NOT NULL default current_timestamp,
PRIMARY KEY (player,tag,name)
);
CREATE TABLE pwobjdata (
        player varchar(64) NOT NULL default '~',
        tag varchar(64) NOT NULL default '~',
        name varchar(64) NOT NULL default '~',
        val blob,
        expire int(11) default NULL,
        last timestamp NOT NULL default current_timestamp,
        PRIMARY KEY (player,tag,name)
        );
CREATE TABLE tbl_questdata(
   ID                   int auto_increment,
   player_acct          varchar(64) NOT NULL DEFAULT '',
   player_character     varchar(64) NOT NULL DEFAULT '',
   szPlotID             varchar(32) NOT NULL DEFAULT '',
   szPlotState          varchar(4) NOT NULL DEFAULT ''
);
CREATE TABLE timedata(
player varchar(64) NOT NULL default '~',
tag varchar(64) NOT NULL default '~',
name varchar(64) NOT NULL default '~',
val text,
expire int(11) default NULL,
last timestamp(14) NOT NULL default current_timestamp,
PRIMARY KEY (player,tag,name)
);
Title: Re: Precacher - Missing file errors
Post by: DM Heatstroke on January 25, 2012, 05:01:21 PM
I'm afraid I don't know enough about SQL to craft an insert statement for all that.  I really don't know anything about SQLite at all.  No idea how to convert between the two.

When you import out.sql into MySQL thru a GUI, there should be a way force it to create the tables & schemas you need upon import.
Title: Re: Precacher - Missing file errors
Post by: Silvercloud on January 26, 2012, 05:02:44 AM
Thanks for looking at it anyway... I found out by posting on another forum... so its all good...! thanks to you both for the efforts, I'm off to beta-test