Player Resource Consortium

Neverwinter Nights => General Discussion => Topic started by: CapnQ on February 04, 2011, 04:52:46 PM

Title: Here's my next patch
Post by: CapnQ on February 04, 2011, 04:52:46 PM
http://s3.amazonaws.com/NWN/nwnprc2.patch

What it does:


PnP Shifter
-----------
When using NWNX to increase PnP Shifter STR, don't go above 100 because that causes carrying weight to drop to 0 (due to a Bioware issue).
Fix PnP Shifter conversation issue that prevented many shape packages from working.
Fix some PnP Shifter conversation TMIs.
Fix PnP Shifter Delete Marked Shapes TMIs.
Tweak PnP Shifter effect application code.
If have unarmed feats (Weapon Focus, Improved Critical, etc.), add corresponding creature weapon feats when shifted
If have creature feats (Weapon Focus, Improved Critical, etc.), add corresponding unarmed feats when shifted

Other
-----
Add chat command to start forced rest detector that makes PRC classes more compatible with modules that use forced resting (e.g. Arena of Champions) (forced resting restores spells in Bioware spellbooks, but not in PRC convo-based spellbooks).
Various chat command tweaks.
Consolidate function "generation" logic (added in a previous patch to prevent duplicate scheduled functions from running).
Title: Here's my next patch
Post by: Necro on February 04, 2011, 05:17:31 PM
How do I implement this patch??  It looks like a text file and I'm not sure what I do with it?
Title: Here's my next patch
Post by: xwarren on February 04, 2011, 05:53:37 PM
Thanks CapnQ!

I'll try to make a new release this weekend :D
Title: Here's my next patch
Post by: CapnQ on February 04, 2011, 05:54:04 PM
Quote from: Necro

How do I implement this patch??  It looks like a text file and I'm not sure what I do with it?


You have to apply it to the PRC code and build the PRC. If you aren't building the PRC, it won't do you any good until xwarren builds the next release. If you are building the PRC, use TortoiseSVN's "Apply Patch" command.
Title: Here's my next patch
Post by: CapnQ on February 04, 2011, 06:17:31 PM
Quote from: xwarren

Thanks CapnQ!

I'll try to make a new release this weekend :D


Cool! I think I'm going to need a new db to use spells with your code changes (my spells are messed up), and I was never able to build a db. I'll get it from your release.

I forgot to mention: epicspellscripts/tm_s0_epleecha.nss and tm_s0_epleechb.nss both use use the constant FEAT_TOMB_TAINTED_SOUL, but it's not defined anywhere. My best guess is that you forgot to commit a file.
Title: Here's my next patch
Post by: CapnQ on February 05, 2011, 11:52:04 AM
Quote from: CapnQ

Quote from: xwarren

Thanks CapnQ!

I'll try to make a new release this weekend :D


Cool! I think I'm going to need a new db to use spells with your code changes (my spells are messed up), and I was never able to build a db. I'll get it from your release.

I forgot to mention: epicspellscripts/tm_s0_epleecha.nss and tm_s0_epleechb.nss both use use the constant FEAT_TOMB_TAINTED_SOUL, but it's not defined anywhere. My best guess is that you forgot to commit a file.


I see PRC 3.4 final is up (thanks!) so I'll use the database files from there, but for future reference, I'd like to find out how to build the database files. I downloaded and installed the PRC server pack and ran "precacher sqlite prc.bat". I then ran the precacher.mod and it created prc_data.* files in my database folder, but they're to small (all 1 or 2 kb), and when I start a new game, memorize a couple of spells, and rest, the spells that I actually learn are the wrong ones, so something is messed up. What's the right way to do this?
Title: Here's my next patch
Post by: CapnQ on February 05, 2011, 11:53:22 AM
Quote from: CapnQ

I see PRC 3.4 final is up (thanks!) so I'll use the database files from there...


I just tried it with those files and had the same problem. I know I've fixed this problem in the past, but don't remember how. Any ideas?
Title: Here's my next patch
Post by: xwarren on February 05, 2011, 12:22:12 PM
Quote from: CapnQ

Quote from: CapnQ

I see PRC 3.4 final is up (thanks!) so I'll use the database files from there...


I just tried it with those files and had the same problem. I know I've fixed this problem in the past, but don't remember how. Any ideas?


I'm not sure I understand what is the problem. Why would you want to create those database files? I always delete them before testing anything (saved games won't work without those files! - new game will).

