Jump to content

Enhanced Edition Compatibility with L1NPCs


Avehn

Recommended Posts

Summary of what data you seem to need.

Chosen from drop down menus:
Override script AERIE.BCS 248 h
Class script SHOUTINV.BCS 250 h
Default script AERIEX.BCS 268 h
Dialogue AERIE.DLG 2cc h

Manually written in as numbers:
Name Aerie 8 h
Tooltip Aerie c h
Relevant numbers are 9184 and 9185, in the original file click on the NPC's two names to learn what numbers you need to enter. When you have entered the numbers into the altered file, click on Update value to make sure you entered the right numbers.

Manually written in:
Global identifier -1 27c h
Local identifier -1 27e h
Script name Aerie 280 h


Sounds and Biography start at A4h (164d) and at 233h (563d). They can be copied in one go from the original file and then pasted into the altered file. Recent versions of Near Infinity have a Raw tab where you can do this.

 

Here is the relevant data from Aerie6.cre:

 


FF FF FF FF 96 20 00 00 97 20 00 00 98 20 00 00 99 20 00 00 9E 20 00 00 A0 20
00 00 A1 20 00 00 A6 20 00 00 A8 20 00 00 AA 20 00 00 AB 20 00 00 FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 69 21 00 00 6A 21
00 00 31 23 00 00 33 23 00 00 34 23 00 00 7D 23 00 00 7E 23 00 00 80 23 00 00
81 23 00 00 86 23 00 00 A8 23 00 00 7C 24 00 00 8E 25 00 00 F1 25 00 00 3C 3B
00 00 3D 3B 00 00 3F 3B 00 00 4E 3B 00 00 4F 3B 00 00 50 3B 00 00 51 3B 00 00
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 52 3B 00 00 54 3B 00 00
55 3B 00 00 57 3B 00 00 58 3B 00 00 59 3B 00 00 5A 3B 00 00 5B 3B 00 00 5D 3B
00 00 5F 3B 00 00 FF FF FF FF 50 0B 00 00 FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF


To turn a Chr file into a Cre file, open it in a hex editor, delete the first 100 Bytes, and then save as a Cre file. If both original and altered files have the Cre format, the relevant attributes occur at the same offsets.
To get an individual copy of the original Aerie Cre file, in File menu go to Export and save to the Override folder.

This method is suitable for any kit which is installed to the relevant game, BG1 or BG2. (It could also be altered to work for IWD1 too.) Then there is BG: Siege of Dragonspear...

Edited by Ishad Nha
Link to post

BG2EE may draw NPC files from a fixed source hence they can't be altered mid-game? Presumably the game reads the Cre files for all NPCs at the start of the game. If you want to customize an NPC in the middle of the game you will need to be thinking outside the square.
After the party entered Waukeen's Promenade, I drew up my own version of Aerie. I could not get the game to accept her.


Original Aerie is a multiclass Cleric/Mage. My altered Aerie is a single-class Morninglord of Lathander, she was saved in the file AERIE7.cre.
In AR0604 the party went over and killed the two "Peasants', then we picked up the disguised key. Party remained exactly where it was, out of sight of the original Aerie. CLUAConsole:CreateCreature("AERIE7") was used to summon the altered version of Aerie. She was then given the key and allowed to join the party.
Original Aerie was left where she was while party went over to the stairway.

 

Link to post

It's nothing to do with EE, it's the same on the original engine IIRC: once you enter an area. the .CRE files inside it are moved to your savegame. Since L1NPCs cannot mod assets already in a savegame folder, you won't see the changes. But if you start a new game or load a save from before entering the area, it should work.

Link to post

"load a save from before entering the area"

That is what I was trying but I could not bring it off! Even when party started from the end of Irenicus's dungeon.

Starting the game all over again did bring it off, the altered Aerie was found in place of the original person.

Edited by Ishad Nha
Link to post

There are several .cre files for each NPC, and the gave spawns the one according to your party level...

If you wish to know which one it is, you can just open the npclevel.2da table, and see which one it is. Assuming if the party level is the number, you should get the .cre file indicated in the table. And yeah, it's very likely that you get something other than aerie6.cre, as you are probably already leveled up a few times when you arrive to the circus, as your party level(the sum of your party members levels divided by their amount of them) is likely higher than 6.

 

The L1NPCs mod does all this simply by replacing the existing .cre's with copies of the original level 1 .cre that's then modified by the other things - functions.

Edited by Jarno Mikkola
Link to post

I replaced all the Aerie.cre files that seemed to have the right class level and XP. Maybe I should replace them all?

Edit:

I altered all files that had the name Aerie, still no luck, But a wholly new game showed the altered Aerie.

That proves my belief that in BG2EE you can't alter an NPC once the game begins. Hence you will need to alter before the game begins or use a method like that shown in post #47.

Edited by Ishad Nha
Link to post

If you strike severe problems, look at your characters folder, in Windows 8 or 10 it has a location like:

C:\Users\[Login Name]\Documents\Baldur's Gate II - Enhanced Edition\characters

I will need to check if it always has priority over the usual override folder or not.

It may only start to exist if you do something like Export a character to a Chr file.

Edited by Ishad Nha
Link to post

I will need to check if it always has priority over the usual override folder or not.

Yes, it is.

 

Not that you should be able to export the chr file of NPCs, as they are after all flagged as NPCs, so non exportable characters.

Edited by Jarno Mikkola
Link to post

Now Geomantic Sorceror Cre files, from the Original BG2, seemed to run on BG2EE without problems. I will need to check whether the Original and EE versions use identical formats for these files. If so, you can use Level1 NPCs to create your Cre files on the Original version then send them over to the override folder of the EE version.

Eventually we may get help to alter the mod so that it runs on EE games.

Link to post

I will need to check whether the Original and EE versions use identical formats for these files.

They are, the reason being that the EE engine is based on BG2:ToB Engine. Of course the EE files have a few additional features, so porting them back might be harder.

For example, we should have 2 kits for the non-EE-BG2 install, while the EE can utilize the one.

It's quite easy to code too.

Link to post

It seems that the mod can create proper NPCs for the first 31 kits, they are the same for both versions of BG2.

Problems arise with mods that have different numbers in each game...

One approach is to fake the ID of the game so that BG2EE can meet the mod rules for being identified as the Original BG2.

 

In the meantime there is still my custom approach.

Link to post

Problems arise with mods that have different numbers in each game...

Erhm meaning ?

The Level 1 NPCs was created so that you only have one game, the game you are playing. If you wish to alter a character in another game, then you install the Level 1 NPCs mod to that game, not make a freak alteration in a hex editor based on the results you get from installing the L1NPC in another game.

Link to post

"The Level 1 NPCs was created so that you only have one game, the game you are playing."
So far as I know, the Level 1 NPCs mod does not work or work properly on any of the Enhanced Edition games. This won't change in the near future.
My idea was to create the NPCs in the Original BG2, where the mod does work, and then transfer the resulting Cre files to BG2EE, where the mod does not work.

"Problems arise with mods that have different numbers in each game..."
In Original BG2 a kit has a number like 35 in Kitlist.2da, meanwhile in BG2EE the kit is number 42. BG2EE starts out with several kits that the original BG2 never had:
Blackguard
Shadowdancer
Dwarven Defender
Dragon Disciple
Dark Moon Monk
Sun Soul Monk
This gives the potential for different numberings in the two versions of the same game.

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.

×
×
  • Create New...