Could you describe the issue you are experiencing with more detail? I am sorry to say that I did not understand the issue.
Thank you for your read.
Now I understand what are my question, and I rewrite the topic.
I played for a long time, but TRAIT valor EXP is 0, have no Increase or decrease.
I cheated, try 10 VS 500 enemy and 500 vs 10 enemy battle, but no get valor exp when battle won.
I open the game code, found this:
Code:
namespace TaleWorlds.CampaignSystem.CharacterDevelopment
{
public class TraitLevelingHelper
public static void OnBattleWon(MapEvent mapEvent, float contribution)
{
float num = 0f;
float strengthRatio = mapEvent.GetMapEventSide(PlayerEncounter.Current.PlayerSide).StrengthRatio;
if (strengthRatio > 0.9f)
{
num = MathF.Min(20f, MathF.Sqrt(mapEvent.StrengthOfSide[(int)mapEvent.GetOtherSide(PlayerEncounter.Current.PlayerSide)]) * strengthRatio);
}
int xpValue = (int)(num * contribution);
TraitLevelingHelper.AddPlayerTraitXPAndLogEntry(DefaultTraits.Valor, xpValue, ActionNotes.BattleValor, null);
}
I have input console command "campaign.list_player_traits" to check valor EXP.
I sure this code is not work, but I don't know this code why don't work.
So, the mistake is "
MathF.Min(20f, MathF.Sqrt(mapEvent.StrengthOfSide[(int)mapEvent.GetOtherSide(PlayerEncounter.Current.PlayerSide)])"?
or elsewhere?