Jump to content

To all Mod Veterans! Please lend me your Wisdom! How to change Mama Cousland’s Outfit(s)!


Danny7GTX

Recommended Posts

Hi guys!

 

So I've decided to replay this game and make it as immersive as possible!

I began by trying to replace the outfit of worn by Teryna Eleanor Cousland with some mods from the nexus, but it didn't turn out the way I wanted.

 

As you all know she wore two different outfits throughout the human noble origin, for the vanilla version.

1. During your first encounter with her, she wore Noble Clothing.

2. During the Castle Siege, she wore the Studed Leather Armor.

 

My Goal!

- I want to replace both her outfits with custom ones!

- Replacing her default Noble Clothing with a custom outfit mod, for her everyday look.

- Replacing her default Studed Leather Armor with another custom outfit mod, for her combat ready attire.

- Both Outfits cannot be the same one.

- I do not want to manually equip her with the combat outfit in-game as it breaks immersion for me.

- She should automatically be in her combat attire during the cutscene where she appears to you after you kill the men outside of her room.

 

What I did!

- For now I only know how to replace an NPC's clothing by locating their .uti (typo) .utc file from DA toolset, then change their default outfit name to the custom one that I have via Equip_ItemList, ect.

- I tried replacing one of the things on the ItemList, "dropdown list", that has the itemID of her Studed Leather armor, with a custom mod outfit, hoping that she'll turn up in that outfit during the siege encounter.

 

The Problem!

The outfit did get replaced as intended during my first encounter with Mama Cousland, but it ended up applying it throughout the prologue, including the siege encounter, which I do not want.

 

 

Replaced Default "Noble Clothing" with an Outfit Mod.

 

 

Same outfit mod is equipped regardless. In this scene she is supposedly to be in her studed leather armor in the vanilla version, but I want it replaced with a different mod outfit.

 

|

|

|

V

CONCLUSION!

So how can I have her wear different custom outfits? 1 for each scene as described in this post.

I hope it's not too confusing for you all >.<

Edited by Danny7GTX
Link to comment
Share on other sites

UTI > User Template for Items

UTC > User Template for Creatures

 

Changing what the Teyrna equips for the castle siege is not as simple as editing her UTC, because the armour is actually equipped by a script that runs when the castle transitions to nighttime.

 

I think what is happening is the script runs, it looks in her inventory for the items specified in the script, and when it doesn't find either the dress specced in the script or the armour, it fails on both counts and leaves her gear she's already wearing.

 

The script that governs the equipment swap is bhn200ar_castle_after_siege; you'll need to edit her UTC (bhn100cr_mother) to

 

- equip the outfit you want for the pre-siege sequence

- add the second set of items to her inventory in a 'non-equipped' state.

 

Then you need to edit the script (bhn200ar_castle_after_siege) to unequip the dress and equip the second set of items, for the dungeon run through the castle.

 

(If you've never worked with scripts before, please please please be sure to create and work in a custom module! And afterward to check your override for 'garbage' files exported along with the script... you don't want to break your game!)

Link to comment
Share on other sites

Hi theskymoves!

 

My apologies! It was a UTC file. Did a typo!

Hmmm... Then it is as I feared. I did suspect that there was a script at play and yes I've never worked with them before nor am I familiar at all.

Is there any examples out there where I can learn how to work with scripts and carry out what you've just said? Yeah I made that mistake once, for not working in a custom module lol, I cant salvage back the original utc file :sad:

EDIT: I'll try googling for some answers! I feel that your instructions are clear and it could might as well be a simple edit/replacement task. Hope you'll be around to answer some queries if I have any!

Edited by Danny7GTX
Link to comment
Share on other sites

 

I had looked into the script for the "bhn200ar_castle_after_siege.nss" file.

I believe this portion of codes corresponds to the Teyrna's equiptment.
Correct me if I'm wrong.
Assuming I have already done these 2 tasks to the "bhn100cr_mother.utc" file on DA Toolset:

- equip the outfit you want for the pre-siege sequence

- add the second set of items to her inventory in a 'non-equipped' state.

If I simply replace the lines of her default outfits with the modded file names, do you think that will work?

 

