示例#1
0
        public void SaveToIni(IniData iniData)
        {
            var tpData = iniData["TemplePlus"];

            if (tpData == null)
            {
                iniData.Sections.Add(new SectionData("TemplePlus"));
                tpData = iniData["TemplePlus"];
            }

            tpData["toeeDir"]    = InstallationPath;
            tpData["autoUpdate"] = DisableAutomaticUpdates ? "false" : "true";
            switch (HpOnLevelUp)
            {
            case HpOnLevelUpType.Max:
                tpData["hpOnLevelup"] = "max";
                break;

            case HpOnLevelUpType.Average:
                tpData["hpOnLevelup"] = "average";
                break;

            default:
                tpData["hpOnLevelup"] = "normal";
                break;
            }
            tpData["maxHpForNpcHitdice"] = MaxHpForNpcHitdice ? "true" : "false";
            switch (FogOfWar)
            {
            case FogOfWarType.Unfogged:
                tpData["fogOfWar"] = "unfogged";
                break;

            case FogOfWarType.Always:
                tpData["fogOfWar"] = "always";
                break;

            default:
                tpData["fogOfWar"] = "normal";
                break;
            }
            tpData["laxRules"] = LaxRules ? "true" : "false";

            tpData["disableAlignmentRestrictions"]   = DisableAlignmentRestrictions ? "true" : "false";
            tpData["disableCraftingSpellReqs"]       = DisableCraftingSpellReqs ? "true" : "false";
            tpData["disableMulticlassXpPenalty"]     = DisableMulticlassXpPenalty ? "true" : "false";
            tpData["showTargetingCirclesInFogOfWar"] = ShowTargetingCirclesInFogOfWar ? "true" : "false";


            tpData["pointBuyPoints"]       = PointBuyPoints.ToString();
            tpData["renderWidth"]          = RenderWidth.ToString();
            tpData["renderHeight"]         = RenderHeight.ToString();
            tpData["windowed"]             = WindowedMode ? "true" : "false";
            tpData["windowWidth"]          = RenderWidth.ToString();
            tpData["windowHeight"]         = RenderHeight.ToString();
            tpData["antialiasing"]         = AntiAliasing? "true" : "false";
            tpData["softShadows"]          = SoftShadows ? "true" : "false";
            tpData["windowedLockCursor"]   = WindowedLockCursor ? "true" : "false";
            tpData["dungeonMaster"]        = DungeonMaster ? "true" : "false";
            tpData["maxLevel"]             = MaxLevel.ToString();
            tpData["allowXpOverflow"]      = AllowXpOverflow ? "true" : "false";
            tpData["slowerLevelling"]      = SlowerLevelling ? "true" : "false";
            tpData["newClasses"]           = NewClasses? "true" : "false";
            tpData["nonCoreMaterials"]     = NonCore ? "true" : "false";
            tpData["tolerantNpcs"]         = TolerantTownsfolk? "true" : "false";
            tpData["showExactHPforNPCs"]   = TransparentNpcStats? "true" : "false";
            tpData["showNpcStats"]         = TransparentNpcStats ? "true" : "false";
            tpData["fastSneakAnim"]        = FastSneaking ? "true" : "false";
            tpData["disableDoorRelocking"] = DisableDoorRelocking? "true" : "false";
            tpData["alertAiThroughDoors"]  = AlertAiThroughDoors ? "true" : "false";
        }
