Planet Coord Formats

Hi everyone,

I am just playing at some coding towards a tool I want to try and develop, and I am looking to collect potential planet formats that appear in game such as;

Standard Format: xxx,yyy:zzz

Alt News Format: planet zzz in the xxx,yyy system

(all sizes considered i.e. x,y:z ; xx,yy:zz)

I just joined up to collect some data but I don’t have much access yet, if anyone has any others they can think of, please could you leave them in here.

Happy New Year everyone, i’m hanging up my boots for the rest of the night.

Beer Time!!!




Should be somewhere in the game roadmap.

I think the two formats you mentioned are the ones in the game now yes.

Hey @Hala ,

Thanks for the response.

What was your reason for wanting to standardise the format?


I went through your posts in the thread you linked, I see what your issues are.
Thanks again for the reply.

Only one example but here is the regex for the three that i cater for.

Pattern standardPlanetPattern = Pattern.compile("(?s)(\d+,\d+:\d+)");
String report = formatStandardList(standardPlanetPattern, planetList);

Pattern newsPlanetPattern = Pattern.compile("(?s) planet (\d+) in the (\d+),: system");
report = report +formatNewsList(newsPlanetPattern, planetList);

    //Our planet 11 at x:68, y:147

Pattern newsLostPlanetPattern = Pattern.compile("(?s)Our planet (\d+) at x:(\d+), y:(\d+)");
report = report +formatNewsList(newsLostPlanetPattern, planetList);

Ah brilliant, thank you very much, a subtle difference I hadn’t seen yet. Thank you for that!!

@TIF I had found another one, but it would hardly ever show up…

# re for format 'x,y:z'
coords = re.compile(r'(\d+),(\d+):(\d+)') 

# Creates coord list in format [(x1,y1,z1),(x2,y2,z2)]

# re for format 'z in the x,y system.'
coordsalt = re.compile(r'planet (\d+) in the (\d+),(\d+) system.')

# re for format 'planet z at x:x, y:y'
coordsalt2 = re.compile(r'planet (\d+) at x:(\d+), y:(\d+)')

# re for format 'Planet #z of The ABC System (x,y)'
coordsalt3 = re.compile(r'Planet #(\d+) of .* System \((\d+),(\d+)\)')

# Creates coord list in format [(z1,x1,y1),(z2,x2,y2)]
1 Like

Python. Nice choice :wink:

Yup! A fine choice indeed, thanks for making that choice :grin:

A few books in now so just trying out a bunch of different stuff with it each day.

1 Like