Ejemplo n.º 1
0
        public static void OnGUI()
        {
            var characters = PartyEditor.GetCharacterList();

            if (characters == null)
            {
                return;
            }
            UI.ActionSelectionGrid(ref selectedIndex,
                                   characters.Select((ch) => ch.CharacterName).ToArray(),
                                   8,
                                   (index) => { BlueprintBrowser.UpdateSearchResults(); },
                                   UI.MinWidth(200));
            var selectedCharacter = GetSelectedCharacter();

            if (selectedCharacter != null)
            {
                UI.Space(10);
                UI.HStack(null, 0, () => {
                    UI.Label($"{GetSelectedCharacter().CharacterName}".orange().bold(), UI.AutoWidth());
                    UI.Space(5);
                    UI.Label("will be used for adding/remove features, buffs, etc ".green());
                });
            }
        }
Ejemplo n.º 2
0
        public static void OnGUI()
        {
            UI.HStack("Settings", 1,
                      () => {
                UI.ActionButton("Reset UI", () => Main.SetNeedsResetGameUI());
                25.space();
                UI.Label("Tells the game to reset the in game UI.".green() + " Warning".yellow() + " Using this in dialog or the book will dismiss that dialog which may break progress so use with care".orange());
            },
                      () => {
                UI.Toggle("Enable Game Development Mode", ref Main.settings.toggleDevopmentMode);
                UI.Space(25);
                UI.Label("This turns on the developer console which lets you access cheat commands, shows a FPS window (hide with F11), etc".green());
            },
                      () => UI.Label(""),
                      () => UI.EnumGrid("Log Level", ref Main.settings.loggingLevel, UI.AutoWidth()),
                      () => UI.Label(""),
                      () => UI.Toggle("Strip HTML (colors) from Native Console", ref Main.settings.stripHtmlTagsFromNativeConsole),
#if DEBUG
                      () => UI.Toggle("Strip HTML (colors) from Logs Tab in Unity Mod Manager", ref Main.settings.stripHtmlTagsFromUMMLogsTab),
#endif
                      () => UI.Toggle("Display guids in most tooltips, use shift + left click on items/abilities to copy guid to clipboard", ref Main.settings.toggleGuidsClipboard),
                      () => { }
                      );
#if DEBUG
            UI.Div(0, 25);
            UI.HStack("Localizaton", 1,
                      () => {
                var cultureInfo = Thread.CurrentThread.CurrentUICulture;
                var cultures    = CultureInfo.GetCultures(CultureTypes.AllCultures).OrderBy(ci => ci.DisplayName).ToList();
                using (UI.VerticalScope()) {
                    using (UI.HorizontalScope()) {
                        UI.Label("Current Cultrue".cyan(), UI.Width(275));
                        UI.Space(25);
                        UI.Label($"{cultureInfo.DisplayName}({cultureInfo.Name})".orange());
                    }
                    if (UI.GridPicker <CultureInfo>("Culture", ref uiCulture, cultures, null, ci => ci.DisplayName, ref cultureSearchText, 8, UI.rarityButtonStyle, UI.Width(UI.ummWidth - 350)))
                    {
                        // can we set it?
                    }
                }
            },
                      () => { }
                      );
#endif
        }
