Found it within TaleWorlds.CampaignSystem.SandBox.GameComponents.DefaultCharacterDevelopmentModel;is there a way to edit how many perk points I need to gain for each level?
// Token: 0x06001DF8 RID: 7672 RVA: 0x000730D5 File Offset: 0x000712D5
// Note: this type is marked as 'beforefieldinit'.
static DefaultCharacterDevelopmentModel()
{
}
// Token: 0x04000BD1 RID: 3025
private const int MaxCharacterLevels = 100;
// Token: 0x04000BD2 RID: 3026
private const int MaxAttributeLevel = 11;
// Token: 0x04000BD3 RID: 3027
private const int SkillPointsAtLevel1 = 120;
// Token: 0x04000BD4 RID: 3028
private const int...
this.OneHandedEdgePlacement.Initialize("{=Stk3PbV4}Edge Placement I", "{=69cxRmEr}One handed damage increased by 4%.", DefaultSkills.OneHanded, this.GetTierCost(1), this.OneHandedExtraHP, SkillEffect.PerkRole.Personal, 0.04f, SkillEffect.PerkRole.None, 0f, SkillEffect.EffectIncrementType.AddFactor);
Found it within TaleWorlds.CampaignSystem.SandBox.GameComponents.DefaultCharacterDevelopmentModel;is there a way to edit how many perk points I need to gain for each level?
// Token: 0x06001DF8 RID: 7672 RVA: 0x000730D5 File Offset: 0x000712D5
// Note: this type is marked as 'beforefieldinit'.
static DefaultCharacterDevelopmentModel()
{
}
// Token: 0x04000BD1 RID: 3025
private const int MaxCharacterLevels = 100;
// Token: 0x04000BD2 RID: 3026
private const int MaxAttributeLevel = 11;
// Token: 0x04000BD3 RID: 3027
private const int SkillPointsAtLevel1 = 120;
// Token: 0x04000BD4 RID: 3028
private const int SkillPointsGainNeededInitialValue = 10;
// Token: 0x04000BD5 RID: 3029
private const int SkillPointsGainNeededIncreasePerLevel = 5;
// Token: 0x04000BD6 RID: 3030
private readonly int[] _skillsRequiredForLevel = new int[100];
// Token: 0x04000BD7 RID: 3031
private const int _focusPointsPerLevelConst = 1;
// Token: 0x04000BD8 RID: 3032
private const int LevelsPerAttributePointConst = 4;
// Token: 0x04000BD9 RID: 3033
private const int FocusPointCostToOpenSkillConst = 0;
// Token: 0x04000BDA RID: 3034
private const int FocusPointsAtStartConst = 5;
// Token: 0x04000BDB RID: 3035
private const int AttributePointsAtStartConst = 15;
// Token: 0x04000BDC RID: 3036
private const int MaxSkillLevels = 1024;
// Token: 0x04000BDD RID: 3037
private readonly int[] _xpRequiredForSkillLevel = new int[1024];
// Token: 0x04000BDE RID: 3038
private const int XpRequirementForFirstLevel = 30;
// Token: 0x04000BDF RID: 3039
private const int traitThreshold1 = 1000;
// Token: 0x04000BE0 RID: 3040
private const int traitThreshold2 = 4000;
// Token: 0x04000BE1 RID: 3041
private const int traitMaxValue1 = 2500;
// Token: 0x04000BE2 RID: 3042
private const int traitMaxValue2 = 6000;
// Token: 0x04000BE3 RID: 3043
private static TextObject _attributeText = new TextObject("{=AT6v10NK}Attribute", null);
// Token: 0x04000BE4 RID: 3044
private static TextObject _skillFocusText = new TextObject("{=MRktqZwu}Skill Focus", null);
// Token: 0x04000BE5 RID: 3045
private static TextObject _overLimitText = new TextObject("{=bcA7ZuyO}Learning Limit Exceeded", null);
}
}
So I downloaded dnspy and edited the perk I wanted to. Used change il and edited bow aim faster from 10% to 100% for ****s and giggles. I saved the module and to see if anything changed I looked at the file through dotpeek and it still shows 10%. Did I edit the line wrong?You'll need a decompiler to see the code directly. I personally use dnSpy.
The best practice, for update compatibility and modularity sake, is to create a separate dll that will overwrite the system you want modified in the load order.
But, if you don't know how to do that, or just want to mess around quickly, easiest practice is to use dnSpy to open the .dll and edit the file directly.
well I tried to compile and i am getting c0234 errors up the wazooSo I downloaded dnspy and edited the perk I wanted to. Used change il and edited bow aim faster from 10% to 100% for ****s and giggles. I saved the module and to see if anything changed I looked at the file through dotpeek and it still shows 10%. Did I edit the line wrong?
sorry to keep posting here but I think it is working, I thought that faster aim mod increased the reload speed of bows, but what it does is pull the bow back quickly. That's what I think at least, now I need to figure out how to make a reload bow faster mod haha.well I tried to compile and i am getting c0234 errors up the wazoo
@IronheadHasan
Follow that tutorial step by step by step.
You will have access to all the classes exposed by TaleWorlds when you import all those DLLs, however, there seems to be a lot missing still. The community is currently trying to leverage Harmony in the meanwhile.
Without using Harmony the *only* thing I can figure out how to do is to re-Initialize the DefaultPerks in the game. But for instance, let's say you wanted to create a perk like I'm working for atheletics, "You can now sprint for up to 5 seconds. Hold Q to run up to 50% faster."
To implement a totally custom perk like this, you would need to re-Initialize an existing perk:
OneHandedEdgePlacement.Initialize("{=Stk3PbV4}Sprinting ", "{=69cxRmEr}You can now sprint for up to 5 seconds. Hold Q to run up to 50% faster.", DefaultSkills.OneHanded, 25, this.OneHandedExtraHP, SkillEffect.PerkRole.Personal, 0.00f, SkillEffect.PerkRole.None, 0f, SkillEffect.EffectIncrementType.Add);
Basically, I've made EdgePlacement do *nothing*.
And then, you'd need to register some kind of a hook like this:
OnGameStart(Game inGame, IGameStarter inGameStarter) {
base.OnGameStart(inGame, inGameStarter);
CampaignGameStarter campaignGameStarter = (CampaignGameStarter)inGameStarter;
campaignGameStarter.AddBehavior(new SprintFunctionality());
}
internal class SprintFunctionality : CampaignBehaviorBase {
public override void RegisterEvents()
{
CampaignEvents.BattleStarted.AddNonSerializedListener(this, BattleEntered);
CampaignEvents.OnPlayerBattleEndEvent.AddNonSerializedListener(this, BattleEnded);
}
}
The idea being, when you enter the battlefield, "turn on sprint" and when you leave the battlefield, "disable" sprint. And I was thinking, maybe you could have a simple If condition to see if the player has learned Edge Placement I, before allowing sprint. And I was thinking, you could allow sprint to work via:
CampaignEvents.TickEvent.AddNonSerializedListener(this, Sprint);
Where Sprint is a function that on frame-tick adds speed to the player character and drains a UI bar.
But all of this is theory, I haven't been able to accomplish any of this because A) there's no apparent way to make the main character move faster via code B) the TickEvent doesn't work like I think it does C) drawing UI isn't known yet
So a lot of stuff just isn't possible *unless* you go the Harmony route. At best, via the DLLs alone, you could just 'buff' the existing perks by doubling their effect numbers, instead of outright replacing them.
But imagine you wanted to do a Perk that was like "+25% slashing damage with one-handed weapons" even something this simple is not clear to me, either.
*And then* consider the fact non-main characters can learn these perks, too. I am sure this adds even more complexity. For instance, what if you want AI characters to be able to Sprint? Or, what if you want an AI character and a player character to be able to sprint simultaneously?
Outside of very simple tweaks, I would argue perks are not in a state to be modified yet, because we will need a full and total understanding of how to code all this without creating tremendous complexity.
i'm going to have to try doing small increases. Because I absolutely hate how slow reloading is for bows, I have edited the animation_combat.XML file to make it faster, the only bad thing is that it affects everyone.If the tooltip description changed, but you didn't actually see a change in behavior, it could just be the perk itself is bugged and since many of the perks right now are doing small incremental changes like 3% or 8%, it's honestly hard to know if they actually work in the base-game.