DavideMitra Posted April 17, 2017 Share Posted April 17, 2017 (edited) I'm looking for a clever and experienced scripter.I created a no-loading-screen medium-sized dungeon (aka a dungeon directly located in Tamriel Worldspace) that develops beneath Whiterun. The mod is almost finished, but I need someone who is able to create a script that, when you're inside of a trigger box - aka inside of the dungeon -, gets rid of the vampire's sunlight penalties (should the player be a vampire). Of course, when the player exits from the trigger box - aka goes back to the surface -, the sun penalties must be returned to the player.You don't have to create a script from scratch. I've already found some vanilla scripts that could do the work with some specific edits I'm not able to do. First of all, feel free to examine my project (pics included), so you can decide if it's worth to help me or not (I don't think somebody would help for a mod that he considers crap).If you'd like to help me with this particular and innovative mod (as I know, this is the first dungeon of its kind here in the Nexus), please post something in the linked topic.We can discuss about it. Best regards, DavideMitra OFFICIAL TOPIC:https://forums.nexusmods.com/index.php?/topic/5550617-no-loading-screen-dungeon-picspre-release-info/ A SINGLE PREVIEW PIC (for other pics, just look at the topic)http://i.imgur.com/rwuLvwV.jpg Edited April 17, 2017 by DavideMitra Link to comment Share on other sites More sharing options...
FrankFamily Posted April 17, 2017 Share Posted April 17, 2017 Some ideas: 1/ Add a global variable condition to the sun weakness spells that you can then modify from the trigger box enabling/disabling them at will. But it would open to incompatibilities and such since you need to touch the vanilla spells. 2/ If the player is a vampire and would receive sun penalties (based on hour) add an opposite effect that compensates the weakness. Won't compensate properly if the magnitudes are changed by another mod. 3/ Change game hour directly which is the conditions for sun weakness, I've never tried it but it's a global variable I guess you could modify to make sure within the cave it's always night and once you go outside it returns to the hour it would be if you hadn't touch it... with some math. This could have more consequences than intended if it actually works. 4/ Remove the sun weakness abilities (removespell) while on the cave and add the appropiate one once you exit based on stage that i think you can get from the vampire quest. Link to comment Share on other sites More sharing options...
DavideMitra Posted April 17, 2017 Author Share Posted April 17, 2017 (edited) Hi! Thanks for the reply! :cool: 1) I had an idea about global variables, but I don't know what's the correct variable to apply. Also, I don't know how to let it work along with my trigger box... 2) This is a good idea. If the scripter isn't able to remove the sun damage spells with the trigger box, he could add a counter effect like you said! 3) This isn't possible, because that global variable controls Climates (aka affects the sun cycle of an entire worldspace). Yes, theorically I could use Regions instead of Climates, but that global variable isn't able to control Regions.. Sigh! 4) You could be right, but I still need a clever scripter to perform that. Unfortunately, I'm not good with that kind of things Edited April 17, 2017 by DavideMitra Link to comment Share on other sites More sharing options...
Levionte Posted April 18, 2017 Share Posted April 18, 2017 (edited) Glancing through the CK entries, it looks like there are four different versions of the sun damage spell? If my memory serves me, I think your symptoms get worse as you go without blood? You could do some checks to find out which version the player has, remove it, and set probably a global variable to keep track of which one. Then, on the other end, you add the spell back depending on which variable you set. This requires you to make a Global Variable called VampSunDamageGlobal or whatever you want to name it: Event OnTriggerEnter(ObjectReference akTriggerRef) If akTriggerRef == PlayerRef If PlayerRef.HasSpell(VampireSunDamage01) PlayerRef.RemoveSpell(VampireSunDamage01) VampSunDamageGlobal.SetValue(1) ElseIf PlayerRef.HasSpell(VampireSunDamage02) PlayerRef.RemoveSpell(VampireSunDamage02) VampSunDamageGlobal.SetValue(2) ElseIf PlayerRef.HasSpell(VampireSunDamage03) PlayerRef.RemoveSpell(VampireSunDamage03) VampSunDamageGlobal.SetValue(3) ElseIf PlayerRef.HasSpell(VampireSunDamage04) PlayerRef.RemoveSpell(VampireSunDamage04) VampSunDamageGlobal.SetValue(4) Else Return EndIf EndIf EndEvent Actor Property PlayerRef Auto Spell Property VampireSunDamage01 Auto Spell Property VampireSunDamage02 Auto Spell Property VampireSunDamage03 Auto Spell Property VampireSunDamage04 Auto GlobalVariable Property VampSunDamageGlobal Auto Which makes the exit something like: Event OnTriggerLeave(ObjectReference akTriggerRef) If akTriggerRef == PlayerRef int SunD = VampSunDamageGlobal.GetValueInt() If SunD == 1 PlayerRef.AddSpell(VampireSunDamage01) ElseIf SunD == 2 PlayerRef.AddSpell(VampireSunDamage02) ElseIf SunD == 3 PlayerRef.AddSpell(VampireSunDamage03) ElseIf SunD == 4 PlayerRef.AddSpell(VampireSunDamage04) Else Return EndIf EndIf EndEvent Actor Property PlayerRef Auto Spell Property VampireSunDamage01 Auto Spell Property VampireSunDamage02 Auto Spell Property VampireSunDamage03 Auto Spell Property VampireSunDamage04 Auto GlobalVariable Property VampSunDamageGlobal Auto I don't know if adding and removing the spells would break the "without-blood" timer or anything else. Alternatively, the spells have a condition to be turned off during an eclipse, from Auriel's Bow I believe. It might be easier to just set the eclipse global to 1 and not touch the spells at all, then set it back to 0 when you're done. I don't like messing with vanilla stuff like that, but in this case it might be a better alternative. That would probably require Dawnguard as a master so you can change their global. Although, the above scripts might as well. I know Dawnguard makes changes to all the vampire stuff, including the sun damage. But I don't know in what ways they are changed. Adding a "Counter" would require making four spells that do exactly the opposite of the sun damage, then adding that spell to the player instead of removing the sun damage and vice versa on the exit. Edited April 18, 2017 by Levionte Link to comment Share on other sites More sharing options...
DavideMitra Posted April 18, 2017 Author Share Posted April 18, 2017 Glancing through the CK entries, it looks like there are four different versions of the sun damage spell? If my memory serves me, I think your symptoms get worse as you go without blood? You could do some checks to find out which version the player has, remove it, and set probably a global variable to keep track of which one. Then, on the other end, you add the spell back depending on which variable you set. This requires you to make a Global Variable called VampSunDamageGlobal or whatever you want to name it: Event OnTriggerEnter(ObjectReference akTriggerRef) If akTriggerRef == PlayerRef If PlayerRef.HasSpell(VampireSunDamage01) PlayerRef.RemoveSpell(VampireSunDamage01) VampSunDamageGlobal.SetValue(1) ElseIf PlayerRef.HasSpell(VampireSunDamage02) PlayerRef.RemoveSpell(VampireSunDamage02) VampSunDamageGlobal.SetValue(2) ElseIf PlayerRef.HasSpell(VampireSunDamage03) PlayerRef.RemoveSpell(VampireSunDamage03) VampSunDamageGlobal.SetValue(3) ElseIf PlayerRef.HasSpell(VampireSunDamage04) PlayerRef.RemoveSpell(VampireSunDamage04) VampSunDamageGlobal.SetValue(4) Else Return EndIf EndIf EndEvent Actor Property PlayerRef Auto Spell Property VampireSunDamage01 Auto Spell Property VampireSunDamage02 Auto Spell Property VampireSunDamage03 Auto Spell Property VampireSunDamage04 Auto GlobalVariable Property VampSunDamageGlobal Auto Which makes the exit something like: Event OnTriggerLeave(ObjectReference akTriggerRef) If akTriggerRef == PlayerRef int SunD = VampSunDamageGlobal.GetValueInt() If SunD == 1 PlayerRef.AddSpell(VampireSunDamage01) ElseIf SunD == 2 PlayerRef.AddSpell(VampireSunDamage02) ElseIf SunD == 3 PlayerRef.AddSpell(VampireSunDamage03) ElseIf SunD == 4 PlayerRef.AddSpell(VampireSunDamage04) Else Return EndIf EndIf EndEvent Actor Property PlayerRef Auto Spell Property VampireSunDamage01 Auto Spell Property VampireSunDamage02 Auto Spell Property VampireSunDamage03 Auto Spell Property VampireSunDamage04 Auto GlobalVariable Property VampSunDamageGlobal Auto I don't know if adding and removing the spells would break the "without-blood" timer or anything else. Alternatively, the spells have a condition to be turned off during an eclipse, from Auriel's Bow I believe. It might be easier to just set the eclipse global to 1 and not touch the spells at all, then set it back to 0 when you're done. I don't like messing with vanilla stuff like that, but in this case it might be a better alternative. That would probably require Dawnguard as a master so you can change their global. Although, the above scripts might as well. I know Dawnguard makes changes to all the vampire stuff, including the sun damage. But I don't know in what ways they are changed. Adding a "Counter" would require making four spells that do exactly the opposite of the sun damage, then adding that spell to the player instead of removing the sun damage and vice versa on the exit.Thank you for your help!! I created the global variable with the exact name you wrote. I created the second script and it should be fine. However, I can't create the first one! The Creation Kit allows me to write it, but when it tries to compile it (aka when I click ok) it crashes to desktop.What might be wrong? :-( Link to comment Share on other sites More sharing options...
FrankFamily Posted April 18, 2017 Share Posted April 18, 2017 That's two events of the same script not two separate scripts. EDIT: there is a potential issue with the removespell method if vampirism stage changes within the cave. Link to comment Share on other sites More sharing options...
DavideMitra Posted April 18, 2017 Author Share Posted April 18, 2017 (edited) That's two events of the same script not two separate scripts. EDIT: there is a potential issue with the removespell method if vampirism stage changes within the cave.I could try to add some spells that counters the sunlight damage one. The idea you explained to me yesterday.I think I might be able to do it by myself. I just have to create 4 new spells (I know how to do that) and to change some names inside of the Levionte's script. At least I think so. However, first of all I must understand how to force Levionte's script to work (because it doesn't work...my fault, of course). Only then I will proceed to edit it.This is the script I wrote in the CK (there are two events, so I just copied both events in a single script. Is that right or did I have to do something additional?!).I just assigned it to my giant trigger box. I added no properties because they already are inside of the script. Scriptname LevionteA extends ObjectReference Event OnTriggerEnter(ObjectReference akTriggerRef) If akTriggerRef == PlayerRef If PlayerRef.HasSpell(VampireSunDamage01) PlayerRef.RemoveSpell(VampireSunDamage01) VampSunDamageGlobal.SetValue(1) ElseIf PlayerRef.HasSpell(VampireSunDamage02) PlayerRef.RemoveSpell(VampireSunDamage02) VampSunDamageGlobal.SetValue(2) ElseIf PlayerRef.HasSpell(VampireSunDamage03) PlayerRef.RemoveSpell(VampireSunDamage03) VampSunDamageGlobal.SetValue(3) ElseIf PlayerRef.HasSpell(VampireSunDamage04) PlayerRef.RemoveSpell(VampireSunDamage04) VampSunDamageGlobal.SetValue(4) Else Return EndIf EndIf EndEvent Actor Property PlayerRef AutoSpell Property VampireSunDamage01 AutoSpell Property VampireSunDamage02 AutoSpell Property VampireSunDamage03 AutoSpell Property VampireSunDamage04 AutoGlobalVariable Property VampSunDamageGlobal Auto {Event OnTriggerLeave(ObjectReference akTriggerRef) If akTriggerRef == PlayerRef int SunD = VampSunDamageGlobal.GetValueInt() If SunD == 1 PlayerRef.AddSpell(VampireSunDamage01) ElseIf SunD == 2 PlayerRef.AddSpell(VampireSunDamage02) ElseIf SunD == 3 PlayerRef.AddSpell(VampireSunDamage03) ElseIf SunD == 4 PlayerRef.AddSpell(VampireSunDamage04) Else Return EndIf EndIf EndEvent Actor Property PlayerRef AutoSpell Property VampireSunDamage01 AutoSpell Property VampireSunDamage02 AutoSpell Property VampireSunDamage03 AutoSpell Property VampireSunDamage04 AutoGlobalVariable Property VampSunDamageGlobal Auto} What's wrong with it? Edited April 18, 2017 by DavideMitra Link to comment Share on other sites More sharing options...
FrankFamily Posted April 18, 2017 Share Posted April 18, 2017 Remove the "{" before "Event OnTriggerLeave" and "}" at the end. And you have the properties twice. Link to comment Share on other sites More sharing options...
DavideMitra Posted April 18, 2017 Author Share Posted April 18, 2017 Remove the "{" before "Event OnTriggerLeave" and "}" at the end. And you have the properties twice.Oh...thanks.I will try it.Now I must go to work. I will post a report about the script without those symbols. I hope it will work correctly! :cool: Link to comment Share on other sites More sharing options...
Levionte Posted April 18, 2017 Share Posted April 18, 2017 I added no properties because they already are inside of the script. You shouldn't need to add any properties, but you will need to fill them out. They should all auto-fill, except potentially the global variable depending on what you named it. Link to comment Share on other sites More sharing options...
Recommended Posts