Kingcato Posted December 19, 2015 Share Posted December 19, 2015 As some of you might know, the Lightboxes once had a Cycle Color function you could access through the console. (Seen in a Trailer,- Pre Release)I dont know why Bethesda disabled this function for the Release.. The Terminals and Actor Values are still in the .esm. The Sub-Menu's were just removed from the Root-Menu.So i included the Sub-Menu again and it works so far. Well as far as ActorValues go...I can choose the Interval type [Random],[sequential],[None] and the timings from 1 to 10 second. Checking AVIF ingame "WorkshopLightboxCycling [AVIF:00210B6F]" and "WorkshopLightboxCyclingType [AVIF:00210C75]" are correctly set by the Terminal.BUT, without effect. The Lightbox just doesnt seem to care about those two AVIF's. Somebody got an Idea why? Link to comment Share on other sites More sharing options...
Kingcato Posted December 20, 2015 Author Share Posted December 20, 2015 DecompiledWorkshopLightboxScript.pex Looks ok ScriptName WorkshopLightboxScript extends ObjectReference actorvalue Property WorkshopLightboxCycling Auto {used to store cycling time interval} actorvalue Property WorkshopLightboxCyclingType Auto {used to store cycling timer 0 = no cycling 1 = random 2 = sequential} actorvalue Property WorkshopTerminalLightBrightness Auto {used to store last light brightness - index to LightBrightness array} actorvalue Property WorkshopTerminalLightColor Auto {used to store last light color - index to LightColors array} Int Property cylingTimeDefault Auto = 2 {default cycling time if nothing is set yet} String[] Property LightBrightness Auto String[] Property LightColors Auto Function StartCycling (Bool bStart) (Flags:0) EndFunction Function SetCyclingType (Int cyclingType) (Flags:0) self.SetValue(WorkshopLightboxCyclingType, cyclingType) If (cyclingType == 0) self.StartCycling(False) Else self.StartCycling(True) EndIf EndFunction Function GetAnimString (Int iColor, Int iBrightness) AS String (Flags:0) If (iColor < 0) || (iColor >= LightColors[count]) || (iBrightness < 0) || (iBrightness >= LightBrightness[count]) Return "None" Else Return LightColors[iColor] + LightBrightness[iBrightness] EndIf EndFunction Function OnActivate (ObjectReference akActionRef) (Flags:0) If akActionRef is(actor) self.CycleToNextColor() EndIf EndFunction Function SetColor (Int iColor, Int iBrightness, Bool bStopCycling) (Flags:0) String animString If (iColor == -1) iColor = self.GetValue(WorkshopTerminalLightColor) EndIf If (iBrightness == -1) iBrightness = self.GetValue(WorkshopTerminalLightBrightness) EndIf If bStopCycling self.SetCyclingType(0) EndIf animString = self.GetAnimString(iColor, iBrightness) If animString self.SetValue(WorkshopTerminalLightColor, iColor) self.SetValue(WorkshopTerminalLightBrightness, iBrightness) self.PlayAnimation(animString) EndIf EndFunction Function SetCyclingTime (Float cyclingTime) (Flags:0) If (cyclingTime <= 0.0) self.SetValue(WorkshopLightboxCycling, 0.0) self.StartCycling(False) Else self.SetValue(WorkshopLightboxCycling, cyclingTime) self.StartCycling(True) EndIf EndFunction Function CycleToNextColor () (Flags:0) Int iCurrentColor Int iCurrentBrightness iCurrentColor = self.GetValue(WorkshopTerminalLightColor) iCurrentBrightness = self.GetValue(WorkshopTerminalLightBrightness) iCurrentBrightness = iCurrentBrightness + 1 If (iCurrentBrightness >= LightBrightness[count]) iCurrentBrightness = 0 iCurrentColor = iCurrentColor + 1 If (iCurrentColor >= LightColors[count]) iCurrentColor = 0 EndIf EndIf self.SetColor(iCurrentColor, iCurrentBrightness, False) EndFunction Link to comment Share on other sites More sharing options...
xaosbob Posted December 21, 2015 Share Posted December 21, 2015 This may be a silly question, but might it have something to do with perks? I don't have the max perks for Hacking or Science! (for instance), so maybe the additional functionality is unlocked in the terminals when you do? I imagine you already checked that, but figured I'd suggest it in case you hadn't. :) Link to comment Share on other sites More sharing options...
Kingcato Posted December 21, 2015 Author Share Posted December 21, 2015 (edited) This may be a silly question, but might it have something to do with perks? I don't have the max perks for Hacking or Science! (for instance), so maybe the additional functionality is unlocked in the terminals when you do? I imagine you already checked that, but figured I'd suggest it in case you hadn't. :smile: lol no. Bethestda truly deleted this function from the game. Maybe it was to heavy for consoles .. ^^ Actualy i think i found it. I used a newer Decompiler for the script and realazied that the 'StartCycling' Function is empty. (right at the beginning) function StartCycling(Bool bStart) ; Empty function endFunction function SetCyclingType(Int cyclingType) self.SetValue(WorkshopLightboxCyclingType, cyclingType as Float) if (cyclingType == 0) self.StartCycling(false) else self.StartCycling(true) endif endFunction String function GetAnimString(Int iColor, Int iBrightness) if (iColor < 0 || iColor >= LightColors.length || iBrightness < 0 || iBrightness >= LightBrightness.length) return "None" else return LightColors[iColor] + LightBrightness[iBrightness] endif endFunction function OnActivate(ObjectReference akActionRef) if (akActionRef is actor) self.CycleToNextColor() endif endFunction function SetColor(Int iColor, Int iBrightness, Bool bStopCycling) if (iColor == -1) iColor = self.GetValue(WorkshopTerminalLightColor) as Int endif if (iBrightness == -1) iBrightness = self.GetValue(WorkshopTerminalLightBrightness) as Int endif if (bStopCycling) self.SetCyclingType(0) endif String animString = self.GetAnimString(iColor, iBrightness) if (animString) self.SetValue(WorkshopTerminalLightColor, iColor as Float) self.SetValue(WorkshopTerminalLightBrightness, iBrightness as Float) self.PlayAnimation(animString) endif endFunction function SetCyclingTime(Float cyclingTime) if (cyclingTime <= 0.000000) self.SetValue(WorkshopLightboxCycling, 0.000000) self.StartCycling(false) else self.SetValue(WorkshopLightboxCycling, cyclingTime) self.StartCycling(true) endif endFunction function CycleToNextColor() Int iCurrentColor = self.GetValue(WorkshopTerminalLightColor) as Int Int iCurrentBrightness = self.GetValue(WorkshopTerminalLightBrightness) as Int iCurrentBrightness += 1 if (iCurrentBrightness >= LightBrightness.length) iCurrentBrightness = 0 iCurrentColor += 1 if (iCurrentColor >= LightColors.length) iCurrentColor = 0 endif endif self.SetColor(iCurrentColor, iCurrentBrightness, false) endFunction Thank you Orvid for your Decompiler: http://www.nexusmods.com/fallout4/mods/3742/?I can finaly sleep now ^^ Edited December 21, 2015 by Kingcato Link to comment Share on other sites More sharing options...
Recommended Posts