From 128a552f5f934515eced141f46c7a92a51ac07fa Mon Sep 17 00:00:00 2001 From: bellyillish Date: Mon, 30 Sep 2024 02:21:04 -0400 Subject: [PATCH] v0.1-beta.7 --- README.md | 12 ++--- .../scripts/mod_beh_companion_idiots.ltx | 2 +- gamedata/configs/text/eng/idiots.xml | 6 +++ gamedata/configs/text/eng/idiots_mcm.xml | 21 +++++++- gamedata/configs/text/rus/idiots.xml | 20 +++++--- gamedata/configs/text/rus/idiots_mcm.xml | 21 +++++++- gamedata/configs/ui/idiots_ui.xml | 2 + gamedata/scripts/a_idiots_config.script | 10 ++-- gamedata/scripts/modxml_idiots_ui.script | 27 +++++++--- gamedata/scripts/z_idiots_combat.script | 49 ++++++++++++------- ...cript => z_idiots_combat_defensive.script} | 38 ++++++++------ ...cript => z_idiots_combat_offensive.script} | 46 ++++++++++------- gamedata/scripts/z_idiots_companions.script | 2 + gamedata/scripts/z_idiots_jobs.script | 8 +-- gamedata/scripts/z_idiots_mcm.script | 5 +- gamedata/scripts/z_idiots_ui.script | 4 +- 16 files changed, 184 insertions(+), 89 deletions(-) rename gamedata/scripts/{xr_combat_camper.script => z_idiots_combat_defensive.script} (80%) rename gamedata/scripts/{xr_combat_monolith.script => z_idiots_combat_offensive.script} (86%) diff --git a/README.md b/README.md index 899ce31..18be384 100644 --- a/README.md +++ b/README.md @@ -48,9 +48,7 @@ Overhauls the companion system for Anomaly/GAMMA. It includes a new UI, fixes se #### 1. Default Combat The original, engine-based combat system that companions used before. -#### 3. Monolith Combat -This existed in the code but was disabled. And for good reason as it was rudimentary and very buggy. I've completely rewritten this scheme but tried to keep the spirit of what the original author intended: - +#### 3. Offensive Combat 1. When far from the enemy, the companion will move to a spot (random but roughly half way) between them and the enemy. They will use cover if possible. 2. At medium distance, they will move directly to a spot that's at close range to the enemy (random but roughly 20m). Again they will use cover if possible. 3. At close range they will keep moving around the enemy using any close cover. @@ -59,14 +57,12 @@ This existed in the code but was disabled. And for good reason as it was rudimen 6. When reloading they will duck or move behind close cover. 7. They will crouch behind low cover and stand behind high cover when engaging. -#### 4. Camper Combat -Like Monolith Combat, this also existed but was disabled. I also rewrote this trying to keep the spirit of the original: - +#### 4. Defensive Combat 1. If not "prone", companions will look for cover near their initial position. 2. If significantly injured, they will retreat to a safe place and recover. They will keep moving if pursued. 3. Every so often they will move to a new position but will always be tethered to within ~8m of their initial position. -**Note:** for Monolith and Camper Combat, companions "share" enemy positions with each other. If a companion loses sight of an enemy while fighting, as long as any other companion (or the player) sees that enemy they will be aware of the enemy's current position. +**Note:** for Offensive and Defensive Combat, companions "share" enemy positions with each other. If a companion loses sight of an enemy while fighting, as long as any other companion (or the player) sees that enemy they will be aware of the enemy's current position. ### Choose Between 3 Combat Readiness Modes: --- @@ -97,7 +93,7 @@ Also, this mod enables the features below for companions only and disables them - Fixes various issues with "prone" animations. - Fixes issue with companions stopping at their last patrol waypoint. - Fixes many (but not all or even most) issues with companions getting stuck behind obstacles/objects while moving to a destination. -- Fixes a bug causing companions to get stuck in scripted combat permanently and become unresponsive. +- Fixes a potential bug causing npcs to get stuck in a scripted combat scheme and ignore their condlist. - Fixes a bug causing companions and enemies to ignore eachother when the companion is sneaking and they are within 30m of each other. - Fixes various issues/inconsistencies with companion state setters in `axr_companions` and `dialogs_axr_companion`. It does so by using its own code lib to manage companion states. - Fixes various issues with incorrect/bad values in various ltx files in both Anomaly and GAMMA. diff --git a/gamedata/configs/scripts/mod_beh_companion_idiots.ltx b/gamedata/configs/scripts/mod_beh_companion_idiots.ltx index 758a66f..6c5d227 100644 --- a/gamedata/configs/scripts/mod_beh_companion_idiots.ltx +++ b/gamedata/configs/scripts/mod_beh_companion_idiots.ltx @@ -3,7 +3,7 @@ on_combat = combat ![combat] -combat_type = {+npcx_beh_combat_tactics_camper} camper, {+npcx_beh_combat_tactics_monolith} monolith, nil +combat_type = {+npcx_beh_combat_tactics_offensive} offensive, {+npcx_beh_combat_tactics_defensive} defensive, {+npcx_beh_combat_tactics_camper} camper, {+npcx_beh_combat_tactics_monolith} monolith, nil ![beh@general] diff --git a/gamedata/configs/text/eng/idiots.xml b/gamedata/configs/text/eng/idiots.xml index 648cf49..3a1e00b 100644 --- a/gamedata/configs/text/eng/idiots.xml +++ b/gamedata/configs/text/eng/idiots.xml @@ -80,6 +80,12 @@ Default Combat + + Offensive Combat + + + Defensive Combat + Monolith Combat diff --git a/gamedata/configs/text/eng/idiots_mcm.xml b/gamedata/configs/text/eng/idiots_mcm.xml index c71195d..14a6d56 100644 --- a/gamedata/configs/text/eng/idiots_mcm.xml +++ b/gamedata/configs/text/eng/idiots_mcm.xml @@ -50,6 +50,17 @@ Enables/disables the tab number indicators that appear above companions when the UI is open. + + + Combat Options + + + Enable "Camper" and "Monolith" combat commands. + + + Enables/disables commands to put companions into "Camper" and "Monolith" combat schemes. These schemes came with Anomaly but were disabled. Note that they can be buggy and are thus unsupported. You can assign keybinds to them but they can't be activated by the "Cycle Combat" keybind. + + Looting and Gathering Options @@ -63,10 +74,10 @@ NOTE: For looting and gathering to work properly in GAMMA, "311 NPC Stop Looting Dead Bodies" must be disabled. - + Only Companions Can Loot and Gather Items - + Enables/disables the ability for non-companion NPCs to loot and gather items. To preserve existing behavior, this would be ticked for GAMMA and unticked for Anomaly. @@ -168,6 +179,12 @@ Default + + Offensive + + + Defensive + Monolith diff --git a/gamedata/configs/text/rus/idiots.xml b/gamedata/configs/text/rus/idiots.xml index 447f92c..7d6f41c 100644 --- a/gamedata/configs/text/rus/idiots.xml +++ b/gamedata/configs/text/rus/idiots.xml @@ -30,7 +30,7 @@ - Movement + Движение Следовать @@ -47,7 +47,7 @@ - Stance + Положение Стоять @@ -61,7 +61,7 @@ - Distance + Дистанция Встать в укрытие @@ -75,11 +75,17 @@ - Combat + Бой Обычный бой + + Режим "Offensive" + + + Режим "Defensive" + Режим "Монолит" @@ -89,7 +95,7 @@ - Readiness + Поведение Атаковать всех @@ -103,7 +109,7 @@ - Jobs + Задачи Собирать предметы @@ -120,7 +126,7 @@ - Formation + Построение Двигаться вместе diff --git a/gamedata/configs/text/rus/idiots_mcm.xml b/gamedata/configs/text/rus/idiots_mcm.xml index 17f653e..697b11f 100644 --- a/gamedata/configs/text/rus/idiots_mcm.xml +++ b/gamedata/configs/text/rus/idiots_mcm.xml @@ -50,6 +50,17 @@ Enables/disables the tab number indicators that appear above companions when the UI is open. + + + Combat Options + + + Enable "Camper" and "Monolith" combat commands. + + + Enables/disables commands to put companions into "Camper" and "Monolith" combat schemes. These schemes came with Anomaly but were disabled. Note that they can be buggy and are thus unsupported. You can assign keybinds to them but they can't be activated by the "Cycle Combat" keybind. + + Looting and Gathering Options @@ -63,10 +74,10 @@ NOTE: For looting and gathering to work properly in GAMMA, "311 NPC Stop Looting Dead Bodies" must be disabled. - + Only Companions Can Loot and Gather Items - + Enables/disables the ability for non-companion NPCs to loot and gather items. To preserve existing behavior, this would be ticked for GAMMA and unticked for Anomaly. @@ -168,6 +179,12 @@ Обычный бой + + Режим "Offensive" + + + Режим "Defensive" + Режим "Монолит" diff --git a/gamedata/configs/ui/idiots_ui.xml b/gamedata/configs/ui/idiots_ui.xml index fd655a1..2f6e189 100644 --- a/gamedata/configs/ui/idiots_ui.xml +++ b/gamedata/configs/ui/idiots_ui.xml @@ -46,6 +46,8 @@ + + diff --git a/gamedata/scripts/a_idiots_config.script b/gamedata/scripts/a_idiots_config.script index 86553f2..eebb257 100644 --- a/gamedata/scripts/a_idiots_config.script +++ b/gamedata/scripts/a_idiots_config.script @@ -2,7 +2,7 @@ package.path = package.path .. ".\\gamedata\\scripts\\?.lua;..\\gamedata\\scripts\\?.lua;" -MDATA_VER = "0.1-beta.5" +MDATA_VER = "0.1-beta.7" MDATA_KEY = "USEFUL_IDIOTS" -- companion state config @@ -39,9 +39,11 @@ ACTIONS = { name = "combat", cycle = true, actions = { - {name = "default", next = "monolith", default = true}, - {name = "monolith", next = "camper", info = "npcx_beh_combat_tactics_monolith"}, - {name = "camper", next = "default", info = "npcx_beh_combat_tactics_camper"}, + {name = "default", next = "offensive", default = true}, + {name = "offensive", next = "defensive", info = "npcx_beh_combat_tactics_offensive"}, + {name = "defensive", next = "default", info = "npcx_beh_combat_tactics_defensive"}, + {name = "monolith", info = "npcx_beh_combat_tactics_monolith"}, + {name = "camper", info = "npcx_beh_combat_tactics_camper"}, } }, { diff --git a/gamedata/scripts/modxml_idiots_ui.script b/gamedata/scripts/modxml_idiots_ui.script index f458d34..99e6b6b 100644 --- a/gamedata/scripts/modxml_idiots_ui.script +++ b/gamedata/scripts/modxml_idiots_ui.script @@ -445,6 +445,18 @@ end function applyOptions(XML, config) + if not config.oldCombat then + local monolith = XML:queryOne("monolith") + local camper = XML:queryOne("camper") + + if monolith then + XML:removeElement(monolith) + end + if camper then + XML:removeElement(camper) + end + end + if not config.jobs then local jobs = XML:queryOne("col[group=jobs]") if jobs then @@ -480,13 +492,14 @@ function onReadHUDXML(name, XML) end local config = { - jobs = ui_mcm.get("idiots/options/jobs"), - artifacts = ui_mcm.get("idiots/options/artifacts"), - font = ui_mcm.get("idiots/options/font"), - scaleX = ui_mcm.get("idiots/options/scaleX"), - scaleY = ui_mcm.get("idiots/options/scaleY"), - offsetX = ui_mcm.get("idiots/options/offsetX"), - offsetY = ui_mcm.get("idiots/options/offsetY"), + oldCombat = ui_mcm.get("idiots/options/oldCombat"), + jobs = ui_mcm.get("idiots/options/jobs"), + artifacts = ui_mcm.get("idiots/options/artifacts"), + font = ui_mcm.get("idiots/options/font"), + scaleX = ui_mcm.get("idiots/options/scaleX"), + scaleY = ui_mcm.get("idiots/options/scaleY"), + offsetX = ui_mcm.get("idiots/options/offsetX"), + offsetY = ui_mcm.get("idiots/options/offsetY"), } DXML.extendXMLObject(XML) diff --git a/gamedata/scripts/z_idiots_combat.script b/gamedata/scripts/z_idiots_combat.script index b0a6a60..cce4388 100644 --- a/gamedata/scripts/z_idiots_combat.script +++ b/gamedata/scripts/z_idiots_combat.script @@ -1,19 +1,14 @@ -local U = z_idiots_utils -local C = z_idiots_companions - - -EVAL_FACER = xrs_facer.evid_facer -EVAL_FACER_STEAL_UP = xrs_facer.evid_steal_up_facer -EVAL_ENEMY = stalker_ids.property_enemy -EVAL_LOGIC = xr_evaluators_id.state_mgr + 4 -EVAL_CAMPER = xr_evaluators_id.combat_camper_base -EVAL_MONOLITH = xr_evaluators_id.combat_monolith_base -ACTION_CAMPER = xr_actions_id.combat_camper_base -ACTION_MONOLITH = xr_actions_id.combat_monolith_base - - +local U = z_idiots_utils +local C = z_idiots_companions +local OFFENSIVE = z_idiots_combat_offensive +local DEFENSIVE = z_idiots_combat_defensive local __combat_evaluate = xr_combat.evaluator_check_combat.evaluate local __is_enemy = xr_combat_ignore.is_enemy +local __add_to_binder = xr_combat.add_to_binder +EVAL_FACER = xrs_facer.evid_facer +EVAL_FACER_STEAL_UP = xrs_facer.evid_steal_up_facer +EVAL_ENEMY = stalker_ids.property_enemy +EVAL_LOGIC = xr_evaluators_id.state_mgr + 4 -- utils: combat -- @@ -69,7 +64,7 @@ COMBAT_ANIMATIONS = { } -function U.updateEnemy(npc, st) +function U.updateEnemy(npc, st, forcePos) local enemy = npc:best_enemy() st.enemyID = nil @@ -85,7 +80,7 @@ function U.updateEnemy(npc, st) return end - st.enemySeen = npc:see(enemy) + st.enemySeen = npc:see(enemy) or forcePos st.enemyPredict = st.seeTime and time_global() <= st.seeTime local newPos = nil @@ -243,7 +238,8 @@ end -- fix: update combat type before evaluating --- prevents NPCs from getting permanently stuck in scripted combat +-- makes condlists work with combat types +-- which prevents NPCs from getting stuck in scripted combat function xr_combat.evaluator_check_combat:evaluate() xr_combat.set_combat_type(self.object, db.actor, self.st) return __combat_evaluate(self) @@ -306,3 +302,22 @@ function xr_combat_ignore.is_enemy(npc, enemy, no_memory) return isEnemy end + + +function xr_combat.add_to_binder(npc, ini, scheme, section, storage, temp) + __add_to_binder(npc, ini, scheme, section, storage, temp) + + if not U.isCompanion(npc) then + return + end + + local manager = npc:motivation_action_manager() + if not manager then + return + end + + if temp.section then + OFFENSIVE.add_to_binder(npc, ini, storage, manager, temp) + DEFENSIVE.add_to_binder(npc, ini, storage, manager, temp) + end +end diff --git a/gamedata/scripts/xr_combat_camper.script b/gamedata/scripts/z_idiots_combat_defensive.script similarity index 80% rename from gamedata/scripts/xr_combat_camper.script rename to gamedata/scripts/z_idiots_combat_defensive.script index 6c4b831..335317f 100644 --- a/gamedata/scripts/xr_combat_camper.script +++ b/gamedata/scripts/z_idiots_combat_defensive.script @@ -5,22 +5,26 @@ local C = z_idiots_companions local Combat = z_idiots_combat +EVAL_DEFENSIVE = stalker_ids.property_script + 3150 +ACTION_DEFENSIVE = xr_actions_id.chugai_actions + 150 + + -- health range to trigger "EVADE" EVADE_HEALTH = {0.3, 0.6} --- combat camper action -class "action_combat_camper" (action_base) +-- "defensive" combat action +class "action_combat_defensive" (action_base) -action_combat_camper.hit_callback = Combat.hit_callback +action_combat_defensive.hit_callback = Combat.hit_callback -function action_combat_camper:__init(name, storage) super(nil, name) +function action_combat_defensive:__init(name, storage) super(nil, name) self.st = storage end -function action_combat_camper:initialize() +function action_combat_defensive:initialize() action_base.initialize(self) local npc = self.object @@ -40,10 +44,12 @@ function action_combat_camper:initialize() st.reached = false st.enemySeen = false st.enemyPredict = false + + U.updateEnemy(npc, st, true) end -function action_combat_camper:updateStorage() +function action_combat_defensive:updateStorage() local npc = self.object local st = self.st @@ -91,7 +97,7 @@ function action_combat_camper:updateStorage() end -function action_combat_camper:execute() +function action_combat_defensive:execute() action_base.execute(self) self:updateStorage() @@ -100,10 +106,12 @@ function action_combat_camper:execute() else self:fight() end + + printf("TESTING DEFENSIVE COMBAT") end -function action_combat_camper:fight() +function action_combat_defensive:fight() local npc = self.object local st = self.st @@ -137,7 +145,7 @@ function action_combat_camper:fight() end -function action_combat_camper:evade() +function action_combat_defensive:evade() local npc = self.object local st = self.st @@ -180,24 +188,24 @@ function add_to_binder(npc, ini, storage, planner, temp) return end - planner:add_evaluator(Combat.EVAL_CAMPER, - Combat.evaluator_combat_type("combat_camper", storage, "camper") + planner:add_evaluator(EVAL_DEFENSIVE, + Combat.evaluator_combat_type("combat_defensive", storage, "defensive") ) - local action = action_combat_camper("combat_camper", storage) + local action = action_combat_defensive("combat_defensive", storage) if action then action:add_precondition(WP(Combat.EVAL_LOGIC, true)) action:add_precondition(WP(Combat.EVAL_ENEMY, true)) - action:add_precondition(WP(Combat.EVAL_CAMPER, true)) + action:add_precondition(WP(EVAL_DEFENSIVE, true)) action:add_precondition(WP(Combat.EVAL_FACER, false)) action:add_precondition(WP(Combat.EVAL_FACER_STEAL_UP, false)) action:add_effect(WP(Combat.EVAL_LOGIC, false)) action:add_effect(WP(Combat.EVAL_ENEMY, false)) - action:add_effect(WP(Combat.EVAL_CAMPER, false)) + action:add_effect(WP(EVAL_DEFENSIVE, false)) - planner:add_action(Combat.ACTION_CAMPER, action) + planner:add_action(ACTION_DEFENSIVE, action) xr_logic.subscribe_action_for_events(npc, storage, action) end end diff --git a/gamedata/scripts/xr_combat_monolith.script b/gamedata/scripts/z_idiots_combat_offensive.script similarity index 86% rename from gamedata/scripts/xr_combat_monolith.script rename to gamedata/scripts/z_idiots_combat_offensive.script index fa0f976..5d47650 100644 --- a/gamedata/scripts/xr_combat_monolith.script +++ b/gamedata/scripts/z_idiots_combat_offensive.script @@ -4,6 +4,10 @@ local U = z_idiots_utils local Combat = z_idiots_combat +EVAL_OFFENSIVE = stalker_ids.property_script + 3140 +ACTION_OFFENSIVE = xr_actions_id.chugai_actions + 140 + + -- health range to trigger "EVADE" EVADE_HEALTH = {0.3, 0.6} @@ -13,18 +17,18 @@ FAR_RANGE = {40, 48} HOLD_TIME = {500, 2500} --- combat monolith action -class "action_combat_monolith" (action_base) +-- "offensive" combat action +class "action_combat_offensive" (action_base) -action_combat_monolith.hit_callback = Combat.hit_callback +action_combat_offensive.hit_callback = Combat.hit_callback -function action_combat_monolith:__init(name, storage) super(nil, name) +function action_combat_offensive:__init(name, storage) super(nil, name) self.st = storage end -function action_combat_monolith:initialize() +function action_combat_offensive:initialize() action_base.initialize(self) local npc = self.object @@ -48,10 +52,12 @@ function action_combat_monolith:initialize() st.enemySeen = false st.enemyPredict = false st.enemyWounded = false + + U.updateEnemy(npc, st, true) end -function action_combat_monolith:updateStorage() +function action_combat_offensive:updateStorage() local npc = self.object local st = self.st @@ -105,7 +111,7 @@ function action_combat_monolith:updateStorage() end -function action_combat_monolith:execute() +function action_combat_offensive:execute() action_base.execute(self) self:updateStorage() @@ -130,10 +136,12 @@ function action_combat_monolith:execute() elseif st.status == "FIGHT_MID" then self:fight_mid() end + + printf("TESTING OFFENSIVE COMBAT") end -function action_combat_monolith:fight_far() +function action_combat_offensive:fight_far() local npc = self.object local st = self.st @@ -165,7 +173,7 @@ function action_combat_monolith:fight_far() end -function action_combat_monolith:fight_mid() +function action_combat_offensive:fight_mid() local npc = self.object local st = self.st @@ -197,7 +205,7 @@ function action_combat_monolith:fight_mid() end -function action_combat_monolith:fight_near() +function action_combat_offensive:fight_near() local npc = self.object local st = self.st @@ -225,7 +233,7 @@ function action_combat_monolith:fight_near() end -function action_combat_monolith:search() +function action_combat_offensive:search() local npc = self.object local st = self.st @@ -255,7 +263,7 @@ function action_combat_monolith:search() end -function action_combat_monolith:evade() +function action_combat_offensive:evade() local npc = self.object local st = self.st @@ -289,7 +297,7 @@ function action_combat_monolith:evade() end -function action_combat_monolith:reload() +function action_combat_offensive:reload() local npc = self.object local st = self.st @@ -335,24 +343,24 @@ function add_to_binder(npc, ini, storage, planner, temp) return end - planner:add_evaluator(Combat.EVAL_MONOLITH, - Combat.evaluator_combat_type("combat_monolith", storage, "monolith") + planner:add_evaluator(EVAL_OFFENSIVE, + Combat.evaluator_combat_type("combat_offensive", storage, "offensive") ) - local action = action_combat_monolith("combat_monolith", storage) + local action = action_combat_offensive("combat_offensive", storage) if action then action:add_precondition(WP(Combat.EVAL_LOGIC, true)) action:add_precondition(WP(Combat.EVAL_ENEMY, true)) - action:add_precondition(WP(Combat.EVAL_MONOLITH, true)) + action:add_precondition(WP(EVAL_OFFENSIVE, true)) action:add_precondition(WP(Combat.EVAL_FACER, false)) action:add_precondition(WP(Combat.EVAL_FACER_STEAL_UP, false)) action:add_effect(WP(Combat.EVAL_LOGIC, false)) action:add_effect(WP(Combat.EVAL_ENEMY, false)) - action:add_effect(WP(Combat.EVAL_MONOLITH, false)) + action:add_effect(WP(EVAL_OFFENSIVE, false)) - planner:add_action(Combat.ACTION_MONOLITH, action) + planner:add_action(ACTION_OFFENSIVE, action) xr_logic.subscribe_action_for_events(npc, storage, action) end end diff --git a/gamedata/scripts/z_idiots_companions.script b/gamedata/scripts/z_idiots_companions.script index 2ab1ee2..4c794fd 100644 --- a/gamedata/scripts/z_idiots_companions.script +++ b/gamedata/scripts/z_idiots_companions.script @@ -228,6 +228,8 @@ function purgeCompanionStates(mdata) for i, npc in ipairs(U.getCompanions()) do setStates(npc, GLOBAL_STATE) + npc:disable_info_portion("npcx_beh_combat_tactics_monolith") + npc:disable_info_portion("npcx_beh_combat_tactics_camper") save_var(npc, "fight_from_point", nil) end end diff --git a/gamedata/scripts/z_idiots_jobs.script b/gamedata/scripts/z_idiots_jobs.script index 0d57150..a0a3a1a 100644 --- a/gamedata/scripts/z_idiots_jobs.script +++ b/gamedata/scripts/z_idiots_jobs.script @@ -80,8 +80,8 @@ end function xr_corpse_detection.add_to_binder(npc, ...) __corpse_add_to_binder(npc, ...) - local npcLooting = ui_mcm.get("idiots/options/npcLooting") - if npcLooting then + local noNpcLooting = ui_mcm.get("idiots/options/noNpcLooting") + if not noNpcLooting then return end @@ -119,8 +119,8 @@ end function xr_gather_items.add_to_binder(npc, ...) __gather_add_to_binder(npc, ...) - local npcLooting = ui_mcm.get("idiots/options/npcLooting") - if npcLooting then + local noNpcLooting = ui_mcm.get("idiots/options/noNpcLooting") + if not noNpcLooting then return end diff --git a/gamedata/scripts/z_idiots_mcm.script b/gamedata/scripts/z_idiots_mcm.script index a2e0183..015d853 100644 --- a/gamedata/scripts/z_idiots_mcm.script +++ b/gamedata/scripts/z_idiots_mcm.script @@ -15,10 +15,13 @@ function getGeneralOptions() MCM.getSubtitle({text = "ui_mcm_idiots_subtitle_options_general"}), MCM.getCheckboxField({id = "indexers", def = true}), MCM.getLine(), + MCM.getSubtitle({text = "ui_mcm_idiots_subtitle_options_combat"}), + MCM.getCheckboxField({id = "oldCombat"}), + MCM.getLine(), MCM.getSubtitle({text = "ui_mcm_idiots_subtitle_options_jobs"}), MCM.getCheckboxField({id = "jobs", def = true}), MCM.getCheckboxField({id = "artifacts"}), - MCM.getCheckboxField({id = "npcLooting", def = isGAMMA}), + MCM.getCheckboxField({id = "noNpcLooting", def = isGAMMA}), MCM.getNote({text = "ui_mcm_idiots_options_jobs_note", clr = {255, 200, 175, 75}}), MCM.getLine(), MCM.getSubtitle({text = "ui_mcm_idiots_subtitle_options_ui"}), diff --git a/gamedata/scripts/z_idiots_ui.script b/gamedata/scripts/z_idiots_ui.script index 244f076..dd3e415 100644 --- a/gamedata/scripts/z_idiots_ui.script +++ b/gamedata/scripts/z_idiots_ui.script @@ -688,7 +688,7 @@ function onKeybindEvent(event, dik) return end - if group == "combat" and action == "camper" then + if group == "combat" and action == "defensive" then UnregisterScriptCallback("idiots_on_state", fn) db.storage[id].combat.moveToPoint = nil end @@ -704,7 +704,7 @@ function onKeybindEvent(event, dik) end C.setState(nil, "movement", "wait", true) - C.setState(nil, "combat", "camper", true) + C.setState(nil, "combat", "defensive", true) actor_menu.set_msg(1, "st_idiots_point_move_message", 8)