For Example:
File names for the mod outfits are:
1. ferelden_noble.uti to replace her noble outfit ie. GEN_IM_CTH_NOB_AF0.
2. onho_cth.uti to replace her studed leather armor ie. GEN_IM_ARM_CHT_LGT_RLR.
From(Original Codes):
object oMother = UT_GetNearestCreatureByTag(oPC,BHN_CR_MOTHER);
object oMotherGloves = GetItemPossessedBy(oMother,GEN_IM_ARM_GLV_LGT_RLR);
object oMotherBoots = GetItemPossessedBy(oMother,GEN_IM_ARM_BOT_LGT_RLR);
object oMotherArmour = GetItemPossessedBy(oMother,GEN_IM_ARM_CHT_LGT_RLR);
UT_RemoveItemFromInventory(rGEN_IM_CTH_NOB_AF0,1,oMother);
EquipItem(oMother,oMotherArmour,INVENTORY_SLOT_CHEST);
EquipItem(oMother,oMotherBoots,INVENTORY_SLOT_BOOTS);
EquipItem(oMother,oMotherGloves,INVENTORY_SLOT_GLOVES);
Change To(Modified):
object oMother = UT_GetNearestCreatureByTag(oPC,BHN_CR_MOTHER);
object oMotherGloves = GetItemPossessedBy(oMother,GEN_IM_ARM_GLV_LGT_RLR); -> line unchanged (Chest piece will supersede the entire look of the outfit)
object oMotherBoots = GetItemPossessedBy(oMother,GEN_IM_ARM_BOT_LGT_RLR); -> line unchanged (Chest piece will supersede the entire look of the outfit)
object oMotherArmour = GetItemPossessedBy(oMother,onho_cth); -> change chestpiece to the Orlesian noble hunting outfit(Mod).
UT_RemoveItemFromInventory(rferelden_noble,1,oMother); -> removes her equipped Ferelden Noble outfit(Mod).
EquipItem(oMother,oMotherArmour,INVENTORY_SLOT_CHEST);
EquipItem(oMother,oMotherBoots,INVENTORY_SLOT_BOOTS);
EquipItem(oMother,oMotherGloves,INVENTORY_SLOT_GLOVES);
Edited by Danny7GTX
Link to comment
Share on other sites

Update...

So this is literally what I did and nothing seems to be working...

 

1. Install the mod packs containing the custom outfits into the override via documents folder.

- Loincloth Fashion

https://www.nexusmods.com/dragonage/mods/3914

- Ferelden Pack

https://www.nexusmods.com/dragonage/mods/4804

 

2. Found the specific .uti item names for my selected outfits from the mods.

- onho_cth.uti from Loincloth Fashion.

- ferelden_noble.uti from Ferelden Pack.

 

3. Modified the "bhn100cr_mother.utc" file and replaced the default item ids with the mods' file names.

 

 

4. Modified the script file: "bhn200ar_castle_after_siege.nss" with notepad.

 

 

5. Placed the modified "bhn100cr_mother.utc" & "bhn200ar_castle_after_siege.nss" into the override folder in the documents directory.

 

6. Outcome = Same thing happened as before. Game does not recognize the armor change for the siege sequence and uses the same outfit from the pre-siege sequence.

Edited by Danny7GTX
Link to comment
Share on other sites

You can't modify a script with Notepad.

 

The NSS is the uncompiled script. The script that runs in the game is the NCS (Compiled Server Script) file with the same name.

 

Scripts have to be modified and compiled with the toolset; there's a lot of info on the toolset wiki about scripting.

 

 

ETA that I can't get a version of the script edited to use the modded items to even export. I wonder if it has something to do with the script calling for an Armor item for the chest slot when the item is actually a clothing item? :confused: Or maybe it's where I put the modded assets (in overrde/toolsetexport, rather than my custom module)? *shrug*

 

Sorry to not be more helpful, but scripting is not my area of expertise. :sad: (Not that I HAVE an area of expertise... I just poke at stuff until it does what I want it to do, and scripting even more so.)

 

Hopefully someone smart will come along with some answers. :ermm:

Edited by theskymoves
Link to comment
Share on other sites

  • 1 month later...

Looks like you're missing the NCS script. You probably need to learn some light coding for this, nothing too crazy or heavy duty. I can give you a few hints to code this in but I won't give you the script.

 

1- Argument is invalid

Function used does not have a defined variable

Constants are not specified

Variables are also not defined

 

The game cannot find the locate these objects so Mama Cousland outfit will remain the same. You need to specify and label/define your constants and variables respectively.

 

2- Editing Before siege script

While it is convenient to use UTC for Mama Cousland initial noble outfit. I would replace it with scripting. Anytime Mama Cousland outfit changes I will need to either rewrite the after siege script or might need to change UTC which gets annoying.

 

Aside from convenience... If memory serves, UTC overrides *might* conflict with scripts. Meaning if the game finds your UTC in the override file. There is a possibility that your UTC changes will override whatever you had written in the after siege script. Mama Cousland outfit will remain as your UTC settings IF that happens.

 

