Page 1 of 1

Detecting ESB

Posted: Wed Apr 21, 2021 2:34 pm
by kaypy
Since ESB doesn't load the full set of libraries and functions, it should* be possible to detect whether a dungeon is loading in ESB by checking the existence of those functions.

But that seems rather haphazard. Is there a 'proper' way to do this?

* haven't tested yet...

Re: Detecting ESB

Posted: Thu Apr 22, 2021 9:36 pm
by Sophia
The method I use is to check for the existence of esb_typecheck. If it's defined, you're in ESB, if not, you're in DSB.

(This is, admittedly, very similar to the method you described! But it's based on a function that is never going to change, so it should be reliable)

Code: Select all

if (esb_typecheck) then
  do_esb_stuff()
else
  do_dsb_stuff()
end