Skip to content

LevelUpHenchment not following Package?

I'm not sure what it's doing but when I run the LevelUpHenchman function it doesn't seem to follow any package that I try to assign to it. The end goal is a henchman who uses the Assassin package and starts as a level 1 rogue. The player should be able to choose between fighter or the rogue class during actual leveling up. I'll throw some tricky code in so that when the henchman qualifies for Assassin that becomes an option as well. The current goal is to just get a rogue to follow a package of my choosing.
#include "nw_i0_henchman"

void main()
{
    SendMessageToPC(GetFirstPC(), IntToString(GetLocalInt(OBJECT_SELF,"class")));
    SendMessageToPC(GetFirstPC(), IntToString(GetLocalInt(OBJECT_SELF,"package")));

    LevelUpHenchman(OBJECT_SELF, GetLocalInt(OBJECT_SELF,"class"), TRUE, GetLocalInt(OBJECT_SELF,"package"));
}

Comments

  • ProlericProleric Member Posts: 1,281
    I guess that you already checked that the class and package constants are valid ?

    Did you make the level 1 henchman using the toolset wizard? Is the initial package the same as the one you're using in the script? Did you make any changes to feats, skills or whatever before running the script? See remarks on LevelUpHenchman to see why those questions matter.

    Are you seeing a console message "Level Up Henchman failed"?

    If not, what are the symptoms of failure?
  • Dragonfolk2000Dragonfolk2000 Member Posts: 377
    The ints that I'm passing through are the correct ones. Should I be using the actual constant listed in the script editor instead?

    The creature wizard always defaults to the default class package, which is not what I want. I did not make any changes to the character.

    I see no console message about it failing.

    The symptoms are that it just isn't picking feats based on the package. I haven't been checking skills but it should be picking feats in a different order, prioritizing certain ones over others.
  • ProlericProleric Member Posts: 1,281
    Using the correct ints is fine (the constants just make the code more legible).

    What is the class, starting package and target package?

    Can you give an example of a feat that isn't allocated?
  • Dragonfolk2000Dragonfolk2000 Member Posts: 377
    The henchman is leveling up as Rogue. The starting package is Default Rogue. I'm trying to use the Assassin package (for the feat selection). The character just continues to use the default Rogue level up. I'm aware that packages do not change class features, they determine what feats and skills to prioritize (among other things). I wanted the assassin feats, none are they that they wouldn't qualify for.
  • Dragonfolk2000Dragonfolk2000 Member Posts: 377
    Alright, from what I can tell you still need the corresponding class in order to use a package or else it defaults to the default package. Guess it's time to figure out how to make a custom NPC package.
  • ProlericProleric Member Posts: 1,281
    The file packages.2da defines which class is allowed to use a package. If you specified class=rogue package=assassin I would expect that to default or fail. Class=Assassin should also fail unless the character has the prestige class prerequisites.

    You'd need to put a new row in packages.2da, then duplicate the files pack##assa.2da, renaming them to match the row you just added.
  • Dragonfolk2000Dragonfolk2000 Member Posts: 377
    That's where I'm at right now, trying to figure out how to do that. I just can't find the .2da files.
  • ProlericProleric Member Posts: 1,281

    Use nwnexplorer to open the game files (data folder).

    It may do that by default, but, if not, open nwn_base.key with the big Open button.

    The 2da files are all in base_2da.bif.
  • Dragonfolk2000Dragonfolk2000 Member Posts: 377
    It may not be worth it in the end. I mean, if someone were to open up a module that uses my custom level up package wouldn't they need to download a separate override file as well? It seems like a lot.
  • ProlericProleric Member Posts: 1,281
    The clean way to do that is to put your 2da files etc in a hak.

    That way, only those modules that need it will use it, by adding the hak to Custom Content in Module Properties. You can find many examples on Neverwinter Vault.

    Putting things in override is fine for your own amusement, but it affects every module, so override is not a suitable method for distributing packages to other players.
  • Dragonfolk2000Dragonfolk2000 Member Posts: 377
    So would the hak be attached to the module then? And the player just installs the module?
  • ProlericProleric Member Posts: 1,281
    Players are used to installing more than one file. To simplify that, put your module and hak in the correct subfolders, then wrap both in a 7zip or RAR archive for downloading. All the player has to do is Extract All in the Neverwinter Nights folder.

    The player can also use NIT (or Steam Workshop) to install both files with one click.

    https://steamcommunity.com/sharedfiles/filedetails/?id=1309774090

  • TarotRedhandTarotRedhand Member Posts: 1,481
    Here's the link to NIT in case you need it -

    Neverwinter Nights Mod Installer Tool - NIT

    TR
  • Dragonfolk2000Dragonfolk2000 Member Posts: 377
    I'll check this out. Thanks.
Sign In or Register to comment.