If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Spacegate

I'm working on a Spacegate script. I'm naming it VeracitySpacegate because Ezandora already has a script named Spacegate. Mine will be better, but hers came first, so she has precedence for the simple name.

(the above are multi-day quests. Where you are in the quest is determined by current items you own and/or current language proficiency. This is the same kind of thing I do in my GingerbreadCity script.)

You can specify the maximum difficulty you're prepared for - A-Z (or 0-25)
You can specify the minimum level of language proficience before proceeding in the skill quests

When you visit a planet with this script, it will record all the encounters and generate a "planet" record with all the things that the Spacegate terminal doesn't tell you: what kind of Spants or Murderbots, which Ancient Ruins are there, what trade item is available for how much, and so on. It will save this in SpacegatePlanetsMine.txt.

I don't have that script coded yet because it depends on a solid planet database - and that is what I am releasing here.
It may be useful to others, and I welcome comments and suggestions.

Spacegate.tsv - the "tab separated values" from the public spreadsheet: exported, concatenated, headers and blank lines removed
SpacegatePlanetsPublic.txt - the result of "importing" Spacegate.txv into my "planet" data structure, indexed by coordinates
SpacegatePlanetsPublicCompact.txt - an experimental compact representation which puts the non-cosmetic data into a single 32-bit code
SpacegatePlanetsVeracity.txt - planets that I have personally visited over the last few weeks. Contains, for example, trophies.

Loading data goes like this:

Load SpacegatePlanetsPublic
Load SpacegatePlanetsVeracity - my validated planets supersede (frequently erroneous) planets from the Public data
Load SpacegatePlanetsMine - planets you have visited also override (possibly erroneous) Public planets - but not the built-in Veracity planets, which have trophies and such.

Reminiscent of what the terminal tells you, but with additional annotations.

There is a large comment at the top of SpacegateData.ash which explains my reasoning about what (non-cosmetic) data distinguishes a planet. In brief, I posit that the first letter determines the difficulty but nothing about what is on the planet, and the other 6 letters provide about 28.5 bits of information which determines everything the terminal (and the annotations) displays. Things like which images are used for plants, animals, aliens, the planet name, the flavor text of suns, moons, clouds, et.c when you visit, and so on, are constant for a particular planet - and are obviously determined from the letters, and are also procedurally generated by selecting bits from the letters. It would be fun to figure that out, but it's not worth storing that info in the planet data structure, in my opinion.

I am sure that the encounter mix is randomized, with parameters. The spreadsheet saying "such-and-such a planet has maximum anomalous plants - 6" - is based on a sample of one visit; when I went there, there were 3, and correspondingly more of the other life forms. If you really want to "maximize" the number of a particular life type, you likely have to go to a planet which has no other kinds of life.

Aside from the invalid coordinates, everything else is conflicting data where I can't necessarily decide what to believe. So I do this:

- If the aliens are "hostile" (or not present) and a trade item is listed, I set aliens as "detected" and list no trade item.
- If there is a Spant or Murderbot non-combat, but drones or soldiers are present, I simply say "detected".
- If Spants or Murderbots are NOT listed as present, but there are units (or an artifact). simply say "detected"

Other choices are possible. For example, if there is a trade item, set the aliens as "friendly".
But, setting to "detected" basically says "details are unconfirmed. Go check if you are interested".

There are 45 planets with Hostile Anomalous Plants.
There are 44 planets with Hostile Anomalous Animals
There is 1 (known) planet with both.

I have verified the planet with both, and am gratified that it exists, since for the longest time, there was no example of a planet with both, although I posited it must exist although the Wiki knows nothing of it.

That's nice. If you want to maximize your research with a geological sample kit, you have 20 planets - of divers difficulty level - to choose from.

A tricky problem is when you have a primary goal of "Anomalous Plants" or "Space Pirate quest step 2" - and you'd like to maximize rocks (for research) as your secondary goal. Which means, minimize other kinds of life - animals, plants, murderbots, spants, aliens. Don't have that coded yet. But it's coming.

Hoping to get all that worked out, as well as the configuration options and the command line by the end of the upcoming long weekend, when I have lots of vacation days. That will allow you to run the script and say "maximize for X and Y, maximum difficulty Z, which planet should I go to?" Or "I want a random planet from K-P. Suggest one?"

The actual "OK, given that, automate for 20 turns and save the results" comes later.

My one question is this:

I have no settings to record types of Rocks you can find. You can choose to not spend a turn in the Caves - so if you want to minimize total turns spent while looking for a particular quest step, say, you might prefer that. But is there really a difference in rocks? The spreadsheet tends to display the result of exactly one run on the planet. If they happened to not get rock type A, does that really mean "you won't ever find rock type A", or is it an artifact of sample size 1?

I can certainly take 3 bits to determine which rock types appear. I wonder how that actually maps to KoL's planet model.

I have four multis who just bought Spacegate access. I expect that essentally all of them will go for "RANDOM" - within their capabilities - which means I'll be able to add more than 1400 new planets a year to the collective database. As hosted by this script.

