alainbryden / bitburner-scripts

My own scripts for playing bitburner
MIT License
608 stars 272 forks source link

work-for-factions.js: We may still wish to earn rep with factions if donations are unlocked to reduce rep donation costs #437

Closed alainbryden closed 2 weeks ago

alainbryden commented 2 weeks ago

Reported on discord.

Currently, if we've unlocked donations with a faction, we will skip ever working with them since we can just throw money at them for reputation.

In some BNs where money is harder to come by, we may wish to nevertheless earn reputation the old-fasioned way so that we don't have to waste money on buying reputation when it comes time to install augmentations.


Original Report:

In work-for-factions, despite there being logic for it, the script will never work past earning favor for donations. In line 875, I think the check should be !forceBestAug instead of !forceRep. Currently the function exits there before forceBestAug is ever checked if donations are unlocked.

My Reply:

Alright I see why I coded it the way I did. There's a bit of subtlety here in what each "scope" is trying to accomplish:

  • Scope 6: Grind rep until we have enough rep to earn enough favour to unlock donations so we can buy any aug in our next install
  • Scope 7: Grind rep until we can buy the most expensive aug in this install But in both cases, if we already have enough favour to donate in this install, then we can already buy the most expensive aug, so even in Scope 7, we can skip working for that faction. The assumption here is that it will be quicker to earn the money required to donate for rep, then it will be to earn the rep directly.

So that said, there's probably room for a new "Scope 8" to be inserted after that, where if we have nothing better to do, go back and earn the rep required for each augmentation so that we don't have to waste money on donating for reputation. I think that's a fair way to spend time before we go straight to grinding for rep with the current highest faction for higher levels of Neuroflux (which would now become "Scope 9"

Adding to the confusion is the use of the word force in the flag forceBestAug. The purpose of these flags were:

  • forceRep: Work until this rep is achieved regardless of whether this rep is actually needed for an aug. This was added as a hack to keep working "forever", but in small increments. I since added the "breakToMainLoop()" logic, so this can probably just be changed to a "workForever" true/false flag to be more clear.
  • forceBestAug: Double meaning (which I hate). First, it makes it so we ignore the "desired" stat and just work towards the most expensive (rep) augmentation the faction has. Second, it means keep working even if we will unlock donations on our next reset (which typically we don't). But what it doesn't mean is, keep working even if we already have unlocked donations. Currently only "forceRep" does that,

So hopefully the new "Scope 8" I proposed maintains the original intent of Scope 7 (don't waste time on rep if donations are already unlocked), but gives more meaningful work to do if we've done that for every faction and want to start reducing our donation costs.