The castle cousland script is the one you want for before siege. The code for changing Mama Cousland initial noble outfit won't be in this script. You need to add a few lines of code that unequips and delete all of the gear she is currently wearing. Then reequip her with your Ferelden noble outfit.

 

If this is done right you don't need a UTC

There should be two NCS and two NSS files each of them is for before siege and after siege.

Edited by Pyroblasta
Link to comment
Share on other sites

  • 1 month later...

Hi Danny7GTX,

 

If you're still interested in doing this - I know it's been awhile - I'll try to explain what's going on with the code.

 

First, I'd like to re-iterate TSM's excellent advice - it's always best to do these things in a separate module. Using the toolset, create your "MyModule", and duplicate copies of the Teyrna's utc and bhn200ar_castle_after_siege.nss script into your new module.

 

The changes you made to the utc look correct. You need to make sure she has the new items you want her to use in her inventory - as you've found, and been successful getting her to wear the new dress before the siege.

 

So I'll see if I can explain what's happening in this code snippet:

 

object oMother = UT_GetNearestCreatureByTag(oPC,BHN_CR_MOTHER);
object oMotherGloves = GetItemPossessedBy(oMother,GEN_IM_ARM_GLV_LGT_RLR);
object oMotherBoots = GetItemPossessedBy(oMother,GEN_IM_ARM_BOT_LGT_RLR);
object oMotherArmour = GetItemPossessedBy(oMother,GEN_IM_ARM_CHT_LGT_RLR);

 

In that bit, they're just setting up references for the items to use in the Equip statements later. As its input parameters, the GetItemPossessedBy function is looking for a character reference (oMother) and a string that is the item's tag.

 

These:

GEN_IM_ARM_GLV_LGT_RLR

GEN_IM_ARM_BOT_LGT_RLR

GEN_IM_ARM_CHT_LGT_RLR

are string constants that actually contain the item's tags in string form. It's a data format thing, and a compiler thing. Compiling actually takes place in multiple steps; the pre-compiler replaces all of those constants with their actual values before running the compile. Those constants are specified in bhn_constants_h (which is included by bhn200ar_castle_after_siege.nss) as follows:

 

const string GEN_IM_ARM_BOT_LGT_RLR = "gen_im_arm_bot_lgt_rlr";
const string GEN_IM_ARM_CHT_LGT_RLR = "gen_im_arm_cht_lgt_rlr";
const string GEN_IM_ARM_GLV_LGT_RLR = "gen_im_arm_glv_lgt_rlr";

 

Long story short: the line you're trying to change needs a string.

 

So when you changed the line like so:

object oMotherArmour = GetItemPossessedBy(oMother,onho_cth); -> change chestpiece to the Orlesian noble hunting outfit(Mod).

 

you were going in the right direction, you just took an odd turn.

 

I'm going to assume that "onho_cth" is the correct tag for the item you wish to use. For most items, the tag is the same as the filename of the uti file. If that is the case, what you need to do is replace this:

object oMotherArmour = GetItemPossessedBy(oMother,GEN_IM_ARM_CHT_LGT_RLR);

 

with this:

 

object oMotherArmour = GetItemPossessedBy(oMother,"onho_cth");

 

Note that all I did is to enclose the content of the string in double quotation marks. Without them, the compiler thinks onho_cth is a variable, but you haven't defined a string variable with that name.

 

Alternatively, you could define a constant for it (at the top of the script, just after the #include statements), like so:

 

const string ONHO_CTH = "ohno_cth";

 

And then use that constant in the code, like this:

 

object oMotherArmour = GetItemPossessedBy(oMother,ONHO_CTH);

 

Either method will yield the same results. And BTW, there's no rule that says constants have to be all caps - it's mostly a stylistic choice that makes code easier to read. When you see something in all caps, it's a constant.

 

Once you've made your changes, you should be able to compile the script, and the compiled ncs should work in your game.

 

@TSM - "ETA that I can't get a version of the script edited to use the modded items to even export. I wonder if it has something to do with the script calling for an Armor item for the chest slot when the item is actually a clothing item? :confused: Or maybe it's where I put the modded assets (in overrde/toolsetexport, rather than my custom module)? *shrug*"

 

FWIW, I don't imagine that was a problem. Clothing items generally do equip in the chest slot - unless the mod author did something unusual. Frankly, the EquipItem function rarely needs you to specify the inventory slot - I believe it looks at the base item type and decides where the item belongs. The only times it's important to specify the slot are:

-- For rings, as there are 2 ring slots.

-- Weapons, as there are 2 sets and some weapon items can be equipped in either hand.

In those cases, I think the routine actually chooses a default (empty) slot (if you didn't specify one), though I haven't experimented with it much.

 

In any case, I hope I helped someone.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...