added stamina debug options, improved stamina behaviour, changes to flask animation

This commit is contained in:
2026-01-07 14:03:14 +01:00
parent 4a502dce4d
commit 590896a0ff
5 changed files with 139 additions and 28 deletions

View File

@@ -106951,6 +106951,8 @@ MonoBehaviour:
menuScroll: {fileID: 0}
sceneDependantFaithRegenMultiplier: 1
faithRegenMultiplier: 1
staminaBaseMaxValue: 200
staminaBaseRegenValue: 1.2
--- !u!114 &9202663234468024490
MonoBehaviour:
m_ObjectHideFlags: 0

View File

@@ -40970,9 +40970,6 @@ AnimatorStateMachine:
m_AnyStateTransitions: []
m_EntryTransitions: []
m_StateMachineTransitions:
- first: {fileID: -1837596898596783166}
second:
- {fileID: 3007483217270765860}
- first: {fileID: 0}
second: []
- first: {fileID: 1107386280914322628}
@@ -41053,10 +41050,13 @@ AnimatorStateMachine:
- first: {fileID: 7497963896994016776}
second:
- {fileID: -7316239175151459625}
- first: {fileID: -1837596898596783166}
second:
- {fileID: 3007483217270765860}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 100, y: 850, z: 0}
m_EntryPosition: {x: -20, y: 700, z: 0}
m_ExitPosition: {x: 600, y: 108, z: 0}
m_ExitPosition: {x: 600, y: 130, z: 0}
m_ParentStateMachinePosition: {x: 260, y: 980, z: 0}
m_DefaultState: {fileID: 1102927989665312400}
--- !u!1107 &1107518706049135160

View File

