...but as it stands right now we'll need a working version of that program for people without access to the original NWN1.
Yeah. I've already started poking at it to update it to the EE.
There's a lot of copy and pasting of code () and some scary looking bit bashing code to do with the key files but nothing that looks insurmountable. My first big hurdle, however, is figuring out how to make Netbeans compile it.
I've yet to see anything resembling a AbstractFactoryFactoryProxyAdapterSingletonInterface which is always a horrible possibility when looking at Java code. That's always encouraging.
I used to play on a server called cormyr dalelands and it had its own hak etc that im reasonably sure shared some code with the PRC.The way they handled Char creation without crashing was an OOC area that deleveled and releveled a character after starting the module. At least one of the admins is active here by the name of Firewraith who may be willing to share that workaround until Beamdog fixes it.
For my steam install it only sees modules in C:\Program Files (x86)\Steam\steamapps\common\Neverwinter Nights\data\mod I renamed it to modules and set up hakinstaller to look there.
Are you using windows 10 Plok? I am and I think that might be my issue. I also found that read only attribute was on for the NWM files. I think that may be a major part of the issue. I am going to try tomorrow to use hakinstaller.
correct Panzerg. Even in the original you needed to use the character creator to make your character.
Right now the character creator won't work with the EE installation. You can use it if you have original installed and then move the character to EE however. Everything else seems to work if you just give it some time and let the game load.
My understanding is that even in the GOG Diamond version, you had to use an external character creator if you wished to to start off with any of the PRC only races, classes, and/or feats, then save the character and then start and select the newly created character in what ever module you are playing.
That is correct, To be able to use any of the classes or races you need to make the character externally.
Feats can be selected while making any of the standard classes.
That I could make a PRC class character in the EE (using a module made and PRC'd in the regular NWN) was actually the most promising thing about this enhanced edition so far.
Are you using windows 10 Plok? I am and I think that might be my issue. I also found that read only attribute was on for the NWM files. I think that may be a major part of the issue. I am going to try tomorrow to use hakinstaller.
I'm on Windows 7. I took one look at Windows 8 and went "ehh, maybe it's time to start using my Linux partition more." I really should run the EE on Linux but I've got this nice context switch going on where I use Linux for work and Windows 7 for messing about. NWN EE = messing about.
For my steam install it only sees modules in C:\Program Files (x86)\Steam\steamapps\common\Neverwinter Nights\data\mod I renamed it to modules and set up hakinstaller to look there.
You've not done anything weird to your Documents folder have you? Like whatever the hell the Windows equivelent of mounting /home on another HDD is? Or perhaps you've installed the game as one user and are running it as another user? Or are you running the program in compatibility mode for XP? When you select the User directory (text box at the bottom of the installation selection window), it's definitely pointing to where you're putting your modules, right?
The program is looking the Neverwinter Nights user directory using the standard .net Environment.SpecialFolder.MyDocuments. This is supposed to return either the "My Documents" or "Documents" folder in "C:\Users\$USER_WHO_IS_RUNNING_PROGRAM\" depending on which version of Windows you're using. It pastes this into a text box that you can override.
It's really, really odd that it can't find your modules and haks. Maybe you should record a video of what you're doing and PM it to me. I might be able to tell you where you're going wrong and maybe change the UI/add a check/fix a bug to make sure other people aren't going to be in your situation.
Are you using windows 10 Plok? I am and I think that might be my issue. I also found that read only attribute was on for the NWM files. I think that may be a major part of the issue. I am going to try tomorrow to use hakinstaller.
Forgot to talk about this. I saw this earlier when I had a quick look at the forums. The program does do some fannying around with readonly settings on files/folders; I just took one look at it and thought "I don't get why this is a thing but it's probably there for a good reason". That's probably what set your stuff as read-only; I'm guessing it's some Windows XP shenanigans.
Maybe it's time to get rid of that. I'll hide it behind a config value for now and have it default to "don't mess with NTFS permissions, thanks".
No fancy shenanigans with user permissions or mount points.When the modules are in "My Documents" "C:\Users\$USER_WHO_IS_RUNNING_PROGRAM\" it definitely does not see them. If I move them into beamdog or steam folders they show up correctly.The hak installer needs them to be in modules folder to add prc ocfix. It will fix the folders if they are in my documents or in steam/beamdog folder either way. But neither the feats or any other evidence that the changes happened shows when I run the game. When I open the nwm files renamed as .mod it shows it as not using haks. It will find the modules if i include them inside steam or beamdog but nothing if I leave them in my documents.
@clansunstar I have a couple of fixed spells, abilities, psionic powers (for example Crisis of Breath has been bugged for mind spell immune creatures that aren't vermin, undead or constructs where they automatically are inflicted 9999 damage without save) that I could submit for a new PRC release if you are interested.
Would you possibly have any interest in joining a team to update the PRC? I am assembling a team to get the upgrade out faster and to help create new content for the PRC.
It would be fantastically awesome if the release had a separate package that was just the extra spells. I presume this could be reasonably easily achieved by putting things together in hak files the right way and noting the lines in a tlk?
I will see about making a video today or tomorrow if possible.
If you could include a quick scan through the hak, tlk, erf and modules directories inside your Documents/Neverwinter Nights and your installation directory in the video that would be immensly helpful. On top of how you're using the program, some information about what's inside your directories will help massively.
@clansunstar I have a couple of fixed spells, abilities, psionic powers (for example Crisis of Breath has been bugged for mind spell immune creatures that aren't vermin, undead or constructs where they automatically are inflicted 9999 damage without save) that I could submit for a new PRC release if you are interested.
Would you possibly have any interest in joining a team to update the PRC? I am assembling a team to get the upgrade out faster and to help create new content for the PRC.
It would be fantastically awesome if the release had a separate package that was just the extra spells. I presume this could be reasonably easily achieved by putting things together in hak files the right way and noting the lines in a tlk?
We are looking into possibility of making it a more modular series of haks where one could choose to only use the spells, or the feats, etc.
Ok, finally managed to get the character creator in a state that work can be done on it. I've been procrastinating a lot with this; I'd sit down to work on it then spend ages fighting with netbeans, lose my temper and then curl up into a fetal position and play childhood videogames. Turns out I'm not a Java guy and shouldn't be allowed to Java unsupervised.
No work has been done yet, but if anyone else wants to do some work with this it's all set up so you just clone the repository, open it in netbeans and you're good to go.
It uses a library called NativeFmod to play sounds (mainly character voice sets), but I'm stuggling to get netbeans to find the damned thing (again, really not a Java guy). For now I've simply commented out the five lines that use it and pledged to fight with it later when I've remembered how Java imports/classpaths work.
I think before I do any work on making it EE compatible I'm going to remove all the copy and pasting and do a bit of refactoring. I doubt anyone is going to be mucking with the code much but it should make life easier for when I actually do update it for EE.
That red bit was the total difference between the various key classes. I suspect that the program was updated to work with the expansions by someone who didn't really know too much about programming and just copied, pasted and updated 2 lines.
I'm sorry to butt in like this, but I'm curious to know how much finagling I'll have to do to get the PRC to work with the CEP in EE. I had issues with this in NWN Diamond that eventually led to me permanently installing the PRC, which was quite a shame, as it looks fantastic.
@krynnmeridia I don't know much about the CEP, but I would imagine it would be a huge pain.
The key problem with making NWN mods work together is 2da/tlk files. 2da/tlk files are basically excel spreadsheets. There's no way to append rows into them all you can do is overwrite whole files. There's also the problem of the ID columns inside the 2das/tlks; there's no mechanism for dealing with conflicts besides not having them in the first place.
Because 2das reference other 2das ID columns and tlk id columns and scripts often load 2da entries by id swapping them out is not simple. You don't just have to change the IDs being used, but all the 2das that reference a given ID and all the scripts that also reference it. The only way to avoid this problem it is for particularly prominent mods to claim dibs on particular IDs/ranges of IDs. Unfortunately, this depends on other people knowing that dibs has been claimed and respecting it - not exactly a bulletproof strategy.
I've made a suggestion to handle this problem - instead of just having an ID you have a group name and an id (so instead of Feat ID 12345 you have Feat Group "prc" Feat ID 1). Another person suggested using GUIDs instead of IDs (I'm against this because generating GUIDs is annoying and they're too long to be held in short term memory). They'd both solve the problem but neither suggested has picked up much interest, unfortunately.
On the subject of the character creator; I'm taking a break from it. I'm really not enjoying it and getting quite burned out working on it. If anyone else wants to take over please be my guest. I've got it all set up to use the Netbeans Java IDE and you can grab my starting off stuff from https://bitbucket.org/SpitefulBerk/nwn_character_creator.
If anyone decides to work on it, you would be doing me a huge favour - I really would much rather be doing some NWN scripting like I originally set out to do. Full disclaimer to anyone who wants to give it a go; the code is not object oriented despite using Java. Everything is a static method (aka global function) and all differences are handled via copy, pasting and modifying whole classes. I don't even understand how the code doesn't crash upon loading the GOG version of the game as that version has no patch.key and no xp1patch.key.
I'm sorry to butt in like this, but I'm curious to know how much finagling I'll have to do to get the PRC to work with the CEP in EE. I had issues with this in NWN Diamond that eventually led to me permanently installing the PRC, which was quite a shame, as it looks fantastic.
Once you have the PRC installed you would need to install the CEP haks depending which version you are using you would need to use the correct Merge hak and tlk. I can get you a link to the right merge hak depending on which version of the CEP you are using.
so....is any progress still going on? or are my hopes for more races n classes dashed out into the wind
Classes may not be possible unless one creates a new branch of the PRC for themselves. Not sure about races yet. We are working on fixing the bugs first.
Hey all, been offline for a bit because of life. Sorry for the radio silence. I haven't had much time or motivation to do any work on anything much for the past 2-3 weeks, I'm afraid. The main things blocking the PRC from being usable are the character editor not working with the EE (see my last post) and the EE client binary being a bit flaky when running it.
As for new classes/races I'm working on my own fork that aims to make this a lot simpler and more modular. It's probably going to be a while before there's anything you can play with (because real life is a thing). For a teaser; here's the ninja implemented in the system I'm working on. ALL of the ninja's scripts are in two files - one to initialise the class and one to handle the wisdom to ac bonus. I've annotated each function with a // comment explaining it. All function and struct names are not final - I've gone a bit overkill in making sure they're unique to be honest.
prc_init_ninja.nss
#include "prc_sneak_attack_advancement";
#include "prc_sequence";
#include "inc_array";
#include "prc_ac_bonuses";
#include "prc_skill_bonuses";
#include "prc_events";
#include "ninja_const";
//Here's our entry point - the main function
//I've written this to call each class feature as a separate function
//for clarity
void main()
{
SneakAttackAdvancement();
WisToAc();
Acrobatics();
}
//The key approach is shown here; rather than having a few big functions
//in the PRC that has to be edited every time a new class is created, we
//instead tell the PRC how the class "ninja" interacts with sneak attacks.
//The PRC is then responsible for calculating everything.
void SneakAttackAdvancement()
{
struct PRC_SneakAttackAdvancement sneak_advancement;
sneak_advancement.growth_type = PRC_SNEAK_ADVANCEMENT_EVERY_ODD_LEVEL;
PRC_SneakAttackAdvancement_RegisterSneakAttackAdvancement(CLASS_TYPE_NINJA, sneak_advancement);
}
//However, some things need to be run more than once because they change
//with circumstances. The Ninja's wisdom bonus, for example, is going to
//change whenever someone equips an amulet of wisdom or casts
//owl's wisdom. We handle this by telling the PRC to run a script in specific
//circumstances and store the result for later use.
void WisToAc()
{
struct PRC_ACBonus ac_bonus;
struct PRC_CacheValidation cache_invalid;
cache_invalid.on_level_change = true;
cache_invalid.on_wis_change = true;
cache_invalid.on_equip_change = true;
ac_bonus.growth_type = PRC_CALLBACK;
ac_bonus.callback = "ninja_wis_to_ac";
ac_bonus.cache_invalid_on = cache_invalid;
ac_bonus.ac_type = AC_DODGE_BONUS;
PRC_ACBonus_RegisterACBonus(CLASS_TYPE_NINJA, PRC_ACBonus);
}
//This is the same as the Sneak Attack advancement fundamentally,
//however it uses an array to define the skills it uses. Arrays don't
//exist in NWN so I'm using a script that fakes them using local variables
//on the module object.
void Acrobatics()
{
object module = GetModule();
struct PRC_SkillBonuses skill_bonus;
struct PRC_ClassLevelSequence growth;
cache_invalid.on_level_change = true;
int skills = array_create(module, "ninja_acrobatics_skills");
array_set_int(module, "ninja_acrobatics_skills", 0, SKILL_TUMBLE);
array_set_int(module, "ninja_acrobatics_skills", 1, SKILL_JUMP);
growth.class = CLASS_TYPE_NINJA;
growth.start_level = 6;
growth.increment_levels = 6;
growth.step_size = 2;
skill_bonus.type = PRC_CLASS_LEVEL_SEQUENCE;
skill_bonus.sequence = growth;
skill_bonus.skills_array_object = module;
skill_bonus.skills_array_name = "ninja_acrobatics_skills";
PRC_SkillBonus_RegisterSkillBonus(CLASS_TYPE_NINJA, skill_bonus);
}
prc_init_ninja_wis_to_ac.nss
//This is the script alluded to in the file above that handles the wisdom to ac
//feature of ninjas. It will be called when the value is detected as being "stale"
//The script above specified that changing a character's level, wisdom stat or
//equipment would constitute a stale value.
void main()
{
object pc = OBJECT_SELF;
int result = 0;
int class_level = GetLevelByClass(CLASS_TYPE_NINJA, pc);
int wis_bonus = GetAbilityScore(ATTRIBUTE_WISDOM, pc) - 10 / 2;
object armor = GetItemInSlot(INVENTORY_SLOT_CHEST, pc);
int armor_ac = GetItemACValue(armor);
wis_bonus = wis_bonus > 0 ? wis_bonus : 0;
if (armor_type == 0){
result = wis_bonus + class_level / 5;
}
SetReturnInt(pc, result);
}
I'm only about a quarter of the way through writing the functions these scripts call (like RegisterSneakAdvancement) and I can't even really test anything until I've got it mostly done. This is an unfortunate consequence of writing it in a top down fashion like this.
If/when it's done, implementing a new class should be a case of:
Add your class in the 2das NWN needs to know about the class (e.g. classes.2da, cls_feat_*.2da)
Find a class that uses a feature your new class will use
Copy and paste the class setup script into a new folder
Change the name of the class in the script
Tell the PRC to read your scripts (currently I'm doing this via a 2da file)
I think that it's going to be much better than rooting through a million include files to find places to add yet another line like + GetLevelByClass(CLASS_TYPE_FOOBAR, oPC). Classes will actually have all their scripts in one place so you can keep it all in your head at the same time.
I had to take a little breather and move crosscountry but the issue was I was only doing the OC fix and not adding the prc haks. In addition the steam installation doesnt seem to see the haks in my documents in wondows 10.
@Plok As you set a high bar of doing the impossible, I was wondering while working on your own fork if you could implement rule adjustments. Some of the PRC modifies some of the rules for balance I would like to make it pure D&D 3.5.
That said even if you do not or do not have the time everything you have done has been amazing.
@Plok As you set a high bar of doing the impossible, I was wondering while working on your own fork if you could implement rule adjustments. Some of the PRC modifies some of the rules for balance I would like to make it pure D&D 3.5.
That said even if you do not or do not have the time everything you have done has been amazing.
I believe the purposes of the forks is for people to implement their own version of the PRC. Hence you could make all the rule adjustments just for yourself, it would be your own fork. Not everyone wants everything in the PRC so we are attempting to find ways to separate everything easier. That's where the forks come in.
hmmm, why the external character creator is needed?
NWN:EE enabled to select custom base class in character creation NWN:EE enabled to select custom race NWN:EE is loading haks in character creation in multiplayer
So I think that everything should now work without the PRC CC?
Comments
There's a lot of copy and pasting of code () and some scary looking bit bashing code to do with the key files but nothing that looks insurmountable. My first big hurdle, however, is figuring out how to make Netbeans compile it.
I've yet to see anything resembling a AbstractFactoryFactoryProxyAdapterSingletonInterface which is always a horrible possibility when looking at Java code. That's always encouraging.
Right now the character creator won't work with the EE installation. You can use it if you have original installed and then move the character to EE however. Everything else seems to work if you just give it some time and let the game load.
Feats can be selected while making any of the standard classes.
The program is looking the Neverwinter Nights user directory using the standard .net Environment.SpecialFolder.MyDocuments. This is supposed to return either the "My Documents" or "Documents" folder in "C:\Users\$USER_WHO_IS_RUNNING_PROGRAM\" depending on which version of Windows you're using. It pastes this into a text box that you can override.
It's really, really odd that it can't find your modules and haks. Maybe you should record a video of what you're doing and PM it to me. I might be able to tell you where you're going wrong and maybe change the UI/add a check/fix a bug to make sure other people aren't going to be in your situation.
--EDIT-- Forgot to talk about this. I saw this earlier when I had a quick look at the forums. The program does do some fannying around with readonly settings on files/folders; I just took one look at it and thought "I don't get why this is a thing but it's probably there for a good reason". That's probably what set your stuff as read-only; I'm guessing it's some Windows XP shenanigans.
Maybe it's time to get rid of that. I'll hide it behind a config value for now and have it default to "don't mess with NTFS permissions, thanks".
"C:\Users\$USER_WHO_IS_RUNNING_PROGRAM\" it definitely does not see them. If I move them into beamdog or steam folders they show up correctly.The hak installer needs them to be in modules folder to add prc ocfix. It will fix the folders if they are in my documents or in steam/beamdog folder either way.
But neither the feats or any other evidence that the changes happened shows when I run the game. When I open the nwm files renamed as .mod it shows it as not using haks. It will find the modules if i include them inside steam or beamdog but nothing if I leave them in my documents.
Anyway, repository is here: https://bitbucket.org/SpitefulBerk/nwn_character_creator
No work has been done yet, but if anyone else wants to do some work with this it's all set up so you just clone the repository, open it in netbeans and you're good to go.
It uses a library called NativeFmod to play sounds (mainly character voice sets), but I'm stuggling to get netbeans to find the damned thing (again, really not a Java guy). For now I've simply commented out the five lines that use it and pledged to fight with it later when I've remembered how Java imports/classpaths work.
I think before I do any work on making it EE compatible I'm going to remove all the copy and pasting and do a bit of refactoring. I doubt anyone is going to be mucking with the code much but it should make life easier for when I actually do update it for EE.
That red bit was the total difference between the various key classes. I suspect that the program was updated to work with the expansions by someone who didn't really know too much about programming and just copied, pasted and updated 2 lines.
The key problem with making NWN mods work together is 2da/tlk files. 2da/tlk files are basically excel spreadsheets. There's no way to append rows into them all you can do is overwrite whole files. There's also the problem of the ID columns inside the 2das/tlks; there's no mechanism for dealing with conflicts besides not having them in the first place.
Because 2das reference other 2das ID columns and tlk id columns and scripts often load 2da entries by id swapping them out is not simple. You don't just have to change the IDs being used, but all the 2das that reference a given ID and all the scripts that also reference it. The only way to avoid this problem it is for particularly prominent mods to claim dibs on particular IDs/ranges of IDs. Unfortunately, this depends on other people knowing that dibs has been claimed and respecting it - not exactly a bulletproof strategy.
I've made a suggestion to handle this problem - instead of just having an ID you have a group name and an id (so instead of Feat ID 12345 you have Feat Group "prc" Feat ID 1). Another person suggested using GUIDs instead of IDs (I'm against this because generating GUIDs is annoying and they're too long to be held in short term memory). They'd both solve the problem but neither suggested has picked up much interest, unfortunately.
On the subject of the character creator; I'm taking a break from it. I'm really not enjoying it and getting quite burned out working on it. If anyone else wants to take over please be my guest. I've got it all set up to use the Netbeans Java IDE and you can grab my starting off stuff from https://bitbucket.org/SpitefulBerk/nwn_character_creator.
If anyone decides to work on it, you would be doing me a huge favour - I really would much rather be doing some NWN scripting like I originally set out to do. Full disclaimer to anyone who wants to give it a go; the code is not object oriented despite using Java. Everything is a static method (aka global function) and all differences are handled via copy, pasting and modifying whole classes. I don't even understand how the code doesn't crash upon loading the GOG version of the game as that version has no patch.key and no xp1patch.key.
As for new classes/races I'm working on my own fork that aims to make this a lot simpler and more modular. It's probably going to be a while before there's anything you can play with (because real life is a thing). For a teaser; here's the ninja implemented in the system I'm working on. ALL of the ninja's scripts are in two files - one to initialise the class and one to handle the wisdom to ac bonus. I've annotated each function with a // comment explaining it. All function and struct names are not final - I've gone a bit overkill in making sure they're unique to be honest.
prc_init_ninja.nss
prc_init_ninja_wis_to_ac.nss
I'm only about a quarter of the way through writing the functions these scripts call (like RegisterSneakAdvancement) and I can't even really test anything until I've got it mostly done. This is an unfortunate consequence of writing it in a top down fashion like this.
If/when it's done, implementing a new class should be a case of:
- Add your class in the 2das NWN needs to know about the class (e.g. classes.2da, cls_feat_*.2da)
- Find a class that uses a feature your new class will use
- Copy and paste the class setup script into a new folder
- Change the name of the class in the script
- Tell the PRC to read your scripts (currently I'm doing this via a 2da file)
I think that it's going to be much better than rooting through a million include files to find places to add yet another line like + GetLevelByClass(CLASS_TYPE_FOOBAR, oPC). Classes will actually have all their scripts in one place so you can keep it all in your head at the same time.That said even if you do not or do not have the time everything you have done has been amazing.
Hopefully this explains them better.
What's the current status of the PRC in NWNEE? Just asking, because without the PRC, NWN isn't worth it. Thanks in advance!
NWN:EE enabled to select custom base class in character creation
NWN:EE enabled to select custom race
NWN:EE is loading haks in character creation in multiplayer
So I think that everything should now work without the PRC CC?
Or am I missing something?