Is it possible to extract the characters from database files? For example mithdradates hall training does have some custom characters in their data base. So is there a way to extract them and use as PC in other modules/campaigns?
offhand… NPCs and PCs don’t convert directly to the other.
not saying it’s impossible, just that iirc PCs have more variables in their .Bic files than NPCs have in their .Utc’s
( I don’t know of a converter utility other than trying to do it manually in eg. TlkEdit2 ) and if you want their equipment also it’s gonna get (even more) twiddly
The limited help for the LETO utility indicates it can convert player files to to other types, i.e. companions. Not sure if it will work on an NPC. You can try it.
You’ll need this https://neverwintervault.org/project/nwn1/other/leto-169
and this https://neverwintervault.org/project/nwn2/other/tool/nwn2-leto-updates-feats-motb-soz-update
If the database file is stored as a blob I believe you can export the file and as long as it is a player file you can use Leto to edit and save the file to your player/server vault folder. You may even be able to use directly from the exported file as long as you give the file the proper extension (xxxxx.bic)
OH ,and I don’t believe you can use NPC files as player files. The engine expects to see all the data from a player file. Not finding it may cause problems especially if the server or game is set for “legal characters”
Thanks, LETO did help in some way. I have managed to convert some NPC to PC and choose as PC before starting campaign/module. But it doesn’t help to extract characters (NPCs/PCs) from database itself. I’m talking about xxx\Neverwinter Nights 2\database files more specifically .cdx , .dbf, .fpt files. Those attached files are custom-made NPCs/PCs [mhot_level_database.zip] from module training where can be summoned in the module to fight against. If anyone knows a way how to extract them to .bic or .ros or any other file where can be opened with LETO or TlkEdit2 I really would appreciate that.
/untested but here’s some ideas —
pretty sure you’d have to look through the MHoT scripts to find the functions and variables used there. i’d Look specifically for RetrieveCampaignObject()
// Use RetrieveCampaign with the given id to restore it. // If you specify an owner, the object will try to be created in their repository // If the owner can't handle the item (or if it's a creature) it will be created on the ground. object RetrieveCampaignObject(string sCampaignName, string sVarName, location locLocation, object oOwner = OBJECT_INVALID, object oPlayer=OBJECT_INVALID);
It should/will be similar to what AlanC9 uses in the Universal Companions db.
so basically once i found the varname of the NPC(s) i’d write a script that instantiates them from the DB, sets their faction to Commoner, clears their actions, and adds them to the PC-party (see also, DM-helper). Then do savegame and find their .Ros files … alternately, if they are simply instantiated but not in the party, do a save and hunt for the creature-object in the .Git file (iirc) and do something “crazy” like copy and overwrite the values into a pre-existing .Ros file or .Utc
/end voodoo chicken dance
I’m able to catch (as pokemon lol) any creature/NPC as DM. Then I use Universal Companions and store it to UC database. Then as PC load the game and use UC party roster and then summon catched NPC. But I don’t know why but I’m not able to control it. That’s not important, so I save the game and run to look at .ros files. I can see UC_NPCname.ros , so I just rename it to UC_NPCname.bic and move it to Neverwinter Nights 2\localvault and then I supposed to see it in character selection in the game but I’m not… Okay, then I open this UC_NPCname.bic with TlkEdit2 and can see one line ''IsPC 0". So I change to “IsPC 1”, load the game… and… still this character won’t appear in character selection menu
Once you have it as an .ros file, you should be able to use LETO to convert it to a player.bic file.
Sorry, I thought you meant external database using NWNX. Didn’t know you meant the Neverwintwer database files. Characters stored blob files in databases like MySQL using NWNX are files that Leto can manipulate.