compatible code for mod Dream Portal