Weird to see this forum still active in 2021 ;-)

It's even a bit more complex I think.

The compiled Osiris-Code is not directly in the save files.

What I think happens is that the game takes the compiled Osiris-Code and creates yet some other code from it, i.e. the code gets compiled to its final form on the very first start of a playthrough and this final form is then stored in the savegame.
(That is what I think happens, I don't remember that Larian ever confirmed this, Raze only ever confirmed things we found out ourselves, e.g. how treasure generation works or the infamous out-of-handles crash ;-)

I've looked through a save once and it contained stuff that almost looked binary, in an XML file. I think it's impossible for anyone but Larian to decipher this stuff. (I'm only guessing that Larian can do this because there was a time when they still patched the game. ...)

The number of party members is in a single Osiris database, as Abraxas said.

I've looked at Baardvarks six man party mod and what he did was simply add a second database entry DB_CompMax(4) in an init section with one of his mod files.
The way Osiris works, he did not overwrite the original DB_CompMax(2) but add an entry DB_CompMax(4).
By chance, the name of the file he used comes after the original file lexically and is thus compiled - and executed - afterwards. This is why it works.
The correct way to do it - imo - is to unset DB_CompMax(2) and then set DB_CompMax(4) afterwards because otherwise, every code piece using the database is executed twice, once with value the 2 and then again with the value 4. It's probably done the simple way in Epic Encounters 6 man because that was created by Baardvark too as far as I know, and it's done done with unsetting in XC_Bags and XC_Encounters 6 man. (The latter is a guess, I never looked if Smarmbot picked up the code from XC_Bags or the simple solution when he created the 6 man merger.)

Of course, a change to story code requires compilation which in turn requires the editor ... which was not included in all packages sold on Steam.