commit 53ffc8b5baa35a944c99b585209c50c149ec54b0 Author: Alex Date: Sat Mar 7 19:59:03 2026 +0100 V 0.7 diff --git a/Configs/ControlHints/AvailableActions.conf b/Configs/ControlHints/AvailableActions.conf new file mode 100644 index 0000000..61f9658 --- /dev/null +++ b/Configs/ControlHints/AvailableActions.conf @@ -0,0 +1,19 @@ +SCR_AvailableActionsDisplay { + m_aActions { + SCR_AvailableActionContext "{68CF05AC5427260F}" { + m_iTimeForHide 5000 + m_iTimeToShow 5000 + m_aConditions { + SCR_ORCondition "{68CF05AD7A4D2446}" { + m_aConditions { + SCR_CharacterSprintingCondition "{68CF05AD4CFC6A7D}" { + } + } + } + } + m_sTag "SCR_Autorun" + m_sAction "SCR_Autorun" + m_sName "Autorun" + } + } +} \ No newline at end of file diff --git a/Configs/ControlHints/AvailableActions.conf.meta b/Configs/ControlHints/AvailableActions.conf.meta new file mode 100644 index 0000000..e2d93a2 --- /dev/null +++ b/Configs/ControlHints/AvailableActions.conf.meta @@ -0,0 +1,17 @@ +MetaFileClass { + Name "{80CC0413DDBDFCB9}Configs/ControlHints/AvailableActions.conf" + Configurations { + CONFResourceClass PC { + } + CONFResourceClass XBOX_ONE : PC { + } + CONFResourceClass XBOX_SERIES : PC { + } + CONFResourceClass PS4 : PC { + } + CONFResourceClass PS5 : PC { + } + CONFResourceClass HEADLESS : PC { + } + } +} \ No newline at end of file diff --git a/Configs/System/chimeraInputCommon.conf b/Configs/System/chimeraInputCommon.conf new file mode 100644 index 0000000..af375c9 --- /dev/null +++ b/Configs/System/chimeraInputCommon.conf @@ -0,0 +1,37 @@ +ActionManager { + Actions { + Action SCR_Autorun { + InputSource InputSourceSum "{68CF05B2CDF32CE3}" { + Sources { + InputSourceValue "{68CF05B2D647AF8F}" { + FilterPreset "pressed" + Input "keyboard:KC_RCONTROL" + Filter InputFilterPressed "{68CF05B2DB8E153F}" { + } + } + InputSourceCombo "{68CF05B386B56BF6}" { + Sources { + InputSourceValue "{68CF05B028ABF55C}" { + Input "gamepad0:shoulder_right" + Filter InputFilterHold "{68CF05B008688BFF}" { + } + } + InputSourceValue "{68CF05B03B9367DA}" { + Input "gamepad0:x" + Filter InputFilterClick "{68CF05B01E6FB93B}" { + } + } + } + } + } + } + } + } + Contexts { + ActionContext CharacterMovementContext { + ActionRefs +{ + "SCR_Autorun" + } + } + } +} \ No newline at end of file diff --git a/Configs/System/chimeraInputCommon.conf.meta b/Configs/System/chimeraInputCommon.conf.meta new file mode 100644 index 0000000..f1e7b1a --- /dev/null +++ b/Configs/System/chimeraInputCommon.conf.meta @@ -0,0 +1,17 @@ +MetaFileClass { + Name "{795184CF9AD764DB}Configs/System/chimeraInputCommon.conf" + Configurations { + CONFResourceClass PC { + } + CONFResourceClass XBOX_ONE : PC { + } + CONFResourceClass XBOX_SERIES : PC { + } + CONFResourceClass PS4 : PC { + } + CONFResourceClass PS5 : PC { + } + CONFResourceClass HEADLESS : PC { + } + } +} \ No newline at end of file diff --git a/Configs/System/keyBindingMenu.conf b/Configs/System/keyBindingMenu.conf new file mode 100644 index 0000000..3696552 --- /dev/null +++ b/Configs/System/keyBindingMenu.conf @@ -0,0 +1,15 @@ +SCR_KeyBindingMenuConfig { + m_KeyBindingCategories { + SCR_KeyBindingCategory "{68CF05B05A034F4A}" { + m_sName "GTG" + m_sDisplayName "GTG" + m_KeyBindingEntries { + SCR_KeyBindingEntry "{68CF05B0B1F4D2F4}" { + m_sActionName "SCR_Autorun" + m_sDisplayName "Autorun" + m_sPreset "pressed" + } + } + } + } +} \ No newline at end of file diff --git a/Configs/System/keyBindingMenu.conf.meta b/Configs/System/keyBindingMenu.conf.meta new file mode 100644 index 0000000..f54af76 --- /dev/null +++ b/Configs/System/keyBindingMenu.conf.meta @@ -0,0 +1,17 @@ +MetaFileClass { + Name "{4EE7794C9A3F11EF}Configs/System/keyBindingMenu.conf" + Configurations { + CONFResourceClass PC { + } + CONFResourceClass XBOX_ONE : PC { + } + CONFResourceClass XBOX_SERIES : PC { + } + CONFResourceClass PS4 : PC { + } + CONFResourceClass PS5 : PC { + } + CONFResourceClass HEADLESS : PC { + } + } +} \ No newline at end of file diff --git a/Prefabs/Characters/Core/Character_Base.et b/Prefabs/Characters/Core/Character_Base.et new file mode 100644 index 0000000..4f0ad2b --- /dev/null +++ b/Prefabs/Characters/Core/Character_Base.et @@ -0,0 +1,7 @@ +SCR_ChimeraCharacter { + ID "520EC961A090B1EE" + components { + SCR_AutorunComponent "{68CF05AF20419949}" { + } + } +} \ No newline at end of file diff --git a/Prefabs/Characters/Core/Character_Base.et.meta b/Prefabs/Characters/Core/Character_Base.et.meta new file mode 100644 index 0000000..7ea296f --- /dev/null +++ b/Prefabs/Characters/Core/Character_Base.et.meta @@ -0,0 +1,17 @@ +MetaFileClass { + Name "{37578B1666981FCE}Prefabs/Characters/Core/Character_Base.et" + Configurations { + EntityTemplateResourceClass PC { + } + EntityTemplateResourceClass XBOX_ONE : PC { + } + EntityTemplateResourceClass XBOX_SERIES : PC { + } + EntityTemplateResourceClass PS4 : PC { + } + EntityTemplateResourceClass PS5 : PC { + } + EntityTemplateResourceClass HEADLESS : PC { + } + } +} \ No newline at end of file diff --git a/Scripts.meta b/Scripts.meta new file mode 100644 index 0000000..5494e25 --- /dev/null +++ b/Scripts.meta @@ -0,0 +1,17 @@ +MetaFileClass { + Name "{5BE22D4A02273A1F}Scripts" + Configurations { + FolderResourceClass PC { + } + FolderResourceClass XBOX_ONE : PC { + } + FolderResourceClass XBOX_SERIES : PC { + } + FolderResourceClass PS4 : PC { + } + FolderResourceClass PS5 : PC { + } + FolderResourceClass HEADLESS : PC { + } + } +} \ No newline at end of file diff --git a/Scripts/Game.meta b/Scripts/Game.meta new file mode 100644 index 0000000..09c080d --- /dev/null +++ b/Scripts/Game.meta @@ -0,0 +1,17 @@ +MetaFileClass { + Name "{B92491157EA3E4AD}Scripts/Game" + Configurations { + FolderResourceClass PC { + } + FolderResourceClass XBOX_ONE : PC { + } + FolderResourceClass XBOX_SERIES : PC { + } + FolderResourceClass PS4 : PC { + } + FolderResourceClass PS5 : PC { + } + FolderResourceClass HEADLESS : PC { + } + } +} \ No newline at end of file diff --git a/Scripts/Game/GTGAutorun/SCR_AutorunComponent.c b/Scripts/Game/GTGAutorun/SCR_AutorunComponent.c new file mode 100644 index 0000000..a6d23e9 --- /dev/null +++ b/Scripts/Game/GTGAutorun/SCR_AutorunComponent.c @@ -0,0 +1,64 @@ +[ComponentEditorProps(category: "GameScripted/Character", description: "Erlaubt automatisches Laufen/Rennen")] +class SCR_AutorunComponentClass: ScriptComponentClass +{ +} + +class SCR_AutorunComponent: ScriptComponent +{ + protected bool m_bIsAutorunEnabled = false; + protected SCR_CharacterControllerComponent m_CharacterController; + protected InputManager m_InputManager; + + protected void OnAutorunPressed() + { + m_bIsAutorunEnabled = !m_bIsAutorunEnabled; + } + + protected void OnLifeStateChangedCallback() + { + m_bIsAutorunEnabled = false; + } + + protected void OnControlledByPlayerCallback(IEntity owner, bool controlled) + { + m_bIsAutorunEnabled = false; + } + + protected void OnPrepareControlsCallback(IEntity owner, ActionManager am, float dt, bool player) + { + if (!m_bIsAutorunEnabled) + return; + + // Autorun abbrechen, wenn: Kontext inaktiv, Karte offen oder Spieler bewegt sich manuell (W/S/A/D) + if (!m_InputManager.IsContextActive("CharacterMovementContext") || + am.GetActionTriggered("GadgetMap") || + Math.AbsFloat(m_InputManager.GetActionValue("CharacterForward")) >= 0.75 || + Math.AbsFloat(m_InputManager.GetActionValue("CharacterRight")) >= 0.75) + { + m_bIsAutorunEnabled = false; + return; + } + + // Bewegungswerte zwingen (Laufen + Rennen) + m_InputManager.SetActionValue("CharacterForward", 1.0); + m_InputManager.SetActionValue("CharacterSprint", 1.0); + } + + override void OnPostInit(IEntity owner) + { + m_CharacterController = SCR_CharacterControllerComponent.Cast(owner.FindComponent(SCR_CharacterControllerComponent)); + if (!m_CharacterController) + { + Print("[SCR_Autorun] Kein SCR_CharacterControllerComponent gefunden! Mod funktioniert nicht.", LogLevel.WARNING); + return; + } + + m_InputManager = GetGame().GetInputManager(); + + // Events abonnieren + m_CharacterController.m_OnPrepareControls.Insert(OnPrepareControlsCallback); + + // Action Listener (Der Name "SCR_Autorun" muss mit der Input-Config übereinstimmen!) + m_InputManager.AddActionListener("SCR_Autorun", EActionTrigger.DOWN, OnAutorunPressed); + } +} \ No newline at end of file diff --git a/Scripts/Game/GTGAutorun/SCR_CharacterControllerComponentModded.c b/Scripts/Game/GTGAutorun/SCR_CharacterControllerComponentModded.c new file mode 100644 index 0000000..ec0c2f8 --- /dev/null +++ b/Scripts/Game/GTGAutorun/SCR_CharacterControllerComponentModded.c @@ -0,0 +1,14 @@ +void OnPrepareControls(IEntity owner, ActionManager am, float dt, bool player); +typedef func OnPrepareControls; +typedef ScriptInvokerBase OnPrepareControlsInvoker; + +modded class SCR_CharacterControllerComponent +{ + ref OnPrepareControlsInvoker m_OnPrepareControls = new OnPrepareControlsInvoker(); + + protected override void OnPrepareControls(IEntity owner, ActionManager am, float dt, bool player) + { + super.OnPrepareControls(owner, am, dt, player); + m_OnPrepareControls.Invoke(owner, am, dt, player); + } +} \ No newline at end of file diff --git a/UserMaps.desc b/UserMaps.desc new file mode 100644 index 0000000..cb68455 --- /dev/null +++ b/UserMaps.desc @@ -0,0 +1,2 @@ +UserMapDescClass { +} \ No newline at end of file diff --git a/addon.gproj b/addon.gproj new file mode 100644 index 0000000..ffb1049 --- /dev/null +++ b/addon.gproj @@ -0,0 +1,8 @@ +GameProject { + ID "Autorun" + GUID "68CB13E78DD0129D" + TITLE "Autorun" + Dependencies { + "58D0FB3206B6F859" + } +} \ No newline at end of file diff --git a/resourceDatabase.rdb b/resourceDatabase.rdb new file mode 100644 index 0000000..a2144ea Binary files /dev/null and b/resourceDatabase.rdb differ diff --git a/worlds/GameMaster/GM_Eden.ent b/worlds/GameMaster/GM_Eden.ent new file mode 100644 index 0000000..d41bc8b Binary files /dev/null and b/worlds/GameMaster/GM_Eden.ent differ diff --git a/worlds/GameMaster/GM_Eden.ent.meta b/worlds/GameMaster/GM_Eden.ent.meta new file mode 100644 index 0000000..14b2e8b --- /dev/null +++ b/worlds/GameMaster/GM_Eden.ent.meta @@ -0,0 +1,17 @@ +MetaFileClass { + Name "{BEF094A5F7F3211C}worlds/GameMaster/GM_Eden.ent" + Configurations { + ENTResourceClass PC { + } + ENTResourceClass XBOX_ONE : PC { + } + ENTResourceClass XBOX_SERIES : PC { + } + ENTResourceClass PS4 : PC { + } + ENTResourceClass PS5 : PC { + } + ENTResourceClass HEADLESS : PC { + } + } +} \ No newline at end of file