Jump to content
Game-Labs Forum

parmenio

Members2
  • Posts

    5
  • Joined

  • Last visited

parmenio's Achievements

Landsmen

Landsmen (1/13)

2

Reputation

  1. I've been meaning to post this for a while but I've been enjoying the game too much. This is a fantastic mod - comparing the vanilla game with the mod I can see lots of hard work has gone into it. This game has been a real joy to play. I bought Gettysburg but didn't get on with it and on that basis and the numerous complaints about AI scaling I didn't bother with this for a long while. I'm not much interested in Age of Sail but I'm going to buy it; Dreadnoughts is of more interest as that is the only period of Naval Warfare I've ever shown any interest in and I'll happily purchase the American Revolution when that comes out. I haven't played much of the campaign side of this to-date. I'm a real ignoramus when it comes to the ACW. I bought Take Command for the Napoleonic mod and I bought SOW hoping that it would eventually lead to a Napoleonic game which it did. So I've spent the time playing the custom and historic battles (and also adding my own mod code on top of yours but I'll post some info on a separate thread on that). A couple of things I've noticed. The first is having turned on enableAIMoraleDisplay I observed that this also gets displayed for the player side (screenshot attached - UGCW-enableAIMoraleDisplay.png). I tracked this down to the Update() method in UnitHud.cs: if (this.unit.side != RuntimeVars.playerSide && Methods.HideHud(this.unit)) { this.hpText.text = "?"; } if (Rebalance.Config.GameSettings.enableAIMoraleDisplay) { Text text = this.hpText; text.text = text.text + " " + Math.Round((double)this.unit.morale, 3); } I've amended this code to be part of the check for the non-player side (0-100 as well but that's just personal choice): if (this.unit.side != RuntimeVars.playerSide) { if (Rebalance.Methods.HideHud(this.unit)) { this.hpText.text = "?"; } else if (Rebalance.Config.GameSettings.enableAIMoraleDisplay) { Text text = this.hpText; text.text = text.text + " " + Convert.ToInt32(this.unit.morale * 100).ToString(); } } The second thing was the displayed arcs for artillery units which I only got round to looking at this morning. I've attached three screenshots (UGCW-All-Arcs.png, UGCW-CanisterAndShot.png, UGCW-CanisterOnly.png). CanisterOnly is fine but there is reduction in the displayed range for CanisterAndShot from all arcs to the CanisterAndShot only display. I think this is because the range modifier is being applied twice; once in the CalcEffectiveRange() method in UnitModel.cs: private float CalcEffectiveRange() { float num = (this.weapon.effectiveRange + this.skillData.effectiveRange) * MonoBehaviourSingleton<UnitPreference>.instance.firearmsRangeDependency.Evaluate(this.actualData.firearms); if (this.CanisterOnly) { num = Methods.GetCanisterRange(); } if (this.CanisterAndShell) { num *= MonoBehaviourSingleton<UnitPreference>.instance.specialModifiers.shellShotEffectiveRangeModifier; } return num; } and the second time in the UpdateArc() method in UnitView.cs: if (this.data.CanisterOnly) { effectiveRange = Methods.GetCanisterRange(); this.lines.Reserve(((!this.isGeneral) ? 500 : 400) * 12); } if (this.data.CanisterAndShell) { effectiveRange *= MonoBehaviourSingleton<UnitPreference>.instance.specialModifiers.shellShotEffectiveRangeModifier; this.lines.Reserve(((!this.isGeneral) ? 500 : 400) * 12); } CanisterOnly isn't affected because it's a fixed value overwriting effectiveRange but the CanisterAndShell arc ends up shorter than it should be. I changed this in UpdateArc() to: if (kind == EUnitKind.Artillery) { this.lines.Reserve(6000); } Thanks again for a great mod!
  2. 🙂 Thanks for that... I'd found a few comments complaining about it on Steam so that helps.
  3. If the answer to this is buried somewhere in this thread, then apologies..... ....but I've been trying to understand what the impact of skirmish mode being off is..... how does it affect unit behaviour?
  4. Noted. I've been using Visual Studio 2019 and Beyond Compare. dnSpy uses a fork of ILSpy for its decompilation (but that looks to be about 5 years old). I believe IlSpy is now built into Visual Studio 2019 16.5 for debugging .NET assemblies for which you do not have the source - it was (and still is) a VS extension before. There is also a plug-in for it called Reflexil which does code injection and assembly saving. I've not used it but I've downloaded it so I might take a look at that as an backup. Appreciate the help so far and the offer.
  5. Hi, is there a modding guide available somewhere that I've missed? There are some old threads around Hex editing but that is not what I'm looking for. I'm most interested in having the Historical sub-mod as a baseline and I'm aware that any mods I might want to add will need to be merged into that. With that in mind, I've been using dnSpy (not a tool I've used before) to decompile the Assembly-CSharp.dll file. As an exercise, I decided to make a simple amendment to read in a new dummy config setting. Editing the Config class and recompiling gave me errors on the following lines: Config.gameSettings.officer.corpsExperience[0] *= Config.GameSettings.corpsOfficerExperienceMultiplier; Config.gameSettings.officer.corpsExperience[1] *= Config.GameSettings.corpsOfficerExperienceMultiplier; Config.gameSettings.officer.divisionExperience[0] *= Config.GameSettings.divisionOfficerExperienceMultiplier; Config.gameSettings.officer.divisionExperience[1] *= Config.GameSettings.divisionOfficerExperienceMultiplier; I then decided to take a look at it with ILSpy (something I have used before) and examine the Config class that it produced: global::Config.gameSettings.officer.corpsExperience[0] *= GameSettings.corpsOfficerExperienceMultiplier; global::Config.gameSettings.officer.corpsExperience[1] *= GameSettings.corpsOfficerExperienceMultiplier; global::Config.gameSettings.officer.divisionExperience[0] *= GameSettings.divisionOfficerExperienceMultiplier; global::Config.gameSettings.officer.divisionExperience[1] *= GameSettings.divisionOfficerExperienceMultiplier; By replacing the dnSpy code with the ILSpy version, it compiles correctly and UGCW starts up without falling over in a heap but I'm wondering if that is a process that the experienced modders here have to follow or if I just don't have dnSpy configured correctly. Any help appreciated... 🙂
×
×
  • Create New...