Planetary Annihilation Guide

Players++ 48 slots! (Local/Lan) for Planetary Annihilation

Players++ 48 slots! (Local/Lan)

Overview

Trying to bypass the 10 player limit? Look no further! This guide is just for you 🙂

Introduction

Before we get straight to the point, there are are few things you have to know.

-This guide shows how to achieve 48 (more or less) slots for Local/Lan mode only.

-This method is compatible for vanilla, Titans, and modded.

-Backup files we are going to edit, so it’s easier to restore them if you want to go back to vanilla.

Thats it, lets get started!

Here we go!

Step 1:
Navigate to your PA server-script folder.

Example:
DRIVE:SteamsteamappscommonPlanetary Annihilationmediaserver-script
DRIVE:SteamsteamappscommonPlanetary Annihilation Titansmediaserver-script

Step 2:
Backup the following files:
main.js” + “ai_names_table.js” + “color_table.js
(color_table.js is located under the folder called “lobby”)

Step 3:
Open up the following file with a text editor:
main.js

Step 4:
In main.js, change
exports.MAX_PLAYERS = 10;
to
exports.MAX_PLAYERS = 48;

Step 5:
Open up the following file with a text editor:
color_table.js

Step 6:
Replace all the text inside color_table.js with the following:

var _ = require(‘thirdparty/lodash’);

function rgbToHsv( r,g,b )
{
r = r / 255;
g = g / 255;
b = b / 255;
var minRGB = Math.min( r,g, b );
var maxRGB = Math.max( r,g,b );
var v = maxRGB;
var delta = maxRGB – minRGB;
var s = v ? delta / v : 0;
var h;
if (maxRGB == minRGB) {
h = 0;
} else {
switch( maxRGB ) {
case r: h = ( g – b ) / delta + ( g < b ? 6 : 0 ); break;
case g: h = ( b – r ) / delta + 2; break;
case b: h = ( r – g ) / delta + 4; break;
}
h = h / 6 * 360;
}
return { h: h, s: s, v: v };
}

function shvColourSort(colours) {
var result = _.sortBy(colours, function(colour) {
var hsv = rgbToHsv(colour[0], colour[1], colour[2] );
var sort = hsv.s.toString(16) + hsv.h.toString(16) + hsv.v.toString(16);
})
return result;
}

var red1 = [255, 153, 153];
var red2 = [255, 51, 51];
var red3 = [204, 0, 0];
var red4 = [102, 0, 0];
var orange1 = [255, 204, 153];
var orange2 = [255, 153, 51];
var orange3 = [204, 102, 0];
var orange4 = [102, 51, 0];
var yellow1 = [255, 255, 153];
var yellow2 = [255, 255, 51];
var yellow3 = [204, 204, 0];
var yellow4 = [102, 102, 0];
var yellowGreen1 = [204, 255, 153];
var yellowGreen2 = [153, 255, 51];
var yellowGreen3 = [102, 204, 0];
var yellowGreen4 = [51, 102, 0];
var blueGreen1 = [153, 255, 204];
var blueGreen2 = [51, 255, 153];
var blueGreen3 = [0, 204, 102];
var blueGreen4 = [0, 102, 51];
var lightBlue1 = [153, 255, 255];
var lightBlue2 = [51, 255, 255];
var lightBlue3 = [0, 204, 204];
var lightBlue4 = [0, 102, 102];
var blue1 = [153, 204, 255];
var blue2 = [51, 153, 255];
var blue3 = [0, 102, 204];
var blue4 = [0, 51, 102];
var darkBlue1 = [153, 153, 255];
var darkBlue2 = [51, 51, 255];
var darkBlue3 = [0, 0, 204];
var darkBlue4 = [0, 0, 102];
var purple1 = [204, 153, 255];
var purple2 = [153, 51, 255];
var purple3 = [102, 0, 204];
var purple4 = [51, 0, 102];
var magenta1 = [255, 153, 255];
var magenta2 = [255, 51, 255];
var magenta3 = [204, 0, 204];
var magenta4 = [102, 0, 102];
var pink1 = [255, 153, 204];
var pink2 = [255, 51, 153];
var pink3 = [204, 0, 102];
var pink4 = [102, 0, 51];
var lightGray = [224, 224, 224];
var gray = [160, 160, 160];
var darkGray = [96, 96, 96];
var black = [32, 32, 32];

var uberColours = [red1, red2, red3, red4,
orange1, orange2, orange3, orange4,
yellow1, yellow2, yellow3, yellow4,
yellowGreen1, yellowGreen2, yellowGreen3, yellowGreen4,
blueGreen1, blueGreen2, blueGreen3, blueGreen4,
lightBlue1, lightBlue2, lightBlue3, lightBlue4,
blue1, blue2, blue3, blue4,
darkBlue1, darkBlue2, darkBlue3, darkBlue4,
purple1, purple2, purple3, purple4,
magenta1, magenta2, magenta3, magenta4,
pink1, pink2, pink3, pink4,
lightGray, gray, darkGray, black];

var CSS3x11colours = [];

var brightnessAdjustment = 14/16;

CSS3x11colours = _.map(CSS3x11colours,function(colour) {

var r = colour[0];
var g = colour[1];
var b = colour[2];

if ( r == 255 || g == 255 || b == 255 ) {
r = Math.round(r * brightnessAdjustment);
g = Math.round(g * brightnessAdjustment);
b = Math.round(b * brightnessAdjustment);
}

return [r, g, b];
});

var colours = shvColourSort(uberColours.concat(CSS3x11colours));

exports.data = _.map(colours, function(colour) {
var result = { primary: colour, secondary: colours };
return result;
});

Step 7:
Awesome, you should now be able to host a local game!
You do this simply by hosting a game like you usually would, except you tick the box “host game locally” in the server browser menu.

Step 8:
Thats it, you are now able to play atleast with a total of 48 people or AI!

Step 9:
Make sure to read the extra notes underneath, maybe they are usefull to you! 😉

Extra Notes

Extra Note 1:
To be able to get your friends in your lobby, you have to be either playing on lan or have an external program running which would connect you to your friends.

Recommended external programs are:
-Hamachi
-Game Ranger
-Evolve

(There are more, but I have experience using these)

Extra Note 2:
Why did I tell you to backup “ai_names_table.js“?

If you are a mad lad who for some reason decides on a AI battle with more than 157 AI’s, you are required to add more AI names to the ai_names_table.js so the game doesn’t run out of names to use and your game won’t crash :). (Also, just for fun, you are able to change the aleady existing names to whatever names you like.)

Extra Note 3:
I suggest not passing the 48 slot limit since this wil basically put your PC afire.
The most optimal way to play is on a single planet with a max size of 250-600. I would also suggest playing on a “sandbox” biome or removing any CSG’s from the planet to further incease performance.

(Tip: You can check how your pc is doing ingame by checking the “SIM” stat in the bottom right corner ingame. This stat represents on what speed the server is running. As soon as the SIM goes under 100% you will notice slow motion gameplay and should probably lower planet size or reduce the slot amount.)

Extra Note 4:
While this is not necessary, you are able to add more colours if you were to add over 48 slots in your lobby. This is obviously done in “color_table.js” but once again not required. If you add over 48 players, addition players will default to a grayish colour. This is not a huge problem but can be annoying in identifying specific players/AI.

Extra Note 5:
Perhaps the most important note:
Have fun!

Screenshots

^I’m not playing on planet clutch as you can see in the last screenshot, just to lazy to upload an other screenshot just to let you guys know I play on a custom one for more performance.
(Read extra note 3)

SteamSolo.com