Player Resource Consortium

 

Author Topic: Upgrade a module with PRC 3.3g to PRC 3.5  (Read 9165 times)

0 Members and 1 Guest are viewing this topic.

September 02, 2012, 04:29:09 PM
Reply #15

My group has been running this module with PRC and no NWNx2 as a private server on and off for the past 6 years or so. Seems to work fine (except for this pesky Scout situation).

Are you running the module in the graphical client or the stand alone server?
HEATSTROKE


September 02, 2012, 09:58:29 PM
Reply #16

Here is how I do it.

1.) Make a backup of your original 3.3 top hak.

2.) Make a folder & extract your 3.3 top hak into it, using NWHak.

3.) Make another folder & extract the PRC 3.5 2da files into it.

4.) Make a 3rd folder that will contain the merged 2da files.

5.) Figure out which files are in both folders, these will be the ones that need merging.

6.) Using Excimer's 2DA Combinulator, open each paired 2da file, merge them & write a new 2DA file to the 3rd folder.  I use the beta version.

7.) When you are done, put the contents of the 3rd folder into your top hak, overwriting any old files.

8.) I usually recompile my module at this point, but I'm not sure if it's 100% necessary.

Hope that helps!

 ;D

Thanks for the detailed instructions - I'll give it a shot over the next couple of days.



September 02, 2012, 10:06:41 PM
Reply #17

Are you running the module in the graphical client or the stand alone server?

We are running it in the stand alone server. (the LINUX stand alone server).

But I do seem to remember that once we had hardware problems on the Linux box and one of the other guys ran it on his Windows standalone server as a temporary measure, until we got the hardware fixed.

Over the years we've done campaigns to play through various modules, but we always end up back on this module.

Unfortunately none of us has the time or skills to host it as a public server - it'd be great if someone would host it as a public server again.


September 03, 2012, 04:44:57 PM
Reply #18
  • Developer
  • *****
  • Posts: 1437
  • Karma: +27/-0
  • Gender: Male
    • View Profile

Does the game crashes right after this log entry is made?:
Quote
[Thu Aug 30 11:58:52] prc_scout: Scout WP for 'Anna Farrunner' - '' - '' - 7ffffffd didn't exist, creating. Tag: PRC_ScoutWP_Anna Farrunner

Could you try if your module works without recompiling all scripts (with just prc haks updated)?


September 03, 2012, 08:08:07 PM
Reply #19

Does the game crashes right after this log entry is made?:
Could you try if your module works without recompiling all scripts (with just prc haks updated)?

Yes the game crashes after that log entry is made.

I tried just opening the PRC 3.3g module in the toolset with PRC 3.5 installed and saving it. I did not recompile scripts. The game still crashes when the Scout character is loaded.

I have not updated the top merge hak as of yet. Working on that now.

Thanks


