示例#1
0
        public static void OnGUI()
        {
            if (Main.IsInGame)
            {
                UI.BeginHorizontal();
                UI.Space(25);
                UI.Label("increment".cyan(), UI.AutoWidth());
                var increment = UI.IntTextField(ref settings.increment, null, UI.Width(150));
                UI.Space(25);
                UI.Toggle("Dividers", ref settings.showDivisions);
                UI.EndHorizontal();
                var mainChar = Game.Instance.Player.MainCharacter.Value;
                var kingdom  = KingdomState.Instance;
                UI.Div(0, 25);
                UI.HStack("Resources", 1,
                          () => {
                    var money = Game.Instance.Player.Money;
                    UI.Label("Gold".cyan(), UI.Width(150));
                    UI.Label(money.ToString().orange().bold(), UI.Width(200));
                    UI.ActionButton($"Gain {increment}", () => { Game.Instance.Player.GainMoney(increment); }, UI.AutoWidth());
                    UI.ActionButton($"Lose {increment}", () => {
                        var loss = Math.Min(money, increment);
                        Game.Instance.Player.GainMoney(-loss);
                    }, UI.AutoWidth());
                },
                          () => {
                    var exp = mainChar.Progression.Experience;
                    UI.Label("Experience".cyan(), UI.Width(150));
                    UI.Label(exp.ToString().orange().bold(), UI.Width(200));
                    UI.ActionButton($"Gain {increment}", () => {
                        Game.Instance.Player.GainPartyExperience(increment);
                    }, UI.AutoWidth());
                });
                if (kingdom != null)
                {
                    UI.Div(0, 25);
                    UI.HStack("Kingdom", 1,
                              () => {
                        UI.Label("Finances".cyan(), UI.Width(150));
                        UI.Label(kingdom.Resources.Finances.ToString().orange().bold(), UI.Width(200));
                        UI.ActionButton($"Gain {increment}", () => {
                            kingdom.Resources += KingdomResourcesAmount.FromFinances(increment);
                        }, UI.AutoWidth());
                        UI.ActionButton($"Lose {increment}", () => {
                            kingdom.Resources -= KingdomResourcesAmount.FromFinances(increment);
                        }, UI.AutoWidth());
                    },
                              () => {
                        UI.Label("Materials".cyan(), UI.Width(150));
                        UI.Label(kingdom.Resources.Materials.ToString().orange().bold(), UI.Width(200));
                        UI.ActionButton($"Gain {increment}", () => {
                            kingdom.Resources += KingdomResourcesAmount.FromMaterials(increment);
                        }, UI.AutoWidth());
                        UI.ActionButton($"Lose {increment}", () => {
                            kingdom.Resources -= KingdomResourcesAmount.FromMaterials(increment);
                        }, UI.AutoWidth());
                    },
                              () => {
                        UI.Label("Favors".cyan(), UI.Width(150));
                        UI.Label(kingdom.Resources.Favors.ToString().orange().bold(), UI.Width(200));
                        UI.ActionButton($"Gain {increment}", () => {
                            kingdom.Resources += KingdomResourcesAmount.FromFavors(increment);
                        }, UI.AutoWidth());
                        UI.ActionButton($"Lose {increment}", () => {
                            kingdom.Resources -= KingdomResourcesAmount.FromFavors(increment);
                        }, UI.AutoWidth());
                    });
                }
            }
            UI.Div(0, 25);
            UI.HStack("Combat", 4,
                      () => { UI.ActionButton("Rest All", () => { CheatsCombat.RestAll(); }); },
                      () => { UI.ActionButton("Empowered", () => { CheatsCombat.Empowered(""); }); },
                      () => { UI.ActionButton("Full Buff Please", () => { CheatsCombat.FullBuffPlease(""); }); },
                      () => { UI.ActionButton("Remove Buffs", () => { Actions.RemoveAllBuffs(); }); },
                      () => { UI.ActionButton("Remove Death's Door", () => { CheatsCombat.DetachDebuff(); }); },
                      () => { UI.ActionButton("Kill All Enemies", () => { CheatsCombat.KillAll(); }); },
                      () => { UI.ActionButton("Summon Zoo", () => { CheatsCombat.SpawnInspectedEnemiesUnderCursor(""); }); }
                      );
            UI.Div(0, 25);
            UI.HStack("Common", 4,
                      () => { UI.ActionButton("Teleport Party To You", () => { Actions.TeleportPartyToPlayer(); }); },
                      () => { UI.ActionButton("Perception Checks", () => { Actions.RunPerceptionTriggers(); }); },
                      () => {
                UI.ActionButton("Set Perception to 40", () => {
                    CheatsCommon.StatPerception();
                    Actions.RunPerceptionTriggers();
                });
            },
                      () => { UI.ActionButton("Change Weather", () => { CheatsCommon.ChangeWeather(""); }); },
                      () => { UI.ActionButton("Give All Items", () => { CheatsUnlock.CreateAllItems(""); }); },
                      //                    () => { UI.ActionButton("Change Party", () => { Actions.ChangeParty(); }); },
                      () => { }
                      );
            UI.Div(0, 25);
            UI.HStack("Unlocks", 4, () => {
                UI.ActionButton("All Mythic Paths", () => { Actions.UnlockAllMythicPaths(); });
                UI.Space(25);
                UI.Label("Warning! Using this might break your game somehow. Recommend for experimental tinkering like trying out different builds, and not for actually playing the game.".green());
            });
            UI.Div(0, 25);
            UI.HStack("Preview", 0, () => {
                UI.Toggle("Dialog Results", ref settings.previewDialogResults, 0);
                UI.Toggle("Dialog Alignment", ref settings.previewAlignmentRestrictedDialog, 0);
                UI.Toggle("Random Encounters", ref settings.previewRandomEncounters, 0);
                UI.Toggle("Events", ref settings.previewEventResults, 0);
            });
            UI.Div(0, 25);
            UI.HStack("Tweaks", 1,
                      () => { UI.Toggle("Object Highlight Toggle Mode", ref settings.highlightObjectsToggle, 0); },
                      () => { UI.Toggle("Whole Team Moves Same Speed", ref settings.toggleMoveSpeedAsOne, 0); },

                      () => { UI.Toggle("Infinite Abilities", ref settings.toggleInfiniteAbilities, 0); },
                      () => { UI.Toggle("Infinite Spell Casts", ref settings.toggleInfiniteSpellCasts, 0); },

                      () => { UI.Toggle("Unlimited Actions During Turn", ref settings.toggleUnlimitedActionsPerTurn, 0); },
                      () => { UI.Toggle("Infinite Charges On Items", ref settings.toggleInfiniteItems, 0); },

                      () => { UI.Toggle("Instant Cooldown", ref settings.toggleInstantCooldown, 0); },
                      () => { UI.Toggle("Spontaneous Caster Scroll Copy", ref settings.toggleSpontaneousCopyScrolls, 0); },

                      () => { UI.Toggle("Disable Equipment Restrictions", ref settings.toggleEquipmentRestrictions, 0); },
                      () => { UI.Toggle("Disable Dialog Restrictions", ref settings.toggleDialogRestrictions, 0); },

                      () => { UI.Toggle("No Friendly Fire On AOEs", ref settings.toggleNoFriendlyFireForAOE, 0); },
                      () => { UI.Toggle("Free Meta-Magic", ref settings.toggleMetamagicIsFree, 0); },

                      () => { UI.Toggle("No Fog Of War", ref settings.toggleNoFogOfWar, 0); },
                      () => { UI.Toggle("No Material Components", ref settings.toggleMaterialComponent, 0); },
                      //() => { UI.Toggle("Restore Spells & Skills After Combat", ref settings.toggleRestoreSpellsAbilitiesAfterCombat,0); },
                      //() => { UI.Toggle("Access Remote Characters", ref settings.toggleAccessRemoteCharacters,0); },
                      //() => { UI.Toggle("Show Pet Portraits", ref settings.toggleShowAllPartyPortraits,0); },
                      () => { UI.Toggle("Instant Rest After Combat", ref settings.toggleInstantRestAfterCombat, 0); },
                      () => { UI.Toggle("Auto Load Last Save On Launch", ref settings.toggleAutomaticallyLoadLastSave, 0); },
                      () => { }
                      );
            UI.Div(153, 25);
            UI.HStack("", 1,
                      () => {
                UI.EnumGrid("Disable Attacks Of Opportunity",
                            ref settings.noAttacksOfOpportunitySelection, 0, UI.AutoWidth());
            },
                      () => {
                UI.EnumGrid("Can Move Through", ref settings.allowMovementThroughSelection, 0, UI.AutoWidth());
            },
                      () => { UI.Space(328); UI.Label("This allows characters you control to move through the selected category of units during combat".green(), UI.AutoWidth()); },
#if false
                      () => { UI.Slider("Collision Radius Multiplier", ref settings.collisionRadiusMultiplier, 0f, 2f, 1f, 1, "", UI.AutoWidth()); },
#endif
                      () => { }
                      );
            UI.Div(0, 25);
            UI.HStack("Level Up", 1,
                      () => { UI.Slider("Feature Selection Multiplier", ref settings.featsMultiplier, 0, 10, 1, "", UI.AutoWidth()); },
                      () => { UI.Toggle("Always Able To Level Up", ref settings.toggleNoLevelUpRestrictions, 0); },
                      () => { UI.Toggle("Add Full Hit Die Value", ref settings.toggleFullHitdiceEachLevel, 0); },
                      () => {
                UI.Toggle("Ignore Class And Feat Restrictions", ref settings.toggleIgnorePrerequisites, 0);
                UI.Space(25);
                UI.Label("Experimental".cyan() + ": in addition to regular leveling, this allows you to choose any mythic class each time you level up starting from level 1. This may have interesting and unexpected effects. Backup early and often...".green());
            },
                      () => { UI.Toggle("Ignore Prerequisites When Choosing A Feat", ref settings.toggleFeaturesIgnorePrerequisites, 0); },
                      () => { UI.Toggle("Ignore Caster Type And Spell Level Restrictions", ref settings.toggleIgnoreCasterTypeSpellLevel, 0); },
                      () => { UI.Toggle("Ignore Forbidden Archetypes", ref settings.toggleIgnoreForbiddenArchetype, 0); },
                      () => { UI.Toggle("Ignore Required Stat Values", ref settings.toggleIgnorePrerequisiteStatValue, 0); },
                      () => { UI.Toggle("Ignore Alignment When Choosing A Class", ref settings.toggleIgnoreAlignmentWhenChoosingClass, 0); },
                      () => { UI.Toggle("Skip Spell Selection", ref settings.toggleSkipSpellSelection, 0); },

#if false
                      // Do we need these or is it covered by toggleFeaturesIgnorePrerequisites
                      () => { UI.Toggle("Ignore Feat Prerequisites When Choosing A Class", ref settings.toggleIgnoreFeaturePrerequisitesWhenChoosingClass, 0); },
                      () => { UI.Toggle("Ignore Feat Prerequisits (List) When Choosing A Class", ref settings.toggle, 0); },
#endif

                      () => { }
                      );
            UI.Div(0, 25);
            UI.HStack("Multipliers", 1,
                      () => { UI.LogSlider("Experience", ref settings.experienceMultiplier, 0f, 20, 1, 1, "", UI.AutoWidth()); },
                      () => { UI.LogSlider("Money Earned", ref settings.moneyMultiplier, 0f, 20, 1, 1, "", UI.AutoWidth()); },
                      () => { UI.LogSlider("Vendor Sell Price", ref settings.vendorSellPriceMultiplier, 0f, 20, 1, 1, "", UI.AutoWidth()); },
                      () => { UI.LogSlider("Vendor Buy Price", ref settings.vendorBuyPriceMultiplier, 0f, 20, 1, 1, "", UI.AutoWidth()); },
                      () => { UI.Slider("Encumberance", ref settings.encumberanceMultiplier, 1, 100, 1, "", UI.AutoWidth()); },
                      () => { UI.LogSlider("Spells Per Day", ref settings.spellsPerDayMultiplier, 0f, 20, 1, 1, "", UI.AutoWidth()); },
                      () => { UI.LogSlider("Movement Speed", ref settings.partyMovementSpeedMultiplier, 0f, 20, 1, 1, "", UI.AutoWidth()); },
                      () => { UI.LogSlider("Travel Speed", ref settings.travelSpeedMultiplier, 0f, 20, 1, 1, "", UI.AutoWidth()); },
                      () => { UI.LogSlider("Companion Cost", ref settings.companionCostMultiplier, 0, 20, 1, 1, "", UI.AutoWidth()); },
                      () => { UI.LogSlider("Enemy HP Multiplier", ref settings.enemyBaseHitPointsMultiplier, 0f, 20, 1, 1, "", UI.AutoWidth()); },
                      () => { UI.LogSlider("Buff Duration", ref settings.buffDurationMultiplierValue, 0f, 100, 1, 1, "", UI.AutoWidth()); },
                      () => { }
                      );
            UI.Div(0, 25);
            UI.HStack("Dice Rolls", 1,
                      () => UI.EnumGrid("All Hits Critical", ref settings.allHitsCritical, 0, UI.AutoWidth()),
                      () => UI.EnumGrid("Roll With Avantage", ref settings.rollWithAdvantage, 0, UI.AutoWidth()),
                      () => UI.EnumGrid("Roll With Disavantage", ref settings.rollWithDisadvantage, 0, UI.AutoWidth()),
                      () => UI.EnumGrid("Always Roll 20", ref settings.alwaysRoll20, 0, UI.AutoWidth()),
                      () => UI.EnumGrid("Always Roll 1", ref settings.alwaysRoll1, 0, UI.AutoWidth()),
                      () => UI.EnumGrid("Never Roll 20", ref settings.neverRoll20, 0, UI.AutoWidth()),
                      () => UI.EnumGrid("Never Roll 1", ref settings.neverRoll1, 0, UI.AutoWidth()),
                      () => UI.EnumGrid("Always Roll 20 Initiative ", ref settings.roll20Initiative, 0, UI.AutoWidth()),
                      () => UI.EnumGrid("Always Roll 1 Initiative", ref settings.roll1Initiative, 0, UI.AutoWidth()),
                      () => { }
                      );
            UI.Div(0, 25);
            UI.HStack("Character Creation", 1,
                      () => { UI.Slider("Build Points (Main)", ref settings.characterCreationAbilityPointsPlayer, 1, 200, 25, "", UI.AutoWidth()); },
                      () => { UI.Slider("Build Points (Mercenary)", ref settings.characterCreationAbilityPointsMerc, 1, 200, 20, "", UI.AutoWidth()); },
                      () => { UI.Slider("Ability Max", ref settings.characterCreationAbilityPointsMax, 0, 50, 18, "", UI.AutoWidth()); },
                      () => { UI.Slider("Ability Min", ref settings.characterCreationAbilityPointsMin, 0, 50, 7, "", UI.AutoWidth()); },
                      () => { }
                      );
            UI.Div(0, 25);
            UI.HStack("Crusade", 1,
                      () => { UI.Toggle("Instant Events", ref settings.toggleInstantEvent, 0); },
                      () => {
                UI.Slider("Build Time Modifer", ref settings.kingdomBuildingTimeModifier, -10, 10, 0, 1, "", UI.AutoWidth());
                var instance = KingdomState.Instance;
                if (instance != null)
                {
                    instance.BuildingTimeModifier = settings.kingdomBuildingTimeModifier;
                }
            },
                      () => { }
                      );
            UI.Space(25);
        }
