SurfsideNaturals Posted February 13, 2020 Share Posted February 13, 2020 Now that you are removing the filled gem when you fill, this script is going to be more complicated and take some time to get right. What if someone, when in the middle of trapping souls, went into the menu and filled a weapon? It may be a good idea to set a state on your script when you remove the gem during filling instead of your current idea. ;This goes on your soul trapping script. ;You will need to create the PlayerAlias property and fill it. _00E_YC_PlayerAlias_GemCheckSCR s = PlayerAlias as _00E_YC_PlayerAlias_GemCheckSCR s.GoToState("Filling") ;Remove the gem s.GoToState("") ;This state will go on your _00E_YC_PlayerAlias_GemCheckSCR script State Filling Event OnItemRemoved(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akDestContainer) endEvent EndState This could result in more than one gem being left in the players inventory. This = 1 ( GC - (GC - 1) ) P.RemoveItem(_00E_YerosCave_SiraSoulbender, GC - (GC - 1), true) Link to comment Share on other sites More sharing options...
JustChill Posted February 13, 2020 Author Share Posted February 13, 2020 Hey, thanks for the heads up.I gonna try to do that too. I just realized that the script needs a lot longer to fire up when the frames are lower. I really dislike how Bethesda likes to ties everything to framerate. They already had issues regarding the game physics by doings so. oO But at the end of the day, it's the player's fault if he tries to do that. Most harsh way would be to lock the game control that allows filling weapons until the process is done. XD This could result in more than one gem being left in the players inventory. This = 1 ( GC - (GC - 1) ) P.RemoveItem(_00E_YerosCave_SiraSoulbender, GC - (GC - 1), true) I am unsure how this can result in more than one gem. oOMy code: P.RemoveItem(_00E_YerosCave_SiraSoulbender, GC - (GC - 1), true)Lets say GC is 5. 5 - (5 - 1) = 1 Lets say GC is 3. 3 - (3 - 1) = 1 Let's say GC is 1... Oh wait, it doesn't even fire when it is 1. ^^ Ok, then let's say it is 2. 2 - (2 - 1) = 1. In addition:Ah... I overthought it.Like I always do. ^^ I was thinking in the way of having just ONE as number, but haven't thought about to remove as much gems to just have one left. You are perfectly right. :) Link to comment Share on other sites More sharing options...
SurfsideNaturals Posted February 13, 2020 Share Posted February 13, 2020 That is why it is important to streamline your scripts. Have a look at this script. You are duplicating functions. ( P.GetItemCount(_00E_YerosCave_SiraSoulbender) ). Function AddGem(ObjectReference P) ;=> I somewhat liked to do all stuff here as of having it easier to track and fix issues. ;=> So I got rid of the FindGem() function. if SiraSoulGemFunctions.ycInt_SiraSoulCounter > 49 ;=> Quest Script Variable :) P.Additem(_00E_WishWell_FrostcliffTavern_BrokenSoulgem, 1, True) SiraSoulGemFunctions.ycInt_SiraSoulCounter = -1 elseif SiraSoulGemFunctions.ycInt_SiraSoulCounter > -1 if UI.IsMenuOpen("InventoryMenu") ;=> A Soul Gem can only be used in inventory menu int[] SoulGemC = new int[6] ;=> Used to take care of eventualities. SoulGemC[0] = P.GetItemCount(_00E_YerosCave_SiraSoulbender) ;=> Like being in a filling process and SoulGemC[1] = P.GetItemCount(SoulGemArray[0]) ;=> quickly opening the menu. SoulGemC[2] = P.GetItemCount(SoulGemArray[1]) ;=> That would have resulted in multiple gems being SoulGemC[3] = P.GetItemCount(SoulGemArray[2]) ;=> added. Now we only have one. SoulGemC[4] = P.GetItemCount(SoulGemArray[3]) SoulGemC[5] = P.GetItemCount(SoulGemArray[4]) if (SoulGemC[0] + SoulGemC[1] + SoulGemC[2] + SoulGemC[3] + SoulGemC[4] + SoulGemC[5]) == 0 P.AddItem(_00E_YerosCave_SiraSoulbender, 1, True) endif endif endif int GC = P.GetItemCount(_00E_YerosCave_SiraSoulbender) If GC > 1 ;=> Just to be sure we only have one empty gem in inventory. ^^ P.RemoveItem(_00E_YerosCave_SiraSoulbender, GC - (GC - 1), true) EndIf ;=> Thanks for making me aware that Papyrus likes firing on weird eventualities. XD EndFunction You do not need to add all of the gems and the way it is done the code has to check every single gem before it finises. It should be set up so it returns a gem as soon as it finds one. if (SoulGemC[0] + SoulGemC[1] + SoulGemC[2] + SoulGemC[3] + SoulGemC[4] + SoulGemC[5]) == 0 P.AddItem(_00E_YerosCave_SiraSoulbender, 1, True) endif Like this for example: if UI.IsMenuOpen("InventoryMenu") ;=> A Soul Gem can only be used in inventory menu if IsFilling() else P.AddItem(_00E_YerosCave_SiraSoulbender, 1, True) endif endif Bool Function IsFilling int i While i < 5 If P.GetItemCount(SoulGemArray[i]) Return True EndIf i = i + 1 EndWhile EndFunction Link to comment Share on other sites More sharing options...
JustChill Posted February 13, 2020 Author Share Posted February 13, 2020 Hey,I just checked your other suggestions.Even with lower frames this should work properly. :DEven the 50 gems get reduced to one as soon as one of them is used for recharging a weapon. Thanks for pointing that out. That was a 360 degree formula. XD I could also just wrote Remove 1 gem. XD You do not need to add all of the gems and the way it is done the code has to check every single gem before it finises. It should be set up so it returns a gem as soon as it finds one. Ah sorry, I just got your response now. Well, as you see in my video everything works fine with my current script. :smile: Just changed the formula you pointed out.Aside of that, I don't get double empty gems back anymore like I previously did when filling gems, so I rather stick to my initial solution. :wink: Link to comment Share on other sites More sharing options...
JustChill Posted February 14, 2020 Author Share Posted February 14, 2020 Just made a full test of the whole soul catching functionality. :) Link to comment Share on other sites More sharing options...
NexusComa Posted February 16, 2020 Share Posted February 16, 2020 (edited) What I and anyone else would take personal is being called a jackass and continuous low key insults at every re-re-re-post.I don't know if you asked Surfs, I don't know how Surfs got it. Who knows if Surfs had the right to give it to you. Clearly that is a rawde-compiled script. Are you suggesting that I posted a de-compiled script here? I would not use someone else's work without crediting them. The script I wrote for JustChill was written from scratch. I hope you were talking about someone else. In that case I certainly agree doing that without crediting them and getting their permission is not acceptable. Clearly the script was pirated. This is why I never helped. Sorry if you can't understand I hate pirating other people work. Dude could have just left it alone .. but had to go all toxic. As if he actually had any ground to stand on. I hope he did reportme. Any fool can see he is and had been pirating for a while now. Say what you will. You honestly think you're fooling anyone. Edited February 16, 2020 by NexusComa Link to comment Share on other sites More sharing options...
JustChill Posted February 16, 2020 Author Share Posted February 16, 2020 What I and anyone else would take personal is being called a jackass and continuous low key insults at every re-re-re-post.I don't know if you asked Surfs, I don't know how Surfs got it. Who knows if Surfs had the right to give it to you. Clearly that is a rawde-compiled script. Are you suggesting that I posted a de-compiled script here? I would not use someone else's work without crediting them. The script I wrote for JustChill was written from scratch. I hope you were talking about someone else. In that case I certainly agree doing that without crediting them and getting their permission is not acceptable. Clearly the script was pirated. This is why I never helped. Sorry if you can't understand I hate pirating other people work. Dude could have just left it alone .. but had to go all toxic. As if he actually had any ground to stand on. I hope he did reportme. Any fool can see he is and had been pirating for a while now. Say what you will. You honestly think you're fooling anyone. This response is very confusing.SurfsideNaturals is asking you if you think, that her script was pirated. You agree but then say that I pirated scripts, without even linking to some clear evidence?Probably because there is none. Especially what the hell is a 'pirated script'? A function wrote by someone else? Well, what if that function is the only way to do it?Like for equipping the Pipboy in New Vegas in GameMode?Leads to a CTD.I credited the original designer of that work around, as do you know which my initial solution was? Opening the console window shortly, for forcing a menu mode XDDDThat's a dirty workaround, ya know?And I was happy when I saw that there was another workaround, that wasn't that clean either, but at least avoided the CTD without being forced to go into console menu. Have you actually checked the code of the Dynamic Pipboy Light mod of mine and searched for similar mods with that code?No? Then what are you talking about? About the magicSoulTrapFXScript?I already told in the first post that this script comes from Enderal.Have you actually checked what Enderal is? Do you know that Skyrim mods with scripts don't work there as their properties might point to something that simply doesn't exist in Enderal's "Skyrim.esm"?Like the magic effects of the Detect Dead spell?Or does this magicSoulTrapFXScript look like the one that is available in Enderal from scratch? ;Thanks to ReDragon2013 for good tips and enhancements. ;+= Just Chill ScriptName magicSoulTrapFXScript extends ActiveMagicEffect ;=> The original script has to be overwritten as it already features an add- / removeItem function. {Scripted effect for the Soul Trap Visual FX} import debug ;======================================================================================; ; PROPERTIES / ;=============/ ImageSpaceModifier property TrapImod auto {IsMod applied when we trap a soul} sound property TrapSoundFX auto ; create a sound property we'll point to in the editor' {Sound played when we trap a soul} VisualEffect property TargetVFX auto {Visual Effect on Target aiming at Caster} VisualEffect property CasterVFX auto {Visual Effect on Caster aming at Target} EffectShader property CasterFXS auto {Effect Shader on Caster during Soul trap} EffectShader property TargetFXS auto {Effect Shader on Target during Soul trap} VisualEffect property WastedVFX auto {Visual Effect on Target aiming up in the air} VisualEffect property HeavenVFX auto {Visual Effect on the air aming at Target} bool property bIsEnchantmentEffect = false auto {Set this to true if this soul trap is on a weapon enchantment or a spell that can do damage to deal with a fringe case} _00E_YerosCave_VariableSCR Property SiraGemFunctions hidden _00E_YerosCave_VariableSCR function get() return Quest.GetQuest("_00E_YerosCave_PlayerSoulGemCheckQST") as _00E_YerosCave_VariableSCR endFunction endProperty ;======================================================================================; ; VARIABLES / ;=============/ ; objectreference playerref bool DeadAlready = FALSE bool bUseWait = True bool soulWasted = false bool soulTrapped = false ;======================================================================================; ; EVENTS / ;=============/ ;Declaring soul gem levels: Event OnEffectStart(Actor akTarget, Actor akCaster) victim = akTarget caster = akCaster if(victim.HasKeyword(ActorTypeNPC)) victimIsNPC = true endif if bIsEnchantmentEffect == False DeadAlready = Victim.IsDead() endif Countdown() EndEvent Event OnEffectFinish(Actor akTarget, Actor akCaster) Await() if victim ; initiate lock to prevent multiple soul traps from processing at the same time: if(SoulTrapController != None) while(!SoulTrapController.SecurePermission(caster)) Utility.Wait(0.1) endWhile endif if(!deadAlready && victim.IsDead() && victim.GetActorValue("PerceptionCondition") != 0) soulTrapped = false String soulType = "None" ;if victim is not a humanoid, remove Black Soul Gems from inventory before trap begins: if(!victimIsNPC) ;numBlack = caster.GetItemCount(SoulGemBlack) ;caster.RemoveItem(SoulGemBlack, numBlack, true) ;=> I am not sure why the original script had to remove the black soul gems. I commented it out. int targetLevel = victim.GetLevel() if(targetLevel < Game.GetGameSettingInt("iLesserSoulActorLevel")) ;soul is petty soulType="Petty" DynamicGemFilling(1) ;=> This is the most disgusting function you have ever seen. Way too heavy, but hey... it just works. :P elseif(targetLevel < Game.GetGameSettingInt("iCommonSoulActorLevel"));soul is lesser soulType="Lesser" DynamicGemFilling(2) elseif(targetLevel < Game.GetGameSettingInt("iGreaterSoulActorLevel")) ;soul is common soulType="Common" DynamicGemFilling(3) elseif(targetLevel < Game.GetGameSettingInt("iGrandSoulActorLevel")) ;soul is greater soulType="Greater" DynamicGemFilling(4) else soulType="Grand" DynamicGemFilling(5) endif ; return Black Soul Gems: ;caster.AddItem(SoulGemBlack, numBlack, true) else numBlack = caster.GetItemCount(SoulGemBlack) if(numBlack > 0) caster.RemoveItem(SoulGemBlack, 1, true) caster.AddItem(SoulGemBlackFilled, 1, true) soulTrapped = true elseif(caster.GetItemCount(_00E_YerosCave_SiraSoulbender) > 0) caster.RemoveItem(_00E_YerosCave_SiraSoulbender, 1, true) caster.AddItem(_00E_YerosCave_SiraSoulbender_FillGrand, 1, true) soulTrapped = true SiraGemFunctions.intYC_SiraSoulCounter += 1 ;=> Regardless how big the current filling is, catching a human soul will always result in an increase of the TOTAL counter. elseif(caster.GetItemCount(_00E_YerosCave_SiraSoulbender_FillPetty) > 0) ;=> Even if a large part of the human soul is wasted. caster.RemoveItem(_00E_YerosCave_SiraSoulbender_FillPetty, 1, true) caster.AddItem(_00E_YerosCave_SiraSoulbender_FillGrand, 1, true) soulTrapped = true soulWasted = true SiraGemFunctions.intYC_SiraSoulCounter += 1 elseif(caster.GetItemCount(_00E_YerosCave_SiraSoulbender_FillLess) > 0) caster.RemoveItem(_00E_YerosCave_SiraSoulbender_FillLess, 1, true) caster.AddItem(_00E_YerosCave_SiraSoulbender_FillGrand, 1, true) soulTrapped = true soulWasted = true SiraGemFunctions.intYC_SiraSoulCounter += 1 elseif(caster.GetItemCount(_00E_YerosCave_SiraSoulbender_FillCom) > 0) caster.RemoveItem(_00E_YerosCave_SiraSoulbender_FillCom, 1, true) caster.AddItem(_00E_YerosCave_SiraSoulbender_FillGrand, 1, true) soulTrapped = true soulWasted = true SiraGemFunctions.intYC_SiraSoulCounter += 1 elseif(caster.GetItemCount(_00E_YerosCave_SiraSoulbender_FillGreat) > 0) caster.RemoveItem(_00E_YerosCave_SiraSoulbender_FillGreat, 1, true) caster.AddItem(_00E_YerosCave_SiraSoulbender_FillGrand, 1, true) soulTrapped = true soulWasted = true SiraGemFunctions.intYC_SiraSoulCounter += 1 endif endif ; begin vanilla Soul Trap FX finale: if(soulTrapped == true) victim.SetActorValue("PerceptionCondition", 0) PlayEffects(caster, victim) if soulType=="Petty" Debug.Notification(_00E_SoulPetty.GetName()+" "+_00E_SuccessfulTrapping.GetName()) SoulsCaught.Mod(1) ;=> I do not change anything about the global counter of Enderal. elseif soulType=="Lesser" Debug.Notification(_00E_SoulLesser.GetName()+" "+_00E_SuccessfulTrapping.GetName()) SoulsCaught.Mod(1) elseif soulType=="Common" Debug.Notification(_00E_SoulCommon.GetName()+" "+_00E_SuccessfulTrapping.GetName()) SoulsCaught.Mod(1) elseif soulType =="Greater" Debug.Notification(_00E_SoulGreater.GetName()+" "+_00E_SuccessfulTrapping.GetName()) SoulsCaught.Mod(1) elseif soulType =="Grand" Debug.Notification(_00E_SoulGrand.GetName()+" "+_00E_SuccessfulTrapping.GetName()) SoulsCaught.Mod(1) else _00E_SoulHuman.show() endif else _00E_FailedTrapping.Show() endif endif ; release lock SoulTrapController.ReleasePermission(caster) endif endEvent ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Functions;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function DynamicGemFilling(int iSoulLevel) While iSoulLevel > 0 numPetty = caster.GetItemCount(SoulGemPetty) numLesser = caster.GetItemCount(SoulGemLesser) numLesserPetty = caster.GetItemCount(_00E_SoulGemLesserFilledPetty) numCommon = caster.GetItemCount(SoulGemCommon) numCommonPetty = caster.GetItemCount(_00E_SoulGemCommonFilledPetty) numCommonLesser = caster.GetItemCount(_00E_SoulGemCommonFilledLesser) numGreater = caster.GetItemCount(SoulGemGreater) numGreaterPetty = caster.GetItemCount(_00E_SoulGemGreaterFilledPetty) numGreaterLesser = caster.GetItemCount(_00E_SoulGemGreaterFilledLesser) numGreaterCommon = caster.GetItemCount(_00E_SoulGemGreaterFilledCommon) numGrand = caster.GetItemCount(SoulGemGrand) numGrandPetty = caster.GetItemCount(_00E_SoulGemGrandFilledPetty) numGrandLesser = caster.GetItemCount(_00E_SoulGemGrandFilledLesser) numGrandCommon = caster.GetItemCount(_00E_SoulGemGrandFilledCommon) numGrandGreater = caster.GetItemCount(_00E_SoulGemGrandFilledGreater) numBender = caster.GetItemCount(_00E_YerosCave_SiraSoulbender) numBenderPetty = caster.GetItemCount(_00E_YerosCave_SiraSoulbender_FillPetty) numBenderLesser = caster.GetItemCount(_00E_YerosCave_SiraSoulbender_FillLess) numBenderCommon = caster.GetItemCount(_00E_YerosCave_SiraSoulbender_FillCom) numBenderGreater = caster.GetItemCount(_00E_YerosCave_SiraSoulbender_FillGreat) ;=> It's vital to fill these int variables again as any of these could change through the process below. ;=> It's cleaner to do that once in the header of the While loop, as using all these functions below instead of the variables is way more heavy. Variables contain simple values, while even the "GetItemCount" function is way more complex than that. if (numPetty + numLesser + numLesserPetty + numCommon + numCommonPetty + numCommonLesser + numGreater + numGreaterPetty + numGreaterLesser + numGreaterCommon + numGrand + numGrandPetty + numGrandLesser + numGrandCommon + numGrandGreater + numBender + numBenderPetty + numBenderLesser + numBenderCommon + numBenderGreater) == 0 iSoulLevel = -20 endif ;=> This is our safety line, to avoid infinite loops. As it might be possible that we don't have soul gems left, but "iSoulLevel" still has a value higher than 0. if numPetty > 0 ;=> This is where the fun starts. It's like endless queries. oO caster.RemoveItem(SoulGemPetty, 1, true) caster.AddItem(SoulGemPettyFilled, 1, true) soulTrapped = true iSoulLevel -= 1 ;=> So, SoulLevel will be reduced as we filled a part of a soul (or a full petty soul) into an empty petty gem. elseif numLesser > 0 if iSoulLevel > 1 caster.RemoveItem(SoulGemLesser, 1, true) caster.AddItem(SoulGemLesserFilled, 1, true) soulTrapped = true iSoulLevel -= 2 else caster.RemoveItem(SoulGemLesser, 1, true) caster.AddItem(_00E_SoulGemLesserFilledPetty, 1, true) soulTrapped = true iSoulLevel -= 1 endif elseif numLesserPetty > 0 caster.RemoveItem(_00E_SoulGemLesserFilledPetty, 1, true) caster.AddItem(SoulGemLesserFilled, 1, true) soulTrapped = true iSoulLevel -= 1 elseif numCommon > 0 if iSoulLevel > 2 caster.RemoveItem(SoulGemCommon, 1, true) caster.AddItem(SoulGemCommonFilled, 1, true) soulTrapped = true iSoulLevel -= 3 elseif iSoulLevel > 1 caster.RemoveItem(SoulGemCommon, 1, true) caster.AddItem(_00E_SoulGemCommonFilledLesser, 1, true) soulTrapped = true iSoulLevel -= 2 else caster.RemoveItem(SoulGemCommon, 1, true) caster.AddItem(_00E_SoulGemCommonFilledPetty, 1, true) soulTrapped = true iSoulLevel -= 1 endif elseif numCommonPetty > 0 if iSoulLevel > 1 caster.RemoveItem(_00E_SoulGemCommonFilledPetty, 1, true) caster.AddItem(SoulGemCommonFilled, 1, true) soulTrapped = true iSoulLevel -= 2 else caster.RemoveItem(_00E_SoulGemCommonFilledPetty, 1, true) caster.AddItem(_00E_SoulGemCommonFilledLesser, 1, true) soulTrapped = true iSoulLevel -= 1 endif elseif numCommonLesser > 0 caster.RemoveItem(_00E_SoulGemCommonFilledLesser, 1, true) caster.AddItem(SoulGemCommonFilled, 1, true) soulTrapped = true iSoulLevel -= 1 elseif numGreater > 0 if iSoulLevel > 3 caster.RemoveItem(SoulGemGreater, 1, true) caster.AddItem(SoulGemGreaterFilled, 1, true) soulTrapped = true iSoulLevel -= 4 elseif iSoulLevel > 2 caster.RemoveItem(SoulGemGreater, 1, true) caster.AddItem(_00E_SoulGemGreaterFilledCommon, 1, true) soulTrapped = true iSoulLevel -= 3 elseif iSoulLevel > 1 caster.RemoveItem(SoulGemGreater, 1, true) caster.AddItem(_00E_SoulGemGreaterFilledLesser, 1, true) soulTrapped = true iSoulLevel -= 2 else caster.RemoveItem(SoulGemGreater, 1, true) caster.AddItem(_00E_SoulGemGreaterFilledPetty, 1, true) soulTrapped = true iSoulLevel -= 1 endif elseif numGreaterPetty > 0 if iSoulLevel > 2 caster.RemoveItem(_00E_SoulGemGreaterFilledPetty, 1, true) caster.AddItem(SoulGemGreaterFilled, 1, true) soulTrapped = true iSoulLevel -= 3 elseif iSoulLevel > 1 caster.RemoveItem(_00E_SoulGemGreaterFilledPetty, 1, true) caster.AddItem(_00E_SoulGemGreaterFilledCommon, 1, true) soulTrapped = true iSoulLevel -= 2 else caster.RemoveItem(_00E_SoulGemGreaterFilledPetty, 1, true) caster.AddItem(_00E_SoulGemGreaterFilledLesser, 1, true) soulTrapped = true iSoulLevel -= 1 endif elseif numGreaterLesser > 0 if iSoulLevel > 1 caster.RemoveItem(_00E_SoulGemGreaterFilledLesser, 1, true) caster.AddItem(SoulGemGreaterFilled, 1, true) soulTrapped = true iSoulLevel -= 2 else caster.RemoveItem(_00E_SoulGemGreaterFilledLesser, 1, true) caster.AddItem(_00E_SoulGemGreaterFilledCommon, 1, true) soulTrapped = true iSoulLevel -= 1 endif elseif numGreaterCommon > 0 caster.RemoveItem(_00E_SoulGemGreaterFilledCommon, 1, true) caster.AddItem(SoulGemGreaterFilled, 1, true) soulTrapped = true iSoulLevel -= 1 elseif numGrand > 0 ;=> This is the worst bit. You can fill ANY soul into a grand gem. if iSoulLevel > 4 ;=> And surely if we have a grand gem that isn't fully filled, we want to continue filling it until it is full. caster.RemoveItem(SoulGemGrand, 1, true) caster.AddItem(SoulGemGrandFilled, 1, true) soulTrapped = true iSoulLevel -= 5 elseif iSoulLevel > 3 caster.RemoveItem(SoulGemGrand, 1, true) caster.AddItem(_00E_SoulGemGrandFilledGreater, 1, true) soulTrapped = true iSoulLevel -= 4 elseif iSoulLevel > 2 caster.RemoveItem(SoulGemGrand, 1, true) caster.AddItem(_00E_SoulGemGrandFilledCommon, 1, true) soulTrapped = true iSoulLevel -= 3 elseif iSoulLevel > 1 caster.RemoveItem(SoulGemGrand, 1, true) caster.AddItem(_00E_SoulGemGrandFilledLesser, 1, true) soulTrapped = true iSoulLevel -= 2 else caster.RemoveItem(SoulGemGrand, 1, true) caster.AddItem(_00E_SoulGemGrandFilledPetty, 1, true) soulTrapped = true iSoulLevel -= 1 endif elseif numGrandPetty > 0 if iSoulLevel > 3 caster.RemoveItem(_00E_SoulGemGrandFilledPetty, 1, true) caster.AddItem(SoulGemGrandFilled, 1, true) soulTrapped = true iSoulLevel -= 4 elseif iSoulLevel > 2 caster.RemoveItem(_00E_SoulGemGrandFilledPetty, 1, true) caster.AddItem(_00E_SoulGemGrandFilledGreater, 1, true) soulTrapped = true iSoulLevel -= 3 elseif iSoulLevel > 1 caster.RemoveItem(_00E_SoulGemGrandFilledPetty, 1, true) caster.AddItem(_00E_SoulGemGrandFilledCommon, 1, true) soulTrapped = true iSoulLevel -= 2 else caster.RemoveItem(_00E_SoulGemGrandFilledPetty, 1, true) caster.AddItem(_00E_SoulGemGrandFilledLesser, 1, true) soulTrapped = true iSoulLevel -= 1 endif elseif numGrandLesser > 0 if iSoulLevel > 2 caster.RemoveItem(_00E_SoulGemGrandFilledLesser, 1, true) caster.AddItem(SoulGemGrandFilled, 1, true) soulTrapped = true iSoulLevel -= 3 elseif iSoulLevel > 1 caster.RemoveItem(_00E_SoulGemGrandFilledLesser, 1, true) caster.AddItem(_00E_SoulGemGrandFilledGreater, 1, true) soulTrapped = true iSoulLevel -= 2 else caster.RemoveItem(_00E_SoulGemGrandFilledLesser, 1, true) caster.AddItem(_00E_SoulGemGrandFilledCommon, 1, true) soulTrapped = true iSoulLevel -= 1 endif elseif numGrandCommon > 0 if iSoulLevel > 1 caster.RemoveItem(_00E_SoulGemGrandFilledCommon, 1, true) caster.AddItem(SoulGemGrandFilled, 1, true) soulTrapped = true iSoulLevel -= 2 else caster.RemoveItem(_00E_SoulGemGrandFilledCommon, 1, true) caster.AddItem(_00E_SoulGemGrandFilledGreater, 1, true) soulTrapped = true iSoulLevel -= 1 endif elseif numGrandGreater > 0 caster.RemoveItem(_00E_SoulGemGrandFilledGreater, 1, true) caster.AddItem(SoulGemGrandFilled, 1, true) soulTrapped = true iSoulLevel -= 1 elseif numBender > 0 if iSoulLevel > 4 caster.RemoveItem(_00E_YerosCave_SiraSoulbender, 1, true) caster.AddItem(_00E_YerosCave_SiraSoulbender_FillGrand, 1, true) soulTrapped = true iSoulLevel -= 5 SiraGemFunctions.intYC_SiraSoulLevel += 5 ;=> This counter tells when it is time to raise the TOTAL counter. if SiraGemFunctions.intYC_SiraSoulLevel > 4 ;=> Human souls always count as grand souls and even increase the TOTAL counter if they get filled into an already filled soul bender. SiraGemFunctions.intYC_SiraSoulCounter += 1 ;=> But with creature souls you have a bit of a play ground... SiraGemFunctions.intYC_SiraSoulLevel = SiraGemFunctions.intYC_SiraSoulLevel - 5 ;=> Basically you can 50*5 times fill the gem with a petty soul. Which means it will break after 250 petty souls got into it. endif ;=> I am not sure if the coding is that accurate, but the main part seems to work (I tested it with a limit of 5 total fillings). elseif iSoulLevel > 3 caster.RemoveItem(_00E_YerosCave_SiraSoulbender, 1, true) caster.AddItem(_00E_YerosCave_SiraSoulbender_FillGreat, 1, true) soulTrapped = true iSoulLevel -= 4 SiraGemFunctions.intYC_SiraSoulLevel += 4 if SiraGemFunctions.intYC_SiraSoulLevel > 4 SiraGemFunctions.intYC_SiraSoulCounter += 1 SiraGemFunctions.intYC_SiraSoulLevel = SiraGemFunctions.intYC_SiraSoulLevel - 5 endif elseif iSoulLevel > 2 caster.RemoveItem(_00E_YerosCave_SiraSoulbender, 1, true) caster.AddItem(_00E_YerosCave_SiraSoulbender_FillCom, 1, true) soulTrapped = true iSoulLevel -= 3 SiraGemFunctions.intYC_SiraSoulLevel += 3 if SiraGemFunctions.intYC_SiraSoulLevel > 4 SiraGemFunctions.intYC_SiraSoulCounter += 1 SiraGemFunctions.intYC_SiraSoulLevel = SiraGemFunctions.intYC_SiraSoulLevel - 5 endif elseif iSoulLevel > 1 caster.RemoveItem(_00E_YerosCave_SiraSoulbender, 1, true) caster.AddItem(_00E_YerosCave_SiraSoulbender_FillLess, 1, true) soulTrapped = true iSoulLevel -= 2 SiraGemFunctions.intYC_SiraSoulLevel += 2 if SiraGemFunctions.intYC_SiraSoulLevel > 4 SiraGemFunctions.intYC_SiraSoulCounter += 1 SiraGemFunctions.intYC_SiraSoulLevel = SiraGemFunctions.intYC_SiraSoulLevel - 5 endif else caster.RemoveItem(_00E_YerosCave_SiraSoulbender, 1, true) caster.AddItem(_00E_YerosCave_SiraSoulbender_FillPetty, 1, true) soulTrapped = true iSoulLevel -= 1 SiraGemFunctions.intYC_SiraSoulLevel += 1 if SiraGemFunctions.intYC_SiraSoulLevel > 4 SiraGemFunctions.intYC_SiraSoulCounter += 1 SiraGemFunctions.intYC_SiraSoulLevel = SiraGemFunctions.intYC_SiraSoulLevel - 5 endif endif elseif numBenderPetty > 0 if iSoulLevel > 3 caster.RemoveItem(_00E_YerosCave_SiraSoulbender_FillPetty, 1, true) caster.AddItem(_00E_YerosCave_SiraSoulbender_FillGrand, 1, true) soulTrapped = true iSoulLevel -= 4 SiraGemFunctions.intYC_SiraSoulLevel += 4 if SiraGemFunctions.intYC_SiraSoulLevel > 4 SiraGemFunctions.intYC_SiraSoulCounter += 1 SiraGemFunctions.intYC_SiraSoulLevel = SiraGemFunctions.intYC_SiraSoulLevel - 5 endif elseif iSoulLevel > 2 caster.RemoveItem(_00E_YerosCave_SiraSoulbender_FillPetty, 1, true) caster.AddItem(_00E_YerosCave_SiraSoulbender_FillGreat, 1, true) soulTrapped = true iSoulLevel -= 3 SiraGemFunctions.intYC_SiraSoulLevel += 3 if SiraGemFunctions.intYC_SiraSoulLevel > 4 SiraGemFunctions.intYC_SiraSoulCounter += 1 SiraGemFunctions.intYC_SiraSoulLevel = SiraGemFunctions.intYC_SiraSoulLevel - 5 endif elseif iSoulLevel > 1 caster.RemoveItem(_00E_YerosCave_SiraSoulbender_FillPetty, 1, true) caster.AddItem(_00E_YerosCave_SiraSoulbender_FillCom, 1, true) soulTrapped = true iSoulLevel -= 2 SiraGemFunctions.intYC_SiraSoulLevel += 2 if SiraGemFunctions.intYC_SiraSoulLevel > 4 SiraGemFunctions.intYC_SiraSoulCounter += 1 SiraGemFunctions.intYC_SiraSoulLevel = SiraGemFunctions.intYC_SiraSoulLevel - 5 endif else caster.RemoveItem(_00E_YerosCave_SiraSoulbender_FillPetty, 1, true) caster.AddItem(_00E_YerosCave_SiraSoulbender_FillLess, 1, true) soulTrapped = true iSoulLevel -= 1 SiraGemFunctions.intYC_SiraSoulLevel += 1 if SiraGemFunctions.intYC_SiraSoulLevel > 4 SiraGemFunctions.intYC_SiraSoulCounter += 1 SiraGemFunctions.intYC_SiraSoulLevel = SiraGemFunctions.intYC_SiraSoulLevel - 5 endif endif elseif numBenderLesser > 0 if iSoulLevel > 2 caster.RemoveItem(_00E_YerosCave_SiraSoulbender_FillLess, 1, true) caster.AddItem(_00E_YerosCave_SiraSoulbender_FillGrand, 1, true) soulTrapped = true iSoulLevel -= 3 SiraGemFunctions.intYC_SiraSoulLevel += 3 if SiraGemFunctions.intYC_SiraSoulLevel > 4 SiraGemFunctions.intYC_SiraSoulCounter += 1 SiraGemFunctions.intYC_SiraSoulLevel = SiraGemFunctions.intYC_SiraSoulLevel - 5 endif elseif iSoulLevel > 1 caster.RemoveItem(_00E_YerosCave_SiraSoulbender_FillLess, 1, true) caster.AddItem(_00E_YerosCave_SiraSoulbender_FillGreat, 1, true) soulTrapped = true iSoulLevel -= 2 SiraGemFunctions.intYC_SiraSoulLevel += 2 if SiraGemFunctions.intYC_SiraSoulLevel > 4 SiraGemFunctions.intYC_SiraSoulCounter += 1 SiraGemFunctions.intYC_SiraSoulLevel = SiraGemFunctions.intYC_SiraSoulLevel - 5 endif else caster.RemoveItem(_00E_YerosCave_SiraSoulbender_FillLess, 1, true) caster.AddItem(_00E_YerosCave_SiraSoulbender_FillCom, 1, true) soulTrapped = true iSoulLevel -= 1 SiraGemFunctions.intYC_SiraSoulLevel += 1 if SiraGemFunctions.intYC_SiraSoulLevel > 4 SiraGemFunctions.intYC_SiraSoulCounter += 1 SiraGemFunctions.intYC_SiraSoulLevel = SiraGemFunctions.intYC_SiraSoulLevel - 5 endif endif elseif numBenderCommon > 0 if iSoulLevel > 1 caster.RemoveItem(_00E_YerosCave_SiraSoulbender_FillCom, 1, true) caster.AddItem(_00E_YerosCave_SiraSoulbender_FillGrand, 1, true) soulTrapped = true iSoulLevel -= 2 SiraGemFunctions.intYC_SiraSoulLevel += 2 if SiraGemFunctions.intYC_SiraSoulLevel > 4 SiraGemFunctions.intYC_SiraSoulCounter += 1 SiraGemFunctions.intYC_SiraSoulLevel = SiraGemFunctions.intYC_SiraSoulLevel - 5 endif else caster.RemoveItem(_00E_YerosCave_SiraSoulbender_FillCom, 1, true) caster.AddItem(_00E_YerosCave_SiraSoulbender_FillGreat, 1, true) soulTrapped = true iSoulLevel -= 1 SiraGemFunctions.intYC_SiraSoulLevel += 1 if SiraGemFunctions.intYC_SiraSoulLevel > 4 SiraGemFunctions.intYC_SiraSoulCounter += 1 SiraGemFunctions.intYC_SiraSoulLevel = SiraGemFunctions.intYC_SiraSoulLevel - 5 endif endif elseif numBenderGreater > 0 caster.RemoveItem(_00E_YerosCave_SiraSoulbender_FillGreat, 1, true) caster.AddItem(_00E_YerosCave_SiraSoulbender_FillGrand, 1, true) soulTrapped = true iSoulLevel -= 1 SiraGemFunctions.intYC_SiraSoulLevel += 1 if SiraGemFunctions.intYC_SiraSoulLevel > 4 SiraGemFunctions.intYC_SiraSoulCounter += 1 SiraGemFunctions.intYC_SiraSoulLevel = SiraGemFunctions.intYC_SiraSoulLevel - 5 endif endif EndWhile if iSoulLevel == -20 ;=> Should be the only circumstance of a wasted soul here. soulWasted = true endif EndFunction Function PlayEffects(Actor akCaster, Actor akVictim) TrapSoundFX.Play(akCaster) ; Play TrapSoundFX sound from player TrapImod.Apply() ; Apply isMod at full strength TargetVFX.Play(akVictim, 4.7, akCaster) ; Play TargetVFX and aim them at the player CasterVFX.Play(akCaster, 5.9, akVictim) TargetFXS.Play(akVictim, 2) ; Play effect shaders CasterFXS.Play(akCaster, 3) if SoulWasted ObjectReference _00E_YC_SoulWastedMarker = akVictim.PlaceAtMe(XMarkerHeading, 1) _00E_YC_SoulWastedMarker.MoveTo(akVictim, 0.0, 0.0, 1000) WastedVFX.Play(akVictim, 4.7, _00E_YC_SoulWastedMarker) ; If a part of the soul wasn't captured it will flow right up into the air. HeavenVFX.Play(_00E_YC_SoulWastedMarker, 5.9, akVictim) soulWasted = false _00E_YC_SoulWastedMarker.Delete() _00E_YC_SoulWastedMarker = None endif EndFunction Function Countdown() latch -= 1 EndFunction Function Await(int count = 0) while(latch > count) Utility.Wait(0.1) endwhile EndFunction ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Properties + Variables;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; bool victimIsNPC GlobalVariable Property SoulsCaught Auto Actor caster Actor victim int latch = 1 int numPetty int numLesser int numLesserPetty int numCommon int numCommonPetty int numCommonLesser int numGreater int numGreaterPetty int numGreaterLesser int numGreaterCommon int numGrand int numGrandPetty int numGrandLesser int numGrandCommon int numGrandGreater int numBender int numBenderPetty int numBenderLesser int numBenderCommon int numBenderGreater int numBlack _00E_SoulTrapController Property SoulTrapController Auto Message Property _00E_FailedTrapping Auto Message Property _00E_SuccessfulTrapping Auto Message Property _00E_SoulPetty Auto Message Property _00E_SoulLesser Auto Message Property _00E_SoulCommon Auto Message Property _00E_SoulGreater Auto Message Property _00E_SoulGrand Auto Message Property _00E_SoulHuman Auto Actor Property PlayerREF Auto Keyword Property ActorTypeNPC Auto Static Property XMarkerHeading Auto SoulGem Property SoulGemPetty Auto SoulGem Property SoulGemPettyFilled Auto SoulGem Property SoulGemLesser Auto SoulGem Property SoulGemLesserFilled Auto SoulGem Property _00E_SoulGemLesserFilledPetty Auto SoulGem Property SoulGemCommon Auto SoulGem Property SoulGemCommonFilled Auto SoulGem Property _00E_SoulGemCommonFilledPetty Auto SoulGem Property _00E_SoulGemCommonFilledLesser Auto SoulGem Property SoulGemGreater Auto SoulGem Property SoulGemGreaterFilled Auto SoulGem Property _00E_SoulGemGreaterFilledPetty Auto SoulGem Property _00E_SoulGemGreaterFilledLesser Auto SoulGem Property _00E_SoulGemGreaterFilledCommon Auto SoulGem Property SoulGemGrand Auto SoulGem Property SoulGemGrandFilled Auto SoulGem Property _00E_SoulGemGrandFilledPetty Auto SoulGem Property _00E_SoulGemGrandFilledLesser Auto SoulGem Property _00E_SoulGemGrandFilledCommon Auto SoulGem Property _00E_SoulGemGrandFilledGreater Auto SoulGem Property SoulGemBlack Auto SoulGem Property SoulGemBlackFilled Auto SoulGem Property _00E_YerosCave_SiraSoulbender Auto SoulGem Property _00E_YerosCave_SiraSoulbender_FillPetty Auto SoulGem Property _00E_YerosCave_SiraSoulbender_FillLess Auto SoulGem Property _00E_YerosCave_SiraSoulbender_FillCom Auto SoulGem Property _00E_YerosCave_SiraSoulbender_FillGreat Auto SoulGem Property _00E_YerosCave_SiraSoulbender_FillGrand Auto It's as disgusting, but pretty functional as anything I would write, ya know? A downside is that the filling starts after 1 second (or even longer), when you have a low framerate.I've capped my framerate to 30 FPS and checked it out. But as a delay appears the only issue, I still stick to it. :P Link to comment Share on other sites More sharing options...
NexusComa Posted February 16, 2020 Share Posted February 16, 2020 This is the pirated script from your 1st post ... (the one that set off the red flags). Anyone that knows anything about programming for Skyrim would tell you the same.You can talk till you're blue in the face and you're never gonna convince me what I'm looking at here isn't a de-complied script. You're silly ... You know so littleabout this subject you think you can pass this off as a original script. I'm shocked you're still even here ... Why don't you go ahead and report me. I would love to see what the Dark0ne thinks of your "original script". Or the "I wrote that by hand from scratch" line. ScriptName magicSoulTrapFXScript extends ActiveMagicEffect{Scripted effect for the Soul Trap Visual FX}import debug;======================================================================================;; PROPERTIES /;=============/ImageSpaceModifier property TrapImod auto{IsMod applied when we trap a soul}sound property TrapSoundFX auto ; create a sound property we'll point to in the editor'{Sound played when we trap a soul}VisualEffect property TargetVFX auto{Visual Effect on Target aiming at Caster}VisualEffect property CasterVFX auto{Visual Effect on Caster aming at Target}EffectShader property CasterFXS auto{Effect Shader on Caster during Soul trap}EffectShader property TargetFXS auto{Effect Shader on Target during Soul trap}bool property bIsEnchantmentEffect = false auto{Set this to true if this soul trap is on a weapon enchantment or a spell that can do damage to deal with a fringe case};======================================================================================;; VARIABLES /;=============/; objectreference playerrefbool DeadAlready = FALSEbool bUseWait = True;======================================================================================;; EVENTS /;=============/;Declaring soul gem levels:Event OnEffectStart(Actor akTarget, Actor akCaster) victim = akTarget caster = akCaster if(victim.HasKeyword(ActorTypeNPC)) victimIsNPC = true endif if bIsEnchantmentEffect == False DeadAlready = Victim.IsDead() endif Countdown()EndEventEvent OnEffectFinish(Actor akTarget, Actor akCaster) Await() if victim ; initiate lock to prevent multiple soul traps from processing at the same time: if(SoulTrapController != None) while(!SoulTrapController.SecurePermission(caster)) Utility.Wait(0.1) endWhile endif if(!deadAlready && victim.IsDead() && victim.GetActorValue("PerceptionCondition") != 0) bool soulTrapped = false String soulType = "None" if numSiraFillCounter == 50 && Caster.GetItemCount(_00E_YerosCave_SiraSoulbender) numSiraFillCounter = 0 Caster.RemoveItem(_00E_YerosCave_SiraSoulbender, 1, true) Caster.AddItem(_00E_WishWell_FrostcliffTavern_BrokenSoulgem, 1) endif ;if victim is not a humanoid, remove Black Soul Gems from inventory before trap begins: if(!victimIsNPC) ;numBlack = caster.GetItemCount(SoulGemBlack) ;caster.RemoveItem(SoulGemBlack, numBlack, true) numPetty = caster.GetItemCount(SoulGemPetty) numLesser = caster.GetItemCount(SoulGemLesser) numCommon = caster.GetItemCount(SoulGemCommon) numGreater = caster.GetItemCount(SoulGemGreater) numGrand = caster.GetItemCount(SoulGemGrand) int targetLevel = victim.GetLevel() if(targetLevel < Game.GetGameSettingInt("iLesserSoulActorLevel")) ;soul is petty soulType="Petty" if(numPetty > 0) caster.RemoveItem(SoulGemPetty, 1, true) caster.AddItem(SoulGemPettyFilled, 1, true) soulTrapped = true elseif (numLesser > 0) caster.RemoveItem(SoulGemLesser, 1, true) caster.AddItem(_00E_SoulGemLesserFilledPetty, 1, true) soulTrapped = true elseif(numCommon > 0) caster.RemoveItem(SoulGemCommon, 1, true) caster.AddItem(_00E_SoulGemCommonFilledPetty, 1, true) soulTrapped = true elseif(numGreater > 0) caster.RemoveItem(SoulGemGreater, 1, true) caster.AddItem(_00E_SoulGemGreaterFilledPetty, 1, true) soulTrapped = true elseif(numGrand > 0) caster.RemoveItem(SoulGemGrand, 1, true) caster.AddItem(_00E_SoulGemGrandFilledPetty, 1, true) soulTrapped = true elseif(caster.GetItemCount(_00E_YerosCave_SiraSoulbender)) caster.RemoveItem(_00E_YerosCave_SiraSoulbender, 1, true) caster.AddItem(_00E_YerosCave_SiraSoulbender_FillPetty, 1, true) soulTrapped = true numSiraFillCounter += 1 endif elseif(targetLevel < Game.GetGameSettingInt("iCommonSoulActorLevel"));soul is lesser soulType="Lesser" if(numLesser > 0) caster.RemoveItem(SoulGemLesser, 1, true) caster.AddItem(SoulGemLesserFilled, 1, true) soulTrapped = true elseif (numCommon > 0) caster.RemoveItem(SoulGemCommon, 1, true) caster.AddItem(_00E_SoulGemCommonFilledLesser, 1, true) soulTrapped = true elseif(numGreater > 0) caster.RemoveItem(SoulGemGreater, 1, true) caster.AddItem(_00E_SoulGemGreaterFilledLesser, 1, true) soulTrapped = true elseif(numGrand > 0) caster.RemoveItem(SoulGemGrand, 1, true) caster.AddItem(_00E_SoulGemGrandFilledLesser, 1, true) soulTrapped = true elseif(caster.GetItemCount(_00E_YerosCave_SiraSoulbender)) caster.RemoveItem(_00E_YerosCave_SiraSoulbender, 1, true) caster.AddItem(_00E_YerosCave_SiraSoulbender_FillLess, 1, true) soulTrapped = true numSiraFillCounter += 1 endif elseif(targetLevel < Game.GetGameSettingInt("iGreaterSoulActorLevel")) ;soul is common soulType="Common" if(numCommon > 0) caster.RemoveItem(SoulGemCommon, 1, true) caster.AddItem(SoulGemCommonFilled, 1, true) soulTrapped = true elseif(numGreater > 0) caster.RemoveItem(SoulGemGreater, 1, true) caster.AddItem(_00E_SoulGemGreaterFilledCommon, 1, true) soulTrapped = true elseif(numGrand > 0) caster.RemoveItem(SoulGemGrand, 1, true) caster.AddItem(_00E_SoulGemGrandFilledCommon, 1, true) soulTrapped = true elseif(caster.GetItemCount(_00E_YerosCave_SiraSoulbender)) caster.RemoveItem(_00E_YerosCave_SiraSoulbender, 1, true) caster.AddItem(_00E_YerosCave_SiraSoulbender_FillCom, 1, true) soulTrapped = true numSiraFillCounter += 1 endif elseif(targetLevel < Game.GetGameSettingInt("iGrandSoulActorLevel")) ;soul is greater soulType="Greater" if(numGreater > 0) caster.RemoveItem(SoulGemGreater, 1, true) caster.AddItem(SoulGemGreaterFilled, 1, true) soulTrapped = true elseif(numGrand > 0) caster.RemoveItem(SoulGemGrand, 1, true) caster.AddItem(_00E_SoulGemGrandFilledGreater, 1, true) soulTrapped = true elseif(caster.GetItemCount(_00E_YerosCave_SiraSoulbender)) caster.RemoveItem(_00E_YerosCave_SiraSoulbender, 1, true) caster.AddItem(_00E_YerosCave_SiraSoulbender_FillGreat, 1, true) soulTrapped = true numSiraFillCounter += 1 endif else soulType="Grand" if(numGrand > 0) caster.RemoveItem(SoulGemGrand, 1, true) caster.AddItem(SoulGemGrandFilled, 1, true) soulTrapped = true elseif(caster.GetItemCount(_00E_YerosCave_SiraSoulbender)) caster.RemoveItem(_00E_YerosCave_SiraSoulbender, 1, true) caster.AddItem(_00E_YerosCave_SiraSoulbender_FillGrand, 1, true) soulTrapped = true numSiraFillCounter += 1 endif endif ; return Black Soul Gems: ;caster.AddItem(SoulGemBlack, numBlack, true) else numBlack = caster.GetItemCount(SoulGemBlack) if(numBlack > 0) caster.RemoveItem(SoulGemBlack, 1, true) caster.AddItem(SoulGemBlackFilled, 1, true) soulTrapped = true elseif(caster.GetItemCount(_00E_YerosCave_SiraSoulbender)) caster.RemoveItem(_00E_YerosCave_SiraSoulbender, 1, true) caster.AddItem(_00E_YerosCave_SiraSoulbender_FillGrand, 1, true) soulTrapped = true numSiraFillCounter += 1 endif endif ; begin vanilla Soul Trap FX finale: if(soulTrapped == true) victim.SetActorValue("PerceptionCondition", 0) PlayEffects(caster, victim) if soulType=="Petty" Debug.Notification(_00E_SoulPetty.GetName()+" "+_00E_SuccessfulTrapping.GetName()) SoulsCaught.SetValueInt(SoulsCaught.GetValueInt()+1) elseif soulType=="Lesser" Debug.Notification(_00E_SoulLesser.GetName()+" "+_00E_SuccessfulTrapping.GetName()) SoulsCaught.SetValueInt(SoulsCaught.GetValueInt()+1) elseif soulType=="Common" Debug.Notification(_00E_SoulCommon.GetName()+" "+_00E_SuccessfulTrapping.GetName()) SoulsCaught.SetValueInt(SoulsCaught.GetValueInt()+1) elseif soulType =="Greater" Debug.Notification(_00E_SoulGreater.GetName()+" "+_00E_SuccessfulTrapping.GetName()) SoulsCaught.SetValueInt(SoulsCaught.GetValueInt()+1) elseif soulType =="Grand" Debug.Notification(_00E_SoulGrand.GetName()+" "+_00E_SuccessfulTrapping.GetName()) SoulsCaught.SetValueInt(SoulsCaught.GetValueInt()+1) else _00E_SoulHuman.show() endif elseif (!victimIsNPC) _00E_FailedTrapping.Show() endif endif ; release lock SoulTrapController.ReleasePermission(caster) endifendEvent;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Functions;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Function PlayEffects(Actor akCaster, Actor akVictim) TrapSoundFX.Play(akCaster) ; Play TrapSoundFX sound from player TrapImod.Apply() ; Apply isMod at full strength TargetVFX.Play(akVictim, 4.7, akCaster) ; Play TargetVFX and aim them at the player CasterVFX.Play(akCaster, 5.9, akVictim) TargetFXS.Play(akVictim, 2) ; Play effect shaders CasterFXS.Play(akCaster, 3)EndFunctionFunction Countdown() latch -= 1EndFunctionFunction Await(int count = 0) while(latch > count) Utility.Wait(0.1) endwhileEndFunction;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Properties + Variables;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;bool victimIsNPCGlobalVariable Property SoulsCaught AutoActor casterActor victimint latch = 1int numPettyint numLesserint numCommonint numGreaterint numGrandint numBlackint numSiraFillCounter_00E_SoulTrapController Property SoulTrapController AutoMessage Property _00E_FailedTrapping AutoMessage Property _00E_SuccessfulTrapping AutoMessage Property _00E_SoulPetty AutoMessage Property _00E_SoulLesser AutoMessage Property _00E_SoulCommon AutoMessage Property _00E_SoulGreater AutoMessage Property _00E_SoulGrand AutoMessage Property _00E_SoulHuman AutoActor Property PlayerREF AutoKeyword Property ActorTypeNPC AutoSoulGem Property SoulGemPetty AutoSoulGem Property SoulGemPettyFilled AutoSoulGem Property SoulGemLesser AutoSoulGem Property SoulGemLesserFilled AutoSoulGem Property _00E_SoulGemLesserFilledPetty AutoSoulGem Property SoulGemCommon AutoSoulGem Property SoulGemCommonFilled AutoSoulGem Property _00E_SoulGemCommonFilledPetty AutoSoulGem Property _00E_SoulGemCommonFilledLesser AutoSoulGem Property SoulGemGreater AutoSoulGem Property SoulGemGreaterFilled AutoSoulGem Property _00E_SoulGemGreaterFilledPetty AutoSoulGem Property _00E_SoulGemGreaterFilledLesser AutoSoulGem Property _00E_SoulGemGreaterFilledCommon AutoSoulGem Property SoulGemGrand AutoSoulGem Property SoulGemGrandFilled AutoSoulGem Property _00E_SoulGemGrandFilledPetty AutoSoulGem Property _00E_SoulGemGrandFilledLesser AutoSoulGem Property _00E_SoulGemGrandFilledCommon AutoSoulGem Property _00E_SoulGemGrandFilledGreater AutoSoulGem Property SoulGemBlack AutoSoulGem Property SoulGemBlackFilled AutoSoulGem Property _00E_YerosCave_SiraSoulbender Auto SoulGem Property _00E_YerosCave_SiraSoulbender_FillPetty Auto SoulGem Property _00E_YerosCave_SiraSoulbender_FillLess AutoSoulGem Property _00E_YerosCave_SiraSoulbender_FillCom Auto SoulGem Property _00E_YerosCave_SiraSoulbender_FillGreat Auto SoulGem Property _00E_YerosCave_SiraSoulbender_FillGrand AutoMiscObject Property _00E_WishWell_FrostcliffTavern_BrokenSoulgem Auto Link to comment Share on other sites More sharing options...
JustChill Posted February 16, 2020 Author Share Posted February 16, 2020 I said that this script comes from Enderal and includes the changes for my "Soulbender" as no reusable soul gem exists in Enderal.Have you actually downloaded Enderal and compared their default script to mine? It even differs because that one doesn't include the "Soulbender". I've already reported you, no worries. Just hoping to make you also aware about you being s***-talking.This is the original script of Enderal: ScriptName magicSoulTrapFXScript extends ActiveMagicEffect {Scripted effect for the Soul Trap Visual FX} import debug ;======================================================================================; ; PROPERTIES / ;=============/ ImageSpaceModifier property TrapImod auto {IsMod applied when we trap a soul} sound property TrapSoundFX auto ; create a sound property we'll point to in the editor {Sound played when we trap a soul} VisualEffect property TargetVFX auto {Visual Effect on Target aiming at Caster} VisualEffect property CasterVFX auto {Visual Effect on Caster aming at Target} EffectShader property CasterFXS auto {Effect Shader on Caster during Soul trap} EffectShader property TargetFXS auto {Effect Shader on Target during Soul trap} bool property bIsEnchantmentEffect = false auto {Set this to true if this soul trap is on a weapon enchantment or a spell that can do damage to deal with a fringe case} ;======================================================================================; ; VARIABLES / ;=============/ ; objectreference playerref bool DeadAlready = FALSE bool bUseWait = True ;======================================================================================; ; EVENTS / ;=============/ Event OnEffectStart(Actor akTarget, Actor akCaster) victim = akTarget caster = akCaster if(victim.HasKeyword(ActorTypeNPC)) victimIsNPC = true endif if bIsEnchantmentEffect == False DeadAlready = Victim.IsDead() endif Countdown() EndEvent Event OnEffectFinish(Actor akTarget, Actor akCaster) Await() if victim ; initiate lock to prevent multiple soul traps from processing at the same time: if(SoulTrapController != None) while(!SoulTrapController.SecurePermission(caster)) Utility.Wait(0.1) endWhile endif if(!deadAlready && victim.IsDead() && victim.GetActorValue("PerceptionCondition") != 0) bool soulTrapped = false String soulType = "None" ;if victim is not a humanoid, remove Black Soul Gems from inventory before trap begins: if(!victimIsNPC) numBlack = caster.GetItemCount(SoulGemBlack) caster.RemoveItem(SoulGemBlack, numBlack, true) numPetty = caster.GetItemCount(SoulGemPetty) numLesser = caster.GetItemCount(SoulGemLesser) numCommon = caster.GetItemCount(SoulGemCommon) numGreater = caster.GetItemCount(SoulGemGreater) numGrand = caster.GetItemCount(SoulGemGrand) int targetLevel = victim.GetLevel() if(targetLevel < Game.GetGameSettingInt("iLesserSoulActorLevel")) ;soul is petty soulType="Petty" if(numPetty > 0) caster.RemoveItem(SoulGemPetty, 1, true) caster.AddItem(SoulGemPettyFilled, 1, true) soulTrapped = true elseif (numLesser > 0) caster.RemoveItem(SoulGemLesser, 1, true) caster.AddItem(_00E_SoulGemLesserFilledPetty, 1, true) soulTrapped = true elseif(numCommon > 0) caster.RemoveItem(SoulGemCommon, 1, true) caster.AddItem(_00E_SoulGemCommonFilledPetty, 1, true) soulTrapped = true elseif(numGreater > 0) caster.RemoveItem(SoulGemGreater, 1, true) caster.AddItem(_00E_SoulGemGreaterFilledPetty, 1, true) soulTrapped = true elseif(numGrand > 0) caster.RemoveItem(SoulGemGrand, 1, true) caster.AddItem(_00E_SoulGemGrandFilledPetty, 1, true) soulTrapped = true endif elseif(targetLevel < Game.GetGameSettingInt("iCommonSoulActorLevel"));soul is lesser soulType="Lesser" if(numLesser > 0) caster.RemoveItem(SoulGemLesser, 1, true) caster.AddItem(SoulGemLesserFilled, 1, true) soulTrapped = true elseif (numCommon > 0) caster.RemoveItem(SoulGemCommon, 1, true) caster.AddItem(_00E_SoulGemCommonFilledLesser, 1, true) soulTrapped = true elseif(numGreater > 0) caster.RemoveItem(SoulGemGreater, 1, true) caster.AddItem(_00E_SoulGemGreaterFilledLesser, 1, true) soulTrapped = true elseif(numGrand > 0) caster.RemoveItem(SoulGemGrand, 1, true) caster.AddItem(_00E_SoulGemGrandFilledLesser, 1, true) soulTrapped = true endif elseif(targetLevel < Game.GetGameSettingInt("iGreaterSoulActorLevel")) ;soul is common soulType="Common" if(numCommon > 0) caster.RemoveItem(SoulGemCommon, 1, true) caster.AddItem(SoulGemCommonFilled, 1, true) soulTrapped = true elseif(numGreater > 0) caster.RemoveItem(SoulGemGreater, 1, true) caster.AddItem(_00E_SoulGemGreaterFilledCommon, 1, true) soulTrapped = true elseif(numGrand > 0) caster.RemoveItem(SoulGemGrand, 1, true) caster.AddItem(_00E_SoulGemGrandFilledCommon, 1, true) soulTrapped = true endif elseif(targetLevel < Game.GetGameSettingInt("iGrandSoulActorLevel")) ;soul is greater soulType="Greater" if(numGreater > 0) caster.RemoveItem(SoulGemGreater, 1, true) caster.AddItem(SoulGemGreaterFilled, 1, true) soulTrapped = true elseif(numGrand > 0) caster.RemoveItem(SoulGemGrand, 1, true) caster.AddItem(_00E_SoulGemGrandFilledGreater, 1, true) soulTrapped = true endif else soulType="Grand" if(numGrand > 0) caster.RemoveItem(SoulGemGrand, 1, true) caster.AddItem(SoulGemGrandFilled, 1, true) soulTrapped = true endif endif ; return Black Soul Gems: caster.AddItem(SoulGemBlack, numBlack, true) else soulTrapped = akCaster.TrapSoul(victim) endif ; begin vanilla Soul Trap FX finale: if(soulTrapped == true) victim.SetActorValue("PerceptionCondition", 0) PlayEffects(caster, victim) if soulType=="Petty" Debug.Notification(_00E_SoulPetty.GetName()+" "+_00E_SuccessfulTrapping.GetName()) SoulsCaught.SetValueInt(SoulsCaught.GetValueInt()+1) elseif soulType=="Lesser" Debug.Notification(_00E_SoulLesser.GetName()+" "+_00E_SuccessfulTrapping.GetName()) SoulsCaught.SetValueInt(SoulsCaught.GetValueInt()+1) elseif soulType=="Common" Debug.Notification(_00E_SoulCommon.GetName()+" "+_00E_SuccessfulTrapping.GetName()) SoulsCaught.SetValueInt(SoulsCaught.GetValueInt()+1) elseif soulType =="Greater" Debug.Notification(_00E_SoulGreater.GetName()+" "+_00E_SuccessfulTrapping.GetName()) SoulsCaught.SetValueInt(SoulsCaught.GetValueInt()+1) elseif soulType =="Grand" Debug.Notification(_00E_SoulGrand.GetName()+" "+_00E_SuccessfulTrapping.GetName()) SoulsCaught.SetValueInt(SoulsCaught.GetValueInt()+1) else _00E_SoulHuman.show() endif elseif (!victimIsNPC) _00E_FailedTrapping.Show() endif endif ; release lock SoulTrapController.ReleasePermission(caster) endif endEvent ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Functions;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function PlayEffects(Actor akCaster, Actor akVictim) TrapSoundFX.Play(akCaster) ; Play TrapSoundFX sound from player TrapImod.Apply() ; Apply isMod at full strength TargetVFX.Play(akVictim, 4.7, akCaster) ; Play TargetVFX and aim them at the player CasterVFX.Play(akCaster, 5.9, akVictim) TargetFXS.Play(akVictim, 2) ; Play effect shaders CasterFXS.Play(akCaster, 3) EndFunction Function Countdown() latch -= 1 EndFunction Function Await(int count = 0) while(latch > count) Utility.Wait(0.1) endwhile EndFunction ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Properties + Variables;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; bool victimIsNPC GlobalVariable Property SoulsCaught Auto Actor caster Actor victim int latch = 1 int numPetty int numLesser int numCommon int numGreater int numGrand int numBlack _00E_SoulTrapController Property SoulTrapController Auto Message Property _00E_FailedTrapping Auto Message Property _00E_SuccessfulTrapping Auto Message Property _00E_SoulPetty Auto Message Property _00E_SoulLesser Auto Message Property _00E_SoulCommon Auto Message Property _00E_SoulGreater Auto Message Property _00E_SoulGrand Auto Message Property _00E_SoulHuman Auto Actor Property PlayerREF Auto Keyword Property ActorTypeNPC Auto SoulGem Property SoulGemPetty Auto SoulGem Property SoulGemPettyFilled Auto SoulGem Property SoulGemLesser Auto SoulGem Property SoulGemLesserFilled Auto SoulGem Property _00E_SoulGemLesserFilledPetty Auto SoulGem Property SoulGemCommon Auto SoulGem Property SoulGemCommonFilled Auto SoulGem Property _00E_SoulGemCommonFilledPetty Auto SoulGem Property _00E_SoulGemCommonFilledLesser Auto SoulGem Property SoulGemGreater Auto SoulGem Property SoulGemGreaterFilled Auto SoulGem Property _00E_SoulGemGreaterFilledPetty Auto SoulGem Property _00E_SoulGemGreaterFilledLesser Auto SoulGem Property _00E_SoulGemGreaterFilledCommon Auto SoulGem Property SoulGemGrand Auto SoulGem Property SoulGemGrandFilled Auto SoulGem Property _00E_SoulGemGrandFilledPetty Auto SoulGem Property _00E_SoulGemGrandFilledLesser Auto SoulGem Property _00E_SoulGemGrandFilledCommon Auto SoulGem Property _00E_SoulGemGrandFilledGreater Auto SoulGem Property SoulGemBlack Auto I am currently also recording a video while posting this, that one I will post afterwards. Where you see me unpacking the "E - Scripts.bsa" which contains all Enderal scripts. Here you go: So, is your point now that you are not allowed to change scripts that come with the base game????????????? HOW THE HELL SHOULD ANYONE BE ALLOWED TO MOD THEN?????? I'm shocked you're still even here ... I am shocked that you are able to write mods on your own with your obvious lack of comprehension. So, let's say I unpack the scripts of Skyrim (which is necessary as otherwise the CK will crash when adding new scripts) and use one of these original scripts for myself just to enhance a few functions.If that would be forbidden, why did Bethesda put the original PSC files into their script packages too? Simple answer: So modders can change these to their own preference. And it's the exact same thing I did with the original magicSoulTrapFXScript from Enderal. But let me make a short recap of my initial post for the special snowflake: Hey there, I currently want to mod some sort of "Azura's Star" for Enderal (Total Conversion of Skyrim).Yet as Enderal uses a scripted soul trap spell to avoid the well-known bug of soul gems loosing their filling I actually wanted to continue on that.This is me acknowledging that I am using the original Enderal script of magicSoulTrapFXScript. That's my current script for the magic effect Soul Trap.And here I tell that this is my current script as I already changed the original to my preferences ultimately having the script I previously posted in my mind. Do you spot the difference? The script in the first page already has a "Soulbender" property which the original Enderal script doesn't have. As that's my personal addition, ya know?!So after all, it should be very clear that I simply have enhanced the already existing script for Enderal as I nowhere said anything else!Got it?When I acknowledge that the script is based on the original Enderal script, then you will have a hard time explaining why this is 'pirating scripts'. And last but not least, how do you even think that mentioning the site owner benefits you in any way? If you really are that butthurt, that you want to bring the site owner into this, then I hope you fastened your seat belts as I reported you for "defamatory statement" and I just provided enough evidence to stand my case. Are we done with dick comparison now????? Or the "I wrote that by hand from scratch" line. What I and anyone else would take personal is being called a jackass and continuous low key insults at every re-re-re-post.I don't know if you asked Surfs, I don't know how Surfs got it. Who knows if Surfs had the right to give it to you. Clearly that is a rawde-compiled script. The script I wrote for JustChill was written from scratch. Because that was me who wrote that? Furthermore she is referencing the REFERENCE ALIAS SCRIPT not the MAGIC EFFECT SCRIPT here.You are absolutely unable to get a grip. I either wrote you a personal message, as I don't think you want to get yourself into further trouble in the public...Maybe you are manly enough to admit your mistake there? Link to comment Share on other sites More sharing options...
BigBizkit Posted February 18, 2020 Share Posted February 18, 2020 This is the pirated script from your 1st post ... (the one that set off the red flags). Anyone that knows anything about programming for Skyrim would tell you the same.You can talk till you're blue in the face and you're never gonna convince me what I'm looking at here isn't a de-complied script.Well, you're wrong. It is based on the magicsoultrapfxscript that comes with Enderal. That being said, you are clearly not interested in helping, so please refrain from posting in this thread as it only makes it harder for users who want to help. @JustChill @NexusComa Please consider using our block/ignore tools as no one benefits from the two of you continuing this argument. Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts