Player Resource Consortium

 

Author Topic: PRC v3.3h RC1  (Read 13194 times)

0 Members and 1 Guest are viewing this topic.

May 09, 2010, 05:15:47 PM
Reply #15

One thing I've noticed, and would ask for future versions, is that you would use the function: SQLEncodeSpecialChars(sString) to get rid of all the extra ['] apostrophes in names that cause this program to break when you try combining 2da's from other mods (CEP2, e.g.). It's a hunt and peck nightmare, on the receiving end. And of course, SQLDecodeSpecialChars(sString) when finished. Otherwise, the SQL caching and the batch file (the editted version I'm using to add other haks' data) seem to work just fine. Note that I can't say for sure, I'm only at line 3500 in apostrophe hunting after a good 90 minutes.
« Last Edit: May 09, 2010, 05:19:50 PM by Horred the Plague »


May 09, 2010, 09:13:27 PM
Reply #16

Quote from: Horred the Plague

One thing I've noticed, and would ask for future versions, is that you would use the function: SQLEncodeSpecialChars(sString) to get rid of all the extra ['] apostrophes in names that cause this program to break when you try combining 2da's from other mods (CEP2, e.g.). It's a hunt and peck nightmare, on the receiving end. And of course, SQLDecodeSpecialChars(sString) when finished. Otherwise, the SQL caching and the batch file (the editted version I'm using to add other haks' data) seem to work just fine. Note that I can't say for sure, I'm only at line 3500 in apostrophe hunting after a good 90 minutes.


How are you going to use that function outside of NWN?

Here is how I do it.

1.) Download PSPad.

2.) Open all the 2DAs you want to look through.  On a semi-modern PC you can open 100s of text files with no problems.

3.) Search -> Find & Replace in files

4.) Replace all instances of ' with `, the symbol below the tilde (~).

5.) Save any changes.  Should only be placables.2da & appearance.2da really.

That's 200+ 2DAs in about 5 minutes. :Dhttp://
« Last Edit: May 09, 2010, 09:14:01 PM by DM Heatstroke »
HEATSTROKE


May 10, 2010, 06:16:48 PM
Reply #17

Thanks DM Heatstroke, I really should have thought of that trick on my own. My opinion was really more a question of not knowing the sql writer's program's capabilities and limitations; if it could be done automatically, it should be i.e. If it can't, well that's it & that's that.

Now that I have this mostly installed, I would add the criticism that the straight prc_cached2da is a bit (well, a lot) excessive in size. 830,000 rows and counting. I can't report on the in-game SQL reads and the subsequent runtime deltas yet, but gut instinct tells me they might be a bit large and laggy--even on a pretty decent machine. I'll happily be proven wrong on this, btw.

Are there any plans to break down some of the individual 2da's into seperate tables, in a future edition? Some of these could be accessed quite a bit during game play, unless I am misunderstanding the purpose of these cached 2da's. Are they used soley for the CCC, or do the scripts make calls to them for other data during gameplay as well instead of Get2DAString and its kin? If the former, I would then further assert that their full potential is not being yet exploited.

Ooo, here's a question. I notice spells.2da in its own seperate file prc_cached_spells.2da, and also broken down into 200k or so lines of prc_cached.2da. Can the prc_cached.2da entries be deleted, or are both being used by the PRC system at this point?

PS: EDIT -- Before my criticisms are miscontrued, let me say that I've enjoyed the work of the PRC crew for many years; you people do a fine job here. I'm merely offering suggestions to try and help make a great thing even better if possible, as I'm unfortunately way too swamped to offer any real-time assistance.
« Last Edit: May 10, 2010, 07:04:43 PM by Horred the Plague »


May 11, 2010, 09:51:41 AM
Reply #18

Quote from: Horred the Plague

Now that I have this mostly installed, I would add the criticism that the straight prc_cached2da is a bit (well, a lot) excessive in size. 830,000 rows and counting. I can't report on the in-game SQL reads and the subsequent runtime deltas yet, but gut instinct tells me they might be a bit large and laggy--even on a pretty decent machine. I'll happily be proven wrong on this, btw.


You don't need to precache every single 2DA.  If you are using MySQL, try this precacher bat file instead.  xwarren saved me a lot of time & CPU cycles with this.

