Author Topic: WM's quality of life fixes (Mod) (0.814 update)  (Read 6719 times)

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: WM's quality of life fixes (Mod) (0.814 update)
« Reply #15 on: February 27, 2019, 08:19:37 am »
Structures being built are no longer valid targets for shield repair, so that should prevent what you describe.

If you have something with a huge amount of shield health, I assume having engineers repair it would make the shields repair faster than otherwise.

Offline Draco18s

  • Resident Velociraptor
  • Core Member Mark V
  • *****
  • Posts: 4,251
Re: WM's quality of life fixes (Mod) (0.814 update)
« Reply #16 on: February 27, 2019, 02:37:43 pm »
If you have something with a huge amount of shield health, I assume having engineers repair it would make the shields repair faster than otherwise.

Well, sure. But is 1500 metal/sec worth that? Generally, no, it isn't.

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: WM's quality of life fixes (Mod) (0.814 update)
« Reply #17 on: February 27, 2019, 02:43:12 pm »
The obvious thought would be to make the metal throughput for shield repairing much lower. Then it's "a bit of a help but won't drain your bank account too hard". Say 150 instead of 1500. Thoughts?

Offline WeaponMaster

  • Newbie Mark III
  • *
  • Posts: 46
Re: WM's quality of life fixes (Mod) (0.814 update)
« Reply #18 on: February 27, 2019, 04:01:07 pm »
Shields do seem to cost way too much to repair, especially since they regenerate for free on their own if they aren't in combat. A lot of time when retreating from combat I get scared when I see that it'll take 45 minutes to rebuild everything; but then after 15 seconds its down to 10 minutes.

Maybe there can be a change where if a unit required 15000 metal to repair the shields it now only costs say 20% of that, but engineers also repair at 20% the usual rate. Shields will still repair at the same rate, but cost less in general.
« Last Edit: February 27, 2019, 04:21:47 pm by WeaponMaster »

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: WM's quality of life fixes (Mod) (0.814 update)
« Reply #19 on: February 27, 2019, 04:24:55 pm »
I just moved the allowed metal throughput down. That's the simplest solution, though not the best. It at least prevents the player from wasting too much metal right after a battle.

Offline WeaponMaster

  • Newbie Mark III
  • *
  • Posts: 46
Re: WM's quality of life fixes (Mod) (0.814 update)
« Reply #20 on: March 01, 2019, 04:50:11 am »
I just saw your change to the code - honestly I tried the same thing.

Code: [Select]
            if ( possibleTarget.ActiveOutflows[MetalFlowPurpose.SelfConstruction] )
            {
                #region Tracing
                if ( tracing ) traceBuffer.Add( ":" ).Add( "Skipping because this structure is under construction" );
                #endregion
                return DelReturn.Continue;
            }

The problem I ran into is that if you put your construction into hold fire mode, your ships will stop constructing it and will instead start healing it because X.ActiveOutflows[MetalFlowPurpose.SelfConstruction] is now false/null. I just tested it again and it indeed occurs, this could be bad if you had some larger construction like a fortress hogging your metal while being constructed - your metal flows would still be tied up because a bunch of engineers will repair it instead of doing other things.

This is my solution, but I assume it's very ugly:

Code: [Select]
            if ( possibleTarget.ComputeDisabledReason(ArcenRejectionReason.EntityIsInHoldFireMode) == ArcenRejectionReason.EntityIsSelfBuilding)
            {
                return DelReturn.Continue;
            }
I have no idea how to check for a specific disabled reason, I assume that each unit has an array of bool for all of the possible reasons. This way works in the simplest case of either SelfBuilding or HoldFire, but might fail if for instance the construction got hit with a paralyzer shot.

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: WM's quality of life fixes (Mod) (0.814 update)
« Reply #21 on: March 01, 2019, 09:44:05 am »
Good point, thanks WeaponMaster. I'll investigate further when I have the chance.