示例#2
0
        public void SaveToIni(IniData iniData)
        {
            var tpData = iniData["TemplePlus"];

            if (tpData == null)
            {
                iniData.Sections.Add(new SectionData("TemplePlus"));
                tpData = iniData["TemplePlus"];
            }

            tpData["toeeDir"]       = InstallationPath;
            tpData["defaultModule"] = ModuleName;
            tpData["autoUpdate"]    = DisableAutomaticUpdates ? "false" : "true";
            switch (HpOnLevelUp)
            {
            case HpOnLevelUpType.Max:
                tpData["hpOnLevelup"] = "max";
                break;

            case HpOnLevelUpType.Average:
                tpData["hpOnLevelup"] = "average";
                break;

            default:
                tpData["hpOnLevelup"] = "normal";
                break;
            }

            switch (HpForNPCHd)
            {
            case HpForNPCHdType.Min:
                tpData["HpForNPCHd"] = "min";
                break;

            case HpForNPCHdType.Max:
                tpData["HpForNPCHd"] = "max";
                break;

            case HpForNPCHdType.Average:
                tpData["HpForNPCHd"] = "average";
                break;

            case HpForNPCHdType.ThreeFourth:
                tpData["HpForNPCHd"] = "threefourth";
                break;

            default:
                tpData["HpForNPCHd"] = "normal";
                break;
            }

            //Set the old setting to false
            tpData["maxHpForNpcHitdice"] = "false";
            switch (FogOfWar)
            {
            case FogOfWarType.Unfogged:
                tpData["fogOfWar"] = "unfogged";
                break;

            case FogOfWarType.Always:
                tpData["fogOfWar"] = "always";
                break;

            default:
                tpData["fogOfWar"] = "normal";
                break;
            }
            tpData["laxRules"] = LaxRules ? "true" : "false";
            tpData["stricterRulesEnforcement"] = StricterRulesEnforcement ? "true" : "false";

            tpData["disableAlignmentRestrictions"]   = DisableAlignmentRestrictions ? "true" : "false";
            tpData["disableCraftingSpellReqs"]       = DisableCraftingSpellReqs ? "true" : "false";
            tpData["disableMulticlassXpPenalty"]     = DisableMulticlassXpPenalty ? "true" : "false";
            tpData["showTargetingCirclesInFogOfWar"] = ShowTargetingCirclesInFogOfWar ? "true" : "false";
            tpData["wildShapeUsableItems"]           = WildshapeUsableItems ? "true" : "false";


            tpData["pointBuyPoints"]     = PointBuyPoints.ToString();
            tpData["renderWidth"]        = RenderWidth.ToString();
            tpData["renderHeight"]       = RenderHeight.ToString();
            tpData["windowed"]           = WindowedMode ? "true" : "false";
            tpData["windowWidth"]        = RenderWidth.ToString();
            tpData["windowHeight"]       = RenderHeight.ToString();
            tpData["antialiasing"]       = AntiAliasing? "true" : "false";
            tpData["softShadows"]        = SoftShadows ? "true" : "false";
            tpData["windowedLockCursor"] = WindowedLockCursor ? "true" : "false";
            tpData["dungeonMaster"]      = DungeonMaster ? "true" : "false";
            tpData["maxLevel"]           = MaxLevel.ToString();
            tpData["maxPCsFlexible"]     = "false";
            switch (NumberOfPcs)
            {
            case NumberOfPcsType.Flexible:
                tpData["maxPCsFlexible"] = "true";
                break;

            case NumberOfPcsType.PCs_3_NPCs_5:
                tpData["maxPCs"] = 3.ToString();
                break;

            case NumberOfPcsType.PCs_4_NPCs_4:
                tpData["maxPCs"] = 4.ToString();
                break;

            case NumberOfPcsType.PCs_5_NPCs_3:
                tpData["maxPCs"] = 5.ToString();
                break;

            case NumberOfPcsType.PCs_6_NPCs_2:
                tpData["maxPCs"] = 6.ToString();
                break;

            case NumberOfPcsType.PCs_7_NPCs_1:
                tpData["maxPCs"] = 7.ToString();
                break;

            case NumberOfPcsType.PCs_8_NPCs_0:
                tpData["maxPCs"] = 8.ToString();
                break;

            default:
                tpData["maxPCs"] = 5.ToString();
                break;
            }
            tpData["allowXpOverflow"]      = AllowXpOverflow ? "true" : "false";
            tpData["metamagicStacking"]    = MetamagicStacking ? "true" : "false";
            tpData["slowerLevelling"]      = SlowerLevelling ? "true" : "false";
            tpData["newClasses"]           = NewClasses? "true" : "false";
            tpData["newRaces"]             = NewRaces? "true" : "false";
            tpData["monstrousRaces"]       = MonstrousRaces? "true" : "false";
            tpData["forgottenRealmsRaces"] = ForgottenRealmsRaces ? "true" : "false";
            tpData["nonCoreMaterials"]     = NonCore ? "true" : "false";
            tpData["tolerantNpcs"]         = TolerantTownsfolk? "true" : "false";
            tpData["showExactHPforNPCs"]   = TransparentNpcStats? "true" : "false";
            tpData["showNpcStats"]         = TransparentNpcStats ? "true" : "false";
            tpData["fastSneakAnim"]        = FastSneaking ? "true" : "false";
            if (WalkDistanceFt < 0)
            {
                WalkDistanceFt = 0;
            }
            tpData["walkDistanceFt"]            = WalkDistanceFt.ToString();
            tpData["disableDoorRelocking"]      = DisableDoorRelocking? "true" : "false";
            tpData["alertAiThroughDoors"]       = AlertAiThroughDoors ? "true" : "false";
            tpData["preferUse5FootStep"]        = PreferUse5FootStep ? "true" : "false";
            tpData["extendedSpellDescriptions"] = ExtendedSpellDescriptions ? "true" : "false";
        }