Jump to content

Detecting F4SE/Making it optional


pra

Recommended Posts

Either I'm too stupid to google or google is full of useless s#*! lately, but I failed to find any information about this.

 

What happens if I have a mod with a pex file which refers to F4SE functions, but I don't actually have any F4SE? Can I detect from within the script if F4SE is available? Is it possible to make something like:

if(hasF4se)

someF4seFunction()

else

someVanillaFunction()

endif

?

Link to comment
Share on other sites

Have you tried something like this:

if (F4SE.GetVersion() > 0)
   someF4SEFunction()
else
   someVanillaFunction()
endif
 

I am not sure if it will throw error if F4SE isn't installed or will go to else.

Edited by shavkacagarikia
Link to comment
Share on other sites

Well, that's exactly the question: will it throw an error? Will it crash? Will the pex file even work if there are F4SE functions in it?

Then test it. Add debug commands. See what happens if F4SE.pex is removed from scripts folder.

Edited by shavkacagarikia
Link to comment
Share on other sites

  • Recently Browsing   0 members

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