Code: [Select]
del precacher2das\*.2da
mkdir precacher2das
7za x bioware2das.7z -oprecacher2das
erf -x -v hak\prc_2das.hak
erf -x -v hak\prc_race.hak
copy cls_feat*.2da precacher2das\*.2da
copy cls_skill*.2da precacher2das\*.2da
copy race_feat*.2da precacher2das\*.2da
copy spells.2da precacher2das\*.2da
copy racialappear.2da precacher2das\*.2da
copy racialtypes.2da precacher2das\*.2da
copy classes.2da precacher2das\*.2da
copy feat.2da precacher2das\*.2da
copy domains.2da precacher2das\*.2da
copy appearance.2da precacher2das\*.2da
copy portraits.2da precacher2das\*.2da
copy soundset.2da precacher2das\*.2da
copy wingmodel.2da precacher2das\*.2da
copy tailmodel.2da precacher2das\*.2da
copy gender.2da precacher2das\*.2da
copy hen_companion.2da precacher2das\*.2da
copy hen_familiar.2da precacher2das\*.2da
copy custom2das\*.2da precacher2das\*.2da
del *.2da
del *.nss
del *.ncs
java -Xmx1024m -jar prc.jar 2datosql precacher2das MySQL


The custom2das folder would be where you placed any 2DA modifications.
« Last Edit: May 11, 2010, 09:57:57 AM by xwarren »
HEATSTROKE


May 11, 2010, 04:37:53 PM
Reply #19

Thank you, both of you. :)  That was such a neat clean list, I decided to use your batch file and do it again, instead of all those DELETE FROM queries on the tables I just built.

I still think this sql caching of 2da's could have broader scope, as long as benchmarks agree with my theory--though I understand it's not your responsibility to do so. Thanks again for all the help, and for all the work you guys do here.


May 12, 2010, 08:44:43 AM
Reply #20

A bit of a problem, and I've had it with two different installs of this (one by the batch file above, one from a manual collection of the 2da files). The convo locks up after choosing race, before class. I can see the initial data from the class SQL read in nwnx-odbc, it stops right at 254>CLAS_PRES_BRAWL. This means it completed at least the first read, AFAIK. But after that, nothing. Even after relaxing, and having two Slurms.

Also, there is an empty table prc_cached2da_ireq and no item_to_ireq is even created. Are these outdated tables by chance? I don't know what data would be going in them, to check against--the names don't resemble any 2da's in any mod or original campaign file I've checked.


May 12, 2010, 09:22:46 AM
Reply #21
  • Hero Member
  • *****
  • Posts: 1439
  • Karma: +27/-0
  • Gender: Male
    • View Profile

There is a typing error in classes.2da, at line 190 (archivist class). Insert 'CLS_PRES_ARCHV' instead of 'cls_pers_archv', rebuild the database and ConvoCC will work again. Sorry for trouble.


May 12, 2010, 09:26:23 AM
Reply #22

Quote from: Horred the Plague

A bit of a problem, and I've had it with two different installs of this (one by the batch file above, one from a manual collection of the 2da files). The convo locks up after choosing race, before class. I can see the initial data from the class SQL read in nwnx-odbc, it stops right at 254>CLAS_PRES_BRAWL. This means it completed at least the first read, AFAIK. But after that, nothing. Even after relaxing, and having two Slurms.


Double check that your 2DAs haven't got corrupted somehow or have an extra formatting character snuck in there.  That is  what happened when I was seeing a similar error.

Quote from: Horred the Plague

Also, there is an empty table prc_cached2da_ireq and no item_to_ireq is even created. Are these outdated tables by chance? I don't know what data would be going in them, to check against--the names don't resemble any 2da's in any mod or original campaign file I've checked.


I know item_to_ireq is outdated.  I usually remove the indexing of it at the bottom of the out.sql before importing it.
HEATSTROKE


May 12, 2010, 09:28:16 AM
Reply #23

Quote from: xwarren

There is a typing error in classes.2da, at line 190 (archivist class). Insert 'CLS_PRES_ARCHV' instead of 'cls_pers_archv', rebuild the database and ConvoCC will work again. Sorry for trouble.


Oh yeah, that too.  :D
HEATSTROKE


May 12, 2010, 10:08:24 AM
Reply #24

Lol, no problem, glad it wasn't on my end cause I couldn't figure out what I was doing wrong. 2da's weren't corrupted, as I had checked them all for replacing ' with `. I'll delete that ref to item_to_req in good faith then.

I just remembered another issue I had with the letoscript setting NWN_DIR. My computer is 100% backslashes, so I had to recreate the path all the way down to the client folder. Maybe consider a NWN_SERVERVAULT_DIR setting, and an NWN_SLASH_LAST string "\" (for the last folder)? Most of us using the PRC probably have the skills to edit the script, and put it in the top hak--but for those that don't, this would be a saving grace.

EDIT: One more question: there is spells data in both prc_cached2da and in the prc_cached2da_spells tables. Are both necessary, or is the prc_cached2da's spell data a leftover from a previous version, in the prc.jar file?

EDIT PS: Deeper research shows it's a custom 2da called prc_spells.2da, and it ends at entry 4071. Considering the length of the 3.3h spells.2da, I'm going to guess obsolete. It's in the prc_2das.hak.
« Last Edit: May 12, 2010, 06:05:24 PM by Horred the Plague »