Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
level 1 = rank 1
level 6 = rank 2
level 9 = rank 3
-level 1= rank 1 = launch the game once, if you don't get this then you probably haven't even heard of "Steam".
-level 2= rank 6 = roughly 1 hour, just play an hour before breakfast.
-level 3= rank 9 = 7 hours of playing, easy peezy lemon sqeezy.
-level 4= rank 12 = 2 days, a lot of people will get this, but they must have a sad life.
-level 5= rank 15 = 2 weeks- 16 days, 100 people are probably gonna get this, they'd have an even sadder life then people playing for 2 days straight.
-level 6= rank 18 = literally impossible, it probably isn't double the xp each rank but oh well, i tried.
Remember that this event is only on for as long as the summer sale is on for (16 days) so if you want higher level badges then you will want to spend more time playing. I would definitely not recommend that you go and spend the whole sale playing though as you could be spending that time enjoying holidays, playing new games and seeing what the best deals out there are. Some people are recommending certain scripting extensions that automatically play the game which is run through grease monkey or tamper monkey and they just have it running in a separate desktop on their computer the whole sale, that way they grind points and its unnoticeable so you can carry on playing your games or doing other stuff while that runs.
Honestly, I personally think that this short event is a waste of time and is only there to get you distracted in your spare time when you are waiting for a game to finish downloading or you are thinking about what to buy. This was not intended to be a game that you play 24x7 and have a good time, you will get bored with it really fast. For those reasons, I kinda feel that valve intended for people to use scripting, that's what happened with the 2015 monster sale anyways.
Also, could someone please correct me if my estimated time required by playing high threat games was wrong. I was only making rough guesses. We don't know anyone yet with level 6, 5 and maybe level 4 badges yet so it's hard to guess these things when valve doesn't tell us how the scoring system works.
// Disable the game animations to minimize browser CPU usage
requestAnimationFrame = function(){}
// This is the zone you want to attack.
var target_zone = -1;
// Variables. Don't change these unless you know what you're doing.
var max_scores = [600, 1200, 2400] // Max scores for each difficulty (easy, medium, hard)
var round_length = 120; // Round Length (In Seconds)
var update_length = 15; // How long to wait between updates (In Seconds)
var loop_rounds = true;
var language = "english"; // Used when POSTing scores
var access_token = "";
var current_game_id = undefined;
var current_timeout = undefined;
var max_retry = 3; // Max number of retries to report your score
var current_retry = 0;
var auto_first_join = true; // Automatically join the best zone at first
var current_planet_id = undefined;
// Grab the user's access token
var INJECT_get_access_token = function() {
$J.ajax({
type: "GET",
url: "https://steamcommunity.com/saliengame/gettoken",
success: function(data) {
if(data.token != undefined) {
console.log("Got access token: " + data.token);
access_token = data.token;
}
else {
console.log("Failed to retrieve access token.")
access_token = undefined;
}
}
});
}
// Make the call to start a round, and kick-off the idle process
var INJECT_start_round = function(zone, access_token) {
// Leave the game if we're already in one.
if(current_game_id !== undefined) {
console.log("Previous game detected. Ending it.");
INJECT_leave_round();
}
// Send the POST to join the game.
$J.ajax({
type: "POST",
url: "https://community.steam-api.com/ITerritoryControlMinigameService/JoinZone/v0001/",
data: { access_token: access_token, zone_position: zone },
success: function(data) {
console.log("Round successfully started in zone #" + zone);
console.log(data);
if (data.response.zone_info !== undefined) {
current_game_id = data.response.zone_info.gameid;
INJECT_wait_for_end(round_length);
} else {
SwitchNextZone();
}
},
error: function (xhr, ajaxOptions, thrownError) {
alert("Error starting round: " + xhr.status + ": " + thrownError);
}
});
}
// Update time remaining, and wait for the round to complete.
var INJECT_wait_for_end = function(time_remaining) {
// Log to console
console.log("Time remaining in round: " + time_remaining + "s");
// Wait
var wait_time;
var callback;
if(time_remaining <= update_length) {
wait_time = time_remaining*1000;
callback = function() { INJECT_end_round(); };
}
else {
var wait_time = update_length*1000;
callback = function() { INJECT_wait_for_end(time_remaining); };
}
// Decrement timer
time_remaining -= update_length;
// Set the timeout
current_timeout = setTimeout(callback, wait_time);
}
// Send the call to end a round, and restart if needed.
var INJECT_end_round = function() {
// Grab the max score we're allowed to send
var score = max_scores[INJECT_get_difficulty(target_zone)];
// Post our "Yay we beat the level" call
$J.ajax({
type: "POST",
url: "https://community.steam-api.com/ITerritoryControlMinigameService/ReportScore/v0001/",
data: { access_token: access_token, score: score, language: language },
success: function(data) {
if( $J.isEmptyObject(data.response) ) {
if (current_retry < max_retry) {
console.log("Empty Response. Waiting 5s and trying again.")
current_timeout = setTimeout(function() { INJECT_end_round(); }, 5000);
current_retry++;
} else {
current_retry = 0;
SwitchNextZone();
}
}
else {
console.log("Successfully finished the round and got expected data back:");
console.log("Level: ", data.response.new_level, "\nEXP: ", data.response.new_score);
console.log(data);
// Update the player info in the UI
INJECT_update_player_info();
// Restart the round if we have that variable set
if(loop_rounds) {
UpdateNotificationCounts();
current_game_id = undefined;
INJECT_start_round(target_zone, access_token)
}
}
}
});
}
// Leave an existing game
var INJECT_leave_round = function() {
if(current_game_id === undefined)
return;
console.log("Leaving game: " + current_game_id);
// Cancel timeouts
clearTimeout(current_timeout);
// POST to the endpoint
$J.ajax({
async: false,
type: "POST",
url: "https://community.steam-api.com/IMiniGameService/LeaveGame/v0001/",
data: { access_token: access_token, gameid: current_game_id },
success: function(data) {}
});
// Clear the current game ID var
current_game_id = undefined;
}
// returns 0 for easy, 1 for medium, 2 for hard
var INJECT_get_difficulty = function(zone_id) {
return window.gGame.m_State.m_PlanetData.zones[zone_id].difficulty - 1;
}
// Updates the player info
// Currently unused. This was meant to hopefully update the UI.
var INJECT_update_player_info = function() {
gServer.GetPlayerInfo(
function( results ) {
gPlayerInfo = results.response;
},
function(){}
);
}
// Update the zones of the grid (map) on the current planet
var INJECT_update_grid = function() {
if(current_planet_id === undefined)
return;
// GET to the endpoint
$J.ajax({
async: false,
type: "GET",
url: "https://community.steam-api.com/ITerritoryControlMinigameService/GetPlanet/v0001/",
data: { id: current_planet_id },
success: function(data) {
window.gGame.m_State.m_PlanetData = data.response.planets[0];
window.gGame.m_State.m_PlanetData.zones.forEach( function ( zone ) {
window.gGame.m_State.m_Grid.m_Tiles[zone.zone_position].Info.progress = zone.capture_progress;
window.gGame.m_State.m_Grid.m_Tiles[zone.zone_position].Info.captured = zone.captured;
});
console.log("Successfully updated map data on planet: " + current_planet_id);
}
});
}
// Get the best zone available
function GetBestZone() {
var bestZoneIdx;
var highestDifficulty = -1;
for (var idx = 0; idx < window.gGame.m_State.m_Grid.m_Tiles.length; idx++) {
var zone = window.gGame.m_State.m_Grid.m_Tiles[idx].Info;
if (!zone.captured) {
if (zone.boss) {
console.log("Zone " + idx + " with boss. Switching to it.");
return idx;
}
if(zone.difficulty > highestDifficulty) {
highestDifficulty = zone.difficulty;
maxProgress = zone.progress;
bestZoneIdx = idx;
} else if(zone.difficulty < highestDifficulty) continue;
if(zone.progress < maxProgress) {
maxProgress = zone.progress;
bestZoneIdx = idx;
}
}
}
if(bestZoneIdx !== undefined) {
console.log(`${window.gGame.m_State.m_PlanetData.state.name} - Zone ${bestZoneIdx} Progress: ${window.gGame.m_State.m_Grid.m_Tiles[bestZoneIdx].Info.progress} Difficulty: ${window.gGame.m_State.m_Grid.m_Tiles[bestZoneIdx].Info.difficulty}`);
}
return bestZoneIdx;
}
// Switch to the next zone when one is completed
function SwitchNextZone() {
next_zone = GetBestZone();
INJECT_leave_round();
INJECT_update_grid();
var next_zone = GetBestZone();
if (next_zone !== undefined) {
console.log("Zone #" + target_zone + " has ended. Trying #" + next_zone);
target_zone = next_zone;
INJECT_start_round(next_zone, access_token);
} else {
console.log("There's no more zone, the planet must be completed. You'll need to choose another planet!");
target_zone = -1;
}
}
// Auto-grab the access token
INJECT_get_access_token();
// Auto join best zone at first
if (auto_first_join == true) {
var delayingStart = setTimeout(firstJoin, 3000);
function firstJoin() {
clearTimeout(delayingStart);
current_planet_id = window.gGame.m_State.m_PlanetData.id;
var first_zone = GetBestZone();
target_zone = first_zone;
INJECT_start_round(first_zone, access_token);
}
}
// Overwrite join function so clicking on a grid square will run our code instead
gServer.JoinZone = function (zone_id, callback, error_callback) {
current_planet_id = window.gGame.m_State.m_PlanetData.id;
target_zone = zone_id;
INJECT_start_round(zone_id, access_token);
}
EDIT 1 - Direct Link to the source code - https://github.com/ensingm2/saliengame_idler
EDIT 2 - Direct Link to the Reddit Thread Discussion - https://www.reddit.com/r/Steam/comments/8sz5ft/well_this_is_certainly_a_nice_surprise/
Source - Reddit.
I like how you say "must have sadlife" lol, since many peps including me, running the scripts on raspberry pi's and on other systems, and it doesn't even need that much power.
Edit - And you also have Rank 4 badge pretty much says it all.