// Token: 0x060015A1 RID: 5537 RVA: 0x00057AF4 File Offset: 0x00055CF4
public void AddAgentAtSlotIndex(Agent agent, int slotIndex)
{
// This will prevent to lose control over troops, they will only do siege actions (like the ladder) when you give charge command
if (agent.Formation.MovementOrder.MovementState != MovementOrder.MovementStateEnum.Charge)
{
return;
}
this.AddAgent(agent, slotIndex);
if (agent.Formation != null)
{
agent.Formation.DetachUnit(agent, true);
}
agent.DetachmentWeight = 1f;
agent.Detachment = this;
}
I said he can't change that in xml files... he will need to edit the dll files just as you explained in your post.
// Token: 0x06001DD4 RID: 7636 RVA: 0x00071EF4 File Offset: 0x000700F4
public override void GetSkillLevelChange(Hero hero, SkillObject skill, float skillXp, out int skillLevelChange)
{
skillLevelChange = 0;
int skillValue = hero.GetSkillValue(skill);
for (int i = 0; i < 1024; i++)
{
int num = skillValue + i;
if (num < 1023)
{
if (skillXp < (float)this._xpRequiredForSkillLevel[num])
{
break;
}
skillLevelChange++;
}
}
}
// Token: 0x06001DD0 RID: 7632 RVA: 0x00071DF8 File Offset: 0x0006FFF8
private void InitializeXpRequiredForSkillLevel()
{
int num = 30;
this._xpRequiredForSkillLevel[0] = num;
for (int i = 1; i < 1024; i++)
{
num += i * 2 + MathF.Round((float)num * 0.005f);
this._xpRequiredForSkillLevel[i] = this._xpRequiredForSkillLevel[i - 1] + num;
}
}
namespace TaleWorlds.Core
{
// Token: 0x02000032 RID: 50
public class DefaultRidingModel : RidingModel
{
// Token: 0x06000328 RID: 808 RVA: 0x0000B3F4 File Offset: 0x000095F4
public override float CalculateAcceleration(ItemObject horseItem, BasicCharacterObject rider)
{
float num = (float)horseItem.HorseComponent.Maneuver * 0.008f;
if (rider != null)
{
num *= 0.7f + 0.003f * ((float)rider.GetSkillValue(DefaultSkills.Riding) - 1.5f * (float)horseItem.Difficulty);
}
return MathF.Clamp(num, 0.15f, 0.7f);
}
}
}