Jump to content
Sign in to follow this  
subtledoctor

NPC_EE ... new class and kit options for BGEE and BG2EE NPCs

Recommended Posts

I'd like to announce my new mod: Non-Player Characters, Enhanced for Everyone. That's right - NPC_EE!

 

Forum page with download link

 

And here is the ReadMe

 

Please note, this is EE-only. If you're playing TOB or BGT or Tutu, you should instead use the excellent "Level 1 NPCs" mod.

What is this mod?

Well, this is a bone I'm throwing to BGEE players, since the wonderful, excellent, currently-unsupported "Level 1 NPCs" mod does not work on the new engine. I added some rekitted NPC components to the end of my Scales of Balance mod (SoB); but there were only a few options, and many of them relied on having installed earlier parts of SoB.

This mod includes various options to change NPCs' class. There are only a few such options, because there are only so many class changes that work - for lore reasons, I'm not changing Jaheira from druid, or Quayle from cleric/mage, or Kagain from fighter, etc. Side benefit: less work for me! :p

Then, in-game, the magic happens: the mod generates a script on the fly that will detect any kits in your game, including mod kits. Every single joinable NPC in the game will get an innate ability to add a kit, or to switch to a new kit, and they will have options for every kit that their class (or multiclass!) allows.

You can turn Minsc into a fighter, and then in-game you can turn him into a Barbarian!  You can turn Coran into a kensai/thief. You can turn Montaron into a berserker/thief. You can make Imoen into a mage/thief multiclass, and then in-game turn her into a swashbuckler/mage. Et cetera.

By default, when you use the ability to change someone's kit, it will zero out their proficiencies and then present you with several innate abilities, which will let you add new ones from scratch.  If you like, you can give an NPC the same kit they already have, and just use this to choose new proficiencies for them.  (If you don't like the proficiency stuff, you can turn it off in the mod's settings file before you install it.)

 

F.A.Q.:

Can't people just use EEKeeper for this?

Yes. But you have to wait until the NPC is in your party, and quit out of the game and spend 20 minutes fiddling in EEKeeper when you really want to be playing. It's a lot easier to install this via Weidu, IMHO. Of course EEKeeper is more flexible, so if the class you want for Shar-Teel isn't in this mod, you can always use EEKeeper as a fall-back. Again, the spirit of this is, more options are better than fewer options.

 

Okay, can I change things around later?

Yes.  Well, the whole idea of this is that it reduces your need to uninstall/reinstall the mod, the way you would have to with Level1NPCs.  You can run two games simultaneously and, because you choose kits for NPCs in-game, the same person can have a different kit and different proficiencies in each playthrough, at the same time and without reinstalling anything!  Of course the class changes will require a reinstall to undo or alter, so this mod should be installed dead last, after all other mods. After BG2Tweaks. After SCS. All the way at the end.

 

I've already changed up some NPCs with Scales of Balance components (or the NPCKits mod, or some other method). Do I have to uninstall those changes before using this mod?

No - whichever one goes in last should control. You should be able to install/uninstall/reinstall this one on top of anything else you've already done. (I have not tested doing this, but it overwrites the various ckass/kit/HP/etc. fields, so I don't see how they would conflict.)

 

Cheers!

Edited by subtledoctor

Share this post


Link to post

Cool. If I ever get some free time, I was considering making an L1NPCs-lite version from scratch just for the EEs if nobody gets around to updating L1NPCs before my inevitable next playthrough.

Share this post


Link to post

...making an L1NPCs.. version .. for the EEs...

There's a legend that someone already did that... I would say that CrevsDaak had done that, or a lot of work towards it, but he went silent about this subject some time ago:

 

...

OK, that had escaped me. Then I'll list new NPCs and done.

So you might ask of it ..

 

Here is the download link.

 

And here is the ReadMe

:beer:

Edited by Jarno Mikkola

Share this post


Link to post

