Mod笔记
本帖最后由 qweytr_1 于 2019-12-9 16:48 编辑Flash插件坏了,没法上传dll文件
只好写笔记了
这是用dnSpy修改的修改笔记,dnSpy可以从https://github.com/0xd4d/dnSpy/releases下载,比如这是6.1.0版本的dnSpy:https://github.com/0xd4d/dnSpy/r ... y-netcore-win64.zip
由于代码众多,这里用翻页符号对不同代码进行分割
已知问题:
1、人物速度属性太高会造成卡顿
2、人物力量属性太高会在投掷手雷的时候卡顿
3、电脑有时会用CharacterProgression新建随机人物,所以修改时候最好不要直接对CharacterProgression下手这个是除移动与心灵控制外其他行动不消耗AP/意志点数
protected virtual void ApplyCosts(object parameter)
{
if (!this.ShouldApplyCosts(parameter))
{
return;
}
if (!this.IsTacticalActor)
{
return;
}
if ((base.Actor as TacticalActor).IsFromViewerFaction)
{
return;
}
if (this.UsesActionPoints)
{
this.TacticalActor.CharacterStats.ActionPoints.Subtract(this.ActionPointCost);
}
if (this.UsesWillPoints)
{
this.TacticalActor.CharacterStats.WillPoints.Subtract(this.WillPointCost);
}
}
和平外交模式(需要改两处,一处保证正常外交关系都是向着有利于双方的方向进行,另一处保证如果外交的一方是玩家,保留扣分项免得大家没办法把结盟改成敌对——然而修改并没对派系之间的好感度生效,该敌对还是敌对) public void ModifyDiplomacy(IDiplomaticParty withParty, int diplomacyChange)
{
PartyDiplomacy.Relation relation = this.GetRelation(withParty);
if (relation == null)
{
throw new Exception(string.Format("{0} does not have diplomatic relations with {1}", this.Party, withParty));
}
relation.Diplomacy += ((diplomacyChange < 400) ? 200 : ((diplomacyChange < 600) ? (diplomacyChange - 600) : 200));
}
private void ApplyDiplomacy(GeoFaction faction)
{
List<RewardSetDiplomaticObjective> setDiplomaticObjectives = this.SetDiplomaticObjectives;
if (setDiplomaticObjectives != null && setDiplomaticObjectives.Count > 0)
{
GeoLevelController component = GameUtl.CurrentLevel().GetComponent<GeoLevelController>();
foreach (RewardSetDiplomaticObjective rewardSetDiplomaticObjective in this.SetDiplomaticObjectives)
{
GeoFaction faction2 = component.GetFaction(rewardSetDiplomaticObjective.WithFaction);
GeoSite pointOfInterest = rewardSetDiplomaticObjective.PointOfInterest;
if (pointOfInterest != null)
{
pointOfInterest.RevealSite(faction);
this.ApplyResult.RevealedSites.Add(pointOfInterest);
}
faction2.Diplomacy.SetDiplomacyObjective(faction, rewardSetDiplomaticObjective.Title, rewardSetDiplomaticObjective.Description, pointOfInterest);
if (faction2 != faction)
{
this.ApplyResult.FactionDiplomacyObjectiveChanged.AddNotContained(faction2);
}
}
}
List<RewardMaxDiplomacyStateChange> setMaxDiplomacyState = this.SetMaxDiplomacyState;
if (setMaxDiplomacyState != null && setMaxDiplomacyState.Count > 0)
{
foreach (RewardMaxDiplomacyStateChange rewardMaxDiplomacyStateChange in this.SetMaxDiplomacyState)
{
rewardMaxDiplomacyStateChange.Faction.Diplomacy.SetMaxDiplomacyState(faction, rewardMaxDiplomacyStateChange.State, true);
}
this.ApplyResult.ChangeMaxDiplomacyState.AddRange(this.SetMaxDiplomacyState);
}
List<RewardDiplomacyChange> diplomacy = this.Diplomacy;
if (diplomacy != null && diplomacy.Count > 0)
{
foreach (RewardDiplomacyChange rewardDiplomacyChange in this.Diplomacy)
{
IDiplomaticParty diplomaticParty = rewardDiplomacyChange.Target ?? faction;
rewardDiplomacyChange.Party.Diplomacy.ModifyDiplomacy(diplomaticParty, (faction.IsViewerFaction ? 600 : 0) + rewardDiplomacyChange.Value);
this.ApplyResult.Diplomacy.Add(rewardDiplomacyChange);
if (this.ApplySecondaryDiplomacyEffects && diplomaticParty is GeoFaction && rewardDiplomacyChange.Party is GeoFaction && diplomaticParty is GeoFaction)
{
this.ApplySecondaryDiplomcy(rewardDiplomacyChange.Value, (GeoFaction)rewardDiplomacyChange.Party, (GeoFaction)diplomaticParty);
}
}
}
}科研速度加快 private int GetResearchProduction(ResearchDef def)
{
float num = (float)this.Faction.ResourceIncome.GetTotalResouce(ResourceType.Research).RoundedValue;
if (this.Faction.IsViewerFaction)
{
num *= 100f;
}
GeoFactionStatModifiers factionStatModifiers = this.Faction.FactionStatModifiers;
return (int)((num * ((factionStatModifiers != null) ? new float?(factionStatModifiers.GetResearchModifier(def)) : null)) ?? 1f);
}飞船加强(似乎无效)
public void UpdateBaseVehicleStats(GeoVehicle vehicle)
{
if (vehicle.VehicleDef.BaseStats.SpaceForUnits != 6)
{
vehicle.Stats.MaximumRange = vehicle.VehicleDef.BaseStats.MaximumRange * (1f + this.ModData.RangeMultiplier);
vehicle.Stats.SpaceForUnits = vehicle.VehicleDef.BaseStats.SpaceForUnits + this.ModData.SpaceForUnits;
vehicle.Stats.Speed = vehicle.VehicleDef.BaseStats.Speed * (1f + this.ModData.SpeedMultiplier);
vehicle.Stats.MaxMaintenancePoints = (int)((float)vehicle.VehicleDef.BaseStats.MaxMaintenancePoints * (1f + this.ModData.MaxMaintenancePointsMultiplier));
vehicle.Range.Range = vehicle.Stats.MaximumRange;
return;
}
vehicle.Stats.MaximumRange = vehicle.VehicleDef.BaseStats.MaximumRange * (3f + this.ModData.RangeMultiplier);
vehicle.Stats.SpaceForUnits = 12;
vehicle.Stats.Speed = vehicle.VehicleDef.BaseStats.Speed * (5f + this.ModData.SpeedMultiplier);
vehicle.Stats.MaxMaintenancePoints = (int)((float)vehicle.VehicleDef.BaseStats.MaxMaintenancePoints * (6f + this.ModData.MaxMaintenancePointsMultiplier));
vehicle.Range.Range = vehicle.Stats.MaximumRange;
}学习技能不消耗点数
public void BuyAbility()
{
if (this._boughtAbility != null)
{
this.ConsumeAbilityCost(0);
this.CommitStatChanges();
this._character.Progression.LearnAbility(this._boughtAbility);
this.ClearBoughtAbility();
this.RefreshStatPanel();
this.SetAbilityTracks();
}
}生产速度加快 public class ItemManufacturing
......
// Token: 0x06006161 RID: 24929 RVA: 0x0019512C File Offset: 0x0019332C
public void Update()
{
if (this.Current == null)
{
return;
}
ItemManufacturing.ManufactureQueueItem manufactureQueueItem = this.Current;
int production = Mathf.RoundToInt(this._faction.ResourceIncome.GetTotalResouce(ResourceType.Production).Value);
if (this._faction.IsViewerFaction)
{
production *= 100;
}
this.AddProduction(production, true);
if (this.Current != null && manufactureQueueItem != this.Current)
{
ItemManufacturing.ManufactureQueueEventHandler onItemStarted = this.OnItemStarted;
if (onItemStarted == null)
{
return;
}
onItemStarted(this.Current);
}
}增加基础属性不消耗点数,且增加属性的步长改成1000private int ChangeCharacterStat(CharacterBaseAttribute baseStat, int currentStatValue, int startingStatValue, bool increase)
{
if (increase)
{
int num = 0;
if (this._currentSkillPoints - num >= 0)
{
this._currentSkillPoints -= num;
return 1000;
}
if (this._currentSkillPoints + this._currentFactionPoints - num >= 0)
{
int num2 = this._currentSkillPoints - num;
this._currentSkillPoints = 0;
this._currentFactionPoints += num2;
return 1000;
}
}
else if (currentStatValue - 1 >= startingStatValue)
{
int baseStatCost = this._character.Progression.GetBaseStatCost(baseStat, currentStatValue);
if (this._currentFactionPoints + baseStatCost <= this._startingFactionPoints)
{
this._currentFactionPoints += baseStatCost;
return -1;
}
if (this._currentFactionPoints == this._startingFactionPoints)
{
this._currentSkillPoints += baseStatCost;
return -1;
}
if (this._currentFactionPoints + baseStatCost > this._startingFactionPoints)
{
int num3 = this._currentFactionPoints + baseStatCost - this._startingFactionPoints;
this._currentFactionPoints = this._startingFactionPoints;
this._currentSkillPoints += num3;
return -1;
}
}
return 0;
}修改最大属性限制 public int GetMaxAttribute(CharacterBaseAttribute stat)
{
switch (stat)
{
case CharacterBaseAttribute.Strength:
return this.MaxStrength + 1000;
case CharacterBaseAttribute.Will:
return this.MaxWill + 1000;
case CharacterBaseAttribute.Speed:
return this.MaxSpeed;
default:
return 0;
}
}一次任务满级 public bool AddExperience(int experience)
{
this.ExperienceEarned += experience;
if (this.Level == this.Def.MaxLevel)
{
return false;
}
int level = this.Level;
this.Experience = this.Def.XPCap;
int num = this.Level - level;
for (int i = 1; i <= num; i++)
{
LevelProgression.LevelUpHandler levelUpCallback = this.LevelUpCallback;
if (levelUpCallback != null)
{
levelUpCallback(i + level);
}
this.HasNewLevel = true;
}
return num > 0;
}制造物品时候获得资源而非消耗资源public ItemManufacturing.ManufactureQueueItem ManufactureItem(IManufacturable item, Action<ItemManufacturing.ManufactureQueueItem, bool> itemAddedCallback = null)
{
if (!this.UseFactoryManufacturing)
{
this._faction.Wallet.Give(item.ManufacturePrice, OperationReason.Purchase);
AmplitudeWebClient instance = AmplitudeWebClient.Instance;
if (instance.Enabled)
{
instance.OnResourcesTaken(item.ManufacturePrice, "Manufacture");
}
}
bool flag = item.GetCostInManufacturePoints(this._faction) == 0f;
if (GameUtl.BuildInstant && this._faction.IsViewerFaction)
{
flag = true;
}
ItemManufacturing.ManufactureQueueItem manufactureQueueItem = new ItemManufacturing.ManufactureQueueItem(item, 0);
if (flag)
{
this.FinishManufactureItem(manufactureQueueItem);
}
else
{
if (this.Current == null)
{
ItemManufacturing.ManufactureQueueEventHandler onItemStarted = this.OnItemStarted;
if (onItemStarted != null)
{
onItemStarted(manufactureQueueItem);
}
}
this._queue.Add(manufactureQueueItem);
ItemManufacturing.ManufactureOrderEventHandler onItemAdded = this.OnItemAdded;
if (onItemAdded != null)
{
onItemAdded(manufactureQueueItem, this._queue.Count - 1);
}
}
if (itemAddedCallback != null)
{
itemAddedCallback(manufactureQueueItem, flag);
}
return manufactureQueueItem;
}经@十八文化 提醒,还有这个,新人随机7个技能,由于改这个的时候会dnSpy报错,修改时候或许需要改IL指令,看上去是删掉83行callvirt .........::get_MaxLevel后面的两行之后在83行之后新建一个指令dup
修改时候或许需要改IL指令,看上去是删掉83行callvirt .........::get_MaxLevel后面的两行,之后在83行之后新建一个指令dup
public CharacterProgression(SpecializationDef specializationDef, LevelProgressionDef levelProgression, BaseStatSheetDef baseStatSheetDef, CharacterGenerationParams generationParams = null)
..............................................................................
AbilityTrack track2 = AbilityTrack.CreatePersonalAbilityTrack(new GameTagDef, levelProgression.MaxLevel, levelProgression.MaxLevel);
有空的可以研究一下怎么用AbilityTrack函数创建7个有用的技能(猛冲/吸雾恢复意志/鱼人的放雾/杀人恢复行动力/子弹带病毒/心灵冲击/自动显示15格内敌人位置)这个技术比较复杂,我只包教不包会 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);
IEnumerable<GameTagDef> abilityFilter = new GameTagDef;
int maxLevel = levelProgression.MaxLevel;
AbilityTrack track2 = AbilityTrack.CreatePersonalAbilityTrack(abilityFilter, maxLevel, maxLevel);
this.AddNewAbilityTrack(track2, false);
List<AbilityTrackSlot> list = new List<AbilityTrackSlot>();
DefRepository defRepository = GameUtl.GameComponent<DefRepository>();
AbilityTrackSlot abilityTrackSlot = new AbilityTrackSlot();
TacticalAbilityDef ability = defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("MindCrush_AbilityDef", StringComparison.OrdinalIgnoreCase));
abilityTrackSlot.Ability = ability;
list.Add(abilityTrackSlot);
abilityTrackSlot = new AbilityTrackSlot();
ability = defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("MindSense_AbilityDef", StringComparison.OrdinalIgnoreCase));
abilityTrackSlot.Ability = ability;
list.Add(abilityTrackSlot);
abilityTrackSlot = new AbilityTrackSlot();
ability = defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("BioChemist_AbilityDef", StringComparison.OrdinalIgnoreCase));
abilityTrackSlot.Ability = ability;
list.Add(abilityTrackSlot);
abilityTrackSlot = new AbilityTrackSlot();
ability = defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("ExtraMove_AbilityDef", StringComparison.OrdinalIgnoreCase));
abilityTrackSlot.Ability = ability;
list.Add(abilityTrackSlot);
abilityTrackSlot = new AbilityTrackSlot();
ability = defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("Heavy_ClassProficiency_AbilityDef", StringComparison.OrdinalIgnoreCase));
abilityTrackSlot.Ability = ability;
list.Add(abilityTrackSlot);
abilityTrackSlot = new AbilityTrackSlot();
ability = defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("Infiltrator_ClassProficiency_AbilityDef", StringComparison.OrdinalIgnoreCase));
abilityTrackSlot.Ability = ability;
list.Add(abilityTrackSlot);
abilityTrackSlot = new AbilityTrackSlot();
ability = defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("Priest_ClassProficiency_AbilityDef", StringComparison.OrdinalIgnoreCase));
abilityTrackSlot.Ability = ability;
list.Add(abilityTrackSlot);
this.AddNewAbilityTrack(new AbilityTrack(list.ToArray(), AbilityTrackSource.Personal), false);
this.Init();
}代码如此,很可惜,这段代码并不能通过编译。
你需要在改这段代码的最开始(Ctrl+Home跳转到的第一行)粘贴这几行using Base.Defs;
using Base.Core;
using System.Linq;请注意,并不是每个技能都可以写进ability = defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("GrenadesTalent_AbilityDef", StringComparison.OrdinalIgnoreCase));里面的
另外,建议在贴好3个using之后用这种方式(或者第二页34#的方式)在(没记错是)AddSecondaryClass这个函数下添加技能:
DefRepository defRepository = GameUtl.GameComponent<DefRepository>();
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("MindCrush_AbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("MindSense_AbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("MotionDetection_AbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("SenseLocate_AbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("ExtraMove_AbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("Thief_AbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("BioChemist_AbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("AssaultRiflesTalent_AbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("GrenadesTalent_AbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("HandgunsTalent_AbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("HeavyWeaponsTalent_AbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("MeleeWeaponTalent_AbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("MountedWeaponTalent_AbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("PDWTalent_AbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("ShotgunTalent_AbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("SilencedWeaponTalent_AbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("SniperTalent_AbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("IgnorePain_AbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("ExpertHealer_AbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("ExpertHeavyWeapons_AbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("ExpertLightWeapons_AbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("ExpertMelee_AbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("ExpertMountedWeapons_AbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("ExpertPacker_AbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("ExpertRunner_AbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("ExpertShooter_AbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("EnhancedVision_AbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("EagleEye_AbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("EagleEyed_AbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("DoublePerception_AbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("Fishman_Regeneration_Passive_AbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("Regeneration_Torso_Passive_AbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("FastUse_AbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("AcidImmunity_DamageMultiplierAbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("FireImmunity_DamageMultiplierAbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("GooImmunity_AbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("PoisonImmunity_DamageMultiplierAbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("PsychicImmunity_DamageMultiplierAbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("SonicImmunity_DamageMultiplierAbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("StunStatusImmunity_AbilityDef", StringComparison.OrdinalIgnoreCase)));
this.AddAbility(defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("VirusImmunity_DamageMultiplierAbilityDef", StringComparison.OrdinalIgnoreCase)));BTW,第二页@ltcszk 给出了一个更漂亮的解法
(我并不会写C#,我都是胡乱玩的,专业解法参考这个是很不错的)
然而请注意,其实我们不能在.ctor那里改这些设置
电脑生成的NPC士兵也会调用这个.ctor
建议学双职业的时候加这些新技能
AI从来没有学双职业的。扫描到站点时候揭露站点内容(或许能借此避开“伏击”这种情况) private void DetectSite(GeoSite site, GeoFaction owner)
{
if (this.ScanDef.RevealSites && !site.GetVisible(this.Owner))
{
if (site.Type == GeoSiteType.AlienBase)
{
GeoAlienBase component = site.GetComponent<GeoAlienBase>();
if (component != null && component.IsPalace)
{
return;
}
}
site.SetVisible(owner, true);
site.GeoLevel.View.OnScannerSiteReveal(site);
Action<GeoSite> onSiteRevealed = this.OnSiteRevealed;
if (onSiteRevealed != null)
{
onSiteRevealed(site);
}
}
if ((this.ScanDef.InspectSites || owner.IsViewerFaction) && !site.GetInspected(this.Owner))
{
site.SetInspected(owner, true);
}
}顺便附上扫描次数修改// PhoenixPoint.Geoscape.Entities.PhoenixBases.FacilityComponents.SatelliteUplinkFacilityComponent
// Token: 0x06005543 RID: 21827
public override void UpdateOutput()
{
this.ScannerCapacity = 100 + (int)this.GetValueAfterAppliedModifiers((float)this.Def.ScannerCapacity, 0f, 1f);
base.UpdateOutput();
}类似地,我们也可以修改能源——处于不明原因,基地经常会拉闸限电把总电量限制在20/30的样子——既然这么喜欢限电干脆把它改掉好了// PhoenixPoint.Geoscape.Entities.PhoenixBases.FacilityComponents.PowerFacilityComponent
// Token: 0x06005528 RID: 21800
public override void UpdateOutput()
{
this.PowerOuput = (int)this.GetValueAfterAppliedModifiers((float)this.Def.PowerOutput, 0f, 1f) << 1;
base.UpdateOutput();
}
先写这么多好了
其中不少代码我还没有测试
本来有部分代码昨天就能发出来的
结果flash插件把浏览器干掉了
而我没从其他地方记笔记…… 不会用啊 有详细步骤吗 好人一生平安!!!!
鼓励楼主继续测试摸索 不明觉厉 明年年底Chrome不支持佛拉屎控件了,DZ论坛何去何从{:3_98:} 非常感谢楼主的分享 请问我想修改士兵的随机三个技能 我在dnspy里面找不到相关 请教一下怎么修改 万分感谢 比如狙击手 大力士之类 看不懂 只能膜拜下大神了 十八文化 发表于 2019-12-7 18:13
请问我想修改士兵的随机三个技能 我在dnspy里面找不到相关 请教一下怎么修改 万分感谢 比如狙击手 大力士之 ...
AbilityTrack.CreatePersonalAbilityTrack
辛苦了 我彻底放弃了 是在弄不懂 只是知道随机三个个人技能 但是不会改成固定的 根本找不到技能的关键词 有没有办法从console commands 入手
比如 teach 命令怎么用 是不是修改这个的呀。
/ Token: 0x06006F5C RID: 28508 RVA: 0x001CC19C File Offset: 0x001CA39C
[ConsoleCommand(Command = "teach", Description = "(ability_def_name) - teach an ability to the actor under the cursor (true - add to selected equipment, false - add to actor)"
public static void CmdTeachAbility(IConsole console, params string[] args)
{
DefRepository defRepo = GameUtl.GameComponent<DefRepository>();
Func<string> func = () => string.Join(", ", from itDef in defRepo.GetAllDefs<TacticalAbilityDef>()
select itDef.name into itName
orderby itName
select itName);
if (args.Length < 1)
{
throw new ConsoleCommandException("You must specify ability def name. Valid values are: " + func());
}
Level level = GameUtl.CurrentLevel();
TacticalLevelController tacticalLevelController = (level != null) ? level.GetComponent<TacticalLevelController>() : null;
TacticalView tacticalView = (tacticalLevelController != null) ? tacticalLevelController.View : null;
if (tacticalView == null)
{
throw new ConsoleCommandException("This command only works in a tactical level");
}
string abilityId = args[0];
TacticalAbilityDef tacticalAbilityDef = defRepo.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith(abilityId, StringComparison.OrdinalIgnoreCase));
if (tacticalAbilityDef == null)
{
throw new ConsoleCommandException("Invalid ability def name: '" + abilityId + "'. Valid values are: " + func());
}
SelectionInfo selectionInfo = tacticalView.SelectAtCursor();
TacticalActor tacticalActor = selectionInfo.Actor as TacticalActor;
if (tacticalActor == null)
{
throw new ConsoleCommandException("No actor under the cursor");
}
if (args.Length < 2 || !Convert.ToBoolean(args[1]))
{
tacticalActor.AddAbility(tacticalAbilityDef, tacticalActor);
console.WriteLine("{0} taught to {1}", new object[]
{
tacticalAbilityDef.name,
tacticalActor.name
});
return;
}
selectionInfo.Actor.AddAbility(tacticalAbilityDef, tacticalActor.Equipments.SelectedEquipment);
console.WriteLine("{0} taught to {1}, via {2}", new object[]
{
tacticalAbilityDef.name,
tacticalActor.name,
tacticalActor.Equipments.SelectedEquipment
});
}
}
} 本帖最后由 qweytr_1 于 2019-12-7 21:52 编辑
十八文化 发表于 2019-12-7 20:27
辛苦了 我彻底放弃了 是在弄不懂 只是知道随机三个个人技能 但是不会改成固定的 根本找不到技能的关键词 有 ...
tacticalActor.AddAbility(tacticalAbilityDef, tacticalActor);
你需要tacticalAbilityDef,但这玩意怎么写,从哪里读,我并没打算研究
毕竟我电脑水平不好
看上去似乎TacticalAbilityDef tacticalAbilityDef = defRepo.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith(abilityId, StringComparison.OrdinalIgnoreCase));这行命令会有帮助
你可以试试
我懒得试了
新人随机7个技能 能不能详细说一下,看不明白 killo830317 发表于 2019-12-8 00:01
新人随机7个技能 能不能详细说一下,看不明白
看不明白就别改
我已经说清楚了
为了不出BUG(在Ctrl+Shift+E的时候dnSpy会生成一行base..ctor()阻止继续编译,我不敢删),于是这个我推荐改IL指令
怎么改我已经说得够清楚了
改成了,楼主可以改为“看上去是删掉83行“callvirt .........::get_MaxLevel”后面的两行,之后在83行之后新建一个指令dup‘’,原句真不好理解 本帖最后由 qweytr_1 于 2019-12-8 04:54 编辑
十八文化 发表于 2019-12-7 20:27
辛苦了 我彻底放弃了 是在弄不懂 只是知道随机三个个人技能 但是不会改成固定的 根本找不到技能的关键词 有 ...
点开了控制台
发现了这个
在打架时候
teach (技能)
就好
好像还可以teach ... true
具体用法还在研究
技能是:
AcidImmunity_DamageMultiplierAbilityDef:酸免疫
AcidResistant_DamageMultiplierAbilityDef
AcidwormExplode_AbilityDef
AdrenalineRush_AbilityDef
AreaStun_AbilityDef
Armadillo_Die_AbilityDef
Armadillo_EvacuateMountedActorsAbilityDef
ArmadilloHulk_DieAbilityDef
ArmourBreak_AbilityDef:主动技·破甲
Assault_ClassProficiency_AbilityDef
AssaultRiflesTalent_AbilityDef
Bash_WithWhateverYouCan_AbilityDef
BashStrike_AbilityDef
Basic_Die_AbilityDef
Berserker_ClassProficiency_AbilityDef
BigBooms_AbilityDef:主动技·漫天轰炸
BioChemist_AbilityDef:被动技能,子弹带病毒+1
BloodLust_AbilityDef:狂战被动
BodySlam_AbilityDef
Brainiac_AbilityDef:加意志与感知
Brawler_AbilityDef
Cautious_AbilityDef:增加准度减伤害
Chiron_BashStrike_AbilityDef
Chiron_Die_AbilityDef
Chiron_EnterPlay_AbilityDef
Chiron_EnterStabilityStance_AbilityDef
Chiron_ExitStabilityStance_AbilityDef
Chiron_Strike_AbilityDef
ChironJumpOneFloor_AbilityDef
CloseQuarters_AbilityDef:近身闪避(状态(?))
CloseQuartersSpecialist_AbilityDef:霰弹枪和近战武器精通
Crabman_Die_AbilityDef
Crabman_EnterPlayAbilityDef
Crafty_AbilityDef:搭载武器精通,范围、伤害+20%
Dash_AbilityDef
DeadlyDuo_FollowUp_ShootAbilityDef
DeadlyDuo_ShootAbilityDef
Decoy_AbilityDef
Decoy_Die_AbilityDef
DefaultDieAbilityDef
DeployDrone_ShootAbilityDef
DeployDronePack_ShootAbilityDef
DeployInjectorBomb1_AbilityDef
DeployInjectorBomb2_AbilityDef
DeployInjectorBomb3_AbilityDef
DeployInjectorBomb4_AbilityDef
DeployLaserTurret_AbilityDef
DeployPRCRTurret_AbilityDef
DeployShield_AbilityDef
DeployTurret_AbilityDef
DeployTurret_PlayAnimation_AbilityDef
Devoted_AbilityDef
DoublePerception_AbilityDef:感知翻倍
DropItem_AbilityDef
EagleEye_AbilityDef:感知翻倍
EagleEyed_AbilityDef:感知+25%
Egg_HatchAcidWorm_MorphIntoActorAbilityDef
Egg_HatchFireWorm_MorphIntoActorAbilityDef
Egg_HatchPoisonWorm_MorphIntoActorAbilityDef
EggFacehugger_Die_AbilityDef
EggFacehugger_HatchFacehugger_MorphIntoActorAbilityDef
EggFacehugger_HulkDieAbilityDef
EggFacehugger_StartPreparing_AbilityDef
EggFacehugger_Surveillance_AbilityDef
ElectricKick_AbilityDef
ElectricReinforcement_AbilityDef
ElectricTentacleAttack_AbilityDef
EndTurn_AbilityDef
EnhancedVision_AbilityDef:装备被动·夜视
EnterVehicle_AbilityDef
EnterVehicle_Instant_AbilityDef
Exalted_Die_AbilityDef
Exalted_InducePanic_AbilityDef
Exalted_MindControl_AbilityDef
Exalted_MindCrush_AbilityDef
Exalted_MistBreather_AbilityDef
Exalted_PsychicScream_AbilityDef
Exalted_ReleaseControl_AbilityDef
ExaltedInteractWithYuggothian_AbilityDef
ExitMission_AbilityDef
ExitVehicle_AbilityDef
ExitVehicle_Instant_AbilityDef
ExpertHealer_AbilityDef
ExpertHeavyWeapons_AbilityDef
ExpertLightWeapons_AbilityDef
ExpertMelee_AbilityDef
ExpertMountedWeapons_AbilityDef
ExpertPacker_AbilityDef
ExpertRunner_AbilityDef
ExpertShooter_AbilityDef:射击准度+20
ExpertThrower_AbilityDef
ExplodingBarrel_StructuralTargetDieAbilityDef
ExtraMove_AbilityDef
ExtremeFocus_AbilityDef:警戒少消耗一点移动力
Facehugger_Die_AbilityDef
Facehugger_MindControl_AbilityDef
FallNoSupport_AbilityDef
FastUse_AbilityDef医疗包,兴奋剂和机械臂的行动点数减少1点,没看清是主动还是被动……应该是被动
FieldMedic_AbilityDef
FireImmunity_DamageMultiplierAbilityDef
FireResistant_DamageMultiplierAbilityDef
FireVulnerability_DamageMultiplierAbilityDef
FirewormEgg_Die_AbilityDef
FirewormEgg_HulkDieAbilityDef
FirewormEgg_StartPreparing_AbilityDef
FirewormEgg_Surveillance_AbilityDef
FirewormEnterPlay_AbilityDef
FirewormExplode_AbilityDef
FirewormFallNoSupport_AbilityDef
Fishman_ClassProficiency_AbilityDef
Fishman_Die_AbilityDef
Fishman_EnterPlay_AbilityDef
Fishman_HumanWeaponsProficiency_AbilityDef
Fishman_Regeneration_Passive_AbilityDef
Fishman_SpawnMist_AbilityDef
Fishman_UpperArms_Strike_AbilityDef
Fishman_UpperArms_Strike_ShootAbilityDef
FlameThrower_ShootAbilityDef
Focused_AbilityDef:狙击手,狙击步枪伤害+25,意志-4
FrenzySelfDamageAbilityDef
GoodShot_AbilityDef:突击步枪伤害,准度+20
GooImmunity_AbilityDef:免疫黏液
GooSpit_ShootAbilityDef
GrenadeSpam_ShootAbilityDef
GrenadeSpam_ShootAbilityFollowUpDef
GrenadesTalent_AbilityDef
Gunslinger_AbilityDef:无需消耗行动点使用精通武器(消耗2意志)
GymRat_AbilityDef:力量+2
Handgun_ShootAbilityDef
HandgunsTalent_AbilityDef
Heavy_ClassProficiency_AbilityDef
HeavyLifter_AbilityDef:负重x2
HeavyWeaponsTalent_AbilityDef
Helpful_AbilityDef:治疗加成50%,意志+2
Humanoid_HighJump_AbilityDef
Idle_AbilityDef
IgnorePain_AbilityDef:狂战被动·无视疼痛
InducePanic_AbilityDef:牧师主动·造成恐慌
Infiltrator_ClassProficiency_AbilityDef
InjectorBomb_Die_AbilityDef
Inspire_AbilityDef:装甲兵被动·激励
InteractWithObject_AbilityDef
InteractWithYuggothian_AbilityDef
Inventory_AbilityDef
InventoryVehicle_AbilityDef
JetJump_AbilityDef
LaunchAcidWorm_ShootAbilityDef
LaunchFireWorm_ShootAbilityDef
LaunchGoo_ShootAbilityDef
LaunchGrenade_ShootAbilityDef
LaunchMissiles_ShootAbilityDef
LaunchMortar_ShootAbilityDef
LaunchPoisonWorm_ShootAbilityDef
LaunchRocket_ShootAbilityDef
MachineEntity_ClassProficiencyAbilityDef:机器没有意志力(存疑),且对生物效果免疫
ManualControl_AbilityDef
MarkedForDeath_AbilityDef
MasterMarksman_AbilityDef
Medkit_AbilityDef
MeleeReturnFire_WithBashAbility_AbilityDef
MeleeReturnFire_WithShootAbility_AbilityDef
MeleeWeaponTalent_AbilityDef
MindCrush_AbilityDef
MindSense_AbilityDef:定位15格以内的有机敌人
MistBreather_AbilityDef
MistLaunch_ShootAbilityDef
MistRepeller_AbilityDef
MotionDetection_AbilityDef:装备被动·移动探测·定位敌人
MountedWeaponTalent_AbilityDef
Move_AbilityDef
Move3x3_AbilityDef
Move5x5_AbilityDef
Mutog_CanLeap_AbilityDef
Mutog_ControlledByPriest_AbilityDef
Mutog_Devour_AbilityDef
Mutog_Die_AbilityDef
Mutog_EnterPlay_AbilityDef
Mutog_HeadAttack_AbilityDef
Mutog_HeadBash_AbilityDef
Mutog_HeadBash_BashAbilityDef
Mutog_Leap_AbilityDef
Mutog_LeftPawBash_AbilityDef
Mutog_PlayBerserkAnimation_AbilityDef
Mutog_PlayDevourAnimation_AbilityDef
Mutog_PrimalInstinct_AbilityDef
Mutog_Ram_AbilityDef
Mutog_Regeneration_AbilityDef
Mutog_RightPawBash_AbilityDef
Mutog_TailBash_AbilityDef
Mutog_TailBash_BashAbilityDef
Mutog_TailSlice_AbilityDef
Mutog_TailSlice_BashAbilityDef
Mutog_TongueLash_AbilityDef
OpenCrate_AbilityDef
Overwatch_AbilityDef
OverwatchFocus_AbilityDef
PainChameleon_AbilityDef:应激反应
PDWTalent_AbilityDef:单兵自卫武器精通,准度+10%
Pitcher_AbilityDef
PlayActionAnimation_AbilityDef
PlaySeedsAnimation_AbilityDef
PoisonImmunity_DamageMultiplierAbilityDef:毒免疫
PoisonResistant_DamageMultiplierAbilityDef
PoisonwormExplode_AbilityDef
Priest_ClassProficiency_AbilityDef
Priest_InstilFrenzy_AbilityDef
Priest_MindControl_AbilityDef
Priest_PsychicScream_AbilityDef
PsychicImmunity_DamageMultiplierAbilityDef
PsychicResistant_DamageMultiplierAbilityDef
PsychicWard_AbilityDef
Queen_BashStrike_AbilityDef
Queen_CanLeap_AbilityDef
Queen_Die_AbilityDef
Queen_Die_Belcher_AbilityDef
Queen_EnterPlay_AbilityDef
Queen_GunsFire_ShootAbilityDef
Queen_IdleAbilityDef
Queen_InstilFrenzy_AbilityDef
Queen_Leap_AbilityDef
Queen_SpawnFacehugger_AbilityDef
Queen_SpawnMist_AbilityDef
Queen_StartPreparing_AbilityDef
Queen_Strike_AbilityDef
QuickAim_AbilityDef
RadiantHope_AbilityDef
RageBurst_ShootAbilityDef
Rally_AbilityDef
RapidClearance_AbilityDef:突击主动·迅速清除
ReadyForAction_AbilityDef
Reckless_AbilityDef:伤害+30%准度-20%
RecoverWill_AbilityDef
RecruitIntoPhoenix_AbilityDef
Regeneration_Torso_Passive_AbilityDef:再生技能
ReleaseControl_AbilityDef
Reload_AbilityDef
ReloadTurret_AbilityDef
RemoteDeployment_AbilityDef
ResourceCrate_DieAbilityDef
Resourceful_AbilityDef
RestrictedMovement_AbilityDef
RetrieveTurret_AbilityDef
ReturnFire_AbilityDef
ReturnFire_WithInactiveWeapon_AbilityDef
Scarab_Die_AbilityDef
Scarab_EvacuateMountedActorsAbilityDef
ScarabHulk_DieAbilityDef
SelfDefenseSpecialist_AbilityDef
SenseLocate_AbilityDef:定位12格以内的敌人
Sentinel_Die_AbilityDef
Sentinel_StartPreparing_AbilityDef
SentinelHatching_MassHatch_AbilityDef
SentinelHatching_Surveillance_AbilityDef
SentinelMist_SpawnMist_AbilityDef
SentinelMist_Surveillance_AbilityDef
SentinelTerror_Surveillance_AbilityDef
SentinelTerror_TelepathicAttack_AbilityDef
SentryTurret_Die_AbilityDef
ShootPoisonSpike_ShootAbilityDef
ShotgunTalent_AbilityDef
SilencedWeaponTalent_AbilityDef
SilentEcho_AbilityDef
Siren_EnterPlay_AbilityDef
Siren_Injecting_BashStrike_AbilityDef
Siren_Injecting_Strike_AbilityDef
Siren_InstilFrenzy_AbilityDef
Siren_PsychicScream_AbilityDef
Siren_Slashing_BashStrike_AbilityDef
Siren_SlashingStrike_AbilityDef
Siren_SpitAcid_AbilityDef
SneakAttack_AbilityDef
Sniper_ClassProficiency_AbilityDef
SniperTalent_AbilityDef
Soldier_Die_AbilityDef
SonicBlast_ShootAbilityDef
SonicImmunity_DamageMultiplierAbilityDef
SonicResistance_DamageMultiplierAbilityDef
Sow_AbilityDef
SpawningPoolCrabman_HulkDie_AbilityDef
SpiderDroneEnterPlay_AbilityDef
SpiderDroneExplode_AbilityDef
SpiderDroneFallNoSupport_AbilityDef
SpitPoison_ShootAbilityDef
StandBy_AbilityDef
Stealth_AbilityDef
StealthSpecialist_AbilityDef
Stimpack_AbilityDef
StomperLegs_EnterStabilityStance_AbilityDef
StomperLegs_ExitStabilityStance_AbilityDef
StomperLegs_Stomp_AbilityDef
Strength_PassiveModifierAbilityDef
Strike_ShootAbilityDef
Strongman_AbilityDef:被动·大力士
StructuralTarget_StructuralTargetDieAbilityDef
Structure_ClassProficiencyAbilityDef
StunStatusImmunity_AbilityDef
SurpriseAttack_AbilityDef
SwarmerEgg_Die_AbilityDef
SwarmerEgg_HatchSwarmer_MorphIntoActorAbilityDef
SwarmerEgg_HulkDieAbilityDef
SwarmerEgg_StartPreparing_AbilityDef
SwarmerEgg_Surveillance_AbilityDef
SY_Aspida_Die_AbilityDef
SY_Aspida_EvacuateMountedActorsAbilityDef
SY_AspidaBashStrike_AbilityDef
SY_AspidaHulk_DieAbilityDef
SY_AspidaStrike_ShootAbilityDef
SY_FullRestoration_AbilityDef
Technician_ClassProficiency_AbilityDef
TechnicianBashStrike_AbilityDef
TechnicianHeal_AbilityDef
TechnicianPowerSurge_ShootAbilityDef
TechnicianRemoveFacehugger_AbilityDef
TechnicianRepair_AbilityDef
TechnicianRestoreBodyPart_AbilityDef
TechnicianStrike_ShootAbilityDef
TechTurret_Die_AbilityDef
TestActionAnimation_AbilityDef
Thief_AbilityDef
ThrowGrenade_ShootAbilityDef
ThrowLaserTurret_AbilityDef
ThrowPRCRTurret_AbilityDef
ThrowTurret_AbilityDef
TotalClearance_ShootAbilityDef
TotalClearance_ShootAbilityFollowUpDef
TurretCombo_ShootAbilityDef
UnusableLeftHand_AbilityDef
UnusableRightHand_AbilityDef
UseAttachedEquipment_AbilityDef
Vanish_AbilityDef:主动·隐身
VehicleRam_AbilityDef
VirophageMedkit_AbilityDef
VirusImmunity_DamageMultiplierAbilityDef
VirusResistant_DamageMultiplierAbilityDef
WarCry_AbilityDef
WeakSpot_AbilityDef:狙击被动·弱点(在部位损坏时移除此部位护甲)
Weapon_ShootAbilityDef
Yuggothian_HulkDie_AbilityDef
Yuggothian_InducePanic_AbilityDef
Yuggothian_Shields_AbilityDef
Yuggothian_StatusAttack_AbilityDef
Yuggothian_StatusDefence_AbilityDef
Zombified_ClassProficiencyAbilityDef
killo830317 发表于 2019-12-8 00:40
改成了,楼主可以改为“看上去是删掉83行“callvirt .........::get_MaxLevel”后面的两行,之后在83行之后 ...
找到了更好的做法
可以删去那行base.ctor()的
或者IL指令把base.ctor放在最前面
已经可以手选技能了
本帖最后由 killo830317 于 2019-12-8 14:27 编辑
这个base..ctor在编译里删除了,指令出错???
qweytr_1 发表于 2019-12-8 02:24
找到了更好的做法
可以删去那行base.ctor()的
拜托能贴出来让我们看看么 ,还有能不能不是每人随机三个技能 而是现实7个
十八文化 发表于 2019-12-8 07:57
拜托能贴出来让我们看看么 ,还有能不能不是每人随机三个技能 而是现实7个
...
主楼代码里面有
killo830317 发表于 2019-12-8 03:54
这个base..ctor在编译里删除了,指令出错???
我说过了,包教不包会
本帖最后由 killo830317 于 2019-12-8 15:15 编辑
嗯,之前的问题解决了,base..ctor也删除了,不过实际还是随机7技能,做不到手选技能。
手选技能是要“写进ability = defRepository.GetAllDefs<TacticalAbilityDef>().FirstOrDefault((TacticalAbilityDef itDef) => itDef.name.StartsWith("GrenadesTalent_AbilityDef", StringComparison.OrdinalIgnoreCase))”吗?还是要“IL指令把base.ctor放在最前面”
顺带问一下,玩家和派系之间的外交加成能不能改,两倍就差不多了,想各派都不得罪的话,刷外交有点慢
qweytr_1 发表于 2019-12-8 14:40
我说过了,包教不包会
大佬,发下改好的Assembly-CSharp 文件把,让我们抄下作业
killo830317 发表于 2019-12-8 15:08
嗯,之前的问题解决了,base..ctor也删除了,不过实际还是随机7技能,做不到手选技能。
手选技能是要“写进 ...
看代码啊
怎么手选我已经写得很清楚了好不好!!!
你在这个页面搜索“代码如此,很可惜,这段代码并不能通过编译。”
附近就是解答
a7111111 发表于 2019-12-8 15:45
大佬,发下改好的Assembly-CSharp 文件把,让我们抄下作业
我前三行就是,Flash插件爆炸了
所以
你给我发?
BTW你是没看见这个吧
https://bbs.blacksheepgame.com/thread-5976838-1-1.html
把狙击手练成狂战士的我感到极度舒适~
qweytr_1 发表于 2019-12-8 16:07
我前三行就是,Flash插件爆炸了
所以
你给我发?
这个看过了,不过想要该自选技能的。。。
这作不知道可不可以修改掩体命中率相关的参数呢? 像XCOM 那种半掩体降低25%命中全掩体降低50% qweytr_1 发表于 2019-12-8 16:07
我前三行就是,Flash插件爆炸了
所以
你给我发?
:lol能传给我的话 我发也可以
a7111111 发表于 2019-12-8 16:48
能传给我的话 我发也可以
所以……你这么说,是让我用意念还是用嘴传给你?{:3_108:}
页:
[1]
2