Is it possible to add clothing from other mods to NPCs?

Post » Wed Jul 06, 2011 9:24 pm

I'm not very sure how to go about this... If I were to add armours from other mods I would have to first recreate new ids in my esp right? Or directly edit their esps. But even then, I'm not sure how to add it to NPCs' inventories without causing massive conflicts with mods that also edit the same NPCs.

Anyone help? Thanks!
User avatar
Danny Blight
 
Posts: 3400
Joined: Wed Jun 27, 2007 11:30 am

Post » Wed Jul 06, 2011 6:05 pm

Well, there are separate ways to do that.

Method 1: You copy each armor's record with your own ID. That is, you launch CS with your plugin as active and another plugin as inactive; then you edit each armor's record and add your prefix to the ID (or replace their prefix with yours). When CS asks you whether you want to create a *new* record, answer "yes". You'll have to pack all meshes and textures of those armors you want in your mod into its distribute archive, though. Advantage is, the player won't have to have other plugin installed to play yours.

Method 2: You launch CS the same way, but you *don't* change anything in edited records, simply hit "Save" on each armor. This way, you don't have to distribute other mod's meshes and textures, but you must warn the player in the readme, in the forum thread, and whatever, that they MUST have that other mod to play yours and that the mod *WON'T* work otherwise.

Method 3: This one is unconventional; I used it in my Almilia's Daughters mod (link in my sig). It's best used when you simply want NPCs to wear some flashy modded things and not a custom armor given to the PC. You'd have to be really well-versed with CS to use it, though. In essence: it uses a compatibility patch that detects which mods are present in player's game and which are not, and from that it decides (or allows a player to decide) which articles should be given to each NPC. Pros: you neither have to have any meshes packed in your mod nor enforce the player to have other mods installed; you simply use those mods if they are there and do without if they are not. Also, it makes your mod versatile, allowing to take advantage of multiple mods. Contras: it breaks immersion, since you have to activate the script somehow (through an amulet or something) and answer questions in the dialogue mode before armors will be distributed; this method won't work automatically.
User avatar
Sabrina garzotto
 
Posts: 3384
Joined: Fri Dec 29, 2006 4:58 pm

Post » Thu Jul 07, 2011 12:01 am

Hey thanks for the quick reply! I'm actually doing this mod for myself, so I'll probably go with method 2. The problem is, if I directly edited the NPCs' inventories, wouldn't it conflict with mods like LGNPCs, or any mod that changes the NPC's dialogue as well?
User avatar
Emily Jeffs
 
Posts: 3335
Joined: Thu Nov 02, 2006 10:27 pm

Post » Thu Jul 07, 2011 6:56 am

Hey thanks for the quick reply! I'm actually doing this mod for myself, so I'll probably go with method 2. The problem is, if I directly edited the NPCs' inventories, wouldn't it conflict with mods like LGNPCs, or any mod that changes the NPC's dialogue as well?


The npc dialogue is a separate interface from object and inventory management, so there isn't any conflict. As far as LGNPC, I don't see there being a conflict if you're not editing any of those particular files. You're modifying original bsa content from another file to create your own esp, correct? Method 1 outlined by, Kir is this "cleanest" method of doing so.
User avatar
suniti
 
Posts: 3176
Joined: Mon Sep 25, 2006 4:22 pm

Post » Thu Jul 07, 2011 4:13 am

Yes, if you make the mod solely for yourself, method 1 is the way. Also, if you don't want your mod conflict with others, you can organize your inventory through a startscript:
if ( NPC1->GetItemCount "MyArmor1" == 0 )    NPC1->RemoveItem "HisArmor" 1    NPC1->AddItem "MyArmor1" 1endifif ( NPC2->GetItemCount "MyArmor2" == 0 )    NPC2->RemoveItem "HerArmor" 1    NPC2->AddItem "MyArmor2" 1endif...
This way you can give NPCs armors without editing their CS entries.
User avatar
Laura Hicks
 
Posts: 3395
Joined: Wed Jun 06, 2007 9:21 am

Post » Wed Jul 06, 2011 6:44 pm

Thanks for the help guys!
User avatar
Nikki Lawrence
 
Posts: 3317
Joined: Sat Jul 01, 2006 2:27 am


Return to III - Morrowind