Server Pack is something completely not related to PRC_DATA* files. The database it creates is used by ConvoCC.
Title: Here's my next patch
Post by: CapnQ on February 05, 2011, 01:43:14 PM
Quote from: xwarren

Quote from: CapnQ

Quote from: CapnQ

I see PRC 3.4 final is up (thanks!) so I'll use the database files from there...


I just tried it with those files and had the same problem. I know I've fixed this problem in the past, but don't remember how. Any ideas?


I'm not sure I understand what is the problem. Why would you want to create those database files? I always delete them before testing anything (saved games won't work without those files! - new game will).

Server Pack is something completely not related to PRC_DATA* files. The database it creates is used by ConvoCC.


I was trying to create the database files because that's what I thought I was supposed to do to fix the problem I'm having. If they aren't needed except for saved games, why are they included in the PRC release? What are they for?

Anyway, my immediate problem is that the spells are messed up. I just deleted all my database files, started a new game with a level 1 Shaman, chose "Light" and "Hide From Undead" in the spellbook, and what appears in my character sheet and radial menu after I sleep is "Shaman Still Read Magic" and "Witch Rainbow Pattern".  As I mentioned, I've seen and fixed this before; I thought I remembered fixing it by deleting the database files, but neither that nor anything else I've tried this time has helped. What causes it and how do I fix it?
Title: Here's my next patch
Post by: xwarren on February 05, 2011, 02:29:03 PM
Quote from: CapnQ


I was trying to create the database files because that's what I thought I was supposed to do to fix the problem I'm having. If they aren't needed except for saved games, why are they included in the PRC release? What are they for?

Anyway, my immediate problem is that the spells are messed up. I just deleted all my database files, started a new game with a level 1 Shaman, chose "Light" and "Hide From Undead" in the spellbook, and what appears in my character sheet and radial menu after I sleep is "Shaman Still Read Magic" and "Witch Rainbow Pattern".  As I mentioned, I've seen and fixed this before; I thought I remembered fixing it by deleting the database files, but neither that nor anything else I've tried this time has helped. What causes it and how do I fix it?


They are used to cache some 2da info - GetLocalString() is much faster than Get2daString() (because of that Get2daString should not be used in loops, and PRC uses a lot of loops ;p ).

Have you edited spells.2da or feat.2da? Do you use older tlk version?
Title: Here's my next patch
Post by: CapnQ on February 05, 2011, 04:17:03 PM
Quote from: xwarren

Quote from: CapnQ


I was trying to create the database files because that's what I thought I was supposed to do to fix the problem I'm having. If they aren't needed except for saved games, why are they included in the PRC release? What are they for?

Anyway, my immediate problem is that the spells are messed up. I just deleted all my database files, started a new game with a level 1 Shaman, chose "Light" and "Hide From Undead" in the spellbook, and what appears in my character sheet and radial menu after I sleep is "Shaman Still Read Magic" and "Witch Rainbow Pattern".  As I mentioned, I've seen and fixed this before; I thought I remembered fixing it by deleting the database files, but neither that nor anything else I've tried this time has helped. What causes it and how do I fix it?


They are used to cache some 2da info - GetLocalString() is much faster than Get2daString() (because of that Get2daString should not be used in loops, and PRC uses a lot of loops ;p ).

Have you edited spells.2da or feat.2da? Do you use older tlk version?


