qiusheng33 Posted April 23, 2016 Share Posted April 23, 2016 Hello I am wondering if there is a convenient papyrus code for me to apply/remove some glowing shader effect on any actors in-game. I am aware that I can possibly make a spell and use DoCombatSpellApply to apply the visual effect but I think this is a little bit inefficient since I only want to apply the shader effect. Link to comment Share on other sites More sharing options...
Ryagard Posted April 23, 2016 Share Posted April 23, 2016 It would be much easier to just roll with the spell option. You could make a custom spell effect if you want something more than vanilla :) Link to comment Share on other sites More sharing options...
DavidJCobb Posted April 23, 2016 Share Posted April 23, 2016 (edited) Y'know, I just made a mod like this. :) Create a quest with a player alias, and add to that alias a cloak spell. The cloak spell should have your shader, with the FX Persist flag set. The spell that it applies should also have the shader set. The "dynamically attaching scripts" tutorial on the CK wiki explains some steps you'll want to take to avoid the brawl bug, though people will still need the Brawl Bugs Plugin as well. These steps apply to any cloak spell, even when not using scripts. That's all you need. No scripts. No gameplay effects. It just works. Edited April 23, 2016 by DavidJCobb Link to comment Share on other sites More sharing options...
qiusheng33 Posted April 23, 2016 Author Share Posted April 23, 2016 thanks a lot for the replies! the glow effect is actually part of what I am trying to accomplish. I will explain my concern in some more detail. Basically I attached unique keywords to every npc in the game world. These keywords are characteristic I want to add to these npcs. So I am running a script applying these characteristics to enemies once the player enter combat with them. The script involve semi-random modifications including but not limited to height, weight, and glow effect. So I try to make every modification as simple, light-weighted as possible to avoid potential script/graphic lags. That is why I was wondering if these is a one-line command in papyrus to apply the glow effect cause I think that accessing a spell in game which then access a magic effect and shader effect is comparatively slower. Link to comment Share on other sites More sharing options...
DavidJCobb Posted April 23, 2016 Share Posted April 23, 2016 Ah, I see the reasoning. There's no Papyrus command to apply a glow to all NPCs, no. You can apply it to NPCs one at a time, but you'd still need a cloak spell for your script to be able to find them; so you need the cloak spell, but may not need any scripts. Link to comment Share on other sites More sharing options...
qiusheng33 Posted April 23, 2016 Author Share Posted April 23, 2016 Hi DavidJCobb, thanks for the reply I am indeed intending to apply the effect to one npc at a time. In my design, I intend to "cast" an invisible aoe once the player enter combat with scripted magic effects; applying the glow effect to enemy is one of them. I think that a cloak spell functions similar to this since it is a constant aoe in a way. It seems, from your reply, that there is a commend to apply the effect to NPCs one at a time; can you indulge my curiosity which command it is? Link to comment Share on other sites More sharing options...
DavidJCobb Posted April 23, 2016 Share Posted April 23, 2016 (edited) Well, you can do MyEffectShader.Play(SomeObject) where SomeObject can be an NPC; but you still have to find a way to actually get nearby NPCs into variables, and a scripted cloak spell is the only way to do that (see the "dynamically attaching scripts" tutorial I mentioned). Your only options are a scripted cloak or a scriptless cloak. I understand the concerns about efficiency, but scriptless cloaks have very little overhead; I play on a fairly old PC and I have no problems with them. Edited April 23, 2016 by DavidJCobb Link to comment Share on other sites More sharing options...
qiusheng33 Posted April 23, 2016 Author Share Posted April 23, 2016 Oh wow thanks a lot DavidJCobb, this is exactly the command I was looking for. Silly me! I kept checking into the actor/actorbase category and totally was oblivious to the shader class. thanks again, totally a life saver. Link to comment Share on other sites More sharing options...
SAC020 Posted June 8, 2017 Share Posted June 8, 2017 (edited) Oh wow thanks a lot DavidJCobb, this is exactly the command I was looking for. Silly me! I kept checking into the actor/actorbase category and totally was oblivious to the shader class. thanks again, totally a life saver. Hi, I am trying to do the exact same thing. Can you please let me know your final solution? Thanks! Edited June 8, 2017 by ss_kk Link to comment Share on other sites More sharing options...
Recommended Posts