示例#2
0
        public static void OnGUI()
        {
            if (Main.IsInGame)
            {
                UI.BeginHorizontal();
                UI.Space(25);
                UI.Label("increment".cyan(), UI.AutoWidth());
                var increment = UI.IntTextField(ref settings.increment, null, UI.Width(150));
                UI.Space(25);
                UI.Toggle("Dividers", ref settings.showDivisions);
                UI.EndHorizontal();
                var mainChar = Game.Instance.Player.MainCharacter.Value;
                var kingdom  = KingdomState.Instance;
                UI.Div(0, 25);
                UI.HStack("Resources", 1,
                          () => {
                    var money = Game.Instance.Player.Money;
                    UI.Label("Gold".cyan(), UI.Width(150));
                    UI.Label(money.ToString().orange().bold(), UI.Width(200));
                    UI.ActionButton($"Gain {increment}", () => Game.Instance.Player.GainMoney(increment), UI.AutoWidth());
                    UI.ActionButton($"Lose {increment}", () => {
                        var loss = Math.Min(money, increment);
                        Game.Instance.Player.GainMoney(-loss);
                    }, UI.AutoWidth());
                },
                          () => {
                    var exp = mainChar.Progression.Experience;
                    UI.Label("Experience".cyan(), UI.Width(150));
                    UI.Label(exp.ToString().orange().bold(), UI.Width(200));
                    UI.ActionButton($"Gain {increment}", () => {
                        Game.Instance.Player.GainPartyExperience(increment);
                    }, UI.AutoWidth());
                });
                if (kingdom != null)
                {
                    UI.Div(0, 25);
                    UI.HStack("Kingdom", 1,
                              () => {
                        UI.Label("Finances".cyan(), UI.Width(150));
                        UI.Label(kingdom.Resources.Finances.ToString().orange().bold(), UI.Width(200));
                        UI.ActionButton($"Gain {increment}", () => {
                            kingdom.Resources += KingdomResourcesAmount.FromFinances(increment);
                        }, UI.AutoWidth());
                        UI.ActionButton($"Lose {increment}", () => {
                            kingdom.Resources -= KingdomResourcesAmount.FromFinances(increment);
                        }, UI.AutoWidth());
                    },
                              () => {
                        UI.Label("Materials".cyan(), UI.Width(150));
                        UI.Label(kingdom.Resources.Materials.ToString().orange().bold(), UI.Width(200));
                        UI.ActionButton($"Gain {increment}", () => {
                            kingdom.Resources += KingdomResourcesAmount.FromMaterials(increment);
                        }, UI.AutoWidth());
                        UI.ActionButton($"Lose {increment}", () => {
                            kingdom.Resources -= KingdomResourcesAmount.FromMaterials(increment);
                        }, UI.AutoWidth());
                    },
                              () => {
                        UI.Label("Favors".cyan(), UI.Width(150));
                        UI.Label(kingdom.Resources.Favors.ToString().orange().bold(), UI.Width(200));
                        UI.ActionButton($"Gain {increment}", () => {
                            kingdom.Resources += KingdomResourcesAmount.FromFavors(increment);
                        }, UI.AutoWidth());
                        UI.ActionButton($"Lose {increment}", () => {
                            kingdom.Resources -= KingdomResourcesAmount.FromFavors(increment);
                        }, UI.AutoWidth());
                    });
                }
            }
            UI.Div(0, 25);
            UI.HStack("Combat", 4,
                      () => UI.ActionButton("Rest All", () => CheatsCombat.RestAll()),
                      () => UI.ActionButton("Empowered", () => CheatsCombat.Empowered("")),
                      () => UI.ActionButton("Full Buff Please", () => CheatsCombat.FullBuffPlease("")),
                      () => UI.ActionButton("Remove Buffs", () => Actions.RemoveAllBuffs()),
                      () => UI.ActionButton("Remove Death's Door", () => CheatsCombat.DetachDebuff()),
                      () => UI.ActionButton("Kill All Enemies", () => CheatsCombat.KillAll()),
                      () => UI.ActionButton("Summon Zoo", () => CheatsCombat.SpawnInspectedEnemiesUnderCursor(""))
                      );
            UI.Div(0, 25);
            UI.HStack("Common", 4,
                      () => UI.ActionButton("Teleport Party To You", () => Actions.TeleportPartyToPlayer()),
                      () => UI.ActionButton("Go To Global Map", () => Actions.TeleportToGlobalMap()),
                      () => UI.ActionButton("Perception Checks", () => Actions.RunPerceptionTriggers()),
                      () => {
                UI.ActionButton("Set Perception to 40", () => {
                    CheatsCommon.StatPerception();
                    Actions.RunPerceptionTriggers();
                });
            },
                      () => UI.ActionButton("Change Weather", () => CheatsCommon.ChangeWeather("")),
                      () => UI.ActionButton("Give All Items", () => CheatsUnlock.CreateAllItems("")),
                      //                    () => { UI.ActionButton("Change Party", () => { Actions.ChangeParty(); }); },
                      () => { }
                      );
            UI.Div(0, 25);
            UI.HStack("Unlocks", 4, () => {
                UI.ActionButton("All Mythic Paths", () => Actions.UnlockAllMythicPaths());
                UI.Space(25);
                UI.Label("Warning! Using this might break your game somehow. Recommend for experimental tinkering like trying out different builds, and not for actually playing the game.".green());
            });
            UI.Div(0, 25);
            UI.HStack("Preview", 0, () => {
                UI.Toggle("Dialog Results", ref settings.previewDialogResults, 0);
                UI.Toggle("Dialog Alignment", ref settings.previewAlignmentRestrictedDialog, 0);
                UI.Toggle("Random Encounters", ref settings.previewRandomEncounters, 0);
                UI.Toggle("Events", ref settings.previewEventResults, 0);
            });
            UI.Div(0, 25);
            UI.HStack("Tweaks", 1,
                      () => UI.Toggle("Object Highlight Toggle Mode", ref settings.highlightObjectsToggle, 0),
                      () => UI.Toggle("Whole Team Moves Same Speed", ref settings.toggleMoveSpeedAsOne, 0),

                      () => UI.Toggle("Infinite Abilities", ref settings.toggleInfiniteAbilities, 0),
                      () => UI.Toggle("Infinite Spell Casts", ref settings.toggleInfiniteSpellCasts, 0),

                      () => UI.Toggle("Unlimited Actions During Turn", ref settings.toggleUnlimitedActionsPerTurn, 0),
                      () => UI.Toggle("Infinite Charges On Items", ref settings.toggleInfiniteItems, 0),

                      () => UI.Toggle("Instant Cooldown", ref settings.toggleInstantCooldown, 0),
                      () => UI.Toggle("Spontaneous Caster Scroll Copy", ref settings.toggleSpontaneousCopyScrolls, 0),

                      () => UI.Toggle("Disable Equipment Restrictions", ref settings.toggleEquipmentRestrictions, 0),
                      () => UI.Toggle("Disable Dialog Restrictions", ref settings.toggleDialogRestrictions, 0),

                      () => UI.Toggle("No Friendly Fire On AOEs", ref settings.toggleNoFriendlyFireForAOE, 0),
                      () => UI.Toggle("Free Meta-Magic", ref settings.toggleMetamagicIsFree, 0),

                      () => UI.Toggle("No Fog Of War", ref settings.toggleNoFogOfWar, 0),
                      () => UI.Toggle("No Material Components", ref settings.toggleMaterialComponent, 0),
                      //() => UI.Toggle("Restore Spells & Skills After Combat", ref settings.toggleRestoreSpellsAbilitiesAfterCombat,0),
                      //() => UI.Toggle("Access Remote Characters", ref settings.toggleAccessRemoteCharacters,0),
                      //() => UI.Toggle("Show Pet Portraits", ref settings.toggleShowAllPartyPortraits,0),
                      () => UI.Toggle("Instant Rest After Combat", ref settings.toggleInstantRestAfterCombat, 0),
                      () => UI.Toggle("Auto Load Last Save On Launch", ref settings.toggleAutomaticallyLoadLastSave, 0),
                      () => { }
                      );
            UI.Div(153, 25);
            UI.HStack("", 1,
                      () => UI.EnumGrid("Disable Attacks Of Opportunity", ref settings.noAttacksOfOpportunitySelection, 0, UI.AutoWidth()),
                      () => UI.EnumGrid("Can Move Through", ref settings.allowMovementThroughSelection, 0, UI.AutoWidth()),
                      () => { UI.Space(328); UI.Label("This allows characters you control to move through the selected category of units during combat".green(), UI.AutoWidth()); }
#if false
                      () => { UI.Slider("Collision Radius Multiplier", ref settings.collisionRadiusMultiplier, 0f, 2f, 1f, 1, "", UI.AutoWidth()); },
示例#3
0
        public static void OnGUI()
        {
            var ks = KingdomState.Instance;

            if (ks == null)
            {
                UI.Label("You must unlock the crusade before you can access these toys.".yellow().bold());
                return;
            }
            var moraleState = ks.MoraleState;

            UI.HStack("Morale", 1,
                      () => {
                UI.Toggle("Flags always green", ref settings.toggleCrusadeFlagsStayGreen);
                KingdomCheats.AddMorale();
            },
                      () => {
                var value = moraleState.CurrentValue;
                UI.Slider("Morale", ref value, moraleState.MinValue, moraleState.MaxValue, 1, "", UI.AutoWidth());
                moraleState.CurrentValue = value;
            },
                      () => {
                var value = moraleState.MaxValue;
                UI.Slider("Max Morale", ref value, -200, 200, 20, "", UI.AutoWidth());
                moraleState.MaxValue = value;
            },
                      () => {
                var value = moraleState.MinValue;
                UI.Slider("Min Morale", ref value, -200, 200, -100, "", UI.AutoWidth());
                moraleState.MinValue = value;
            },
                      () => { }
                      );
            UI.Div(0, 25);
            UI.HStack("Kingdom", 1,
                      () => {
                UI.Label("increment".cyan(), UI.Width(325));
                var increment = UI.IntTextField(ref settings.increment, null, UI.Width(150));
                UI.Space(25);
                UI.Label("Experimental".orange().bold());
            },
                      () => {
                using (UI.VerticalScope()) {
                    UI.Space(15);
                    UI.Div(0, 0, 800);
                    using (UI.HorizontalScope()) {
                        UI.Label("Kingdom Stat", UI.Width(325));
                        UI.Label("Rank", UI.Width(150));
                        UI.Label("Experience", UI.Width(150));
                        UI.Label("Next Rank", UI.Width(150));
                    }
                    foreach (var kingdomStat in ks.Stats)
                    {
                        var conditions = KingdomRoot.Instance.RankUps.Conditions[kingdomStat.Type];
                        using (UI.HorizontalScope()) {
                            var rank     = kingdomStat.Rank;
                            var exp      = kingdomStat.Value.ToString().orange();
                            var required = conditions.GetRequiredStatValue(kingdomStat.Rank + 1).ToString().cyan();
                            UI.ValueAdjuster(kingdomStat.Type.ToString(), () => kingdomStat.Rank, v => kingdomStat.Rank = v, 1, 0, 8);
                            UI.Space(42);
                            UI.Label(exp, UI.Width(150));
                            UI.Label(required, UI.Width(150));
                            UI.Space(10);
                            UI.ActionButton($"Gain {settings.increment}", () => {
                                kingdomStat.Value += settings.increment;
                            }, UI.AutoWidth());
                            UI.ActionButton($"Lose {settings.increment}", () => {
                                kingdomStat.Value -= settings.increment;
                            }, UI.AutoWidth());
                        }
                    }
                    UI.Div(0, 0, 800);
                    UI.DescriptiveLabel("Cost Modifiers", "The following modifiers all work on ".green() + "cost = cost (1 + modifier) ".yellow() + "so a value of ".green() + "-1".yellow() + " means the cost is free, ".green() + "0".yellow() + " is normal cost and ".green() + "2".yellow() + " increases it 3x".green());
                    UI.Slider("Claim Cost Modifier", () => ks.ClaimCostModifier, v => ks.ClaimCostModifier   = v, -1, 2, 0, 1);
                    UI.Slider("Claim Time Modifier", () => ks.ClaimTimeModifier, v => ks.ClaimTimeModifier   = v, -1, 2, 0, 1);
                    UI.Slider("Rankup Time Modifer", () => ks.RankupTimeModifier, v => ks.RankupTimeModifier = v, -1, 2, 0, 1);
                    UI.Slider("Build Time Modifier", ref settings.kingdomBuildingTimeModifier, -1, 2, 0, 1);
                    UI.Div(0, 0, 800);
                    UI.DescriptiveLabel("Random Encounters", "The following modifiers all work on ".green() + "chance = chance (1 + modifier) ".yellow() + "so a value of ".green() + "-1".yellow() + " means the chance is 0, ".green() + "0".yellow() + " is chance cost and ".green() + "2".yellow() + " increases it 3x".green());
                    UI.Slider("% Chance (Unclaimed)", () => ks.REModifierUnclaimed, v => ks.REModifierUnclaimed = v, -1f, 2f, 0f, 1);
                    UI.Slider("% Chance (Claimed)", () => ks.REModifierClaimed, v => ks.REModifierClaimed       = v, -1, 2, -0.5f, 1);
                    UI.Slider("% Chance (Upgraded)", () => ks.REModifierUpgraded, v => ks.REModifierUnclaimed   = v, -1f, 2f, -1f, 1);
                    UI.Div(0, 0, 800);
                    UI.ValueAdjuster("Confidence (Royal Court)", () => ks.RoyalCourtConfidence, v => ks.RoyalCourtConfidence = v, 1, 0, int.MaxValue);
                    UI.ValueAdjuster("Confidence (Nobles)", () => ks.NobilityConfidence, v => ks.NobilityConfidence          = v, 1, 0, int.MaxValue);
                    UI.ValueAdjuster("Victories This Week", () => ks.VictoriesThisWeek, v => ks.VictoriesThisWeek            = v, 1, 0, int.MaxValue);
                    UI.EnumGrid("Unrest", () => ks.Unrest, (u) => ks.Unrest         = u);
                    UI.AlignmentGrid("Alignment", ks.Alignment, (a) => ks.Alignment = a, UI.Width(325));
                }
            },
                      () => {
                using (UI.VerticalScope()) {
                    UI.Space(15);
                    UI.Div(0, 0, 800);
                    UI.Label("Kingdom Finances");
                }
            },
                      () => {
                UI.Label("Finances".cyan(), UI.Width(325));
                UI.Label(ks.Resources.Finances.ToString().orange().bold(), UI.Width(100));
                UI.ActionButton($"Gain {settings.increment}", () => {
                    ks.Resources += KingdomResourcesAmount.FromFinances(settings.increment);
                }, UI.AutoWidth());
                UI.ActionButton($"Lose {settings.increment}", () => {
                    ks.Resources -= KingdomResourcesAmount.FromFinances(settings.increment);
                }, UI.AutoWidth());
            },
                      () => {
                UI.Label("Materials".cyan(), UI.Width(325));
                UI.Label(ks.Resources.Materials.ToString().orange().bold(), UI.Width(100));
                UI.ActionButton($"Gain {settings.increment}", () => {
                    ks.Resources += KingdomResourcesAmount.FromMaterials(settings.increment);
                }, UI.AutoWidth());
                UI.ActionButton($"Lose {settings.increment}", () => {
                    ks.Resources -= KingdomResourcesAmount.FromMaterials(settings.increment);
                }, UI.AutoWidth());
            },
                      () => {
                UI.Label("Favors".cyan(), UI.Width(325));
                UI.Label(ks.Resources.Favors.ToString().orange().bold(), UI.Width(100));
                UI.ActionButton($"Gain {settings.increment}", () => {
                    ks.Resources += KingdomResourcesAmount.FromFavors(settings.increment);
                }, UI.AutoWidth());
                UI.ActionButton($"Lose {settings.increment}", () => {
                    ks.Resources -= KingdomResourcesAmount.FromFavors(settings.increment);
                }, UI.AutoWidth());
            },
                      () => {
                using (UI.VerticalScope()) {
                    UI.Space(15);
                    UI.Div(0, 0, 800);
                }
            },
                      () => UI.Toggle("Instant Events", ref settings.toggleInstantEvent),
                      () => UI.Toggle("Ignore Event Solution Restrictions", ref settings.toggleIgnoreEventSolutionRestrictions),
                      () => {
                UI.Slider("Crusade card resolution time multiplier", ref settings.kingdomTaskResolutionLengthMultiplier, -1, 2, 0, 2, "", UI.Width(400));
                UI.Space(25);
                UI.Label("Multiplies crusade card resolution time by (1 + modifier). -1 will make things as fast as possible (minimum 1 day to avoid possible bugs)".green());
            },
                      () => {
                UI.Slider("Build Time Modifier", ref settings.kingdomBuildingTimeModifier, -1, 2, 0, 2, "", UI.Width(400));
                var instance = KingdomState.Instance;
                if (instance != null)
                {
                    instance.BuildingTimeModifier = settings.kingdomBuildingTimeModifier;
                }
                UI.Space(25);
                UI.Label("Multiplies build time by (1 + modifier). -1 will make new buildings instant.".green());
            },
                      () => {
                var startDate   = Game.Instance.BlueprintRoot.Calendar.GetStartDate();
                var currentDate = KingdomState.Instance.Date;
                var dateText    = Game.Instance.BlueprintRoot.Calendar.GetDateText(currentDate - startDate, GameDateFormat.Full, true);
                using (UI.VerticalScope()) {
                    UI.Space(15);
                    UI.Div(0, 0, 800);
                    using (UI.HorizontalScope()) {
                        UI.Label("Date".cyan(), UI.Width(325));
                        UI.Label(dateText.orange().bold(), UI.AutoWidth());
                        UI.ActionButton($"+1 Day", () => { Actions.KingdomTimelineAdvanceDays(1); }, UI.Width(150));
                        UI.ActionButton($"+1 Month", () => {
                            Actions.KingdomTimelineAdvanceDays(KingdomState.Instance.DaysTillNextMonth);
                        }, UI.Width(150));
                    }
                    UI.ValueAdjuster("Current Day", () => ks.CurrentDay, v => ks.CurrentDay    = v, 1, 0, int.MaxValue);
                    UI.ValueAdjuster("Current Turn", () => ks.CurrentTurn, v => ks.CurrentTurn = v, 1, 0, int.MaxValue);
                }
            },
                      () => { }
                      );
            25.space();
            UI.Div();
            SettlementsEditor.OnGUI();
        }