meepen/salien-bot

userscript: failed to join planet; headless: not working either

Closed this issue ยท 28 comments

neither userscript nor headless not working.
userscript says failed to join planet, headless stuck here:

Playing as:      xxxxxxxxxxx
Running for:     5m 16s
Current level:   14 (6838755 / 7200000)
Exp since start: 0
Current planet:  Glory Days Planet II [10.091%] (id 38)

Zone 0 is for some reason unjoinable on planet 37/38 and since zone 0 is a hard zone the script gets stuck in a loop trying to join it.

Same problem.
1

Just a quick dirty workaround to keep you going until a proper fix is released:

diff --git a/headless.js b/headless.js
index 6ca976e..89bb11b 100644
--- a/headless.js
+++ b/headless.js
@@ -473,6 +473,9 @@ const GetBestZone = function GetBestZone(planet) {
     for (let idx in planet.zones) {
         let zone = planet.zones[idx];

+       if (idx == 0 && zone.capture_progress == 0.0)
+           continue;
+
         if (!zone.captured) {
             if (zone.boss_active) // boss
                 return zone;

Patched script: headless.js

Update: check the zone progress as well, so we don't miss the zone when it gets fixed (thanks @Dontmindme2)

Just a quick dirty workaround to keep you going until a proper fix is released:

@mrc0mmand thanks man, but in which doc should we put this on?

CyBot commented

@Makaka2 in headless.js, line 474

let zone = planet.zones[idx];

Hm, something's wrong. Apparently, I'm doing an amendment, but mainly it doesn't change anything.

It's about the bosses, please fix it quick, or we will miss the boss, more XP!

but this hotfix ignores the bosses

Yeah, that's a problem. I think there must be another wise variant: use Idle Daddy app for your android device for now, as all dudes said before, until a proper fix.

AFAIK, the zone 0 is not a boss zone (at least not right now), it's just unjoinable - there's nobody on the planet and it doesn't have the boss mark:

The same applies to all planets according to https://wrya.net/tmp/salien-status/

You could also try for 474
if (idx == 0 && planet.zones[idx].capture_progress == 0.0)

Edited: since zone hasn't been defined as planet.zones[idx] at that point...my bad

That would at least let you join the boss zone when it opens up (i.e. progress has been made), but that is assuming the rest of the script is ready to handle a boss fight.

ge-ku commented

Funny, zone with id 0 returns response with this header: x-error_message | This is a boss zone. Update your cheats. Even though I'm not using script (also tried with account that didn't use script ever to make sure it's not some kind of a ban).

Zone 0 is bugged on all new planets, it's impossible to join and incorrectly returns the error for boss zone even though it is not a boss zone.

The if (idx == 0 && zone.capture_progress == 0.0) is the best fix you can do for now until Valve fixes it.

Also that message is just the devs having some fun. It's definetly no ban and it always returns that error when you try to join a Boss Zone using the normal JoinZone api instead of JoinBossZone. Funnily enough it also returns the Steams EResult 17 which === Banned

ge-ku commented

I wonder if Valve made it so boss appears in zone 0 after every other zone is defeated? If so, we'll miss it using fix by @mrc0mmand

I updated the workaround to check the zone progress as well, so we don't miss it once it gets fixed. The code already contains handlers for boss zones, so hopefully it will work once they appear.

@mrc0mmand the fix doesn't work for me,

i'm just still stuck at this.
cmd_2018-06-30_11-45-54

@mrc0mmand can you manually add it to the hub, just for the plain simplicity? I mean it works well and probably in a proper way.

@Makaka2 done, check the original comment

Biggie-thankie, man!

@SuicidalcookieS did you run npm install after you applied the patch?

no is that necessary ?

Yes, it is necessary, as it updates the headless package in node.js.

ok now after running npm install on all accounts it works Thanks

This is on live now, but I'm very confused as to what valve did here...

however it's not on userscript yet.