private static void Init(SettingsBundle xml, MainForm mainForm)
        {
            // SETUP SKILLS
            if (xml.skills.def != null)
                SkillManager.InitSkills(xml.skills.def, xml.skills.special);
            SkillManager.CreateMissingSkills();

            // SETUP ACTIONS
            if (xml.actions != null)
                ActiveMode.LoadSettings(xml.actions);
            ActiveMode.LoadDefaultSettings();


            // INIT MAINFORM
            mainForm.Init(username: API.Users.AuthResult.user);

            // LOAD SCRIPTS
            ScriptManager.LoadScripts();
            // OVERRIDE SCRIPTS
            if (xml.scripts != null)
                ScriptManager.OverrideScripts(xml.scripts);

            // INIT ACTIVE MODE
            ActiveMode.Init();
        }