@@ -18117,42 +18117,42 @@ PrefabInstance:
- target: {fileID: 564995907207171390, guid: 851e8e61247888340bdec90fc8aa37f5,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 564995907207171390, guid: 851e8e61247888340bdec90fc8aa37f5,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 564995907207171390, guid: 851e8e61247888340bdec90fc8aa37f5,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 210
objectReference: {fileID: 0}
- target: {fileID: 564995907207171390, guid: 851e8e61247888340bdec90fc8aa37f5,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -135
objectReference: {fileID: 0}
- target: {fileID: 616128472424357225, guid: 851e8e61247888340bdec90fc8aa37f5,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 616128472424357225, guid: 851e8e61247888340bdec90fc8aa37f5,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 616128472424357225, guid: 851e8e61247888340bdec90fc8aa37f5,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 210.00003
objectReference: {fileID: 0}
- target: {fileID: 616128472424357225, guid: 851e8e61247888340bdec90fc8aa37f5,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -45
objectReference: {fileID: 0}
- target: {fileID: 703778627114599771, guid: 851e8e61247888340bdec90fc8aa37f5,
type: 3}
@@ -19145,6 +19145,16 @@ PrefabInstance:
propertyPath: m_AnchoredPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3830035321481100824, guid: 851e8e61247888340bdec90fc8aa37f5,
type: 3}
propertyPath: staminaBaseMaxValue
value: 100
objectReference: {fileID: 0}
- target: {fileID: 3830035321481100824, guid: 851e8e61247888340bdec90fc8aa37f5,
type: 3}
propertyPath: staminaBaseRegenValue
value: 0.6
objectReference: {fileID: 0}
- target: {fileID: 3925395170508564942, guid: 851e8e61247888340bdec90fc8aa37f5,
type: 3}
propertyPath: m_Layer
@@ -19213,22 +19223,22 @@ PrefabInstance:
- target: {fileID: 4202610206940879906, guid: 851e8e61247888340bdec90fc8aa37f5,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4202610206940879906, guid: 851e8e61247888340bdec90fc8aa37f5,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4202610206940879906, guid: 851e8e61247888340bdec90fc8aa37f5,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 210
objectReference: {fileID: 0}
- target: {fileID: 4202610206940879906, guid: 851e8e61247888340bdec90fc8aa37f5,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -225
objectReference: {fileID: 0}
- target: {fileID: 4204595259268909078, guid: 851e8e61247888340bdec90fc8aa37f5,
type: 3}
@@ -19430,10 +19440,20 @@ PrefabInstance:
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4704300330561169846, guid: 851e8e61247888340bdec90fc8aa37f5,
type: 3}
propertyPath: maxStamina
value: 100
objectReference: {fileID: 0}
- target: {fileID: 4704300330561169846, guid: 851e8e61247888340bdec90fc8aa37f5,
type: 3}
propertyPath: selectedToolbar
value: 0
value: 2
objectReference: {fileID: 0}
- target: {fileID: 4704300330561169846, guid: 851e8e61247888340bdec90fc8aa37f5,
type: 3}
propertyPath: staminaRecovery
value: 0.6
objectReference: {fileID: 0}
- target: {fileID: 4704300330561169846, guid: 851e8e61247888340bdec90fc8aa37f5,
type: 3}
@@ -19473,22 +19493,22 @@ PrefabInstance:
- target: {fileID: 4796023216948086302, guid: 851e8e61247888340bdec90fc8aa37f5,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4796023216948086302, guid: 851e8e61247888340bdec90fc8aa37f5,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 4796023216948086302, guid: 851e8e61247888340bdec90fc8aa37f5,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 210
objectReference: {fileID: 0}
- target: {fileID: 4796023216948086302, guid: 851e8e61247888340bdec90fc8aa37f5,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -315
objectReference: {fileID: 0}
- target: {fileID: 4907318199456855652, guid: 851e8e61247888340bdec90fc8aa37f5,
type: 3}
@@ -19958,12 +19978,12 @@ PrefabInstance:
- target: {fileID: 5234664790783380194, guid: 851e8e61247888340bdec90fc8aa37f5,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 7872026
value: 8313224
objectReference: {fileID: 0}
- target: {fileID: 5234664790783380194, guid: 851e8e61247888340bdec90fc8aa37f5,
type: 3}
propertyPath: m_AnchoredPosition.y
value: -1259526.5
value: -1330118.2
objectReference: {fileID: 0}
- target: {fileID: 5265345828117443429, guid: 851e8e61247888340bdec90fc8aa37f5,
type: 3}
@@ -20783,22 +20803,22 @@ PrefabInstance:
- target: {fileID: 7465903852046106667, guid: 851e8e61247888340bdec90fc8aa37f5,
type: 3}
propertyPath: m_AnchorMax.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7465903852046106667, guid: 851e8e61247888340bdec90fc8aa37f5,
type: 3}
propertyPath: m_AnchorMin.y
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7465903852046106667, guid: 851e8e61247888340bdec90fc8aa37f5,
type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
value: 210
objectReference: {fileID: 0}
- target: {fileID: 7465903852046106667, guid: 851e8e61247888340bdec90fc8aa37f5,
type: 3}
propertyPath: m_AnchoredPosition.y
value: 0
value: -405
objectReference: {fileID: 0}
- target: {fileID: 7534046934194550914, guid: 851e8e61247888340bdec90fc8aa37f5,
type: 3}
@@ -21392,7 +21412,9 @@ MonoBehaviour:
m_sunLight: {fileID: 1976683114}
m_moonLight: {fileID: 0}
WeatherPresent: 0
WeatherSystem: {fileID: 0}
m_sunLightExists: 1
m_moonLightExists: 0
--- !u!4 &1013064392
Transform:
m_ObjectHideFlags: 10
@@ -25855,6 +25877,8 @@ MonoBehaviour:
x: 250
y: 250
z: 250
m_allFloatingPointFixMembers: []
m_allWorldSpaceParticleSystems: []
m_originTargetTileX: 0
m_originTargetTileZ: 0
m_terrainUnloadMemoryTreshold: 4294967296

View File

@@ -206,7 +206,9 @@ namespace Beyond
private float healthBaseMaxValue = 200;
private float healthBaseRegenValue = 0f;
[SerializeField]
private float staminaBaseMaxValue = 200;
[SerializeField]
private float staminaBaseRegenValue = 1.2f;
private float faithBaseMaxValue = 100f;

View File

@@ -18,7 +18,9 @@ public partial class SROptions
private bool m_fastRunning = false;
private bool m_damageBooster;
private bool m_immortal = false;
// --- STAMINA SETTINGS ---
private float m_staminaRegen = 0.6f; // Default Invector Value
private float m_maxStamina = 100f; // Default Invector Value
private Quest m_currentQuest;
[Category("Build")]
@@ -157,6 +159,87 @@ public partial class SROptions
}
}
[Category("Stats")]
[DisplayName("Stamina Regen Rate")]
[Increment(0.1f)] // Optional attribute for SRDebugger slider/buttons
public float StaminaRegen
{
get
{
if (Player.Instance && Player.Instance.ThirdPersonController)
{
return Player.Instance.ThirdPersonController.staminaRecovery;
}
return m_staminaRegen;
}
set
{
m_staminaRegen = value;
if (Player.Instance && Player.Instance.ThirdPersonController)
{
Player.Instance.ThirdPersonController.staminaRecovery = value;
}
}
}
[Category("Stats")]
[DisplayName("Max Stamina")]
[Increment(10f)]
public float MaxStamina
{
get
{
if (Player.Instance && Player.Instance.ThirdPersonController)
{
return Player.Instance.ThirdPersonController.maxStamina;
}
return m_maxStamina;
}
set
{
m_maxStamina = value;
if (Player.Instance && Player.Instance.ThirdPersonController)
{
// Set the Max value
Player.Instance.ThirdPersonController.maxStamina = value;
// Optional: Refill current stamina so you see the bar grow immediately
// Player.Instance.ThirdPersonController.currentStamina = value;
}
}
}
[Category("Stats")]
[DisplayName("Roll Stamina Cost")]
[Increment(5f)] // Allows changing values by 5 in the debugger
public float RollStaminaCost
{
get
{
if (Player.Instance && Player.Instance.ThirdPersonController)
{
return Player.Instance.ThirdPersonController.rollStamina;
}
return 20f; // Return a safe default if player isn't found
}
set
{
if (Player.Instance && Player.Instance.ThirdPersonController)
{
Player.Instance.ThirdPersonController.rollStamina = value;
}
}
}
[Category("Stats")]
public void ResetStaminaDefaults()
{
StaminaRegen = 0.6f;
MaxStamina = 100f;
}
[Category("Save")]
public void SaveGame()
{