Jump to content

ArronDominion

Premium Member
  • Posts

    250
  • Joined

  • Last visited

Posts posted by ArronDominion

  1. GameFront being one of the original sites (back when they were FileFront), I was figuring something like this would happen eventually. Remember when they were one of the few big names on the block before Nexus really came into its own. They are great people, and keeping the peace between the sites is a good thing to help bridge the communities.
  2. The reason this guy is pushing vidme so hard is because his youtube account has been banned, https://www.youtube.com/channel/UCs6RGhIXb1FfZOjntqs7jzg

     

    This is what it reads on his old YT channel.

    "This account has been terminated because we received multiple third-party claims of copyright infringement regarding material the user posted."

    The Nexus staff works hard to keep copyright claims to a minimum so why in the world would they be willing to open the gates to allow copyright violators to post vidme videos all over their site?

     

    Comes back with a "This channel does not exist." page.

  3. I think it is a good idea to allow for more avenues for sharing a mod author's work. For those who are not established modders, they need as much visibility as possible. If Vidme can help a modder out, than that option should be available (even if it is just a link container that can be inserted into a Mod's Description).

     

    Youtube and Vidme can coexist as options, as well as Vimeo, DailyMotion, Veoh, Metacafe, or any new video sharing options. If there is a substantial user base using Vidme, then it makes sense to provide it as an option. If there isn't a substantial enough base, then some sort of guide for those wanting to link non-Youtube trailers for their content.

     

    In short, my vote is "Yes"

  4. Classic ASP (not ASP.NET) is being phased out if I remember correctly. This could probably be reworked to use a combo of HTML5/JavaScript (could utilize PHP/Ruby/other higher level languages if desired), and a MySQL backend (to replace the MS Access use) if it was desired to keep it in a web format.

  5. I changed the quest containing the scene to a Start Game Enabled Quest, and it has the flags Run Once and Warn On Alias failure enabled. The quest has a single alias for the AJDBTEyebotMessenger NPC, and it is set to UniqueActor | Not Optional | Allow Reuse in Quest

     

    In stage 0 of the quest, I have the Run on start? checked, and in the Papyrus Fragment section I have the following call:

    (AJDBTDialogueController as AJDBTDialogueControllerQuestScript).RegisterGameTime()
    
    

    Here is the quest script that I am using:

     

     

    Scriptname AJDBTDialogueControllerQuestScript extends Quest
    {This script controls when to start the required scene.}
    
    Actor Property AJDBTEyebotMessenger Auto Const
    
    Actor Property AJDBTVaultTecOperative Auto Const
    
    ObjectReference Property AJDBTVault111Marker Auto Const
    
    Actor[] Property AJDBTRaiders Auto
    
    Actor Property AJDBTLvlRaider Auto Const
    
    ObjectReference Property AJDBTDiamondCityEntrance Auto Const
    
    ObjectReference Property AJDBTDiamondCitySceneStartMarker Auto Const
    
    Quest Property AJDBTDialogueController Auto Const
    
    Quest Property AJDBTQuestForTheVaultTecHomebrew Auto Const
    
    Scene Property AJDBTDialogueControllerEyebotScene Auto Const
    
    Event OnTimerGameTime(int aiTimerID)
    		;Ensure that the scene has not been done before
    		if (AJDBTDialogueController.GetStage() < 1)
    			;Verify the distance
    			Actor Player = Game.GetPlayer()
    			
    			If ((AJDBTDiamondCitySceneStartMarker.GetDistance(Game.GetPlayer()) <= 1000.0))
    				;Force first person
    				Game.ForceFirstPerson()
    				
    				;Disable player controls
    				InputEnableLayer myLayer = InputEnableLayer.Create()
    				myLayer.DisablePlayerControls(true, true, false, true, true, true, true, true, true, true, true)
    				
    				;Give a notification that controls have been disabled
    				Game.ShakeController(0.75, 0.75, 2)
    				
    				;Move the eyebot
    				AJDBTEyebotMessenger.Enable()
    				AJDBTEyebotMessenger.MoveTo(AJDBTDiamondCityEntrance)
    				
    				;Move everything else to kill each other in Vault 111
    				AJDBTVaultTecOperative.Enable()
    				AJDBTVaultTecOperative.MoveTo(AJDBTVault111Marker)
    				AJDBTLvlRaider.Enable()
    				
    				;Figure out how many raiders to move to Vault | 2 by default
    				If (Player.GetLevel() < 10)
    					AJDBTVault111Marker.PlaceAtMe(AJDBTLvlRaider, 2)
    				ElseIf (Player.GetLevel() < 20)
    					AJDBTVault111Marker.PlaceAtMe(AJDBTLvlRaider, 3)
    				ElseIf (Player.GetLevel() < 30)
    					AJDBTVault111Marker.PlaceAtMe(AJDBTLvlRaider, 4)
    				ElseIf (Player.GetLevel() < 40)
    					AJDBTVault111Marker.PlaceAtMe(AJDBTLvlRaider, 5)
    				ElseIf (Player.GetLevel() < 50)
    					AJDBTVault111Marker.PlaceAtMe(AJDBTLvlRaider, 6)
    				ElseIf (Player.GetLevel() < 60)
    					AJDBTVault111Marker.PlaceAtMe(AJDBTLvlRaider, 7)
    				Else
    					AJDBTVault111Marker.PlaceAtMe(AJDBTLvlRaider, 9)
    				EndIf	
    			
    				;Start the Scene
    				AJDBTDialogueControllerEyebotScene.ForceStart()
    			Else
    				;Re-register the timer
    				StartTimerGameTime(0.033)
    			EndIf
    		Else
    			
    		EndIf
    EndEvent
    
    Function RegisterGameTime()
    	StartTimerGameTime(0.033)
    EndFunction
    
    Function HandleSceneEnd()
    	;Re-enable player controls
    	InputEnableLayer myLayer = InputEnableLayer.Create()
    	myLayer.EnablePlayerControls()
    	
    	;Remove the Eyebot...goodbye dear F.H.A.M.M.
    	AJDBTEyebotMessenger.MoveTo(AJDBTLogicCellMarker)
    	AJDBTEyebotMessenger.Disable()
    
    	;Start the quest
    	AJDBTQuestForTheVaultTecHomebrew.Start()
    	
    	AJDBTQuestForTheVaultTecHomebrew.SetStage(10)
    	AJDBTQuestForTheVaultTecHomebrew.SetObjectiveDisplayed(10)
    EndFunction
    
    
    
    ObjectReference Property AJDBTLogicCellMarker Auto Const
    
    

     

     

     

    None of the actions contained within the distance segment of the IF...ELSE are firing. Am I screwing something up in setting up the quest, or is there an accepted practice I should be trying instead for setting up a quest with dialogue?

  6.  

    The issue is likely that the player is further away than 250 from that marker and if that's the case your OnTimer exits and never registers itself again. The fix will be adding an else statement after your GetDistance call and calling

    StartTimerGameTime(0.033)

    in the else statement.

     

    Fixed code:

    Scriptname AJDBTInitQuestController extends ObjectReference
    
    Quest Property AJDBTQuestForTheVaultTecHomebrew Auto
    
    Event OnInit()
        ;Game.GetPlayer().AddItem(AJDBTHolotape, 1)
    
        StartTimerGameTime(1)
    
    EndEvent
    
    Event OnTimerGameTime(int aiTimerID)
        if (AJDBTQuestForTheVaultTecHomebrew != None)
            ;Determine if we need to startup our Dialogue Controller
            if (!AJDBTDialogueController.IsRunning())
                AJDBTDialogueController.Start()
    
                While (AJDBTDialogueController.IsStarting())
                    ;Spin
                EndWhile
            EndIf
    
            ;Ensure that the scene has not been done before
            if (AJDBTDialogueController.GetStage() < 1)
                ;Verify the distance
                Actor Player = Game.GetPlayer()
                
                If ((AJDBTDiamondCitySceneStartMarker.GetDistance(Game.GetPlayer()) <= 250.0))
                    ;Force first person
                    Game.ForceFirstPerson()
                    
                    ;Disable player controls
                    InputEnableLayer myLayer = InputEnableLayer.Create()
                    myLayer.DisablePlayerControls(true, true, false, true, true, true, true, true, true, true, true)
                    
                    ;Give a notification that controls have been disabled
                    Game.ShakeController(0.75, 0.75, 2)
                    
                    ;Move the eyebot
                    AJDBTEyebotMessenger.Enable()
                    AJDBTEyebotMessenger.MoveTo(AJDBTDiamondCityEntrance)
                    
                    ;Move everything else to kill each other in Vault 111
                    AJDBTVaultTecRoboticOperative.Enable()
                    AJDBTVaultTecRoboticOperative.MoveTo(AJDBTVault111Marker)
                    AJDBTLvlRaider.Enable()
                    
                    ;Figure out how many raiders to move to Vault | 2 by default
                    If (Player.GetLevel() < 10)
                        AJDBTVault111Marker.PlaceAtMe(AJDBTLvlRaider, 2)
                    ElseIf (Player.GetLevel() < 20)
                        AJDBTVault111Marker.PlaceAtMe(AJDBTLvlRaider, 3)
                    ElseIf (Player.GetLevel() < 30)
                        AJDBTVault111Marker.PlaceAtMe(AJDBTLvlRaider, 4)
                    ElseIf (Player.GetLevel() < 40)
                        AJDBTVault111Marker.PlaceAtMe(AJDBTLvlRaider, 5)
                    ElseIf (Player.GetLevel() < 50)
                        AJDBTVault111Marker.PlaceAtMe(AJDBTLvlRaider, 6)
                    ElseIf (Player.GetLevel() < 60)
                        AJDBTVault111Marker.PlaceAtMe(AJDBTLvlRaider, 7)
                    Else
                        AJDBTVault111Marker.PlaceAtMe(AJDBTLvlRaider, 9)
                    EndIf    
                
                    ;Start the Scene
                    AJDBTDialogueControllerEyebotScene.ForceStart()
                else
                    ;Re-register the timer  
                    StartTimerGameTime(0.033)
               endif
            Else
                ;Re-register the timer
                StartTimerGameTime(0.033)
            EndIf
        else
            ;Cancel our timer for sure
            CancelTimerGameTime()
        EndIf
    
    EndEvent
    Actor Property AJDBTVaultTecRoboticOperative Auto
    
    Holotape Property AJDBTHolotape Auto
    
    Actor Property AJDBTEyebotMessenger Auto Const
    
    Quest Property AJDBTDialogueController Auto Const
    
    Actor Property AJDBTLvlRaider Auto Const
    
    Scene Property AJDBTDialogueControllerEyebotScene Auto Const
    
    ObjectReference Property AJDBTDiamondCityEntrance Auto Const
    
    ObjectReference Property AJDBTDiamondCitySceneStartMarker Auto Const
    
    ObjectReference Property AJDBTLogicCellMarker Auto Const
    
    ObjectReference Property AJDBTVault111Marker Auto Const
    

     

    Doh! I missed that when I was going over the script. I have added the missing Else for the re-register of the timer and decided for testing's sake to increase the distance from 250 to 1000. The results are not any different.

     

    I decided to go a step further and add a Debug message in the OnInit with the message not firing. I have this script attached to a random static inside of a cell that the player will never reach. Are scripts not fired in this scenario for Fallout 4?

  7. Hello everyone,

     

    I am more used to Skyrim than Fallout 4 in terms of scripting, and am running into a roadblock anytime I picked up the Fallout 4 Creation Kit for scripting. I am attempting to make a small quest mod where the player runs into Diamond City, and is greeted by a messenger bot with a message to go back to Vault 111.

     

    I have a logic cell setup with the required NPCs, and have an object reference in the cell with the following script:

     

     

     

    Scriptname AJDBTInitQuestController extends ObjectReference
    
    Quest Property AJDBTQuestForTheVaultTecHomebrew Auto
    
    Event OnInit()
    	;Game.GetPlayer().AddItem(AJDBTHolotape, 1)
    
    	StartTimerGameTime(1)
    
    EndEvent
    
    Event OnTimerGameTime(int aiTimerID)
    	if (AJDBTQuestForTheVaultTecHomebrew != None)
    		;Determine if we need to startup our Dialogue Controller
    		if (!AJDBTDialogueController.IsRunning())
    			AJDBTDialogueController.Start()
    
    			While (AJDBTDialogueController.IsStarting())
    				;Spin
    			EndWhile
    		EndIf
    
    		;Ensure that the scene has not been done before
    		if (AJDBTDialogueController.GetStage() < 1)
    			;Verify the distance
    			Actor Player = Game.GetPlayer()
    			
    			If ((AJDBTDiamondCitySceneStartMarker.GetDistance(Game.GetPlayer()) <= 250.0))
    				;Force first person
    				Game.ForceFirstPerson()
    				
    				;Disable player controls
    				InputEnableLayer myLayer = InputEnableLayer.Create()
    				myLayer.DisablePlayerControls(true, true, false, true, true, true, true, true, true, true, true)
    				
    				;Give a notification that controls have been disabled
    				Game.ShakeController(0.75, 0.75, 2)
    				
    				;Move the eyebot
    				AJDBTEyebotMessenger.Enable()
    				AJDBTEyebotMessenger.MoveTo(AJDBTDiamondCityEntrance)
    				
    				;Move everything else to kill each other in Vault 111
    				AJDBTVaultTecRoboticOperative.Enable()
    				AJDBTVaultTecRoboticOperative.MoveTo(AJDBTVault111Marker)
    				AJDBTLvlRaider.Enable()
    				
    				;Figure out how many raiders to move to Vault | 2 by default
    				If (Player.GetLevel() < 10)
    					AJDBTVault111Marker.PlaceAtMe(AJDBTLvlRaider, 2)
    				ElseIf (Player.GetLevel() < 20)
    					AJDBTVault111Marker.PlaceAtMe(AJDBTLvlRaider, 3)
    				ElseIf (Player.GetLevel() < 30)
    					AJDBTVault111Marker.PlaceAtMe(AJDBTLvlRaider, 4)
    				ElseIf (Player.GetLevel() < 40)
    					AJDBTVault111Marker.PlaceAtMe(AJDBTLvlRaider, 5)
    				ElseIf (Player.GetLevel() < 50)
    					AJDBTVault111Marker.PlaceAtMe(AJDBTLvlRaider, 6)
    				ElseIf (Player.GetLevel() < 60)
    					AJDBTVault111Marker.PlaceAtMe(AJDBTLvlRaider, 7)
    				Else
    					AJDBTVault111Marker.PlaceAtMe(AJDBTLvlRaider, 9)
    				EndIf	
    			
    				;Start the Scene
    				AJDBTDialogueControllerEyebotScene.ForceStart()
    			EndIf
    		Else
    			;Re-register the timer
    			StartTimerGameTime(0.033)
    		EndIf
    	else
    		;Cancel our timer for sure
    		CancelTimerGameTime()
    	EndIf
    
    EndEvent
    Actor Property AJDBTVaultTecRoboticOperative Auto
    
    Holotape Property AJDBTHolotape Auto
    
    Actor Property AJDBTEyebotMessenger Auto Const
    
    Quest Property AJDBTDialogueController Auto Const
    
    Actor Property AJDBTLvlRaider Auto Const
    
    Scene Property AJDBTDialogueControllerEyebotScene Auto Const
    
    ObjectReference Property AJDBTDiamondCityEntrance Auto Const
    
    ObjectReference Property AJDBTDiamondCitySceneStartMarker Auto Const
    
    ObjectReference Property AJDBTLogicCellMarker Auto Const
    
    ObjectReference Property AJDBTVault111Marker Auto Const
    
    

     

     

     

    On my existing save (clean of mods), I go to the Diamond City location which is designed to trigger the quest after fast traveling from Far Harbor, but nothing is happening. Is there something I should be doing something different in the Fallout 4 scripting environment?

  8. Hello shayferal,

     

    Which game are you wanting to create a new actor value for?

     

    This is what the wiki has for Skyrim :

    https://www.creationkit.com/index.php?title=Actor_Value

     

    And here is what Fallout 4 has:

    https://www.creationkit.com/fallout4/index.php?title=Actor_Value

     

    Fallout 4 mentions being able to create custom ones, but I have not seen that for Skyrim so far. Might be able to utilize formlists or arrays to keep track of custom values you want to associate with a NPC

  9. I am a busy modder, but I try to take time to help out other modders that message me. I also in my spare time (very little now) make tutorial videos. I have been really slow with putting out videos lately, but will place several links for those looking for some tutorials, mostly scripting related.

     

    Skyrim Creation Kit Scripting Series: Papyrus Tutorials (complete playlist automatically updated): https://www.youtube.com/playlist?list=PLrN7sXqWQOBPyalkASaFwoVgNnAZOasEx

    Skyrim Creation Kit Scripting Series: Papyrus Tutorials - Variables Unit: https://www.youtube.com/playlist?list=PLrN7sXqWQOBNdVMivGkGl0vKuM8lRNsDq

    Skyrim Creation Kit Scripting Series: Papyrus Tutorials - Events/Functions Unit (work in progress | just finished global functions): https://www.youtube.com/playlist?list=PLrN7sXqWQOBPVRNKPBBFl9aTjOtuL4uWK

    Skyrim Creation Kit Tutorials (mostly requests for non-scripting items, but might contain a mix in the future): https://www.youtube.com/playlist?list=PLrN7sXqWQOBMfVTMlW-U5trsC7LRbjkbL

     

    Will post other playlists as they prop-up. The events/functions that I have been stewing on for a bit is nearly finished, so objects will be afterwards.

  10. Hello Everyone,

     

    I have started looking at holotapes for the current mod I am making, and am making no headway on getting the audio to play.

     

    In an effort to not affect other mods, I created my own quest for the holotapes that I will be using. I set it up as start game enabled, and added a scene with a single radio action in the first phase. I have generated a SEQ file for the dialogue.

     

    I have setup an actor for the purpose of the holotape, and I recorded my dialogue in Audacity (Mono, 16-bit PCM, and have tried both 44100 and 48000 Hz). When I play the holotape from the inventory I only have the sound of the tape starting and ending, with no dialogue heard.

     

    Did I do something wrong with the Audacity recording? Do I need to scrap that recording and go with recording it via the Creation Kit?

  11. In the learning stage, it is ok to open the modding tools not as often as the game you are attempting to mod. It is good to have a balance between your irl load, modding load, and just having fun. Don't force yourself into it or you will cause burnout faster, and find something that isn't creative for a bit (such as playing a game).

  12. I looked at FO4Edit and compared it with the vanilla Workshop terminal. The only difference I saw readily was that I had no preview transform, and proceeded to add one. I am still at the same point though.

     

    Is there a particular row I need to look at?:

    https://www.dropbox.com/s/mglo9768f1wh5hl/ajdtbuildableterminal_fo4edit_screen1.png?dl=0

     

    https://www.dropbox.com/s/seo17fw406rid9k/ajdtbuildableterminal_fo4edit_screen2.png?dl=0

  13. None of those commands seem to be affecting it in-game. I decided to take your suggestion and turned it into a script:

    Scriptname AJDTerminalInitScript extends ObjectReference Const
    {Author: Arron Dominion
    Contents:  A script to control behavior when spawned.}
    
    
    Event OnInit()
    	self.SetAngle(0,0,0)
    	float currX = self.GetPositionX()
    	float currY = self.GetPositionY()
    	float currZ = self.GetPositionZ()
    
    	float newZ = currZ + 5
    
    	self.SetPosition(currX,currY,newZ)
    EndEvent
    

    https://www.dropbox.com/s/jdicgv6sjdk4234/ajdtbuildableterminal_scriptforinitevent.png?dl=0

     

    No dice on the script route either.

  14. Hello Nexus,

     

    I have been playing around with the Fallout 4 Creation Kit a little (have little free time unfortunately), and was wanting to make more terminal options for placeable settlement.

     

    I have the terminal in the build menu, but when it is placed, there is not interaction dialogue when near the terminal.

     

    Here is what I have on the constructable object:

    https://www.dropbox.com/s/wmm9mvy3ft2a7tw/ajdtbuildableterminalcorded_constructableobjectforterminal.png?dl=0

     

    And here is what I have for the terminal itself:

    https://www.dropbox.com/s/jikwizm4eq1oqbf/ajdtbuildableterminal_terminalsetup_withchanges.png?dl=0

     

    And here is what it acts like in game:

    https://www.dropbox.com/s/t369yvqwo4e5p6j/20160501114808_1.jpg?dl=0

     

    https://www.dropbox.com/s/dz9kmssq2vrb3ru/20160501112143_1.jpg?dl=0

     

    https://www.dropbox.com/s/mfaxn8szfc4lckj/problemchild.jpg?dl=0

     

     

    Someone on the Bethesda mentioned interaction markers, which I believe I have added...but I am missing something. Anyone know what I might be doing wrong?

  15. Hello Everyone,

     

    Earlier this year I started a tutorial series for those wanting to learn about scripting mechanics. I stopped because I started getting busy with work, and now I am starting from where I left off, in the middle of the Array segment in the Events/Functions unit.

     

    This is the running playlist for the entire series: https://www.youtube.com/playlist?list=PLrN7sXqWQOBPyalkASaFwoVgNnAZOasEx

    Here is the playlist for the complete unit on Variables: https://www.youtube.com/playlist?list=PLrN7sXqWQOBNdVMivGkGl0vKuM8lRNsDq

    And here is the playlist for the Events/Functions: https://www.youtube.com/playlist?list=PLrN7sXqWQOBPVRNKPBBFl9aTjOtuL4uWK

     

    My goal is to do at least one week.

  16. Hello, so I setup a Force Greet in my mod with lots of tutorials and awesome help from skinnytecboy. The catch is that it only worked for the save I normally play around with and not for any other save file. I have been tweaking since then and it is now in a non-working state.

     

    Steps I have taken:

    -Assigned the force greet package to the NPC themselves in addition to the Quest Alias.

    -Create a new scene that is started. Has zero phases to it. It is only there for the purpose of potentially facilitating the force greet.

    -Changing the branch containing the force greet and linked topics from Normal to Top-Level to Blocking back to Normal

    -Verified that the Quest's Story Manager event is receiving the keyword to start the quest (at least I am making that assumption since there is only one quest that uses the keyword after using the SendAndWait())

     

    This particular quest was setup with Stages 0, 10, 11, 12, 13, 14, 15, 20, and 30. Currently only 0-20 are in use. 11-15 are used for a home tour scene I setup. Currently only have two Quest Aliases, AJDSCHDidonericGuerdAlias (the actor utilized in both Quest scenes), and AJDSCHLoveInterest for a future attempt to have tailored dialogue responses for Didoneric towards the player's spouse.

     

    Properties of the Didoneric alias are Unique Actor (AJDSCHDidonericGuerd), Allow Reuse, and AJDSCHDidonericGuerdForceGreet package.

     

    There are two dialogue views (only one has been setup, the other one will be used for a future scene at the end of a different quest). The first dialogue view has three branches. The first branch contains the dialogue for the Force Greet scene, the second branch contains the dialogue for the tour scene, and the third contains normal player-NPC interactions.

     

    ----

     

    The scene that hypothetically is being used to trigger the force greet is started upon the first transport to a particular area. Below is the script for this:

     

     

    Scriptname AJDSCHHiddenTowerTeleportScript extends ObjectReference  
    
    ObjectReference Property HiddenSpotRef  Auto  
    
    Event OnActivate(ObjectReference akActionRef)
        ;Transport to the spot
        Game.GetPlayer().MoveTo(HiddenSpotRef)
        Game.EnableFastTravel()
        Game.FastTravel(HiddenSpotRef)
    
        if (AJDSCHInvestigateLair.IsRunning() == false)
            AJDSCHInvestigateLair.Start()
            AJDSCHDidonericGuerdDialogueKeyword.SendStoryEvent()
            Game.ForceFirstPerson()
            Game.DisablePlayerControls(true, true, true, false, false, false, false)
            AJDSCHDidonericGuerdInitialMeetingScene.Start()
        EndIf
    EndEvent
    Quest Property AJDSCHInvestigateLair  Auto  
    
    Actor Property AJDSCHDidonericGuerd  Auto  
    
    Keyword Property AJDSCHDidonericGuerdDialogueKeyword  Auto  
    
    Scene Property AJDSCHDidonericGuerdInitialMeetingScene  Auto 

     

    --------

     

    Here is the expected behavior:

    https://youtu.be/R4HXTAioUB8?t=1m11s

     

    And the current behavior is that the NPC is just standing in place without moving.

     

    Any assistance on how I should proceed on troubleshooting this would be appreciated.

  17. I figured out what was going on in the original scripts. The scripts themselves were setup properly. My problem stemmed from the Property for the GeneratorState not being set on the Light Switch scripts. The lights are now having correct behavior when the generator is on compared to when it is off. Thanks for the help though, I will keep that in mind when I do a similar setup in the future.

  18. So each set of lights have their own global variable representing a switch state. With multiple switches, they don't care what the other one's pushed state is as it only checks what the global has been set to at the current time. After the fact I added a global for the generator state and integrated it into the light switches. Current behavior for the switches is that they turn on/off when expected regardless which particular switch was used.

     

    The point of failure is when the switch for the generator, the 2nd script, is fired, the lights that are currently set to on will not shut off due to the generator state. The generator switch is in a cell called AJDSCHSoulCairnHomeHiddenGenerator while the light switches are in AJDSCHSoulCairnHomeHiddenCave and AJDSCHSoulCairnHomeHiddenFarm.

     

    The reason for the complexity in the generator activation script is that there is a quest (not implemented, but the mechanics are there) where the player will have to go through the process of trouble shooting the generator and reactivate it. The components for this reactivation is turning on the flow, turning on the substations, and turning on the flow (hence the total of 5 mentioned in the activation portion).

     

    The goal of that generator switch is to change it's active state, and remotely toggle a LightSwitch that will call ToggleLights in some shape or form, and turn on/off remotely based on the generator state and what the global for the light activation state for the particular set of lights is set.

  19. I started look at Skyrim modding again, and got back to my Soul Cairn house mod additions that I was 80% done with. Bear with me as this is a complex system.

     

    Individual Light Switches

    In this, I created light switches in several cells, each containing ObjectReferences to the individual light objects. When the switches are used it will turn off/on the lights based on the current global storing their light state. A global is in use since the state is referred to by multiple scripts, as there can be more than one light switch for a given set of lights.

     

    Below is an example of the scripts I am using for the individual light switches:

    Entrance:

     

     

    Scriptname AJDSCHEntranceLightSwitchScript extends ObjectReference  
    
    GlobalVariable Property AJDSCHEntranceLightSwitchState  Auto  
    
    ObjectReference Property AJDSCHEntranceLight1  Auto  
    ObjectReference Property AJDSCHEntranceLight2  Auto  
    ObjectReference Property AJDSCHEntranceLight3  Auto  
    ObjectReference Property AJDSCHEntranceLight4  Auto  
    ObjectReference Property AJDSCHEntranceLight5  Auto  
    ObjectReference Property AJDSCHEntranceLight6  Auto  
    ObjectReference Property AJDSCHEntranceLight7  Auto  
    ObjectReference Property AJDSCHEntranceLight8  Auto  
    ObjectReference Property AJDSCHEntranceLight9  Auto  
    ObjectReference Property AJDSCHEntranceLight10  Auto  
    ObjectReference Property AJDSCHEntranceLight11  Auto  
    ObjectReference Property AJDSCHEntranceLight12  Auto  
    
    GlobalVariable Property AJDSCHGeneratorState Auto
    
    ;Light Switch State is default to off
    
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;Inputs: None
    ;
    ;The purpose of this function is to be called from an external script to retoggle the lights
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    Function ToggleLights()
    	;Checks to see if the light switch state is set to On 
    	If(((AJDSCHEntranceLightSwitchState.GetValue() as Int) == 1) && ((AJDSCHGeneratorState.GetValue() as Int) < 1))
    		TurnLightsOn()
    	Else
    		TurnLightsOff()
    	EndIf
    EndFunction
    
    Function TurnLightsOn()
    	AJDSCHEntranceLight1.Enable()  
    	AJDSCHEntranceLight2.Enable()  
    	AJDSCHEntranceLight3.Enable()  
    	AJDSCHEntranceLight4.Enable()  
    	AJDSCHEntranceLight5.Enable()  
    	AJDSCHEntranceLight6.Enable()  
    	AJDSCHEntranceLight7.Enable()  
    	AJDSCHEntranceLight8.Enable()  
    	AJDSCHEntranceLight9.Enable()  
    	AJDSCHEntranceLight10.Enable()  
    	AJDSCHEntranceLight11.Enable()  
    	AJDSCHEntranceLight12.Enable() 
    EndFunction
    
    Function TurnLightsOff()
    	AJDSCHEntranceLight1.Disable()  
    	AJDSCHEntranceLight2.Disable()  
    	AJDSCHEntranceLight3.Disable()  
    	AJDSCHEntranceLight4.Disable()  
    	AJDSCHEntranceLight5.Disable()  
    	AJDSCHEntranceLight6.Disable()  
    	AJDSCHEntranceLight7.Disable()  
    	AJDSCHEntranceLight8.Disable()  
    	AJDSCHEntranceLight9.Disable()  
    	AJDSCHEntranceLight10.Disable()  
    	AJDSCHEntranceLight11.Disable()  
    	AJDSCHEntranceLight12.Disable()  
    EndFunction
    
    Event OnActivate(ObjectReference akActivator)
    	int temp = 0
    	temp = (AJDSCHEntranceLightSwitchState.GetValue() as int)
    	;Performs check if lights are off first
    	if (temp == 0 && ((AJDSCHGeneratorState.GetValue() as int) < 1))
    		;Turn on the lights
    		TurnLightsOn()
    		;Set the light switch state to on
    		AJDSCHEntranceLightSwitchState.SetValue(1)
    	elseif(temp == 0 && ((AJDSCHGeneratorState.GetValue() as int) > 0))	
    		AJDSCHEntranceLightSwitchState.SetValue(1)
    	else
    		;Turn off the lights
    		TurnLightsOff()
    		;Set the light switch state to off
    		AJDSCHEntranceLightSwitchState.SetValue(0)
    	endif
    EndEvent
    

     

     

     

    Generator

    There is a room which houses a Geothermal generator. The default Generator state is On. At some point the generator is flipped to off. The goal is for the generator state to control the lights in all cells.

     

    Below is the generator script:

    Generator:

     

     

    Scriptname AJDSCHGeneratorOperationsScript extends ObjectReference  
    
    Message Property AJDSCHGeneratorCheckIndicator  Auto  
    Message Property AJDSCHGeneratorCheckManual  Auto  
    Message Property AJDSCHGeneratorOnline  Auto  
    {Messages displayed throughout the process.  CheckIndicator is used when some indicators are on and some are off.  CheckManual is used when all indicators are off.  Online is when it is turned on.}
    
    GlobalVariable Property AJDSCHGeneratorFlowState  Auto  
    GlobalVariable Property AJDSCHGeneratorPowerStation01State  Auto  
    GlobalVariable Property AJDSCHGeneratorPowerStation02State  Auto  
    GlobalVariable Property AJDSCHGeneratorState  Auto  
    GlobalVariable Property AJDSCHGeneratorTurbine01State  Auto  
    GlobalVariable Property AJDSCHGeneratorTurbine02State  Auto  
    {Variables that are linked to the overall state of the generator.}
    
    ObjectReference Property GeneratorGemOff  Auto  
    ObjectReference Property GeneratorGemOn  Auto  
    {The physical core gems.}
    
    ObjectReference[] Property AJDSCHDwemerLightButtonsArray  Auto  
    {The array storing all of the lights}
    
    ;;;;;;;;;;;;;;;;;;
    ;Generator state is set to offline when it is 1, and 0 means it is online
    ;;;;;;;;;;;;;;;;;;
    
    Event OnActivate(ObjectReference akActivator)
    	;Assigns the globals to temporary variables for ease of access
    	int flowState = (AJDSCHGeneratorFlowState.GetValue() as int)
    	int power01State = (AJDSCHGeneratorPowerStation01State.GetValue() as int)
    	int power02State = (AJDSCHGeneratorPowerStation02State.GetValue() as int)
    	int turbine01State = (AJDSCHGeneratorTurbine01State.GetValue() as int)
    	int turbine02State = (AJDSCHGeneratorTurbine02State.GetValue() as int)
    	int generatorState = (AJDSCHGeneratorState.GetValue() as int)
    	
    	;Assigns a total to all non-overall states.  If all are on, should add up to 5
    	int total = flowState + power01State + power02State + turbine01State + turbine02State
    	
    	;For the gem rotation
    	float neutralPosition = 0.0
    	float neutralAngle = 0.0
    	float rotationAngle = GeneratorGemOff.GetAngleZ() + 45.0
    	float speed = 30.0
    	
    	float PosX = GeneratorGemOff.GetPositionX()
    	float PosY = GeneratorGemOff.GetPositionY()
    	float PosZ = GeneratorGemOff.GetPositionZ()
    	float AngleX = GeneratorGemOff.GetAngleX()
    	float AngleY = GeneratorGemOff.GetAngleY()
    	
    	;Checks to see if none of them are online
    	if (total < 1)
    		;Shows the message when no indicators are on
    		AJDSCHGeneratorCheckManual.Show()
    	;Checks to see if some of the non-overall states are set to online	
    	elseif (total < 5)
    		;Shows the message when some indicators need to be set to online
    		AJDSCHGeneratorCheckIndicator.Show()
    	;Everything is good to go and the generator is offline	
    	elseif (generatorState == 1)
    		;Change the Generator State
    		AJDSCHGeneratorState.SetValue(0)
    		;Change the power gems
    		GeneratorGemOff.Disable()
    		GeneratorGemOn.Enable()
    		;Starts the rotation of the gems
    	GeneratorGemOff.TranslateTo(PosX, PosY, PosZ, AngleX, AngleY, rotationAngle, speed)
    	GeneratorGemOn.TranslateTo(PosX, PosY, PosZ, AngleX, AngleY, rotationAngle, speed)
    		;Turn on the lights
    		DealWithTheLights()
    		;Calls for future gem rotations
    		RegisterForUpdate(1.0)
    		;Shows the generator online message
    		
    	;In the event someone wants to turn off the generator
    	else
    		;Change the Generator State
    		AJDSCHGeneratorState.SetValue(1)
    		;Change the power gems
    		GeneratorGemOn.Disable()
    		GeneratorGemOff.Enable()
    		;Disables gem rotation
    		UnregisterForUpdate()
    		;Turn off the lights
    		DealWithTheLights()
    	endif
    EndEvent
    
    Event OnUpdate()
    	;variables for rotation
    	float neutralPosition = 0.0
    	float neutralAngle = 0.0
    	float rotationAngle = GeneratorGemOff.GetAngleZ() + 45.0
    	float speed = 30.0
    	
    	float PosX = GeneratorGemOff.GetPositionX()
    	float PosY = GeneratorGemOff.GetPositionY()
    	float PosZ = GeneratorGemOff.GetPositionZ()
    	float AngleX = GeneratorGemOff.GetAngleX()
    	float AngleY = GeneratorGemOff.GetAngleY()
    	
    	;Checks to see if rotation angle is above 360.0
    	if (rotationAngle > 360.0)
    		rotationAngle = 0+45.0
    	endif
    
    	;Does the rotation
    	GeneratorGemOff.TranslateTo(PosX, PosY, PosZ, AngleX, AngleY, rotationAngle, speed)
    	GeneratorGemOn.TranslateTo(PosX, PosY, PosZ, AngleX, AngleY, rotationAngle, speed)
    EndEvent
    
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;Inputs: None
    ;
    ;The purpose of this function is to go through and either turn off or turn on the lights
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    Function DealWithTheLights()
    
    	;Goes through each element of the array and calls a different script based off of the 
    	(AJDSCHDweCaveLightSwitchButton as AJDSCHCaveLightSwitchScript).ToggleLights()
    	(AJDSCHDweEntranceLightSwitchButton as AJDSCHEntranceLightSwitchScript).ToggleLights()
    	(AJDSCHDweGroundFloorLightSwitchButton as AJDSCHGroundFloorLightSwitch).ToggleLights()
    	(AJDSCHDweHerbalistLightSwitchButton as AJDSCHHerbalistLightSwitch).ToggleLights()
    	(AJDSCHDweIgorLightSwitchButton as AJDSCHIgorLightSwitchScript).ToggleLights()
    	(AJDSCHDweIgorOffLightSwitchButton as AJDSCHIgorOfficeLightSwitchScript).ToggleLights()
    	(AJDSCHDweLibraryLightSwitchButton as AJDSCHLibraryLightSwitchScript).ToggleLights()
    	(AJDSCHDweSecretTortureLightSwitchButton as AJDSCHSecretTortureLightSwitchScript).ToggleLights()
    	(AJDSCHDweUselessLightSwitchButton as AJDSCHUselessLightSwitchScript).ToggleLights()
    
    EndFunction
    
    
    Function UselessMaybe()
    	int index = 0
    	int DwemerLightButtonsArrayLength = AJDSCHDwemerLightButtonsArray.Length
    	ObjectReference CurrentLightButton
    
    	While Index < DwemerLightButtonsArrayLength
    		CurrentLightButton = AJDSCHDwemerLightButtonsArray[index]
    	
    		;Checks to see if we are at the Cave Light
    		if (index == 0)
    			;Turn off/on the light
    			(CurrentLightButton as AJDSCHCaveLightSwitchScript).ToggleLights()
    		;Checks to see if we are at the Entrance Light	
    		ElseIf (index == 1)
    			;Turn off/on the light
    			(CurrentLightButton as AJDSCHEntranceLightSwitchScript).ToggleLights()
    		;Checks to see if we are at the Ground Floor Light
    		ElseIf (index == 2)
    			;Turn off/on the light
    			(CurrentLightButton as AJDSCHGroundFloorLightSwitch).ToggleLights()
    		;Checks to see if we are at the Herbalist Light
    		ElseIf (index == 3)
    			;Turn of/on the light
    			(CurrentLightButton as AJDSCHHerbalistLightSwitch).ToggleLights()
    		;Checks to see if we are at the Igor Home Light
    		ElseIf (index == 4)
    			;Turn off/on the light
    			(CurrentLightButton as AJDSCHIgorLightSwitchScript).ToggleLights()
    		;Checks to see if we are at the Igor Office Light
    		ElseIf (index == 5)
    			;Turn off/on the light
    			(CurrentLightButton as AJDSCHIgorOfficeLightSwitchScript).ToggleLights()
    		;Checks to see if we are at the Library Light Switch
    		ElseIf (index == 6)
    			;Turn off/on the light
    			(CurrentLightButton as AJDSCHLibraryLightSwitchScript).ToggleLights()
    		;Checks to see if we are at the Secret Torture (or bedroom) Light Switch
    		ElseIf (index == 7)
    			;Turns off/on the light
    			(CurrentLightButton as AJDSCHSecretTortureLightSwitchScript).ToggleLights()
    		;Checks to see if we are at the Useless Light Switch	
    		ElseIf (index == 8)
    			;Turns off/on the light
    			(CurrentLightButton as AJDSCHUselessLightSwitchScript).ToggleLights()
    		;Current End of Switches
    		Else
    			;never will reach here
    		EndIf
    
    		;Increment our index
    		index += 1
    	EndWhile
    EndFunction
    
    ObjectReference Property AJDSCHDweCaveLightSwitchButton  Auto  
    ObjectReference Property AJDSCHDweEntranceLightSwitchButton  Auto  
    ObjectReference Property AJDSCHDweGroundFloorLightSwitchButton  Auto  
    ObjectReference Property AJDSCHDweHerbalistLightSwitchButton  Auto  
    ObjectReference Property AJDSCHDweIgorLightSwitchButton  Auto  
    ObjectReference Property AJDSCHDweIgorOffLightSwitchButton  Auto  
    ObjectReference Property AJDSCHDweLibraryLightSwitchButton  Auto  
    ObjectReference Property AJDSCHDweSecretTortureLightSwitchButton  Auto  
    ObjectReference Property AJDSCHDweUselessLightSwitchButton  Auto  
    
    

     

     

     

    As you can see I have tried a few options, none of which are currently successful. Anyone have any ideas on what I am missing, or if what I am attempting is not possible?

×
×
  • Create New...