(The "what happened this run" will also include the following cosmetic things:

What the sky look like
What the sun(s) look like
What the moon(s) look like.
Which plant image
Which animal image
Which (hostile or friendly) alien image

Since those do not change for a given planet, they must be encoded in the 7-alphabetic-character worth of bits - but since they don't actually affect gameplay, they undoubtedly reuse bits used to encode game-affecting parameters.)

This is all pretty amazing. Blows away the script I made for playing these. I think all mine does is keep a record of any planet coordinates where it saw the word "anomalous" on the terminal page. In any event, you have rekindled my interest in the spacegate, which I quit playing some time ago. I am probably going to have to install this when I get a chance.

Obviously, if you specify a difficulty (or range) we may not be able to satisfy even one goal, much less two.
There are so many planets, it seems likely that all combinations exist for every difficulty, but our library of planets is tiny, given the vastness of space.

For grins, revision 128 includes my (very incomplete) VeracitySpacegate.ash.
It has the code I demoed above - where you can search for planets that match one or two goals - and get a list of them back.
This will all change a lot, even before I get to the "automate a planet, record everything, print it (and save to settings) at end of session" part.

So, don't count on anything - goals, data structures, functions - to remain unchanged, but it may amuse you in its present state.

If nothing else, it shows how I incrementally develop software without necessarily having it all designed up front.

Regarding the proposed commands, I have a refinement. There are two "prefix" commands:

automate - choose a planet based on parameters and visit it
suggest - choose a planet based on parameters and say what's known about

"automate" is the default and you can leave it off, unless there are no other parameters, where it does whatever current settings specify

---

automate - visit planets based on current settings
suggest - suggest a planet based on current settings and describe it

All other commands work as described above: they "automate" the specified planet.
If you precede them the "suggest", they generate a planet and describe it.

Suggest will be more verbose about how it chooses a planet and more forgiving of errors; nothing to abort, since it will not visit a planet.

So, something like this:

> VeracitySpacegate suggest goal spants, animals (K-N)

I know about 428 planets with Spants
Of those, 16 also have Hostile Anomalous Animals
Of those, 4 have difficulty between K and N
I suggest you visit LUBBOCK
Here's what I know about it:
... planet description...

Getting "suggest" planet-picking functionality by itself is a prerequisite to getting the "automate" functionality - and would be useful by itself.

I'll work towards releasing that soonish.

I really want the "automate" functionality since that will add new planets to SpacegatePlanetsMine.txt, where they can augment the database.
Of course, that part only applies to visiting unknown (or RANDOM) planets - or previously know planets from the spreadsheet with incomplete info.

Edit: And considering that I sequentially trim lists of planets based on goals, I see no reason that there need be only two goals. Heck, if you want "spent artifact" and "murderbot artifact" and "procrastinator 1" and "friendly aliens", by all means - see if such a planet is known.

Since I had nothing better to do today, I finished up all the "suggest a planet" stuff.

Code:

> VeracitySpacegate help
Available commands:
help - print this message
suggest [parameters] - select a planet to visit
visit [parameters] - select a planet to vist and go there
automate [parameters] - (same as visit)
If you do not specify parameters, the script will use current settings to control selection
Available parameters:
coordinates XXXXXXX - go to the coordinates you specified
random [difficulty] - go to a random planet, as restrained by the difficulty you chose
goal A [, B]... [difficulty] - go to a planet that satisfies all the goals you selected
Difficulty is always optional; if not selected, script settings will determine it. It defauls to (A-Z)
(X) - difficulty is exactly X
(X-Y) - difficulty is between X and Y, inclusive
Available goals:
rocks - If this is the only goal, will find a planet with all rocks.
plants - Hostile Anomalous plants
animals - Hostile Anomalous animals
trade [buy] [item] - friendly aliens selling the (optiona) item. Will find cheapest, if you want to 'buy'
(item is one of salad, booze, medicine, mask)
trophy [item] - hostile aliens wielding the (optional) equipment
(item is one of blowgun, loincloth, necklace, spear, totem)
murderbots [type] - Murderbots (optionally) with artifact, drones, or soldiers
spants [type] - Spants (optionally) with artifact, drones, or soldiers
ruins - any unidentified ruins
procrastinator [step] - the next (or specified) step in the Procrastinator quest
space baby [step] - the next (or specified) step in the Space Baby quest
space pirate [step] - the next (or specified) step in the Space Pirate quest
For spants and murderbots, [type] is optional. If omitted, chooses planet with life 'detected' but type not known.
For aliens, [item] is optional. If omitted, chooses plent with life 'detected', but item not known
Available script settings:
VSG.Coordinates - coordinates or RANDOM
VSG.Goals - set of goals. default is 'rocks'
VSG.BuyTradeItem - true or false
VSG.MinimumDifficulty - Easiest planet to visit. Default is A
VSG.MaximumDifficulty - Hardest planet to visit. Default is Z
VSG.MinimumProcrastinatorLanguage - Minimum language fluency to try for step 2. Default is 60
VSG.MinimumSpaceBabyLanguage - Minimum language fluency to try for step 2. Default is 50
VSG.MinimumSpacePirateLanguage - Minimum language fluency to try for step 2. Default is 40

If you are looking for a trade item and actually want to buy it, it will find the cheapest price.

Code:

> VeracitySpacegate random (F-K)
RANDOM coordinates with difficulty (F-K) -> FMJQGOD
I suggest that you visit the planet at coordinates FMJQGOD
I know nothing about that planet. Go forth and explore it. Have fun, but be careful!

We generate our own random planet coordinates, rather than depending on KoL - which doesn't let you specify difficulty ranges, like that.

I think this is everything I need for the planet database and choosing a planet to visit based on your goals.

Next up will be actually visiting the planet, watching everything, and saving planet parameters in SpacegatePlanetsMine.txt.

I installed it and ran the above. Pretty sweet. I can deduce there is a planet with difficulty less than 'K' that has both plants and animals? I'm curious - the database is only built up by your 4 characters (and the spreadsheet)? New planet data accumulated by other players just remains in their personal data files? ie...is there any way to implement data-sharing so that the script would build its database faster? I suspect not or other scripts would probably have deployed such by now. But you're such a wiz I couldn't put it past you .

I suspect I will have more to say after I have a had a chance to play with it more. For now, I'll just say "Bravo".

The planet with both plants and animals is EGGBURT. I saw that on the spreadsheet and visited it for verification.

The state of the database is this:

1) The public spreadsheet, processed by SpacegateImport.ash (also released) is in SpacegatePlanetsPublic.txt
2) The planets that I have personally visited, entered and annotated by hand, are in SpacegatePlanetsVeracity.ash

