RevenantGenesis Posted April 11, 2019 Share Posted April 11, 2019 As simple as it sounds I cannot for the life of me figure out how to change my followers outfit depending on the time of day. I'm working on a vampire follower and I want her to equip a hooded version of her outfit when the sun rises. I have pretty general knowledge in the CK, so I thought I could look into how Serana does it, but it's pretty complicated, and tied into her quest. I feel that making a quest is probably the way to go but I don't have much knowledge in creating quests to accomplish what I'm trying to do. I also tried putting a script on her that tracks the time of day and change the outfit there but I don't think that's the way to go as it didnt work. If I could I'd like her to change to the non good outfit indoors as well, or maybe even different outfits depending on the day, but I could settle without it. Any help would be greatly appreciated. Link to comment Share on other sites More sharing options...
Levionte Posted April 11, 2019 Share Posted April 11, 2019 Using the story manager is an option, but it's kind of a pain to setup just for an outfit swap. You could also give the follower/alias an AI Package that changes the outfit whenever it's activated via time condition or whatever. While that does work, I've found it's not very dependable as they won't reevaluate their AI Package very often unless it's triggered directly. I would probably recommending using a perk that de/activates during whatever conditions you want. I did a variation of this on my Ciri follower if you want an example, but she changes her headgear / hair depending on the weather. It's been a long time since I've worked on it, but I believe I had originally gone with the AI Package approach, and then used a perk to reevaluate the package more timely as opposed to handling the outfit swapping itself. Link to comment Share on other sites More sharing options...
TobiaszPL Posted April 11, 2019 Share Posted April 11, 2019 Script or AiPackage... float Function GetHour() float Time = Utility.GetCurrentGameTime() Time -= Math.Floor(Time) Time *= 24 Return Time EndFunction ; Also ; ; you can use ; >> GetCurrentWeather ; >> GetOutgoingWeather ; and make NPC change outfit for rain snow etc. Event OnUpdateGameTime() ; if ShouldKeepUpdating == true RegisterForSingleUpdateGameTime( 1 ) Temp = GetHour() If ( ( Temp > 8 ) && ( Temp < 20 ) ) Npc.SetOutfit( MyDayOutfit ) Else Npc.SetOutfit( MyNightOutfit ) EndIf ; This script can be in NPC ; so NPC can control it and shutdown on Event OnDeath() EndEvent But its no tested by Me :)i hate followers but i know there is Function to Change Outfit cause i was using it many times for my NPCs Link to comment Share on other sites More sharing options...
RevenantGenesis Posted April 11, 2019 Author Share Posted April 11, 2019 Awesome thank you guys for the input. I'll definitely be looking at Ciri if the script TobiaszPL posted doesn't work. It looks very similar to the script I was trying to use, but I'm new to scripting aoni probably messed it up. Will be back with an update. Link to comment Share on other sites More sharing options...
RevenantGenesis Posted April 12, 2019 Author Share Posted April 12, 2019 (edited) Okay so I finally got it working, or it seems like it. I tried using the script posted above but it still didn't work, but I could have entered the properties wrong. I also referenced Ciri but it seems like her clothing is managed through a quest, and from what I've read before you can create a quest that starts when the game starts you have to first generate a .seq file which I don't know how to do yet. I could be wrong about this though. But when Levionte said that he used perks it gave me this idea. What I did was I created a Magic Effect with the Script archetype, and Self and Constant Effect as the other options. Then on that magic effect I created this script, and set my No Hood Outfit as the property in the CK. Scriptname OutfitReplacer extends ActiveMagicEffect Outfit Property NewOutfit Auto Event OnEffectStart(Actor akTarget, Actor akCaster) utility.Wait(5.000000) akCaster.SetOutfit(NewOutfit) utility.Wait(5.000000) Debug.Notification("WORK")EndEvent The debug notification is there to let me know the script is running, and this also works without the Utility.Wait(5.000000) before the set outfit command, I just had this here to see the effect happen when night turned to day when I was testing. Also, the change outfit script that I was using before was; Actor Property SkyNPC autoOutfit Property NewOutfit auto SkyNPC.SetOutfit(NewOutfit) which compiled but seemed to do nothing. akCaster.SetOutfit worked once I switched to it. Then I put that magic effect on an Ability with the same conditions that the vampire sun Stamina damage conditions had. S GetGlobalValue Gobal:'GameHour' <= 19.00 ANDS GetGlobalValue Gobal:'GameHour' >= 5.00 ANDS IsInterior NONE == 0.00 ANDS GetGlobalValue Gobal:'DLC1EclipseActive' == 0.00 AND Then I created a perk that called that Ability that I then put on my NPC, then she began putting on her hooded outfit when she went outside and was in the sun. I then repeted the process again and created night versions of everything (Perk, Ability, Magic Effect) for the Night Outfit, but on the conditions on the Night Outfit Ability, I put this; S GetGlobalValue Gobal:'GameHour' > 19.00 ORS GetGlobalValue Gobal:'GameHour' < 5.00 ORS IsInterior NONE == 1.00 ORS GetGlobalValue Gobal:'DLC1EclipseActive' == 1.00 OR And just like that she is now taking off her hood when she goes inside or is the night, and putting it on in the sun. If I repeat the process for more outfits, there is a condition that can be put on the ability that will track which day of the week it is as well, giving her a different outfit every day. Though I haven't tested this yet, i'm pretty sure its gonna work the same when I do it. Thanks for the help guys. It got the gears turning, Cheers. Edited April 12, 2019 by RevenantGenesis Link to comment Share on other sites More sharing options...
Recommended Posts