HollownessDevoured Posted April 7, 2022 Share Posted April 7, 2022 (edited) I am trying to redress some npcs and Eleanor Cousland is giving me grief. I have her in a hat to start hoping when it cut to night scene she'd remove it when she changed gear—but of course she didn't. Are these scripts? does anyone know where or what causes these "change or remove gear" actions? Edited April 7, 2022 by HollownessDevoured Link to comment Share on other sites More sharing options...
YaraC Posted April 7, 2022 Share Posted April 7, 2022 I would check before the scripts if there might be a copy of the NPC in use for the night scenes. (The new setting also does not affect prerendered cutscenes in case there might be one in this context.) Link to comment Share on other sites More sharing options...
DLuf Posted April 7, 2022 Share Posted April 7, 2022 (edited) Yes, the scripts handle equipping/unequipping characters for cutscenes. Such as the scene where Soris rescues you in the City Elf origin, except this scene is a bit bugged in vanilla game and so the weapons Duncan gives him simply end up in your inventory and you have to manually equip them (the code that would equip you with the weapons already exist but they call the wrong objects - whether this is an actual bug or not is up for debate). In Eleanor's case, the script you'd want to look into is named bhn200ar_castle_after_siege. If I'm not mistaken, anyway; I haven't actually played with it. Edited April 7, 2022 by DLuf Link to comment Share on other sites More sharing options...
HollownessDevoured Posted April 7, 2022 Author Share Posted April 7, 2022 (edited) Yeah, I was looking at the human noble scripts last night but it was before bed so I didn't get to look thoroughly enough. Thanks! edit: hmm, I still don't see the script that seems to define Eleanor's re-equipping. Edited April 7, 2022 by HollownessDevoured Link to comment Share on other sites More sharing options...
Pasquale1223 Posted April 7, 2022 Share Posted April 7, 2022 edit: hmm, I still don't see the script that seems to define Eleanor's re-equipping.It is in bhn200ar_castle_after_siege (the area load script) under the case for EVENT_TYPE_AREALOAD_PRELOADEXIT The script gets references for the boots, gloves, and armor in her inventory and then equips them. Since she is wearing a hat you wish to remove, you can add this: object oHat = GetItemInEquipSlot(INVENTORY_SLOT_HEAD,oMother); UnequipItem(oMother,oHat); in that section, recompile it, and it should remove the hat. Link to comment Share on other sites More sharing options...
HollownessDevoured Posted April 7, 2022 Author Share Posted April 7, 2022 Omg now I just feel dumb I didn't fully scan the script I just assumed it be near the player item list. Thank you I need to really pay closer attention to the details X / Thank you for the assistance! Link to comment Share on other sites More sharing options...
Pasquale1223 Posted April 7, 2022 Share Posted April 7, 2022 Sure thing. And I neglected to mention before - since it's related to an area load, you might also be able to implement it in a PRCSCR script rather than modify the vanilla code. Link to comment Share on other sites More sharing options...
HollownessDevoured Posted April 7, 2022 Author Share Posted April 7, 2022 Ok, now trying to remove the items from inventory but it keeps saying: E: 13:39:53 - bhn200ar_castle_after_siege.nss - bhn200ar_castle_after_siege.nss(248): Variable defined without type (while compiling var_constants_h.nss) Original: UT_RemoveItemFromInventory(rGEN_IM_CTH_NOB_AF0,1,oMother); Mine (a custom UTI): UT_RemoveItemFromInventory(rLADYS_DARK_FORMAL_DRESS,1,oMother); Link to comment Share on other sites More sharing options...
HollownessDevoured Posted April 7, 2022 Author Share Posted April 7, 2022 Sure thing. And I neglected to mention before - since it's related to an area load, you might also be able to implement it in a PRCSCR script rather than modify the vanilla code. The removal script seemed to work like a charm! Link to comment Share on other sites More sharing options...
Pasquale1223 Posted April 7, 2022 Share Posted April 7, 2022 Ok, now trying to remove the items from inventory but it keeps saying: E: 13:39:53 - bhn200ar_castle_after_siege.nss - bhn200ar_castle_after_siege.nss(248): Variable defined without type (while compiling var_constants_h.nss) Original: UT_RemoveItemFromInventory(rGEN_IM_CTH_NOB_AF0,1,oMother); Mine (a custom UTI): UT_RemoveItemFromInventory(rLADYS_DARK_FORMAL_DRESS,1,oMother); When you see something in all caps, it's probably a constant. They threw a lower case r in front of it to indicate that its data type is resource. Constants must be defined somewhere, and are often in header files (header filenames typically end with _h). Notice the script bhn200ar_castle_after_siege has this at the top: #include "bhn_constants_h" ... which includes the header file for that origin (bhn is background human noble), and in that included file, this constant is defined: const resource rGEN_IM_CTH_NOB_AF0 = R"gen_im_cth_nob_af0.uti";When source code is compiled, a preprocessor goes through and replaces all of the constants with their actual values before the compile takes place. You can either define constants for your custom things or just use the actual resource names. This: UT_RemoveItemFromInventory(rGEN_IM_CTH_NOB_AF0,1,oMother); works identically to this: UT_RemoveItemFromInventory(R"gen_im_cth_nob_af0.uti",1,oMother);in actual practice. Link to comment Share on other sites More sharing options...
Recommended Posts