When I say "by hand", I mean I have an ASH file with a hand-coded array of "planet" records which I map_to_file into that file. I attach that for your amusement, although I see no need to release it via svn.

So far, my multis have been doing things like testing the quests (Procrastinator,, etc.),verifying planets like EGGBURT,, and visiting (once) all the planets that are publicly announced as having rare drops from hostile aliens.

When I finish the "record everything you say while adventuring on a planet" part, the script will automatically do something similar: it will add a "planet" to the map of planets you, personally, have visited and will map_to_file it to SpacegatePlanetsMine.txt. As I mentioned, when my scripts load_planets(), they merge three files - SpacegatePlanetsPublic.txt, SpacegatePlanetsVeracity.txt, and SpacegatePlanetsMine.txt. The first contains "unverified" planets - many with incomplete info, because of all the data format errors reported by SpacegateImprt.ash. The latter two are considered to be "verified" and will override planets from the "Public" data file.

Once I get the automatic discovery stuff working, I will copy my Veracity file to my Mine file and all of my multis will add to that. Periodically, I will copy it back to Veracity and release it, so that all users of this script will have my data available.

Note that everybody will still have their own Mine file - and those can be shared, as well, by simply concatenating multiple Mine files into one.

A thing I haven't figured out is how to easily add in knowledge about the rare hostile alien trophies. Most everybody who visits a planet will not see such - but the person who gets one will have it notated in their Mine file. Perhaps a program which will do the "concatenation" of somebody else's Mine file into yours and will compare planets that it merges in, reporting on differences (like the trophies)?

I also want to collect the "cosmetic" planet info and save it in, perhaps, a parallel file: SpacegatePlanetCosmetics.txt, say. This will also be indexed by coordinates, but will have:

These are all things that have no effect on gameplay. Only the name is in the public spreadsheet - which is why I have that in my planet data structure, even though it is cosmetic; I wanted to import it. Hmm. Perhaps I should move it to the planet_cosmetics structure and have SpacegateImport .ash write to both files, thus keeping the "game affecting" data and the "cosmetic" data separated? I think I'll do that. The public "cosmetics" file will - like the planet data - be incomplete.

The sky, suns, and moons are described when you first step onto a planet:

The sky is a dim red, punctuated by mottled pale blue and pink clouds. It is twilight -- the planet's sun is just out of sight. There are no moons visible.
The sky above the horizon is a deep blue, speckled with puffy grey clouds. The planet's sun (if it has one) is nowhere to be seen. There are no moons visible.
The sky is blue fading into orange near the horizon. The system's twin white suns loom above you. The planet doesn't appear to have any satellites.
The planet's sky is a deep green, dominated by a system of pale blue rings. The landscape is lit by a brilliant white sun. Several waning moons pepper the planet's ecliptic plane.
The sky is a bleached orange. The system's single, distant sun hangs dimly near the horizon. The sky is moonless.
The sky is yellow fading into blue near the horizon. A bright yellow, almost Sol-like sun hangs overhead. A single massive moon dominates the dome of the sky.
The planet's sky is a pale green, dominated by a system of white rings. The system's twin blue suns loom above you. Two gaseous moons punctuate the sky.

And so on. Always three sentences. I'm curious about what the choices are for each.

Certainly not something to make decisions on for visiting a planet, but will augment my "planet description" to include that extra info - much as I do with kinds of spants, trade item and price, and so on.

I spend most of yesterday coding. I'll come up with a plan for completing the "visit" part of the script and perhaps I'll start on that on Sunday; I have a lot of things I need to do today and tomorrow.