士兵随机7技能
感谢论坛一些高手,其实qweytr_1已经找到方法了,这里整理一下。修改代码的红色地方,编译时删除base.ctor()那行。
目前测试新游戏的人物有随机7技能,还没有继续后续是否有问题。
public CharacterProgression(SpecializationDef specializationDef, LevelProgressionDef levelProgression, BaseStatSheetDef baseStatSheetDef, CharacterGenerationParams generationParams = null)
{
this._abilityTracks = new List<AbilityTrack>();
this._abilities = new List<TacticalAbilityDef>();
this._baseStats = new List<int>();
this._baseStats.Clear();
int num = (generationParams != null) ? generationParams.EnduranceBonus : 0;
this._baseStats.Add(baseStatSheetDef.Strength + num);
int num2 = (generationParams != null) ? generationParams.WillBonus : 0;
this._baseStats.Add(baseStatSheetDef.Will + num2);
int num3 = (generationParams != null) ? generationParams.SpeedBonus : 0;
this._baseStats.Add(baseStatSheetDef.Speed + num3);
this.BaseStatSheet = baseStatSheetDef;
this.SkillPoints = levelProgression.InitialSkillpoints;
this.LevelProgression = new LevelProgression(levelProgression, 0);
this.MainSpecDef = specializationDef;
AbilityTrack track = new AbilityTrack(specializationDef.AbilityTrack, AbilityTrackSource.PrimaryClass);
this.AddNewAbilityTrack(track, true);
AbilityTrack track2 = AbilityTrack.CreatePersonalAbilityTrack(new GameTagDef[0], levelProgression.MaxLevel, 7);
this.AddNewAbilityTrack(track2, false);
this.Init();
}
编辑->搜索程序集,输入 CharacterProgression 右键有个"编辑方法",修改后"编译",然后在"文件->保存模块"。 bravoex 发表于 2019-12-8 10:45
编辑->搜索程序集,输入 CharacterProgression
编辑->搜索程序集,输入 CharacterProgression之后
这一大堆也找不到改哪……
, levelProgression.MaxLevel,7); 改成这样下方代码的位置显示错误 大兄弟你写的简单,我看懂了{:3_121:} paladinman 发表于 2019-12-8 13:15
编辑->搜索程序集,输入 CharacterProgression之后
搜 AddNewAbilityTrack,第108行:lol
paladinman 发表于 2019-12-8 13:15
编辑->搜索程序集,输入 CharacterProgression之后
Assembly-CSharp -> PhoenixPoint.Common.Entities.Characters -> CharacterProgression,的108行
左边“程序集资源管理器“展开树能找到。
然而看不懂。是什么软件打开?编辑存档?存档位置在哪? 编译时删除base.ctor()那行 这句话是什么意思 没找到 谢谢楼上的两位老哥,找到了 改的时候, AbilityTrack track = new AbilityTrack(specializationDef.AbilityTrack, AbilityTrackSource.PrimaryClass);报错,编译不了 非常感谢 你太厉害了 辛苦了 弄好了,谢谢楼上几位的分享了。 修改以后无法进入游戏?有版本要求吗?
没有 删除base这行,因为没找到,编译后还是可以用,希望 后期不出错
本帖最后由 luoxian761 于 2020-11-23 19:10 编辑
1.8版本是不是方法不一样了,好多红字,编译不了。我的在118行。。 现版本还能用吗 周年版修改方法:
// PhoenixPoint.Common.Entities.Characters.AbilityTrack
// Token: 0x06006F74 RID: 28532 RVA: 0x001D2940 File Offset: 0x001D0B40
public static AbilityTrack CreatePersonalAbilityTrack(int trackLength, int abilitiesCount)
{
DefRepository defRepository = GameUtl.GameComponent<DefRepository>();
SkillTagDef basicFilter = GameUtl.GameComponent<SharedData>().SharedGameTags.PersonalProgressionTag;
List<TacticalAbilityDef> list = (from p in defRepository.GetAllDefs<TacticalAbilityDef>()
where p.CharacterProgressionData != null && p.CharacterProgressionData.PersonalTrackTags.Contains(basicFilter)
select p).ToList<TacticalAbilityDef>();
List<AbilityTrackSlot> list2 = new List<AbilityTrackSlot>();
for (int i = 0; i < trackLength; i++)
{
list2.Add(new AbilityTrackSlot());
}
List<AbilityTrackSlot> list3 = new List<AbilityTrackSlot>(list2);
for (int j = 0; j < abilitiesCount + 4; j++)
{
TacticalAbilityDef tacticalAbilityDef = (list.Count > 0) ? list.GetRandomElement(null) : null;
list.Remove(tacticalAbilityDef);
AbilityTrackSlot randomElement = list3.GetRandomElement(null);
list3.Remove(randomElement);
randomElement.Ability = tacticalAbilityDef;
}
return new AbilityTrack(list2.ToArray(), AbilityTrackSource.Personal);
}
修改CreatePersonalAbilityTrack函数中的 j < abilitiesCount + 4,就是本来3技能改为3+4技能
修改CharacterProgression函数 强制调用CreatePersonalAbilityTrack函数 把问号之前的删掉
// PhoenixPoint.Common.Entities.Characters.CharacterProgression
// Token: 0x06006FD8 RID: 28632
public CharacterProgression(CharacterProgressionDescription param)
{
this._abilityTracks = new List<AbilityTrack>();
this._abilities = new List<TacticalAbilityDef>();
this._baseStats = new List<int>();
this._baseStats.Clear();
this._baseStats.Add(param.BaseStatSheetDef.Strength);
this._baseStats.Add(param.BaseStatSheetDef.Will);
this._baseStats.Add(param.BaseStatSheetDef.Speed);
this.BaseStatSheet = param.BaseStatSheetDef;
this.SkillPoints = param.LevelProgressionDef.InitialSkillpoints;
this.LevelProgression = new LevelProgression(param.LevelProgressionDef, 0);
this.MainSpecDef = param.SpecializationDef;
AbilityTrack track = new AbilityTrack(this.MainSpecDef.AbilityTrack, AbilityTrackSource.PrimaryClass);
this.AddNewAbilityTrack(track, true);
AbilityTrack track2 = AbilityTrack.CreatePersonalAbilityTrack(param.LevelProgressionDef.MaxLevel, this.BaseStatSheet.PersonalAbilitiesCount);
this.AddNewAbilityTrack(track2, false);
this.Init();
}
zgq083516 发表于 2021-2-15 17:28
周年版修改方法:
// PhoenixPoint.Common.Entities.Characters.AbilityTrack
// Token: 0x06006F74 RID: 2 ...
可以了,感谢分享
lzc230 发表于 2021-6-27 07:22
可以了,感谢分享
可以分享一下修改好的文件吗?谢谢
zgq083516 发表于 2021-2-15 17:28
周年版修改方法:
// PhoenixPoint.Common.Entities.Characters.AbilityTrack
// Token: 0x06006F74 RID: 2 ...
可以分享一下修改好的文件吗?谢谢
666666666666666666 1111111111111
页:
[1]