September 03, 2012, 10:05:05 PM
Reply #20

 :(

I have upgraded the top merge hak as described above (thanks for the instructions), but the module still crashes when the Scout character is loaded.

I went back to my PRC 3.3g installation and created a Fighter, then gained a level & took Scout. Exiting and reloading the character was fine. Restarting the server and reloading the character was fine. I was also able to load up the Scout-6/Bowman-6 character where we originally found the problem. So PRC 3.3g works fine with a Scout, PRC 3.5 does not.

Here is the latest log file from PRC 3.5 - much the same as the other one, except I added in debug statements in the hif_onenter script and around the on_heartbeat script. You can see that it executes hif_onenter, then executes prc_onenter, then finishes hif_onenter. Then it crashes. From my inspection of the prc_scout code, it looks like it is doing the calculation for Skirmish bonuses when it fails, but I've pretty well reached the limits of my expertise as far as understanding the coding.

The only other thing I can think of is that the module's onenter script does do a location move on the character that is entering, but it did that with PRC 3.3 as well, so I don't understand why it would make a difference with PRC 3.5, when checking for the Skirmish bonuses.

I don't know what else to try - as far as I know, the Scout is the only class with the Skirmish ability.

If anyone else has the time to look at this, the PRC3.3-version of the module is available to be downloaded from the vault at http://nwvault.ign.com/View.php?view=Modules.Detail&id=6096. Just open it in a PRC 3.5 toolset, and resave it after recompiling the scripts. The top Merge hak doesn't seem to make a difference to this situation.

Create a Fighter, talk to Barliman in the Inn, do the quest for Hamfast and that will get you enough XP for level 2. (or just use a leveller module or DM). Choose Scout as your second level. Exit the module & reload the character. It works.

Exit the module, restart the server & reload the character - it should fail.

Any other suggestions are welcome.


September 04, 2012, 05:21:23 PM
Reply #21
  • Developer
  • *****
  • Posts: 1437
  • Karma: +27/-0
  • Gender: Male
    • View Profile

When I encounter a bug like this I usually try to find out which script is causing it. The attached file is from PRC 3.3 - could you add it to your top hak and check if the server still crashes when loading scout character, please?


September 04, 2012, 09:02:39 PM
Reply #22

When I encounter a bug like this I usually try to find out which script is causing it. The attached file is from PRC 3.3 - could you add it to your top hak and check if the server still crashes when loading scout character, please?

I added the prc_scout.ncs file to the top merge hak using nwhak.exe - is that the correct way to do it?

It doesn't seem to make any difference - the server crashes when the scout character is loaded and the log file looks the same to me.

I've attached the latest log file - is there a way to tell if the prc_scout.ncs file was executed or not?



September 05, 2012, 04:44:47 PM
Reply #23
  • Developer
  • *****
  • Posts: 1437
  • Karma: +27/-0
  • Gender: Male
    • View Profile

If it's in the top hak, than the log says it was executed. Maybe it's something in onenter script?

Could you test which hak is causing crashes? Just update PRC haks one by one - update prc_2das.hak - load the module and check your character, update prc_* etc. At some point the game will crash - this will tell us which hak is causing this.


September 05, 2012, 05:31:49 PM
Reply #24

If it's in the top hak, than the log says it was executed.

I am not sure that I added it to the top hak properly. The 2 server logs are identical as far as I can see (with and without prc_scout in the top hak). Both logs say that prc_scout is being executed but the logs don't distinguish between the 3.3 prc_scout and the 3.5 prc_scout routines. Let me re-phrase the question:

Is there a way to tell if the prc_scout.ncs file that you sent (the 3.3 one) was executed or I screwed up adding it to the top hak with the result that the prc_scout 3.5 routine was run?

Quote
Maybe it's something in onenter script?

The onenter script is already finished by the time the crash occurs. I put my own debug statements in the hif_onenter routine. Here's the tail-end of the log showing them - ("starting onenter", "starting prc_onenter" and "finished onenter" are mine):

Code: [Select]
[Tue Sep  4 15:51:49] starting onenter
[Tue Sep  4 15:51:49] starting prc_onenter
[Tue Sep  4 15:51:49] Deleting composite bonus list 'PRC_ComAttBon' on 'Anna Farrunner' - '' - '' - 7ffffffd
[Tue Sep  4 15:51:49] Deleting composite bonus list 'PRC_CBon' on 'base_prc_skin' - 'base_prc_skin' - 'base_prc_skin' - 594e
[Tue Sep  4 15:51:49] Clearing class flags
[Tue Sep  4 15:51:49] prc_inc_sneak: Rogue Sneak Dice: 2
[Tue Sep  4 15:51:49] prc_inc_sneak: Blackguard Sneak Dice: 0
[Tue Sep  4 15:51:49] prc_inc_sneak: Assassin Sneak Dice: 0
[Tue Sep  4 15:51:49] prc_inc_sneak: Epic Sneak Dice: 0
[Tue Sep  4 15:51:49] finished onenter
[Tue Sep  4 15:51:49] prc_scout running, event: 6
[Tue Sep  4 15:51:49] prc_scout: Scout WP for 'Anna Farrunner' - '' - '' - 7ffffffd didn't exist, creating. Tag: PRC_ScoutWP_Anna Farrunner

Quote
Could you test which hak is causing crashes? Just update PRC haks one by one - update prc_2das.hak - load the module and check your character, update prc_* etc. At some point the game will crash - this will tell us which hak is causing this.

 ???  I don't know what you mean
Quote
update PRC haks
Do you mean replace 3.5 haks with the corresponding 3.3 haks one at a time in the hak folder or do you mean generate a .ncs file like you did with the 3.3 prc_scout.ncs? I have no idea how to generate a .ncs file from a PRC hak.



September 05, 2012, 07:32:34 PM
Reply #25
  • Developer
  • *****
  • Posts: 1437
  • Karma: +27/-0
  • Gender: Male
    • View Profile

???  I don't know what you mean  Do you mean replace 3.5 haks with the corresponding 3.3 haks one at a time in the hak folder
Replace 3.3 haks with corresponging 3.5 haks one at a time, yes.

To make sure that 3.3 version of prc_scout.nsc is executed delete (using nwhak.exe) prc_scout.nsc from prc_scripts.hak (so there will be only one version in the top hak). Both uncompiled scripts are almost identical - I thought that maybe some includes were changed.


September 07, 2012, 01:40:37 AM
Reply #26

Replace 3.3 haks with corresponging 3.5 haks one at a time, yes.

To make sure that 3.3 version of prc_scout.nsc is executed delete (using nwhak.exe) prc_scout.nsc from prc_scripts.hak (so there will be only one version in the top hak). Both uncompiled scripts are almost identical - I thought that maybe some includes were changed.

OK, I reran the test with the 3.3 version of prc_scout in the top merge hak and with prc_scout deleted from prc_scripts.hak. The server crashed as before when the scout was loaded. The log looks exactly the same as before.

I did discover that NWN will also crash when loading the module as a local game in the client-only and loading the scout character. This will make it easier to test replacing the 3.3 haks one-by-one, which may have to wait for the weekend.

Stay tuned...


September 07, 2012, 02:26:26 AM
Reply #27

I did discover that NWN will also crash when loading the module as a local game in the client-only and loading the scout character. This will make it easier to test replacing the 3.3 haks one-by-one, which may have to wait for the weekend.

Stay tuned...

OK, being able to test it as a local game in the client-only significantly sped up the testing.

In all cases, I loaded the PRC 3.3 version of the module and selected the scout-6/bowman-6 character.

In the pure-PRC 3.3 environment the module loads the character successfully. That is the first attached Log file "nwclientLog1-worked.txt".

Through trial & error, I discovered that I had to use PRC 3.5 versions of two files to get the module to crash: prc_2das.hak and prc_scripts.hak. Using just one or the other did not cause the module to crash - I had to use both together. That is the second attached log file "nwclientLog1-failed.txt".

I really hope this gives you the info you need to track it down.






December 06, 2012, 09:58:04 PM
Reply #28

Success!!

I found this code in the module's 00_oncliententer script:

Code: [Select]
object oPC = GetEnteringObject();
object oWaypoint = GetWaypointByTag("WP_The_Begining");
location lWaypoint = GetLocation(oWaypoint);
if (!GetIsPC(oPC))
return;
AssignCommand(oPC, ClearAllActions());
AssignCommand(oPC, JumpToLocation(lWaypoint));

After I removed the above code, I was able to load the Scout character without it crashing the server. I have no idea why the original authors had this code in there, but everything seems to still work.

I suspect it is interacting badly with the way PRC 3.5 is checking the Skirmish ability - the Skirmish checking code  must have changed from PRC3.3, but I have no idea how that code works.

Thanks to everyone who helped!

I'll be uploading the PRC 3.5 version of the module to the vault in the next day or two.