Core dynamic scripting logic for SWMH