BloodyStigmata Posted May 7, 2017 Share Posted May 7, 2017 I want one of the companions I created in the CK to wear an Elder Scroll like Serana does. The scroll that she wears is listed as an ammo item. I made a duplicate of it. How would I go about making my companion equip the Elder Scroll? Adding it directly to the inventory doesn't seem to work. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted May 7, 2017 Share Posted May 7, 2017 Ammo won't be equipped automatically. Only armor has the potential of being equipped automatically. You'll need to use EquipItem in a script somewhere to tell the follower to equip the object. Link to comment Share on other sites More sharing options...
Malseph1 Posted May 7, 2017 Share Posted May 7, 2017 Smithing enchantments don't modify the base skill. They directly increase the tempering of the item. That value calculated on the fly and not accessible to the creation kit. It might be possible with an SKSE plugin.If i change them to just modify the base skill by adding points instead of a %, how do i cap it so it wont go over 100 of the base skill? I still need an answer to this if anyone knows. Cannot figure out how to cap a skill. If I understood correctly it would be something like...If greater than 100, set to 100. Do i need to make a condition for that? How do i do that on a magic effect? That is where i am stuck. I went through all conditions and couldn't find anything like it. Same with perk entry points, was a dead end. Link to comment Share on other sites More sharing options...
Elias555 Posted May 8, 2017 Author Share Posted May 8, 2017 Smithing enchantments don't modify the base skill. They directly increase the tempering of the item. That value calculated on the fly and not accessible to the creation kit. It might be possible with an SKSE plugin.If i change them to just modify the base skill by adding points instead of a %, how do i cap it so it wont go over 100 of the base skill? I still need an answer to this if anyone knows. Cannot figure out how to cap a skill. If I understood correctly it would be something like...If greater than 100, set to 100. Do i need to make a condition for that? How do i do that on a magic effect? That is where i am stuck. I went through all conditions and couldn't find anything like it. Same with perk entry points, was a dead end. It would be easy to do via scripting. I'm a bit tired but here's an example of what I was saying Event OnEffectStart(Actor akTarget, Actor akCaster) ;Whatever event, not sure what you're doing Float TargetsLevel = akTarget.GetActorValue("Smithing") ;Making a reference to check If TargetsLevel > 100 ;If the reference above is more than 100 akTarget.SetActorValue("Smithing", 100) ;set it to 100 EndIf EndEvent Link to comment Share on other sites More sharing options...
TheDungeonDweller Posted May 11, 2017 Share Posted May 11, 2017 (edited) While that will work, setactorvalue doesn't take into account for buffed skills. If your skill is 85 +50(buffed) = 135, and you set it to 100, it becomes 150. So you need a way to bring down the current value(the green number when buffed).I've come up with this to handle stats/skills that are buffed and/or if you want to cap them. Event OnEffectStart(Actor akTarget, Actor akCaster) String asValueName = "Smithing" Float BaseValue = akCaster.GetBaseActorValue(asValueName) Float CurrentValue = akCaster.GetActorValue(asValueName) if (BaseValue <= 100.0 && CurrentValue > 100.00) akCaster.ForceActorValue(asValueName, 100.0) else if BaseValue > 100.0 && CurrentValue > BaseValue BaseValue = BaseValue - (BaseValue - 100.0) akCaster.SetActorValue(asValueName, BaseValue) akCaster.ForceActorValue(asValueName, 100.0) endif endif EndEvent A function I worked out to a set a desired cap. Works for attributes(the above doesn't.) Function SetActorValueCap(Actor akActor, String asValueName, Float afValueCap = 100.0) ; Store the base and current value. Float BaseValue = akActor.GetBaseActorValue(asValueName) Float CurrentValue = akActor.GetActorValue(asValueName) ; Cap default is 100. If checking for attributes, adjust the desired cap accordingly. ; Check if the current value is over the cap. if (BaseValue <= afValueCap && CurrentValue > afValueCap) ;Unless the base is also over the cap, we\ll assume it\s not. akActor.ForceActorValue(asValueName, afValueCap) elseif BaseValue > afValueCap && CurrentValue > BaseValue ; bring the base and current back down to the cap. BaseValue = BaseValue - (BaseValue - afValueCap) akActor.SetActorValue(asValueName, BaseValue) akActor.ForceActorValue(asValueName, afValueCap) else return endif EndFunction Example of how to us: SetActorValueCap(Game.GetPlayer(), "Illusion", 50.0) ; Ilusion can never go over 50.Tested those a lot and has worked for me. There are other ways, like through use of GetActorValuePercentage, but I occasionally get some pretty inaccurate results from that. Doing it the longer way always got me consistent results.Edit: I guess this will also sort of troll someone that attempts to increase skills/stats through the console, because this will set it right back to the cap. To achieve broken levels of smithing you need a really high value, like 10,000. Beth really nailed that skill to the wall. Edited May 11, 2017 by TheDungeonDweller Link to comment Share on other sites More sharing options...
TurelimVampire Posted May 11, 2017 Share Posted May 11, 2017 Hey, would it be possible to make a new head for a character & then switch it with the original so it has the custom head as default? I read that when you equip armour in Skyrim it's actually replacing that body part & the npc in question (dragonpriest) wears a mask so I'm assuming it would work. I'm making a kind of lich & it's easier to just replace the dragonpriest's head with the new one. I'm assuming if I made it as a piece of armour then the player would be able to remove it once the dragonpriest was dead so that's not gonna work. It would need to be his actual head.Can anyone point me in the direction of a tutorial, perhaps, if this is possible.Thanks. Link to comment Share on other sites More sharing options...
FrankFamily Posted May 11, 2017 Share Posted May 11, 2017 The player removing it is not really a problem, just untick the playable flag on the item and it won't appear in the inventory. Link to comment Share on other sites More sharing options...
TurelimVampire Posted May 11, 2017 Share Posted May 11, 2017 Oh cool. Thanks! Link to comment Share on other sites More sharing options...
Elias555 Posted May 11, 2017 Author Share Posted May 11, 2017 The player removing it is not really a problem, just untick the playable flag on the item and it won't appear in the inventory.Does that prevent equipping another head armour piece? Link to comment Share on other sites More sharing options...
FrankFamily Posted May 11, 2017 Share Posted May 11, 2017 Nope, but shouldn't be a problem if doing this with an NPC which is what he's doing afaik. It's not like the NPC is going to look for helmets to equip. Besides, many vanilla NPCs use unplayable equipped stuff without issues. Link to comment Share on other sites More sharing options...
Recommended Posts