diff --git a/Assets/Animations/fitness/FitnessAnimation.anim b/Assets/Animations/fitness/FitnessAnimation.anim index 817d54ca8..0a11c616f 100644 --- a/Assets/Animations/fitness/FitnessAnimation.anim +++ b/Assets/Animations/fitness/FitnessAnimation.anim @@ -23,15 +23,24 @@ AnimationClip: - serializedVersion: 3 time: -1 value: 0 +<<<<<<< HEAD + inSlope: 4.5243287 + outSlope: 4.5243287 +======= inSlope: 0.32372805 outSlope: 0.32372805 +>>>>>>> Develop tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 time: 0 +<<<<<<< HEAD + value: 4.5243287 +======= value: 0.32372805 +>>>>>>> Develop inSlope: 0.5 outSlope: 0.5 tangentMode: 0 @@ -41,14 +50,24 @@ AnimationClip: - serializedVersion: 3 time: 1 value: 1 +<<<<<<< HEAD + inSlope: -1.6243408 + outSlope: -1.6243408 +======= inSlope: 0 outSlope: 0 +>>>>>>> Develop tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 time: 2 +<<<<<<< HEAD + value: 1.2756472 + inSlope: 0.27564716 + outSlope: 0.27564716 +======= value: 0.32372805 inSlope: -0.37711877 outSlope: -0.37711877 @@ -2702,13 +2721,29 @@ AnimationClip: value: 0.019055326 inSlope: 0 outSlope: 0 +>>>>>>> Develop tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: distanceCurve + path: + classID: 114 + script: {fileID: 11500000, guid: 37ab87ce3d4646a2acf848037c5236da, type: 3} + - curve: + serializedVersion: 2 + m_Curve: - serializedVersion: 3 +<<<<<<< HEAD + time: -1 + value: 0 +======= time: 45 value: 0.019055326 +>>>>>>> Develop inSlope: 0 outSlope: 0 tangentMode: 0 @@ -2716,8 +2751,13 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 +<<<<<<< HEAD + time: 0 + value: 0 +======= time: 46 value: 0.019055326 +>>>>>>> Develop inSlope: 0 outSlope: 0 tangentMode: 0 @@ -2725,8 +2765,13 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 +<<<<<<< HEAD + time: 1 + value: 0 +======= time: 47 value: 0.019055326 +>>>>>>> Develop inSlope: 0 outSlope: 0 tangentMode: 0 @@ -2734,116 +2779,229 @@ AnimationClip: inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 +<<<<<<< HEAD + time: 2 + value: 0 +======= time: 48 value: 0.019055326 +>>>>>>> Develop inSlope: 0 outSlope: 0 tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: usageCurve + path: + classID: 114 + script: {fileID: 11500000, guid: 37ab87ce3d4646a2acf848037c5236da, type: 3} + - curve: + serializedVersion: 2 + m_Curve: - serializedVersion: 3 +<<<<<<< HEAD + time: -1 + value: 0 + inSlope: 1.851249 + outSlope: 1.851249 +======= time: 49 value: 0.019055326 inSlope: 0 outSlope: 0 +>>>>>>> Develop tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 +<<<<<<< HEAD + time: 0 + value: 1.851249 + inSlope: 0.118540764 + outSlope: 0.118540764 +======= time: 50 value: 0.019055326 inSlope: 0 outSlope: 0 +>>>>>>> Develop tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 +<<<<<<< HEAD + time: 1 + value: 0.2370815 + inSlope: -0.8070837 + outSlope: -0.8070837 +======= time: 51 value: 0.019055326 inSlope: 0 outSlope: 0 +>>>>>>> Develop tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 +<<<<<<< HEAD + time: 2 + value: 0.2370815 +======= time: 52 value: 0.019055326 +>>>>>>> Develop inSlope: 0 outSlope: 0 tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: sparsityCurve + path: + classID: 114 + script: {fileID: 11500000, guid: 37ab87ce3d4646a2acf848037c5236da, type: 3} + - curve: + serializedVersion: 2 + m_Curve: - serializedVersion: 3 +<<<<<<< HEAD + time: -1 + value: 0 + inSlope: 0.396294 + outSlope: 0.396294 +======= time: 53 value: 0.019055326 inSlope: 0 outSlope: 0 +>>>>>>> Develop tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 +<<<<<<< HEAD + time: 0 + value: 0.396294 + inSlope: 0.40124807 + outSlope: 0.40124807 +======= time: 54 value: 0.019055326 inSlope: 0 outSlope: 0 +>>>>>>> Develop tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 +<<<<<<< HEAD + time: 1 + value: 0.80249614 + inSlope: 0.20310107 + outSlope: 0.20310107 +======= time: 55 value: 0.019055326 inSlope: 0 outSlope: 0 +>>>>>>> Develop tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 +<<<<<<< HEAD + time: 2 + value: 0.80249614 +======= time: 56 value: 0.019055326 +>>>>>>> Develop inSlope: 0 outSlope: 0 tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: enemyStandardDeviationCurve + path: + classID: 114 + script: {fileID: 11500000, guid: 37ab87ce3d4646a2acf848037c5236da, type: 3} + - curve: + serializedVersion: 2 + m_Curve: - serializedVersion: 3 +<<<<<<< HEAD + time: -1 + value: 0 + inSlope: 0.7589286 + outSlope: 0.7589286 +======= time: 57 value: 0.019055326 inSlope: 0 outSlope: 0 +>>>>>>> Develop tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 +<<<<<<< HEAD + time: 0 + value: 0.7589286 + inSlope: 0.039344937 + outSlope: 0.039344937 +======= time: 58 value: 0.019055326 inSlope: 0 outSlope: 0 +>>>>>>> Develop tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 +<<<<<<< HEAD + time: 1 + value: 0.07868984 + inSlope: -0.34011936 + outSlope: -0.34011936 +======= time: 59 value: 0.019055326 inSlope: 0 outSlope: 0 +>>>>>>> Develop tangentMode: 0 weightedMode: 0 inWeight: 0.33333334 outWeight: 0.33333334 - serializedVersion: 3 +<<<<<<< HEAD + time: 2 + value: 0.07868984 +======= time: 60 value: 0.019055326 +>>>>>>> Develop inSlope: 0 outSlope: 0 tangentMode: 0 @@ -2871,7 +3029,11 @@ AnimationClip: m_AdditiveReferencePoseClip: {fileID: 0} m_AdditiveReferencePoseTime: 0 m_StartTime: 0 +<<<<<<< HEAD + m_StopTime: 2 +======= m_StopTime: 60 +>>>>>>> Develop m_OrientationOffsetY: 0 m_Level: 0 m_CycleOffset: 0 diff --git a/Assets/Scripts/Game/NarrativeGenerator/EnemyRelatedNarrative/QuestEnemiesParameters.cs b/Assets/Scripts/Game/NarrativeGenerator/EnemyRelatedNarrative/QuestEnemiesParameters.cs index b4e8e828e..72ccb502a 100644 --- a/Assets/Scripts/Game/NarrativeGenerator/EnemyRelatedNarrative/QuestEnemiesParameters.cs +++ b/Assets/Scripts/Game/NarrativeGenerator/EnemyRelatedNarrative/QuestEnemiesParameters.cs @@ -38,26 +38,16 @@ public override string ToString() return stringBuilder.ToString(); } - public void CalculateDifficultyFromProfile(PlayerProfile playerProfile) + public void CalculateDifficultyFromProfile(float masteryPreference) { - switch (playerProfile.MasteryPreference) - { - case < 15: - Difficulty = DifficultyLevels.VeryEasy; - break; - case < 35: - Difficulty = DifficultyLevels.Easy; - break; - case < 65: - Difficulty = DifficultyLevels.Medium; - break; - case < 85: - Difficulty = DifficultyLevels.Hard; - break; - default: - Difficulty = DifficultyLevels.VeryHard; - break; - } + Difficulty = masteryPreference switch + { + < 0.15f => DifficultyLevels.VeryEasy, + < 0.35f => DifficultyLevels.Easy, + < 0.65f => DifficultyLevels.Medium, + < 0.85f => DifficultyLevels.Hard, + _ => DifficultyLevels.VeryHard + }; } public void CalculateMonsterFromQuests(IEnumerable questLines) diff --git a/Assets/Scripts/Game/NarrativeGenerator/PlayerProfile.cs b/Assets/Scripts/Game/NarrativeGenerator/PlayerProfile.cs index 3be47b55e..32a40f60f 100644 --- a/Assets/Scripts/Game/NarrativeGenerator/PlayerProfile.cs +++ b/Assets/Scripts/Game/NarrativeGenerator/PlayerProfile.cs @@ -67,5 +67,14 @@ public override string ToString() stringBuilder.Append("E:" + CreativityPreference); return stringBuilder.ToString(); } + + //TODO FIX THIS FOR NON-PRETEST DATA AND CREATE UNIT TEST! + public void Normalize() + { + MasteryPreference *= 2; + ImmersionPreference *= 2; + AchievementPreference *= 2; + CreativityPreference *= 2; + } } } \ No newline at end of file diff --git a/Assets/Scripts/Game/NarrativeGenerator/ProfileCalculator.cs b/Assets/Scripts/Game/NarrativeGenerator/ProfileCalculator.cs index 6c874d156..e4dea0359 100644 --- a/Assets/Scripts/Game/NarrativeGenerator/ProfileCalculator.cs +++ b/Assets/Scripts/Game/NarrativeGenerator/ProfileCalculator.cs @@ -155,6 +155,7 @@ private static PlayerProfile CreateProfileWithWeights() CalculateStartSymbolWeights ( playerProfile ); var favoriteQuest = _questWeightsByType.Aggregate((x, y) => x.Value > y.Value ? x : y).Key; playerProfile.SetProfileFromFavoriteQuest(favoriteQuest); + playerProfile.Normalize(); return playerProfile; } } diff --git a/Assets/Scripts/Game/NarrativeGenerator/QuestGeneratorManager.cs b/Assets/Scripts/Game/NarrativeGenerator/QuestGeneratorManager.cs index df7861e31..b48fbd351 100644 --- a/Assets/Scripts/Game/NarrativeGenerator/QuestGeneratorManager.cs +++ b/Assets/Scripts/Game/NarrativeGenerator/QuestGeneratorManager.cs @@ -185,7 +185,7 @@ private void CreateGeneratorParametersForQuestLine(PlayerProfile playerProfile) questLines.EnemyParametersForQuestLines = new QuestEnemiesParameters(); //questLines.NpcParametersForQuestLines = new QuestNpcsParameters(); questLines.ItemParametersForQuestLines = new QuestItemsParameters(); - questLines.CalculateDifficultyFromProfile(playerProfile); + questLines.CalculateDifficultyFromProfile(playerProfile.MasteryPreference); #if UNITY_EDITOR Debug.Log("Profile: " + playerProfile); #endif diff --git a/Assets/Scripts/Game/NarrativeGenerator/Quests/QuestLineList.cs b/Assets/Scripts/Game/NarrativeGenerator/Quests/QuestLineList.cs index 44ae164b3..466593efd 100644 --- a/Assets/Scripts/Game/NarrativeGenerator/Quests/QuestLineList.cs +++ b/Assets/Scripts/Game/NarrativeGenerator/Quests/QuestLineList.cs @@ -108,9 +108,9 @@ public void CreateAssetsForEnemies(string directory) } - public void CalculateDifficultyFromProfile(PlayerProfile playerProfile) + public void CalculateDifficultyFromProfile(float masteryPreference) { - EnemyParametersForQuestLines.CalculateDifficultyFromProfile(playerProfile); + EnemyParametersForQuestLines.CalculateDifficultyFromProfile(masteryPreference/100f); } public void CalculateMonsterFromQuests()