I had the same idea before seeing your post, but as far as I can tell, no. I'm using the PRC that's in SVN plus my patch (which doesn't change spells.2da, feat.2da, or the tlk file). I re-ran the PRC module updater to make sure I did't have a merged tlk or hak issue. Started a new game: still the same problem.
Title: Here's my next patch
Post by: CapnQ on February 07, 2011, 09:08:47 AM
Quote from: CapnQ

Quote from: xwarren

Quote from: CapnQ


I was trying to create the database files because that's what I thought I was supposed to do to fix the problem I'm having. If they aren't needed except for saved games, why are they included in the PRC release? What are they for?

Anyway, my immediate problem is that the spells are messed up. I just deleted all my database files, started a new game with a level 1 Shaman, chose "Light" and "Hide From Undead" in the spellbook, and what appears in my character sheet and radial menu after I sleep is "Shaman Still Read Magic" and "Witch Rainbow Pattern".  As I mentioned, I've seen and fixed this before; I thought I remembered fixing it by deleting the database files, but neither that nor anything else I've tried this time has helped. What causes it and how do I fix it?


They are used to cache some 2da info - GetLocalString() is much faster than Get2daString() (because of that Get2daString should not be used in loops, and PRC uses a lot of loops ;p ).

Have you edited spells.2da or feat.2da? Do you use older tlk version?


I had the same idea before seeing your post, but as far as I can tell, no. I'm using the PRC that's in SVN plus my patch (which doesn't change spells.2da, feat.2da, or the tlk file). I re-ran the PRC module updater to make sure I did't have a merged tlk or hak issue. Started a new game: still the same problem.


I've tracked down the problem. In subversion revisions 235 through 245 (which was the latest revision at the time I posted this issue, though I see there are more now--maybe one has fixed the problem?), there's a mismatch between spells.2da, iprp_feats.2da, and feat.2da on the one hand, and prc_consortium.tlk.xml on the other. In revision 245, for instance, the first three all list tlk entry 16844363 as the name of the OAShaman_Light spell, but in the tlk file this maps to this entry:

<entry id="67147" lang="en" sex="m">Witch Rainbow Pattern</entry>

Revision 245 is actually not the revision that was used to build the PRC 3.4 release, I believe, so the release may not have a problem. I simply haven't checked yet.
Title: Here's my next patch
Post by: CapnQ on February 08, 2011, 11:51:23 AM
Quote from: CapnQ

Revision 245 is actually not the revision that was used to build the PRC 3.4 release, I believe, so the release may not have a problem. I simply haven't checked yet.


I've verified that the 3.4 release doesn't have this problem (which you no doubt suspected). That makes at least three things that are in the official release that aren't yet in Subversion:

1) The definition for the FEAT_TOMB_TAINTED_SOUL constant (which I mentioned in another post).
2) My patch (the I submitted at the beginning of this thread).
3) The fix to this tlk / 2da mismatch.

xwarren, any chance of getting these committed fairly soon?

Thanks!
Title: Here's my next patch
Post by: CapnQ on February 08, 2011, 01:57:49 PM
Here's another difference. The "PRC Pack.hif" file in the release is missing the OnPlayerChat changes, so chat commands won't work. As far as I can tell, the .hif file in subversion does have this.
Title: Here's my next patch
Post by: xwarren on February 08, 2011, 02:49:51 PM
Quote from: CapnQ

Here's another difference. The "PRC Pack.hif" file in the release is missing the OnPlayerChat changes, so chat commands won't work. As far as I can tell, the .hif file in subversion does have this.


Thanks for spotting this. I'm sure I've copied the file with OnPlayerChat event support to CompiledResources folder. Something in the build process must have replace it. I'll have to fix it ASAP.

The 3.4 release was build from current sources - it has tomb-tainted soul feat and your patch. I had some problems with committing files to SVN, probably something with sourceforge server (i updated later with no problems).
Title: Here's my next patch
Post by: CapnQ on February 08, 2011, 03:50:00 PM
Quote from: xwarren

Quote from: CapnQ

Here's another difference. The "PRC Pack.hif" file in the release is missing the OnPlayerChat changes, so chat commands won't work. As far as I can tell, the .hif file in subversion does have this.


Thanks for spotting this. I'm sure I've copied the file with OnPlayerChat event support to CompiledResources folder. Something in the build process must have replace it. I'll have to fix it ASAP.


Yes, it is there in Subversion, but not in the release. I thought, like you, that the build process must be picking up the wrong one somehow.


Quote
The 3.4 release was build from current sources - it has tomb-tainted soul feat and your patch. I had some problems with committing files to SVN, probably something with sourceforge server (i updated later with no problems).


So are you saying all these things are in Subversion? Because I'm not seeing them. The latest revision on the SourceForge server currently is 245, which doesn't have these changes. I thought I saw a newer revision briefly, but now I don't. Perhaps as part of their problems that kept you from committing, they lost your changes once you actually did get them to commit. Could you double-check to see if they're still there, and re-commit if they're not?

Thanks!
Title: Here's my next patch
Post by: xwarren on February 09, 2011, 11:33:00 AM
Current SVN revision is 277 (checked both my copy and sourceforge site), last log message is 'patch from CapnQ' :P, so yes it's all there. Try updating again (re-downloading is the worst scenario in this case ;) )
Title: Here's my next patch
Post by: CapnQ on February 09, 2011, 03:59:04 PM
Quote from: xwarren

Current SVN revision is 277 (checked both my copy and sourceforge site), last log message is 'patch from CapnQ' :P, so yes it's all there. Try updating again (re-downloading is the worst scenario in this case ;) )


OK, thanks for double-checking. I see it now, too. Very odd!