Jump to content

detect skyrim vr


Recommended Posts

Is there a way, from a script, to detect any of SKSE64VR? SkyUIVR? or just plain SkyrimSE VR?

 

I wish to make an alternative for users of my mod who have VR but for whom getcurrentcrosshairref doesn't work. There are other ways to deal with this deficiency but it seems that it may be useful for the future to have a way to discriminate.
My mod uses SKSE64 and presumably VR users have SKSE64VR, I don't have VR so I shall not be testing anything in it! I have googled but I cannot find what skse.getversion returns in a VR setup; SkyUIVR seems to use the same named esp as the ordinary.

 

diziet

Link to comment
Share on other sites

  • 5 months later...

This is probably VERY late to the discussion but since this is one of the first topics that shows up on a google search:

 

 

How you get if the user is in VR is simple: Ask for something only the VR version of the game should have. use the following function call in an IF statement, if it returns a valid form, your player is in vr!

 

Game.GetFormFromFile(0x0BD7, "SkyrimVR.esm")

 

For example

 

If Game.GetFormFromFile(0x0BD7, "SkyrimVR.esm")

DoVrThing()

EndIf

 

If you are curious, that function call is trying to get the quest form tied to the initial start menu VR space.

Edited by ClarkWasHere
Link to comment
Share on other sites

  • 2 weeks later...

Does anyone know what is the alternative for GetCurrentCrosshairRef?

I resort to a spell:

Actor Function dz_get_actor()
spell_npc = NONE
If no_crosshair_toggle == False
  Actor npc
  npc = Game.GetCurrentCrosshairRef() as Actor
  Return npc
Else
  Actor npc
  dz_outfits_actor_aura_spell.Cast(PlayerRef)
  Utility.Wait(0.2)
  npc = spell_npc
  ;debug.messagebox("DEBUG: teammate_ref is "+npc)
  Return npc
EndIf
EndFunction

where the dz_outfits_actor_aura_spell has a script:

Scriptname dz_outfits_actor_aura_effect_script Extends ActiveMagicEffect
dz_outfits_mcm_menu Property dz_mcm Auto            ;need access to mcm menu variables
EffectShader Property AbsorbGreenFXS   Auto        ;green aura for later

Event OnEffectStart(Actor Target, Actor Caster)
AbsorbGreenFXS.Play(Target)               ;place green aura around the target
Actor NPC = Target as Actor
dz_mcm.spell_npc = NPC
EndEventEvent OnEffectFinish(Actor Target, Actor Caster)
AbsorbGreenFXS.Stop(Target)
EndEvent

that sets a variable in my MCM acript to the target of the spell

It's clunky and the code here has things in that are only relevant to my MCM script where the dz_get_actor() is from,

 

diziet

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...