Nice. Well like I say, feel free to add in anything you want. (And/or criticize the code... some of it needs work, like the "Ajantis=Inquisitor" component that I've commented out.)

 

Also, one of my back-burner ideas for this is to add an .ini file that just looks like

AJANTIS_1 = bastard sword 
AJANTIS_2 = long bow
...
etc.
And let the .tp2 read that and insert them into the proficiency assignment, just to give the player one more thing they control. It's still nowhere near the control that L1NPCs gives you, but it would probably be enough for most people. Edited by subtledoctor

Share this post


Link to post

 

...making an L1NPCs.. version .. for the EEs...

There's a legend that someone already did that... I would say that CrevsDaak had done that, or a lot of work towards it, but he went silent about this subject some time ago:

 

...

OK, that had escaped me. Then I'll list new NPCs and done.

So you might ask of it ..

 

Here is the download link.

 

And here is the ReadMe

:beer:

 

Eeeeh, my version barely installs, it is in my old computer's HDD (if it wasn't accidentally deleted in one or misplaced), and I haven't even finished adding all of the EE NPCs (I had added Neera and Dorn (both BG:EE and BG2:EE), and had started adding Rasaad), so I wouldn't say that it's actually there for anyone else to install... I'll look for it later and see if I can get some more work done (dude, 'cause I had even forgotten xD).

Share this post


Link to post

That came together faster than I thought! Here's a very rough beta of v2.

 

Some of the strings are stupid, and it's limited to the NPC's current class. I'll clean up the text and eventually add some Weidu options to change some NPCs' class. Consider this a proof-of-concept.

 

https://dl.dropboxusercontent.com/u/86011511/NPC_EE_beta.zip

 

EE-only - it relies on an EE feature of kitlist.2da. If you're playing BGT or TOB, use Level1NPCs instead.

Share this post


Link to post

Okay: I'm ready to unveil v2!

 

Download link

 

This makes MAJOR changes. There are no more options to change kits. Instead, there are options to change NPCs' class. There are many fewer components, because there are not as many class changes that work (for lore reasons, I'm not changing Jaheira from druid, or Quayle from cleric/mage, or Kagain from fighter, etc. Side benefit: less work for me! :p

 

Then, in-game, the magic happens: I've devised a way to generate a script on the fly that will detect any mod kits you have added. Every single joinable NPC in the game will get an innate ability to add a kit, or to switch to a new kit, and they will have options for every kit that their class allows.

 

It's frakkin' awesome.

 

What's more: I've cheated a bit. Just 20 minutes ago, I figured out how to add an extra option to sorcerers, allowing them to take the Wild Mage wizard kit. I haven't tested it at all but I did confirm that it works. So, with this mod you can turn Neera into a sorcerer, and then in game turn her into a Wild Sorcerer! It's perfect for her!

 

You can turn Minsc into a fighter, and then in-game you can turn him into a Barbarian!

 

Also, as if that's not enough (come on!):

 

I've also added options for multiclass characters to take a kit. They can only take a kit in one class, so here how it pans out:

- ranger/clerics: choose a ranger kit

- fighter/clerics: choose a cleric kit

- cleric/thieves: choose a cleric kit

- cleric/mages: choose a cleric kit

- fighter/druids: choose a fighter kit

- fighter/thieves: choose a fighter kit

- fighter/mages: choose a fighter kit

- thief/mages: choose a thief kit

- fighter/mage/clerics: choose a cleric kit

- fighter/mage/thieves: choose a fighter kit

 

So you can turn Coran into a kensai/thief. You can turn Montaron into a berserker/thief. You can make Imoen into a mage/thief multiclass, and then in-game turn her into a swashbuckler/mage.

 

YES, you can do all of this and more with EEKeeper. But this is much cooler and easier to use.

 

Cheers!

Edited by subtledoctor

Share this post


Link to post

Hey, I've noticed that you added support for EET in this mod. Thanks. Few things are not perfect yet though. In EET following NPC BG1 creatures are renamed due to conflicting names with BG2 resources:

IMOEN6 => IMOEN6_ (IMOEN61 in BGT)

QUAYLE => QUAYLE_ (BGQUAYLE in BGT)

VICONI6 => VICONI6_ (VICONI61 in BGT)

XAN => XAN_ (BGXAN in BGT)
XZAR => XZAR_ (BGXZAR in BGT)

 

Also your code is not compatible with tutu at all. That platform renames every single resource in BG1 by adding _ at the beginning, not only for conflicting ones. Overall I think it would be better to assign variables depending on the platform like this and paste it into ALWAYS section of the tp2 file (this way they will be assigned for each component). Right before LANGUAGE declaration you could add something like this:

ALWAYS
  ACTION_IF GAME_IS ~bgee~ BEGIN
    OUTER_SPRINT tutu_var ~~
    OUTER_SPRINT IMOEN6_var ~IMOEN6~
    OUTER_SPRINT QUAYLE_var ~QUAYLE~
    OUTER_SPRINT VICONI6_var ~VICONI6~
    OUTER_SPRINT XAN_var ~XAN~
    OUTER_SPRINT XZAR_var ~XZAR~
  END ELSE ACTION_IF GAME_IS ~eet~ BEGIN
    OUTER_SPRINT tutu_var ~~
    OUTER_SPRINT IMOEN6_var ~IMOEN6_~
    OUTER_SPRINT QUAYLE_var ~QUAYLE_~
    OUTER_SPRINT VICONI6_var ~VICONI6_~
    OUTER_SPRINT XAN_var ~XAN_~
    OUTER_SPRINT XZAR_var ~XZAR_~
  END ELSE ACTION_IF GAME_IS ~bgt~ BEGIN
    OUTER_SPRINT tutu_var ~~
    OUTER_SPRINT IMOEN6_var ~IMOEN61~
    OUTER_SPRINT QUAYLE_var ~BGQUAYLE~
    OUTER_SPRINT VICONI6_var ~VICONI61~
    OUTER_SPRINT XAN_var ~BGXAN~
    OUTER_SPRINT XZAR_var ~BGXZAR~
  END ELSE ACTION_IF GAME_IS ~tutu tutu_totsc~ BEGIN
    OUTER_SPRINT tutu_var ~_~
    OUTER_SPRINT IMOEN6_var ~IMOEN6~
    OUTER_SPRINT QUAYLE_var ~QUAYLE~
    OUTER_SPRINT VICONI6_var ~VICONI6~
    OUTER_SPRINT XAN_var ~XAN~
    OUTER_SPRINT XZAR_var ~XZAR~
  END
END

now you no longer need separate blocks for each platform. For example this (which is not really compatible with either EET or Tutu):

ACTION_IF GAME_IS ~tutu bgee eet~ THEN BEGIN
    COPY_EXISTING ~IMOEN1.cre~ ~override~
                ~IMOEN2.cre~ ~override~
                ~IMOEN4.cre~ ~override~
                ~IMOEN6.cre~ ~override~

could be changed to:

ACTION_IF GAME_IS ~tutu tutu_totsc bgee eet bgt~ THEN BEGIN
    COPY_EXISTING ~%tutu_var%IMOEN1.cre~ ~override~
                ~%tutu_var%IMOEN2.cre~ ~override~
                ~%tutu_var%IMOEN4.cre~ ~override~
                ~%tutu_var%%IMOEN6_var%.cre~ ~override~

notice that whole

ACTION_IF GAME_IS ~bgt~ THEN BEGIN

block in mage_thief.tpa is no longer needed if you code it like this, so there is less chance for mistakes.

 

btw. if you are adding exact same changes in both BG1 and BG2 creatures than you could use code like this instead (Imoen used just as an example, from what I've seen you are doing different patching in BG1 and BG2):

ACTION_FOR_EACH file IN ~%tutu_var%IMOEN1~ ~%tutu_var%IMOEN2~ ~%tutu_var%IMOEN4~ ~%tutu_var%%IMOEN6_var%~ ~IMOEN6~ ~IMOEN10~ ~IMOEN15~ ~IMOEN211~ ~IMOEN213~ BEGIN
  ACTION_IF FILE_EXISTS_IN_GAME ~%file%.cre~ BEGIN
    COPY_EXISTING ~%file%.cre~ ~override~
      //do your patching
    BUT_ONLY
  END
END
Edited by K4thos

Share this post


Link to post

Oy. More, different renaming conventions. What was wrong with the BGT convention?

 

Well, I think I'm just removing Tutu compatibility - it's not used very much, and it's a ton of work to deal with, and I don't have a Tutu install to test with so I would be releasing code blindly. And it's fine for this mod, anyway, because it's now EE-only.

 

As for EET, I'll get around to adding those variants when i can. Bad timing though, as RL is preventing me from doing much more than the occasoinal bug-fix and some forum posts. Until SoD comes out, EET is not going to be a very high priority...

Share this post


Link to post
What was wrong with the BGT convention?

1. It's not consistent. Using exmples from previous post:

QUAYLE => BGQUAYLE - this one is fine

IMOEN6 => IMOEN61 - this is odd one

2. Due to 2 characters prefix there are instances where 7 character filenames had to be changed to fit in 8 characters limit (no common convention, dropping 1 or 2 letters, usually at the end but not always).

3. Area renaming have no bearing on the original BG1 area numbers. You are always forced to use external site for reference

4. It changes much more than it should (for example every single EXIT and DOOR name in area files)

5. BGT appends dialogues for continuous NPCs, so common convention with EET wouldn't be reliable either way

And so forth. Ascension64 (author of BGT-weidu) actually agrees with the opinion that it's not a good convention.

 

When modding EET you pretty much only need to know about 2 rules regarding BG1 resources:

- area resources = changed prefix from AR to BG

- other resources = "_" suffix at the end of few conflicting files

 

As for EET, I'll get around to adding those variants when i can. Bad timing though, as RL is preventing me from doing much more than the occasoinal bug-fix and some forum posts. Until SoD comes out, EET is not going to be a very high priority...

Thanks. You may also consider using cross-platform coding implementation via community standard cpmvars btw. These files contains all vatiables that you will need in your mods to make it work with all platforms.

 

------------

 

Some bug reports:

1. npc_ee/npcs/coran/bard.tpa

EXTEND_BOTTOM ~imoen.bcs~ ~npc_ee/npcs/coran/coran_bard.baf~

=>

EXTEND_BOTTOM ~coran.bcs~ ~npc_ee/npcs/coran/coran_bard.baf~

2. Pretty much every EXTEND_TOP like the one above for BG2 NPCs is not compatible with a game started in ToB because you only modify non-ToB variants of Override scripts.

Edited by K4thos

Share this post


Link to post

2. Pretty much every EXTEND_TOP like the one above for BG2 NPCs is not compatible with a game started in ToB because you only modify non-ToB variants of Override scripts.

Actually most of them do also EXTEND the TOB scripts, but a few (Nalia, Mazzy) were missing. Good catch.

 

As to EET, I don't mean to gripe and it is 100% in my plans. It's just, RL is absolutely destroying me right now and I don't have enough time to get this done anytime soon.

Share this post


Link to post

Just taking a closer look at this. It's a very nice technique, defining the variables up-front. But I see a possible problem (really just with Imoen and Viconia)

now you no longer need separate blocks for each platform. For example this (which is not really compatible with either EET or Tutu):

ACTION_IF GAME_IS ~tutu bgee eet~ THEN BEGIN
    COPY_EXISTING ~IMOEN1.cre~ ~override~
                ~IMOEN2.cre~ ~override~
                ~IMOEN4.cre~ ~override~
                ~IMOEN6.cre~ ~override~
could be changed to:
ACTION_IF GAME_IS ~tutu tutu_totsc bgee eet bgt~ THEN BEGIN
    COPY_EXISTING ~%tutu_var%IMOEN1.cre~ ~override~
                ~%tutu_var%IMOEN2.cre~ ~override~
                ~%tutu_var%IMOEN4.cre~ ~override~
                ~%tutu_var%%IMOEN6_var%.cre~ ~override~
notice that whole
ACTION_IF GAME_IS ~bgt~ THEN BEGIN
block in mage_thief.tpa is no longer needed if you code it like this, so there is less chance for mistakes.

 


In EET and BGT you don't just need the one variant of Imoen6 or Viconi6; I need to patch both imoen6 and imoen61; and both viconi6 and viconi61. So I would still need a separate block for

ACTION_IF GAME_IS ~bgt eet~ THEN BEGIN

No?

Share this post


Link to post

You can patch both at the same time, that's why we're setting these variables beforehand. This example probably is more readable:

ACTION_FOR_EACH file IN ~IMOEN1~ ~IMOEN2~ ~IMOEN4~ ~%IMOEN6_var%~ ~IMOEN6~ ~IMOEN10~ ~IMOEN15~ ~IMOEN211~ ~IMOEN213~ BEGIN
  ACTION_IF FILE_EXISTS_IN_GAME ~%file%.cre~ BEGIN
    COPY_EXISTING ~%file%.cre~ ~override~
      //do your patching
    BUT_ONLY
  END
END

above example will return correct file names for both BGT and EET but only if you assigned that "IMOEN6_var" like I've mentioned in the first post. If you don't know which variables needs to be set than please consider downloading cpmvars for each platform here (notice that these files contains exactly the same variable names but different words evaluated in them) Now INCLUDE each of these files in the ALWAYS section of your mod depending on GAME_IS command. From now on you no longer need to worry about setting variables, you just need to remember which files are renamed and replace the names with variable names, using BG:EE file as a reference. Let me know if it's still confusing.

Edited by K4thos

Share this post


Link to post
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...