0 of 0

File information

Last updated

Original upload

Created by

starpest

Uploaded by

thestarpest

Virus scan

Safe to use

39 comments

  1. Ayanko
    Ayanko
    • premium
    • 1 kudos
    Locked
    Sticky
    I noticed that this wasn't working properly with the + and ++ optical camo, regarding the toggle and instant cooldown.
    In the 'init' file for the toggle, I added; 

    ses:HasStatusEffect(vincent, "BaseStatusEffect.OpticalCamoPlayerBuffLegendaryPlus") or
     ses:HasStatusEffect(vincent, "BaseStatusEffect. OpticalCamoPlayerBuffLegendaryPlusPlus")
    underneath
    ses:HasStatusEffect(vincent, "BaseStatusEffect.OpticalCamoPlayerBuffLegendary")
    I then added;
    ses:RemoveStatusEffect(vincent, "BaseStatusEffect.OpticalCamoPlayerBuffLegendaryPlus")
        ses:RemoveStatusEffect(vincent, "BaseStatusEffect.OpticalCamoPlayerBuffLegendaryPlusPlus")
    In the next part.

    Did a few tests; now the camo debuff will come off when toggled on and off.

    For the yaml file in tweaks;
    Items.AdvancedOpticalCamoLegendaryPlus_inline1:
      value: 1
    Items.AdvancedOpticalCamoLegendaryPlus_inline12:
      floatValues: [1]
    Items.AdvancedOpticalCamoLegendaryPlusPlus_inline1:
      value: 1
    Items.AdvancedOpticalCamoLegendaryPlusPlus_inline12:
      floatValues: [1]


    Hopefully this helps; I'm shite at explaining but thought it worth adding.
    1. Aureliuh
      Aureliuh
      • premium
      • 12 kudos
      this was great, thank you so much. I also removed the apogee edits as it conflicted with another mod that affected apogee, thank you so much!
    2. deleted125596768
      deleted125596768
      • account closed
      • 11 kudos
      Kudos! Thanks for this!
    3. linehand
      linehand
      • member
      • 17 kudos
      I think there's a typo in your code there (extra space):
      ses:HasStatusEffect(vincent, "BaseStatusEffect. OpticalCamoPlayerBuffLegendaryPlusPlus")
      So based on what you had in your original post above, I was trying to add the Arasaka Lurker Optical Camo from Stealthrunner mod to the toggle mod here, but I haven't been able to make it work. Looking in the stealth runner mod I can see the status effects it "should" be using...

      -- fake boolean
      -- local camoactive = false
      function camolistener(entity)
          local ses = Game.GetStatusEffectSystem()
          local vincent = entity:GetEntityID()

          return ses:HasStatusEffect(vincent, "BaseStatusEffect.OpticalCamoPlayerBuffRare") or
              ses:HasStatusEffect(vincent, "BaseStatusEffect.OpticalCamoPlayerBuffRarePlus") or
              ses:HasStatusEffect(vincent, "BaseStatusEffect.OpticalCamoPlayerBuffEpic") or
              ses:HasStatusEffect(vincent, "BaseStatusEffect.OpticalCamoPlayerBuffEpicPlus") or
              ses:HasStatusEffect(vincent, "BaseStatusEffect.OpticalCamoPlayerBuffLegendary") or
              ses:HasStatusEffect(vincent, "BaseStatusEffect.OpticalCamoPlayerBuffLegendaryPlus") or
              ses:HasStatusEffect(vincent, "BaseStatusEffect.OpticalCamoPlayerBuffLegendaryPlusPlus") or
              ses:HasStatusEffect(vincent, "BaseStatusEffect.OpticalCamoPlayerBuffBase") or
              ses:HasStatusEffect(vincent, "BaseStatusEffect.OpticalCamoLurkerPlayerBuffRare") or
              ses:HasStatusEffect(vincent, "BaseStatusEffect.OpticalCamoLurkerPlayerBuffRarePlus") or
              ses:HasStatusEffect(vincent, "BaseStatusEffect.OpticalCamoLurkerPlayerBuffEpic") or
              ses:HasStatusEffect(vincent, "BaseStatusEffect.OpticalCamoLurkerPlayerBuffEpicPlus") or
              ses:HasStatusEffect(vincent, "BaseStatusEffect.OpticalCamoLurkerPlayerBuffLegendary") or
              ses:HasStatusEffect(vincent, "BaseStatusEffect.OpticalCamoLurkerPlayerBuffLegendaryPlus") or
              ses:HasStatusEffect(vincent, "BaseStatusEffect.OpticalCamoLurkerPlayerBuffLegendaryPlusPlus")
              --then camoactive = true
              --end
      end

      -- I don't know how to call the specific id for the cloak buff so I will just remove all of them ¯\_(ツ)_/¯
      function togglecamo(entity)
          local ses = Game.GetStatusEffectSystem()
          local vincent = entity:GetEntityID()

          ses:RemoveStatusEffect(vincent, "BaseStatusEffect.OpticalCamoPlayerBuffRare")
          ses:RemoveStatusEffect(vincent, "BaseStatusEffect.OpticalCamoPlayerBuffRarePlus")
          ses:RemoveStatusEffect(vincent, "BaseStatusEffect.OpticalCamoPlayerBuffEpic")
          ses:RemoveStatusEffect(vincent, "BaseStatusEffect.OpticalCamoPlayerBuffEpicPlus")
          ses:RemoveStatusEffect(vincent, "BaseStatusEffect.OpticalCamoPlayerBuffLegendary")
          ses:RemoveStatusEffect(vincent, "BaseStatusEffect.OpticalCamoPlayerBuffLegendaryPlus")
          ses:RemoveStatusEffect(vincent, "BaseStatusEffect.OpticalCamoPlayerBuffLegendaryPlusPlus")
          ses:RemoveStatusEffect(vincent, "BaseStatusEffect.OpticalCamoPlayerBuffBase")
          ses:RemoveStatusEffect(vincent, "BaseStatusEffect.OpticalCamoLurkerPlayerBuffRare")
          ses:RemoveStatusEffect(vincent, "BaseStatusEffect.OpticalCamoLurkerPlayerBuffRarePlus")
          ses:RemoveStatusEffect(vincent, "BaseStatusEffect.OpticalCamoLurkerPlayerBuffEpic")
          ses:RemoveStatusEffect(vincent, "BaseStatusEffect.OpticalCamoLurkerPlayerBuffEpicPlus")
          ses:RemoveStatusEffect(vincent, "BaseStatusEffect.OpticalCamoLurkerPlayerBuffLegendary")
          ses:RemoveStatusEffect(vincent, "BaseStatusEffect.OpticalCamoLurkerPlayerBuffLegendaryPlus")
          ses:RemoveStatusEffect(vincent, "BaseStatusEffect.OpticalCamoLurkerPlayerBuffLegendaryPlusPlus")
      end

      -- initialize toggle func
      registerForEvent('onInit', function()
          ObserveBefore("PlayerPuppet", "OnAction", function(this, action)
              local actionstring = Game.NameToString(ListenerAction.GetName(action))
              local actionevent = ListenerAction.GetType(action).value
                  if (actionstring == "UseCombatGadget" and actionevent == "BUTTON_PRESSED" and camolistener(this)) then
                      togglecamo(this)
                  end
          end)
      end)

      I also added in RarePlus and EpicPlus versions that were missing. Also only added "BaseStatusEffect.OpticalCamoPlayerBuffBase" after I couldn't get it working because I saw that Arasaka Lurker was referencing it, but still no luck... any ideas?
    4. FarmerJohnn
      FarmerJohnn
      • member
      • 0 kudos
      idk why but even when i change the cooldown values it still is the default cooldown any fixes?
    5. thestarpest
      thestarpest
      • premium
      • 14 kudos
      Last I played, the status effects did not match the in-game quality and worked like this:

      OpticalCamoPlayerBuffUncommon = Epic+
      OpticalCamoPlayerBuffRare = Legendary
      OpticalCamoPlayerBuffEpic = Legendary+
      OpticalCamoPlayerBuffLegendary = Legendary++

      this was the case since the 2.0 update, but maybe they got around to fixing it or you guys are running a mod that changes the statuses.
      In any case I'm going to sticky this post with the updated code for those who have issues with the mod, just replace all text in init.lua.

      (...\Cyberpunk2077\bin\x64\plugins\cyber_engine_tweaks\mods\opticalcamotoggle\init.lua)

      Spoiler:  
      Show

      function camolistener(entity)
          local ses = Game.GetStatusEffectSystem()
          local vincent = entity:GetEntityID()

          return ses:HasStatusEffect(vincent, "BaseStatusEffect.OpticalCamoPlayerBuffRare") or
              ses:HasStatusEffect(vincent, "BaseStatusEffect.OpticalCamoPlayerBuffEpic") or
              ses:HasStatusEffect(vincent, "BaseStatusEffect.OpticalCamoPlayerBuffLegendary") or
              ses:HasStatusEffect(vincent, "BaseStatusEffect.OpticalCamoPlayerBuffLegendaryPlus") or
              ses:HasStatusEffect(vincent, "BaseStatusEffect.OpticalCamoPlayerBuffLegendaryPlusPlus")
      end

      function togglecamo(entity)
          local ses = Game.GetStatusEffectSystem()
          local vincent = entity:GetEntityID()

          ses:RemoveStatusEffect(vincent, "BaseStatusEffect.OpticalCamoPlayerBuffRare")
          ses:RemoveStatusEffect(vincent, "BaseStatusEffect.OpticalCamoPlayerBuffEpic")
          ses:RemoveStatusEffect(vincent, "BaseStatusEffect.OpticalCamoPlayerBuffLegendary")
          ses:RemoveStatusEffect(vincent, "BaseStatusEffect.OpticalCamoPlayerBuffLegendaryPlus")
          ses:RemoveStatusEffect(vincent, "BaseStatusEffect.OpticalCamoPlayerBuffLegendaryPlusPlus")
      end

      registerForEvent('onInit', function()
          ObserveBefore("PlayerPuppet", "OnAction", function(this, action)
              local actionstring = Game.NameToString(ListenerAction.GetName(action))
              local actionevent = ListenerAction.GetType(action).value
                  if (actionstring == "UseCombatGadget" and actionevent == "BUTTON_PRESSED" and camolistener(this)) then
                      togglecamo(this)
                  end
          end)
      end)



      Cheers
  2. deunan2277
    deunan2277
    • supporter
    • 18 kudos
    Optical Camo TweakXL is working per description on game version 2.13
    Thank you thestarpest for making this mod!

    Chooms please always read the mod Description, make sure you installed all the required mods Cyber Engine Tweaks, TweakXL & RED4ext in the correct path, all must be the latest version.

    [Info] Take note that the Optical Camo Tweaks mod disables the level 40 Headhunter passive 'Optical Camo is active when grappling enemies.'' and the level 15 Cool Perk Vanishing Act 'Optical Camo activates automatically and consumes its charge gradually while crouch-sprinting or sliding.' .

    Optical Camo Tweaks works well together with Extra gadget quickslots, Truly Invisible Optical Camo, Kiroshi Optics Night Vision Mod and Use Your Cybernetic Eyes to Aim 2.1. An alternative will be Better Optical Camo, but the mod requires a fix, easily done though.
  3. TKTaKo
    TKTaKo
    • member
    • 1 kudos
    for those who want the tooltip to actually reflect the cooldown changes you gotta swap the 'inline11'/'inline12' bits in each entry for 'inline13'
    i.e change
    Items.AdvancedOpticalCamoRarePlus_inline11:
    into
    Items.AdvancedOpticalCamoRarePlus_inline13:
    note: for the Epic/EpicPlus rarity use inline12 instead

    and change how the value is set from
      floatValues: [X]
    into
      floatValues:
    - X
    either game changed the inner workings of these items breaking this bit of the tweakxl override or the author just bungled this part up, cause checking all the optical camos in wolvenkit they all store the float used for the cooldown in the tooltip in inline13 except for epic which uses 12

    you'll have to do the same for all instances that you desire to override
    1. exploiteddna
      exploiteddna
      • premium
      • 109 kudos
      either notation for the array of values should be fine, unless psiberx removed the array syntax floatValues: [ x ]
    2. moddel
      moddel
      • member
      • 4 kudos
      I'm a bit confused, in my OpticalCamoTweaks.yaml I don't have a Items.AdvancedOpticalCamoRarePlusand I also don't have
      Items.AdvancedOpticalEpic


      Here's what my file looks like:

      #- OptiCamo Cooldown
      Items.AdvancedOpticalCamoEpicPlus_inline1:
        value: 5
      Items.AdvancedOpticalCamoEpicPlus_inline11:
        floatValues: [5]
      Items.AdvancedOpticalCamoLegendary_inline1:
        value: 3
      Items.AdvancedOpticalCamoLegendary_inline12:
        floatValues: [3]
      Items.AdvancedOpticalCamoLegendaryPlus_inline1:
        value: 1
      Items.AdvancedOpticalCamoLegendaryPlus_inline12:
        floatValues: [1]
      Items.AdvancedOpticalCamoLegendaryPlusPlus_inline1:
        value: 0
      Items.AdvancedOpticalCamoLegendaryPlusPlus_inline12:
        floatValues: [0]
      #- Duration
      BaseStatusEffect.OpticalCamoPlayerBuffUncommon_inline1:
        value: 15
      BaseStatusEffect.OpticalCamoPlayerBuffRare_inline1:
        value: 20
      BaseStatusEffect.OpticalCamoPlayerBuffEpic_inline1:
        value: 25
      BaseStatusEffect.OpticalCamoPlayerBuffLegendary_inline1:
        value: 30
      #- 'Apogee' Sandevistan Duration
      #Items.AdvancedSandevistanApogeePlusPlus_inline20:
        #value: 30
      #- Slow Factor
      #Items.AdvancedSandevistanApogeePlusPlus_inline21.value:
        #value: 0.05



      After trying to apply your fix it looks like this:

      #- OptiCamo Cooldown
      Items.AdvancedOpticalCamoEpicPlus_inline1:
        value: 5
      Items.AdvancedOpticalCamoEpicPlus_inline12:
        floatValues: [5]
      Items.AdvancedOpticalCamoLegendary_inline1:
        value: 3
      Items.AdvancedOpticalCamoLegendary_inline13:
        floatValues: [3]
      Items.AdvancedOpticalCamoLegendaryPlus_inline1:
        value: 1
      Items.AdvancedOpticalCamoLegendaryPlus_inline13:
        floatValues: [1]
      Items.AdvancedOpticalCamoLegendaryPlusPlus_inline1:
        value: 0
      Items.AdvancedOpticalCamoLegendaryPlusPlus_inline13:
        floatValues: [0]
      #- Duration
      BaseStatusEffect.OpticalCamoPlayerBuffUncommon_inline1:
        value: 15
      BaseStatusEffect.OpticalCamoPlayerBuffRare_inline1:
        value: 20
      BaseStatusEffect.OpticalCamoPlayerBuffEpic_inline1:
        value: 25
      BaseStatusEffect.OpticalCamoPlayerBuffLegendary_inline1:
        value: 30
      #- 'Apogee' Sandevistan Duration
      #Items.AdvancedSandevistanApogeePlusPlus_inline20:
        #value: 30
      #- Slow Factor
      #Items.AdvancedSandevistanApogeePlusPlus_inline21.value:
        #value: 0.05


      Changes: EpicPlus 11 -> 12; all others changed to 13

      Is this correct now?
  4. spartandfk
    spartandfk
    • member
    • 0 kudos
    Hi! Functionally, this mod is perfect. Editing the file changes duration and cooldown as expected (yay!), but the icon for the camo in the gadget slot did not reflect the changed duration. Initially, there was no "decreasing charge" bar on the gadget icon, even though I had set it for two minutes, and after two minutes, the camo did wear off as expected. I did edit the init.lua as suggested by thestarpest under Ayanko's stickied post. After this edit, the gadget icon decreasing charge bar returned, but decreased as if it only had a 15 second duration. The camo did persist after this bar finished, and functionally lasted for the duration I chose.

    My question is, can the "decreasing charge" bar of the gadget slot be changed to reflect my new duration for the camo? I would like to be able to see the bar go down, and take two minutes to do so (which is the duration I chose).

    I'm fairly new to modding the game, and don't really know what I'm doing with any of the code, so clear instructions would be appreciated. Thank you!
  5. ronchuchu
    ronchuchu
    • supporter
    • 2 kudos

    hi, great mod. I noticed in the in .yaml file you have a tweak for the apogee sandy. Is it changing the cyberware? I havent changed the values. I kinda want it to stay the same. And for the slow factor #Value: 0.05, how much % of time is that slowing down?
    1. asd2006208
      asd2006208
      • member
      • 0 kudos
      I believe that would be a 95% time slow effect. Rather than using the time reduction, the value is the actual speed when you activates sandy.
    2. thestarpest
      thestarpest
      • premium
      • 14 kudos
      The values are commented out so they are not executed at runtime, just something leftover from me testing cyber-ware functionality.
    3. Beehive151
      Beehive151
      • supporter
      • 5 kudos
      How do I get the Apogee commands to actually work?? :D
    4. thestarpest
      thestarpest
      • premium
      • 14 kudos
      remove the '#'
  6. jacrull
    jacrull
    • member
    • 1 kudos
    I may just not be tech savvy enough but I don't understand the directions. If I want the optical camo to last as long as possible, what do I edit in the .yaml and what do I edit it to? If I want the recharge to be really short, what do I change in the .yaml? There's probably a lot of people in the same boat, this is pretty complicated if you don't know what you're looking at here so a short explanation in the description of the mod is pretty much mandatory if people are going to get anything out of it.
  7. Pzikhedelic
    Pzikhedelic
    • member
    • 13 kudos
    Will the toggle works fine with Custom Quick Slot?
    1. thestarpest
      thestarpest
      • premium
      • 14 kudos
      The script checks for the 'Combat Gadget' default hotkey, which is middle mouse button or left bumper by default. Idk if custom quick slot will let you assign those tags, but you can edit the init.lua to listen for your hotkeys instead:

      if (actionstring == "UseCombatGadget" and actionevent == "BUTTON_PRESSED"
      (line 29) just replace with your keycode
    2. MrCerdo333
      MrCerdo333
      • member
      • 1 kudos
      Hi and thx for the mod.
      I want to putt a combo key from gamepad like I have in Customs Quick Slots,the keys are IK_Pad_B_CIRCLE + IK_Pad_DigitUp
      I dont know how to do it, it´s possible?
      ok I was trying, and can remplace :"UseCombatGadget"
      for any action but no for key code,I putt "dpad_down" to no get any conflict with gampad,but I don´t know how to do it with 2 action at same time:"Dodge"(b-circle in gamepad) plus "dpad_up"(dpad up in gamepad)
      thxs and sorry for my bad English not my own lenguage
    3. ApocryphaNG
      ApocryphaNG
      • supporter
      • 6 kudos
      Can u post example?
    4. exploiteddna
      exploiteddna
      • premium
      • 109 kudos
      i dont think UseCombatGadget has to be replaced with a keycode, but rather another actionstring.. which, i don't know if these are parameters defined in the vanilla game scripts or if it's from a script extension in redscript.. idrk. But there must be a list of acceptable actionstring parameters somewhere. 

      ...or maybe im wrong, perhaps you can simply replace UseCombatGadget with a keycode like IK_G or whatever.. guess we can try
  8. WalkerGin1
    WalkerGin1
    • supporter
    • 0 kudos
    hello,

    I see no CET toggle if you can please clarify where it can be found 
    1. ZoanChrome
      ZoanChrome
      • member
      • 2 kudos
      +1
    2. WalkerGin1
      WalkerGin1
      • supporter
      • 0 kudos
      thanks 
  9. mukulhastak
    mukulhastak
    • supporter
    • 5 kudos
    Can confirm that this works with Custom QSlots, i just tested this. Thanks a lot to the mod author!

    Edit: Ok, not perfectly, if it is one of the quickslots that's not active in the main gadget slot, it will still toggle on with the quickslot key, but to toggle it off, you need to press the main gadget key again, which will also trigger whatever gadget is activated in the main gadget slot. I suppose you can still use QSlots for grenades and manually equip camo from the inventory whenever you want to use camo. Its not a perfect solution, but atleast you can use both mods.
  10. YoRHa9S
    YoRHa9S
    • member
    • 2 kudos
    Good mod.

    Seems to have a compatibility issue with the Custom Quickslots mod. The toggle function does not work, nor do your edits to the duration/recharge.

    I went through the trouble of removing Custom Quickslots and double-checking if Optical Camo TweakXL worked and it did so CQ is definitely the culprit.
  11. Asgurian
    Asgurian
    • premium
    • 0 kudos
    Any way to change the toggle key?