Closed DerSkagg closed 7 years ago
Pulled in your changes: cefff8d https://github.com/genbtc/AutoTrimps/pull/90
Since this has been added (and replaced the prior option to just always buy X given Golden Upgrade) can you implement an option for not alternating? I'd prefer to be able to just get 7 VM Goldens then put the rest into Helium. Never really want battle unless I'm pushing deep.
The default behavior is actually just a modification into the DZUGAVILI MOD, that is you must have VOID as your intended purchase. (If you have Helium or Battle, both Dzugavili and my modifications are ignored).
Afterwards is where my code takes over and does either the Alternating Selection or Zone Selection.
Alternating is intended for lazy speed runs, while Zone is intended to ignore battle if set high enough.
Just set the golden zone past your hze and you won't buy battles. (I.e. this is the deep run configuration I intended).
That... is strange. If it works as you say, it should be reflected in the tooltip at least.
OK, i changed it to Put the GUI buttons as a dependency on the Void setting and updated the tooltip. 050ce9392b232894aa0e4e022bd790b126030494
The new buttons are great. However...
When AutoGoldenUpgrades: Void is selected, goldstrat (Zone) behavior doesn't allow buying Golden Helium. Whether you set gold zone low (1) or high (zone x, or -1) it never switches over to Helium from Battle (always buys battle after void.) I've tested this with three modes, one set to -1, one set to 1, and one set to z201 (7*25 zones of voids results in 175, so 200 should be something else regardless. By setting to 201, I can see if it changes which golden is purchased between 200 and 225. No change is seen.) No switch is seen in any of these three modes: just Golden Battle.
Current workarounds are to either set Autogoldenupgrades to Helium only (thus never getting voids to seven) or to monitor until seven voids are purchased and manually switch. Unfortunately, this somewhat defeats the purpose of automation.
My original code:
if (goldStrat == "Alternating"){
var goldAlternating = getPageSetting('goldAlternating');
if (game.global.goldenUpgrades%goldAlternating == 0){
buyGoldenUpgrade("Helium");
}else{
buyGoldenUpgrade("Battle");
}
}else if(goldStrat == "Zone"){
var zone = game.global.world;
var goldZone = getPageSetting('goldZone');
if (zone <= goldZone){
buyGoldenUpgrade("Helium");
}else{
buyGoldenUpgrade("Battle");
}
}else{
buyGoldenUpgrade("Helium");
}
The genBTC code:
var challSQ = game.global.runningChallengeSquared;
var doDerskaggChallSQ = false;
if (setting == "Helium" && challSQ && !success)
doDerskaggChallSQ = true;
// DZUGAVILI MOD - SMART VOID GUs
// Assumption: buyGoldenUpgrades is not an asynchronous operation and resolves completely in function execution.
// Assumption: "Locking" game option is not set or does not prevent buying Golden Void
if (!success && setting == "Void" || doDerskaggChallSQ) {
num = getAvailableGoldenUpgrades(); //recheck availables.
if (num == 0) return; //we already bought the upgrade...(unreachable)
// DerSkagg Mod - Instead of Voids, For every Helium upgrade buy X-1 battle upgrades to maintain speed runs
var goldStrat = getPageSetting('goldStrat');
if (goldStrat == "Alternating") {
var goldAlternating = getPageSetting('goldAlternating');
setting = (game.global.goldenUpgrades%goldAlternating == 0) ? "Helium" : "Battle";
} else if (goldStrat == "Zone") {
var goldZone = getPageSetting('goldZone');
setting = (game.global.world <= goldZone) ? "Helium" : "Battle";
} else
setting = (!challSQ) ? "Helium" : "Battle";
buyGoldenUpgrade(setting);
}
I'm pretty certain that it should be working as expected, I can check a run after I get home tonight. And as for the workaround, set it to Void and GoldenStrat off it bypasses the settings to just buy helium (I.e. it doesn't go into the Alternating or Zone upgrades). My apologies for not expressing this previously. I hadn't looked at the code in a while.
Are you using this on Kong or github Trimps? Kong does stuff in an iframe and that can cause some complications. I've tested this in Kong using Firefox and it works as expected, but I will double check tonight to ensure this for you.
After looking over the GenBTC code, it appears that it defaults to Helium if you turn OFF the strats and are in a non-c2 map otherwise it sets to battle.
Got it working by setting zone higher (100 past HZE.) Expected -1 to do the same thing that setting zone very high does. Not certain why the z201 setting didn't show a difference, but this may have been my mistake. I will double check on next run.
I typically leave mine at 400, then buy battles for the last 90 zones.
Let me know how it goes, and if possible set it to "OFF" to see if that works as intended.
I should have time after work tonight to do some testing, and if I figure out the problem submit a patch to genBTC.
I've made a few goldenUpgrade strategies in a forked repo https://github.com/DerSkagg/AutoTrimps
These strategies target the goldenUpgrade void purchases or DZUGAVILI MOD - SMART VOID GUs where after buying the max voids we can we just purchase helium upgrades. I've noticed that this limits AT to only allow for one strategy.
The two purposed and implemented strategies are as follows: Off - Just purchase helium upgrades until the end of the run Alternating - For every 1 helium we purchase, purchase X-1 battle upgrades (This is a lazy method, but is effectively the same he/hr gain as just buying helium when set to 2, it appears though in testing that I have on average more bones running with alternating, additionally this allows farming natures to be faster it appears) Zone - Buy helium until we reach zone X then buy battle for the rest of the run (This follows how players typically will buy golden upgrades, switching over to battle near the end of the run)
The issue I'm having, and possibly is something simple that I will figure out as I explore the code is having it save and reload the settings I have created.