OGame profile importer (Tampermonkey script): data collection and upload

Last updated: 2026-11-27

NameStarEmpireX-OGame Profil Importáló (shown as “StarEmpireX OGame Profile Importer” in English)
TypeUserscript (for the Tampermonkey / Violentmonkey / Greasemonkey browser extensions)
Version3.1
Tolerationthe script and the server side have to be submitted to the OGame Origin team; until written approval is given, this is not an officially approved add-on
Installationfrom Greasy Fork (https://greasyfork.org/scripts/607573-starempirex-ogame-profile-importer); the button on the profile page (/account-profile) leads there. The full, readable source is public there
Related websitehttps://starempirex.hu – Hungarian OGame community portal with calculators
Contacthttps://starempirex.hu/kapcsolat
Address of this descriptionhttps://starempirex.hu/StarEmpireX_README/ogp-importer/?lang=en

1. Purpose

The calculators on starempirex.hu (for example flight time and fuel consumption, expeditions) work with the player's own data: mine levels, research, lifeform levels and bonuses, production, class. The player can also enter these by hand on the website's OGame profile page.

The script replaces this manual entry. It reads the player's own data that is already visible on the OGame pages the player opened, and at the player's request sends it in a single step to their own profile on starempirex.hu.

The script performs no action at all in the game and gives no in-game advantage. It only transfers data the player can see about their own account anyway and could also type in by hand.

2. Principles

3. Installation and linking

  1. The player registers and logs in on starempirex.hu, then opens the OGame profile page (/account-profile).
  2. The page guides them through installing Tampermonkey and the script.
  3. On the profile page they generate an import token:
    • the token is 48 hexadecimal characters (192 random bits);
    • it is shown only once;
    • the server stores only its SHA-256 hash;
    • it can be revoked or regenerated at any time (the old one then becomes invalid).
  4. On the first send the script asks for the starempirex.hu username and the token. It keeps them in Tampermonkey's own storage (GM storage), on the player's computer.
    • They can be changed later with the “🔑 Change username / token” link on the panel, or from the Tampermonkey menu (“🔧 OGP: set username/token”).
    • If the server reports an invalid token, the script asks for the new one by itself.

The script never asks for, reads or sends the OGame password, cookies or session ID.

4. Where it runs and what it shows

5. What it reads and from where

5.1 On both pages: meta tags

DataSourceUsed forSent?
Universe (e.g. s170-hu.ogame.gameforge.com)meta[name=ogame-universe]identifying the server✔
Player namemeta[name=ogame-player-name]displaying the profile✔
Class (collector / general / discoverer)meta[name=ogame-player-characterclass-id]class bonuses in the calculators✔
Player IDmeta[name=ogame-player-id]local storage key only (keeping several accounts apart)✘

Since version 2.8 the script does not read the current planet's ID and type or the production data of the resource bar (reloadResources(...)): production comes only from the Empire view.

5.2 Empire view (?page=standalone&component=empire)

It reads the createImperiumHtml(...) data embedded in the page: the planets tab (?page=standalone&component=empire) and, if the player opens it, the moons tab as well (…&planetType=1). The moons tab is optional.

Per planet:

DataNote
OGame planet ID, name (max. 60 characters), coordinates
Level of the metal mine, crystal mine and deuterium synthesizer
Level of the other buildings (13): solar plant, fusion reactor, robotics factory, nanite factory, shipyard, metal, crystal and deuterium storage, research lab, terraformer, alliance depot, space dock, missile silofor the calculators, for filling in the profile and for the profile's achievement list (which levels are already reached)
Minimum and maximum temperaturefor calculating deuterium production; shown next to the planet in the profile
Lifeform racedetermined from the active lifeform buildings
Level of the lifeform buildings (12)
Level of the active lifeform research
Production (metal, crystal, deuterium)the production value of the Empire view (hourly today, per second in older OGame versions); the server recognises the unit and converts it to a daily value

Per moon (from the moons tab): coordinates, and the level of the lunar base, sensor phalanx, jump gate, robotics factory, shipyard and the three storages.

Fleet – only if the player switches it on. The panel has a “Send fleet (ship counts)” switch, off by default. While it is off, the script does not read or store ship counts; when it is switched off, the ship counts already stored are also deleted from local storage. When it is on, the script reads the number of ships (15 types) per planet and per moon from the same Empire view data, and when sending it only sends the total count per type. Fleets in flight are not included.

At account level the research levels (16): espionage, computer, weapons, shielding, armour, energy, hyperspace, combustion drive, impulse drive, hyperspace drive, laser, ion, plasma, intergalactic research network, astrophysics, graviton.

5.3 Lifeform bonuses (?page=ingame&component=lfbonuses)

From the displayed page it reads:

DataNote
Lifeform experience levels (4 races, 0–100)these are not in the Empire view

Since version 2.7 the script does not read or send the bonus percentages shown on the page (ship, class, resource and expedition bonuses). They are rounded to two decimals and can be calculated exactly from the lifeform research and buildings of the Empire view and the experience levels; this is how starempirex.hu calculates them.

On this page the content appears after loading, so the script reads the already opened page once more after 1.5 seconds. This also involves no request and no click.

5.4 What it does not read

It does not read:

6. Sending data

When: only when the player clicks the “📤 Send all” button on the panel. Above the button the panel states where the data goes, who can see it and how it can be deleted, and it links to this description. If the Empire view data is older than 24 hours, it asks for confirmation first.

Where to: POST https://starempirex.hu/components/helpers/profile/import.php. Sending happens over HTTPS with GM_xmlhttpRequest, and the @connect setting only allows the starempirex.hu address.

The complete content of the request:

{
  "type": "full",
  "username": "<starempirex.hu username>",
  "token": "<import token>",
  "scriptVersion": "3.1",
  "meta": { "universe": "s170-hu.ogame.gameforge.com", "playerName": "…", "classId": 1 },
  "empire": {
    "planets": [ { "id": 0, "name": "…", "coords": "1:100:8",
                   "mines": {"1": 0, "2": 0, "3": 0}, "buildings": {"4": 0, "14": 0, "21": 0},
                   "tempMin": 0, "tempMax": 0, "race": 1,
                   "lfb": {"1": 0}, "lfr": {"11201": 0}, "prod": {"m": 0, "c": 0, "d": 0} } ],
    "moons": [ { "coords": "1:100:8", "buildings": {"41": 0, "42": 0, "43": 0} } ],
    "research": { "106": 0, "108": 0 }
  },
  "fleet": { "ships": { "202": 0, "204": 0 } },
  "lf": { "levels": { "1": 0, "2": 0, "3": 0, "4": 0 } }
}

moons is only included if the moons tab has been read; fleet only with the fleet switch on. The server filters buildings and ship types against an allow-list (level 0–99, count 0–999 999 999 999). If moons arrives, the moon is deleted on planets not listed in it; if not, the earlier moon data is kept. fleet replaces the ships saved on the profile's Fleet panel (the lifeform bonuses stay); without fleet the manually saved fleet is unchanged.

The key of lfr is the tech ID (1<race>2<slot>). Per planet the server keeps one research for each of the 18 research slots: if several arrive for one slot, the first one. Manual profile saving filters the same way.

Response: the server returns the number of saved planets and the daily production, and the script shows them in a notification.

Local storage:

7. Server side (starempirex.hu)

7.1 Authentication and protection

7.2 Storage and access

7.3 Use

The Calculators page of starempirex.hu (including the Expedition and Plasma panels) fills in the default values from the profile. The user can change every value by hand.

On the profile page the “❓ How does it work?” button opens a short, easy-to-understand description of the profile and of installing and using the importer.

7.4 Deletion and revocation

8. Compliance with the OGame tool rules

RuleStatus
Automation, macronone: the script starts no in-game action
Timing, delayed actionnone; the only timer is the one-time local re-read of the lifeform page, without a request
Automatic refresh, polling loopnone
Network request on game pagesonly to starempirex.hu: on a click on the send button, plus at most one cookie-less GET a day for the interface texts, without player data; the server never rewrites the script's code
Background call, accountInfo, cpnone: the script sends no request to the OGame servers, so it causes no activity either
Automatic alarm, webhook, Discordnone
Direct espionage, alternative interface, bypassing the lobbynone
Imitating a dark matter featurenone
Ads, footer, premium elementsuntouched
Fee, subscription, inserted adsnone
Private datadata leaves only on the player's click, after being informed; the fleet only when switched on separately, as totals; it does not read messages, cookies or the session
API usethe script does not use any OGame API
Readable sourcenot minified, not obfuscated; its behaviour is described in this document
Tolerationrequired for both the script and the server side

9. Updates

10. Version history

VersionChange
3.1@match only covers the Empire view and the Lifeform bonuses page. Multilingual interface: the language comes from the universe address, and the script fetches the texts from starempirex.hu. Data collection and sending are unchanged.
2.9Also sends the planet's minimum temperature from the Empire view (previously only the maximum).
2.8No longer reads the current planet's exact (decimal) production or the planet ID/type meta tag; production comes only from the Empire view.
2.7Reads only the experience levels from the Lifeform bonuses page; does not collect the rounded bonus percentages (the website calculates them exactly from the raw data). The server deletes the previously stored rounded bonuses on the next import.
2.6Level of every building per planet, moon buildings from the moons tab of the Empire view; fleet collection that the user can switch on (off by default), with total ship counts.
2.5Also sends the ships' combat bonuses (structure, shield, weapon) from the Lifeform bonuses page.
2.4The floating button appears only in the Empire view and on the Lifeform bonuses page.
2.3With an invalid token the script asks for the new one; token can be changed from the panel.