CatsWithMachineGuns Posted April 10, 2022 Share Posted April 10, 2022 (edited) Hey Nexus, long story short I'm trying to make my own set of conditions for fancy energy weapon spells/enchantments, but I'm attempting to implement them in an admittedly unorthodox way. Basically, without altering each and every energy weapon by hand, tinkering with the player's critical chance, or fiddling with the Global Crit Effect variable or anything of the sort, I'm trying to see if I can make the player and the player alone, have some sort of perk or condition that can apply zappy/melty effects on a keyword basis, not via weapon enchantments or already existing critical effects. For example, the Alien Blaster has the AlienDisintegrationEnch to disintegrate things with blue flames, but that applies to everything killed by it, all the time, including stock bashes for kills. That just isn't quite what I'm going for. Is there a way to make a perk / ability / spell / enchantment / magic effect / script / quest detect something in the vein of say, "if the player has the perk '[MyCustomPerk]', then apply [MyCustomDisintegrationEffect] to whoever they just killed when they kill something with ANY weapon that has keyword [WeaponTypeLaser]"?(and I intend to make multiple conditions so plasma does the goo effect, laser does red ash, institute laser does blue ash, etc, but I need to know if this is even possible first) Here's an artistic interpretation that can probably illustrate what I'm trying to convey better than my words can I suspect it would have to be a script and/or quest as some people do, but I'm wondering if this is totally do-able in a very simple way I'm just overlooking. TL;DR energy weapons have cool kill effects and I want to make a perk that makes the player always do them, but in a very hands-off way that doesn't involve changing a ton of things by hand. Thanks! Edited April 10, 2022 by CatsWithMachineGuns Link to comment Share on other sites More sharing options...
robotized Posted April 10, 2022 Share Posted April 10, 2022 Changing a ton of things - no, no overrides necessary. But does require creating a decent amount of forms(if that's the right word). I have experimented with this before, on weapons though. I have a theory how to add it via perk and how to add the perk to the player. So I think it's possible. The critical effects will always be applied upon death, I think even to the point of making dead bodies into ash/goo. I'm not sure how to explain it all in detail :sad: . Are you good with CK and FO4Edit? Link to comment Share on other sites More sharing options...
CatsWithMachineGuns Posted April 10, 2022 Author Share Posted April 10, 2022 Hi there, thank you for taking the time to respond! I'm still learning the ropes with Creation Kit (I've mostly made personal projects with custom armors enchantments, re-written vanilla perks, keywords, dynamic naming, etct) and I usually dabble along with FO4edit side-by-side but I've obviously still got a lot to learn with both of them. I frequently check out how other people make their mods by opening them in FO4edit. I know that it's possible to make energy weapons always do critical effects by giving them an enchantment type and adding conditions, but that would have to be applied to every individual weapon and just isn't practical, especially if I intend to download community-made weapons later on. I'm hoping there's some way that I could make my custom disintegration effects apply to anyone I kill via keywords or something simple that doesn't involve a lot of papyrus scripting. Any help or insight is appreciated! Link to comment Share on other sites More sharing options...
robotized Posted April 10, 2022 Share Posted April 10, 2022 Ok, I had to do some tests first. I couldn't manage adding the perk with using Aliases inside a Quest. But I did a quick search and found a simple script solution, which is attached to the quest and used to add the perk to the player. Here is an example plugin with the script included:https://drive.google.com/file/d/1zCrdDT6iLGysDv1jLKVOeuOYxjvSgK9D/view?usp=sharingThis method is basically the same as the enchantment(object effect) of the Mirelurk Queen weapon, which adds the critical spell to the target. I hope you will understand it better when you look at the plugin and see how the forms are connected. In the perk are added Entry Points - Apply Combat Hit Spell. Currently there are two - for plasma and red laser. The perk is best edited in CK. When you add new entry point with combat spell, you have to add condition, choose to add it to Weapon, not the Perk Owner. Edit: The method is a bit buggy sometimes. As I mentioned it's also possible for fresh corpses(I mean killed npcs, not spawned dead) to be turned to ash/goo. The effects seem to not be applied when you score a headshot and detach the head. On some occasions they are not applied at all or the body just disappears. Link to comment Share on other sites More sharing options...
CatsWithMachineGuns Posted April 11, 2022 Author Share Posted April 11, 2022 (edited) Hey, great work! I admit I was expecting more of a walk-through as opposed to someone just flat out making it for me, but either way it's appreciated! And of course I can just tinker around with it to see how you set it up to learn myself. You're right that it has a tendency to not work if it does cranial severance, but that's a negligible shortcoming, and otherwise this works great and consistently applies the shader on-kill. Fantastic work!I'll get to adding my own forms later for blue lasers, cryo, etc. Now I can go be John Protagonist™ with all the fancy laser effects, many thanks! Edit: it doesn't seem to work with community-made weapons like the Laser RCW :XEdit 2: it works with a bunch of community-made weapons except the Laser RCW for some reason. Strange.Edit 3: the Laser RCW never had a critical effect assigned to it. Giving it CritLaser has fixed it! Although the reason I was looking to do this on a per-keyword basis was to avoid some things that may slip through the cracks such as this, but I'll take what I can get I s'pose. Edited April 11, 2022 by CatsWithMachineGuns Link to comment Share on other sites More sharing options...
robotized Posted April 11, 2022 Share Posted April 11, 2022 My experiments a while ago were done with the JunkJet. I was making it shoot grenades and used the same method, just applied as enchantment to the barrel or receiver. The JunkJet doesn't have crit effects enabled, so this shouldn't be an issue. Maybe I did something differently, or maybe the condition needs more keywords. I'll take a look later after work. Still it's likely that modded weapons have their own custom keywords, so extending compatibility will require adding a lot of masters to the plugin with the critical effects. Link to comment Share on other sites More sharing options...
robotized Posted April 11, 2022 Share Posted April 11, 2022 Myth busted. No, it's not required for Crit Effect to be added to the weapon. I tested with 10mm pistol and plasma effect, it worked like a charm. The problem is in the conditions and it is my fault. Sorry about that. The last thing I did was to add second condition to the red laser effect and I got it wrong. Currently the conditions are:Subject.HasKeyword(ma_LaserGun [KYWD:000D1052]) = 1.000000 ANDSubject.HasKeyword(ma_LaserMusket [KYWD:0004BAF1]) = 1.000000 ANDSince there is no weapon(at least not vanilla), which has both these keywords, then the effect will not work. The right way to do it is:Subject.HasKeyword(ma_LaserGun [KYWD:000D1052]) = 1.000000 ORSubject.HasKeyword(ma_LaserMusket [KYWD:0004BAF1]) = 1.000000 ORWhy did I use mod association keywords instead of WeaponTypeLaser? Because the institute rifle also has the keyword WeaponTypeLaser, and it has blue beam. You have to get creative with the keywords to include one weapon, but exclude other. You can check if the weapon has/doesn't have certain keyword(s). I believe you can mix AND and OR conditions, but I haven't done much tests with that, I don't know if it matters how these conditions are arranged. Edit: Do check what keywords the Laser RCW has. You can duplicate the red laser spell, which is added by the perk, then add the duplicated spell as new entry point to the perk, and use different conditions to make the Laser RCW or other laser weapons compatible(if they have any kind of vanilla keywords that is).Currently the keywords for the red laser effect don't cover the Gatling Laser. Link to comment Share on other sites More sharing options...
CatsWithMachineGuns Posted April 11, 2022 Author Share Posted April 11, 2022 (edited) Hey, thanks for keeping up with this for some internet stranger, 'preciate it. I skimmed through the .esp with both FO4edit and Creation Kit and didn't find anything pertaining to the utilization of any keywords in there. If I were to plug these conditions in to get them working, where exactly should they be going? The spell, the hitspell, the magic effect, or the perk? I'm still trying to figure out how creation kit works its magic when it comes to the hierarchy. The Laser RCW does in fact have the keyword WeaponTypeLaser, and you're right that the Gatling Laser does not. And yes, I did bear in mind that the institute laser uses a blue laser, so keyword ma_InstituteLaserGun would be best for ensuring blue lasers as opposed to red :wink: Anyway, basically I guess the next question is "well, what should I be doing now?" Edit: I actually saw the perk has a "Weapons" condition tab for the first time in my life. The more you know! Edited April 12, 2022 by CatsWithMachineGuns Link to comment Share on other sites More sharing options...
robotized Posted April 11, 2022 Share Posted April 11, 2022 No problem. Maybe I should try to write something down, as tutorial/explanation, to help you get better understanding. Then you can try to create more spells to cover cryo effects and the legendary cryo/fire/plasma. At least for vanilla weapons, modded ones could require adding dependencies to the plugin. I have more ideas about keywords for the condition checks. Link to comment Share on other sites More sharing options...
CatsWithMachineGuns Posted April 12, 2022 Author Share Posted April 12, 2022 (edited) Alright, I've been going through and checking weapons/keywords all day and you were right about using OR instead of AND, that fixed a few things.All smooth sailing so far but another question arose. Would there be a way to filter the effects by who's doing what to who? For example, if I wanted laser guns to instead apply a custom effect exclusively to super mutants that sets them on fire and melts them into the mirelurk queen goo puddle model (since both are green-brown and smelly, of course) when killed by anyone with a laser gun (not just by me, John Protagonist™) instead of doing their usual flashy red fire effects, would it be possible to detect it on a sort of per-actor basis? The question is moreso about seeing if I can specify conditions on a victim basis instead of an attacker basis, though I would imagine doing such would involve manually applying a perk to every relevant npc in the game and while that just doesn't sound super practical, I'm guessing it would be the only way (and it's not like there's too many super mutant types anyway). So I guess that leads to a question that's kind of the inverse: is there a way to apply a perk to an actor that makes it so that they themselves always trigger the magic effect (once again, ideally on a keyword basis)? I know the FXShaderOnDeath and FXCastSpellOnDeath both exist as scripts for MagicEffects, but it's more about figuring out how to make the game detect when and how to fire it that I'm struggling with. And of course I thank you once again, today's been a great day for learning! Edited April 12, 2022 by CatsWithMachineGuns Link to comment Share on other sites More sharing options...
Recommended Posts