Ejemplo n.º 3
0
        public static void OnGUI()
        {
            UI.Toggle("Hide Completed", ref Main.settings.hideCompleted);
            GUILayout.Space(5f);
            Quest[] quests = Game.Instance.Player.QuestBook.Quests.ToArray();
            selectedQuests = ((selectedQuests.Length != quests.Length) ? new bool[quests.Length] : selectedQuests);
            int   index        = 0;
            Color contentColor = GUI.contentColor;

            foreach (Quest quest in quests)
            {
                if (Main.settings.hideCompleted && quest.State == QuestState.Completed && selectedQuests[index])
                {
                    selectedQuests[index] = false;
                }
                if (!Main.settings.hideCompleted || quest.State != QuestState.Completed || selectedQuests[index])
                {
                    UI.HStack(null, 0, () => {
                        UI.Space(50);
                        UI.Label(quest.Blueprint.Title, UI.Width(600));
                        UI.Space(50);
                        UI.DisclosureToggle(quest.stateString(), ref selectedQuests[index]);
                    });
                    if (selectedQuests[index])
                    {
                        foreach (QuestObjective questObjective in quest.Objectives)
                        {
                            if (questObjective.ParentObjective == null)
                            {
                                UI.HStack(null, 0, () => {
                                    UI.Space(50);
                                    UI.Label($"{questObjective.Order}", UI.Width(50));
                                    UI.Space(10);
                                    UI.Label(questObjective.Blueprint.Title, UI.Width(600));
                                    UI.Space(25);
                                    UI.Label(questObjective.stateString(), UI.Width(150));
                                    if (questObjective.State == QuestObjectiveState.None && quest.State == QuestState.Started)
                                    {
                                        UI.ActionButton("Start", () => { questObjective.Start(); }, UI.AutoWidth());
                                    }
                                    else if (questObjective.State == QuestObjectiveState.Started)
                                    {
                                        UI.ActionButton(questObjective.Blueprint.IsFinishParent ? "Complete (Final)" : "Complete", () => {
                                            questObjective.Complete();
                                        }, UI.AutoWidth());
                                        if (questObjective.Blueprint.AutoFailDays > 0)
                                        {
                                            UI.ActionButton("Reset Time", () => {
                                                Traverse.Create(questObjective).Field("m_ObjectiveStartTime").SetValue(Game.Instance.Player.GameTime);
                                            }, UI.AutoWidth());
                                        }
                                    }
                                    else if (questObjective.State == QuestObjectiveState.Failed && (questObjective.Blueprint.IsFinishParent || quest.State == QuestState.Started))
                                    {
                                        UI.ActionButton("Restart", () => {
                                            if (quest.State == QuestState.Completed || quest.State == QuestState.Failed)
                                            {
                                                Traverse.Create(quest).Field("m_State").SetValue(QuestState.Started);
                                            }
                                            questObjective.Reset();
                                            questObjective.Start();
                                        }, UI.AutoWidth());
                                    }
                                });
                                if (questObjective.State == QuestObjectiveState.Started)
                                {
                                    foreach (QuestObjective childObjective in quest.Objectives)
                                    {
                                        if (childObjective.ParentObjective == questObjective)
                                        {
                                            UI.HStack(null, 0, () => {
                                                UI.Space(100);
                                                UI.Label($"{childObjective.Order}", UI.Width(50));
                                                UI.Space(10);
                                                UI.Label(childObjective.Blueprint.Title, UI.Width(600));
                                                UI.Space(25);
                                                UI.Label(childObjective.stateString(), UI.Width(150));
                                                if (childObjective.State == QuestObjectiveState.None)
                                                {
                                                    UI.ActionButton("Start", () => { childObjective.Start(); }, UI.AutoWidth());
                                                }
                                                else if (childObjective.State == QuestObjectiveState.Started)
                                                {
                                                    UI.ActionButton(childObjective.Blueprint.IsFinishParent ? "Complete (Final)" : "Complete", () => {
                                                        childObjective.Complete();
                                                    }, UI.AutoWidth());
                                                }
                                            });
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                index++;
            }
            UI.Space(25);
        }
Ejemplo n.º 4
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()); },
Ejemplo n.º 5
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);
        }
Ejemplo n.º 6
0
        public static void OnGUI()
        {
#if DEBUG
            UI.Div(0, 25);
            var inventory = Game.Instance.Player.Inventory;
            var items     = inventory.ToList();
            UI.HStack("Inventory", 1,
                      () => {
                UI.ActionButton("Export", () => items.Export("inventory.json"), UI.Width(150));
                UI.Space(25);
                UI.ActionButton("Import", () => inventory.Import("inventory.json"), UI.Width(150));
                UI.Space(25);
                UI.ActionButton("Replace", () => inventory.Import("inventory.json", true), UI.Width(150));
            },
                      () => { }
                      );
#endif
            UI.Div(0, 25);
            UI.HStack("Loot", 1,
                      () => {
                UI.BindableActionButton(MassLootBox, UI.Width(200));
                UI.Space(5); UI.Label("Area exit loot screen useful with the mod Cleaner to clear junk loot mid dungeon leaving less clutter on the map".green());
            },
                      () => {
                UI.ActionButton("Reveal Ground Loot", () => LootHelper.ShowAllChestsOnMap(), UI.Width(200));
                UI.Space(210); UI.Label("Shows all chests/bags/etc on the map excluding hidden".green());
            },
                      () => {
                UI.ActionButton("Reveal Hidden Ground Loot", () => LootHelper.ShowAllChestsOnMap(true), UI.Width(200));
                UI.Space(210); UI.Label("Shows all chests/bags/etc on the map including hidden".green());
            },
                      () => {
                UI.ActionButton("Reveal Inevitable Loot", () => LootHelper.ShowAllInevitablePortalLoot(), UI.Width(200));
                UI.Space(210); UI.Label("Shows unlocked Inevitable Excess DLC rewards on the map".green());
            },
                      () => {
                UI.Toggle("Mass Loot Shows Everything When Leaving Map", ref settings.toggleMassLootEverything);
                UI.Space(100); UI.Label("Some items might be invisible until looted".green());
            },
                      () => {
                UI.Toggle("Color Items By Rarity", ref settings.toggleColorLootByRarity);
                UI.Space(25);
                using (UI.VerticalScope()) {
                    UI.Label($"This makes loot function like Diablo or Borderlands. {"Note: turning this off requires you to save and reload for it to take effect.".orange()}".green());
                    UI.Label("The coloring of rarity goes as follows:".green());
                    UI.HStack("Rarity".orange(), 1,
                              () => {
                        UI.Label("Trash".Rarity(RarityType.Trash).bold(), UI.rarityStyle, UI.Width(200));
                        UI.Space(5); UI.Label("Common".Rarity(RarityType.Common).bold(), UI.rarityStyle, UI.Width(200));
                        UI.Space(5); UI.Label("Uncommon".Rarity(RarityType.Uncommon).bold(), UI.rarityStyle, UI.Width(200));
                    },
                              () => {
                        UI.Space(3); UI.Label("Rare".Rarity(RarityType.Rare).bold(), UI.rarityStyle, UI.Width(200));
                        UI.Space(5); UI.Label("Epic".Rarity(RarityType.Epic).bold(), UI.rarityStyle, UI.Width(200));
                        UI.Space(5); UI.Label("Legendary".Rarity(RarityType.Legendary).bold(), UI.rarityStyle, UI.Width(200));
                    },
                              () => {
                        UI.Space(5); UI.Label("Mythic".Rarity(RarityType.Mythic).bold(), UI.rarityStyle, UI.Width(200));
                        UI.Space(5); UI.Label("Godly".Rarity(RarityType.Godly).bold(), UI.rarityStyle, UI.Width(200));
                        UI.Space(5); UI.Label("Notable".Rarity(RarityType.Notable).bold() + "*".orange().bold(), UI.rarityStyle, UI.Width(200));
                    },
                              () => {
                        UI.Space(3); UI.Label("*".orange().bold() + " Notable".Rarity(RarityType.Notable) + " denotes items that are deemed to be significant for plot reasons or have significant subtle properties".green(), UI.Width(615));
                    },
                              () => { }
                              );
                }

                // The following options let you configure loot filtering and auto sell levels:".green());
            },
#if false
                      () => UI.RarityGrid("Hide Level ", ref settings.lootFilterIgnore, 0, UI.AutoWidth()),
                      () => UI.RarityGrid("Auto Sell Level ", ref settings.lootFilterAutoSell, 0, UI.AutoWidth()),
#endif
                      () => { }
                      );
            UI.Div(0, 25);
            var isEmpty = true;
            UI.HStack("Loot Checklist", 1,
                      () => {
                var areaName = "";
                if (Main.IsInGame)
                {
                    areaName            = Game.Instance.CurrentlyLoadedArea.AreaDisplayName;
                    var areaPrivateName = Game.Instance.CurrentlyLoadedArea.name;
                    if (areaPrivateName != areaName)
                    {
                        areaName += $"\n({areaPrivateName})".yellow();
                    }
                }
                UI.Label(areaName.orange().bold(), UI.Width(300));
                UI.Label("Rarity: ".cyan(), UI.AutoWidth());
                UI.RarityGrid(ref settings.lootChecklistFilterRarity, 4, UI.AutoWidth());
            },
                      () => {
                UI.ActionTextField(
                    ref searchText,
                    "itemSearchText",
                    (text) => { },
                    () => { },
                    UI.Width(300));
                UI.Space(25); UI.Toggle("Show Friendly", ref settings.toggleLootChecklistFilterFriendlies);
                UI.Space(25); UI.Toggle("Blueprint", ref settings.toggleLootChecklistFilterBlueprint, UI.AutoWidth());
                UI.Space(25); UI.Toggle("Description", ref settings.toggleLootChecklistFilterDescription, UI.AutoWidth());
            },
                      () => {
                if (!Main.IsInGame)
                {
                    UI.Label("Not available in the Main Menu".orange()); return;
                }
                var presentGroups = LootHelper.GetMassLootFromCurrentArea().GroupBy(p => p.InteractionLoot != null ? "Containers" : "Units");
                var indent        = 3;
                using (UI.VerticalScope()) {
                    foreach (var group in presentGroups.Reverse())
                    {
                        var presents = group.AsEnumerable().OrderByDescending(p => {
                            var loot = p.GetLewtz(searchText);
                            if (loot.Count == 0)
                            {
                                return(0);
                            }
                            else
                            {
                                return((int)loot.Max(l => l.Rarity()));
                            }
                        });
                        var rarity = settings.lootChecklistFilterRarity;
                        var count  = presents.Where(p => p.Unit == null || (settings.toggleLootChecklistFilterFriendlies && !p.Unit.IsPlayersEnemy || p.Unit.IsPlayersEnemy) || (!settings.toggleLootChecklistFilterFriendlies && p.Unit.IsPlayersEnemy)).Count(p => p.GetLewtz(searchText).Lootable(rarity).Count() > 0);
                        UI.Label($"{group.Key.cyan()}: {count}");
                        UI.Div(indent);
                        foreach (var present in presents)
                        {
                            var pahtLewts = present.GetLewtz(searchText).Lootable(rarity).OrderByDescending(l => l.Rarity());
                            var unit      = present.Unit;
                            if (pahtLewts.Count() > 0 && (unit == null || (settings.toggleLootChecklistFilterFriendlies && !unit.IsPlayersEnemy || unit.IsPlayersEnemy) || (!settings.toggleLootChecklistFilterFriendlies && unit.IsPlayersEnemy)))
                            {
                                isEmpty = false;
                                UI.Div();
                                using (UI.HorizontalScope()) {
                                    UI.Space(indent);
                                    UI.Label($"{present.GetName()}".orange().bold(), UI.Width(325));
                                    if (present.InteractionLoot != null)
                                    {
                                        if (present.InteractionLoot?.Owner?.PerceptionCheckDC > 0)
                                        {
                                            UI.Label($" Perception DC: {present.InteractionLoot?.Owner?.PerceptionCheckDC}".green().bold(), UI.Width(125));
                                        }
                                        else
                                        {
                                            UI.Label($" Perception DC: NA".orange().bold(), UI.Width(125));
                                        }
                                        int?trickDc = present.InteractionLoot?.Owner?.Get <DisableDeviceRestrictionPart>()?.DC;
                                        if (trickDc > 0)
                                        {
                                            UI.Label($" Trickery DC: {trickDc}".green().bold(), UI.Width(125));
                                        }
                                        else
                                        {
                                            UI.Label($" Trickery DC: NA".orange().bold(), UI.Width(125));
                                        }
                                    }
                                    UI.Space(25);
                                    using (UI.VerticalScope()) {
                                        foreach (var lewt in pahtLewts)
                                        {
                                            var description = lewt.Blueprint.Description;
                                            var showBP      = settings.toggleLootChecklistFilterBlueprint;
                                            var showDesc    = settings.toggleLootChecklistFilterDescription && description != null && description.Length > 0;
                                            using (UI.HorizontalScope()) {
                                                //Main.Log($"rarity: {lewt.Blueprint.Rarity()} - color: {lewt.Blueprint.Rarity().color()}");
                                                UI.Label(lewt.Name.Rarity(lewt.Blueprint.Rarity()), showDesc || showBP ? UI.Width(350) : UI.AutoWidth());
                                                if (showBP)
                                                {
                                                    UI.Space(100); UI.Label(lewt.Blueprint.GetDisplayName().grey(), showDesc ? UI.Width(350) : UI.AutoWidth());
                                                }
                                                if (showDesc)
                                                {
                                                    UI.Space(100); UI.Label(description.StripHTML().green());
                                                }
                                            }
                                        }
                                    }
                                }
                                UI.Space(25);
                            }
                        }
                        UI.Space(25);
                    }
                }
            },
                      () => {
                if (isEmpty)
                {
                    using (UI.HorizontalScope()) {
                        UI.Label("No Loot Available".orange(), UI.AutoWidth());
                    }
                }
            }
                      );
        }
Ejemplo n.º 7
0
        public static void OnGUI()
        {
            if (Main.IsInGame)
            {
                UI.HStack("Character Creation", 1,
                          () => UI.Toggle("Ignore Attribute Cap", ref settings.toggleIgnoreAttributeStatCapChargen, 0),
                          () => UI.Toggle("Ignore Remaining Attribute Points", ref settings.toggleIgnoreAttributePointsRemainingChargen, 0),
                          () => UI.Toggle("Ignore Alignment", ref settings.toggleIgnoreAttributeStatCapChargen, 0),

                          () => 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("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 DEBUG
                          () => UI.Toggle("Lock Character Level", ref settings.toggleLockCharacterLevel, 0),
//                    () => UI.Toggle("Ignore Alignment Restrictions", ref settings.toggleIgnoreAlignmentRestriction, 0),
                          () => UI.Toggle("Ignore Remaining Attribute Points", ref settings.toggleIgnoreAttributePointsRemaining, 0),
                          () => UI.Toggle("Ignore Skill Cap", ref settings.toggleIgnoreSkillCap, 0),
                          () => UI.Toggle("Ignore Remaining Skill Points", ref settings.toggleIgnoreSkillPointsRemaining, 0),
#endif
#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

                          () => { }
                          );
#if DEBUG
                UI.Div(0, 25);
                UI.HStack("Multiple Classes", 1,
                          () => UI.Label("Experimental Preview".magenta(), UI.AutoWidth()),
                          () => {
                    UI.Toggle("Multiple Classes On Level-Up", ref settings.toggleMulticlass, 0);
                    UI.Space(25);
                    UI.Label("With this enabled you can configure characters in the Party Editor to gain levels in additional classes whenever they level up. Please go to Party Editor > Character > Classes to configure this".green());
                },
                          () => UI.Toggle("Use Highest Hit Die", ref settings.toggleTakeHighestHitDie, 0),
                          () => UI.Toggle("Use Highest Skill Points", ref settings.toggleTakeHighestSkillPoints, 0),
                          () => UI.Toggle("Use Highest BAB ", ref settings.toggleTakeHighestBAB, 0),
                          () => UI.Toggle("Use Highest Save By Recalc", ref settings.toggleTakeHighestSaveByRecalculation, 0),
                          () => UI.Toggle("Use Highest Save ", ref settings.toggleTakeHighestSaveByAlways, 0),
                          () => UI.Toggle("Use Recalculate Caster Levels", ref settings.toggleRecalculateCasterLevelOnLevelingUp, 0),
                          () => UI.Toggle("Restrict Caster Level To Current", ref settings.toggleRestrictCasterLevelToCharacterLevel, 0),
                          //() => { UI.Toggle("Restrict CL to Current (temp) ", ref settings.toggleRestrictCasterLevelToCharacterLevelTemporary, 0),
                          () => UI.Toggle("Restrict Class Level for Prerequisites to Caster Level", ref settings.toggleRestrictClassLevelForPrerequisitesToCharacterLevel, 0),
                          () => UI.Toggle("Fix Favored Class HP", ref settings.toggleFixFavoredClassHP, 0),
                          () => UI.Toggle("Always Receive Favored Class HP", ref settings.toggleAlwaysReceiveFavoredClassHP, 0),
                          () => UI.Toggle("Always Receive Favored Class HP Except Prestige", ref settings.toggleAlwaysReceiveFavoredClassHPExceptPrestige, 0),
                          () => { }
                          );
                if (settings.toggleMulticlass)
                {
                    UI.Div(0, 25);
                    UI.HStack("Character Generation", 1,
                              () =>
                              UI.Label("Choose default multiclass setting to use during creation of new characters".green(), UI.AutoWidth())
                              );
                    var multiclassSet = settings.charGenMulticlassSet;
                    MulticlassPicker.OnGUI(multiclassSet, 150);
                    settings.charGenMulticlassSet = multiclassSet;
                }
#endif
            }
        }