| Name | StarEmpireX-OGame Profil Importáló (shown as “StarEmpireX OGame Profile Importer” in English) |
| Type | Userscript (for the Tampermonkey / Violentmonkey / Greasemonkey browser extensions) |
| Version | 3.1 |
| Toleration | the 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 |
| Installation | from 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 website | https://starempirex.hu – Hungarian OGame community portal with calculators |
| Contact | https://starempirex.hu/kapcsolat |
| Address of this description | https://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
- Read-only. It only reads the content of pages the player opened themselves.
- It does not click, navigate or load pages.
- It sends no request of any kind to the OGame servers (page, AJAX, API, XML).
- No automation. There is no timed, repeating or background action.
- Own account only. It does not read other players' data.
- Data is sent only on a button press. One click means one single HTTPS request, to starempirex.hu only. Apart from that it fetches the interface texts at most once a day (without any player data).
- The player can delete the uploaded data at any time.
3. Installation and linking
- The player registers and logs in on starempirex.hu, then opens the OGame profile page (
/account-profile). - The page guides them through installing Tampermonkey and the script.
- 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).
- 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
- Tampermonkey starts the script on only two OGame pages (
@match): the Empire view (index.php?page=standalone&component=empire…) and the Lifeform bonuses page (index.php?page=ingame&component=lfbonuses…). The script checks this itself on start as well; it does not run on any other game page. - On the
starempirex.hu/account-profilepage it only tells the website that it is installed and which version it is. - Interface texts: the script contains no language texts. The interface language comes from the universe address (e.g.
s187-hu→ Hungarian), and the script fetches the texts in that language from starempirex.hu: one cookie-less GET request, at most once a day per language, without any player data; the result is kept in Tampermonkey's own storage. If there is no translation for the language, it receives English texts. The texts are plain data: the script never executes them and only displays them as text. - There is no other network request on game pages, only the one of the send button. The script sends no request at all to the OGame servers.
- Empire view: in the bottom right corner of the standalone view a floating “📤 Profile sync” button opens a panel, and short notifications appear. The panel shows which data has already been read and, next to the send button, where the data will go. For a missing page it offers a plain “Open →” link, but the player has to open it.
- Lifeform bonuses: there is no floating element here, only one line of text is added to the page content as feedback on the reading. The menu, the footer, the ads and the premium elements are therefore not covered by anything.
- It does not change, hide or replace any element of OGame's own interface.
5. What it reads and from where
5.1 On both pages: meta tags
| Data | Source | Used for | Sent? |
|---|---|---|---|
Universe (e.g. s170-hu.ogame.gameforge.com) | meta[name=ogame-universe] | identifying the server | ✔ |
| Player name | meta[name=ogame-player-name] | displaying the profile | ✔ |
| Class (collector / general / discoverer) | meta[name=ogame-player-characterclass-id] | class bonuses in the calculators | ✔ |
| Player ID | meta[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:
| Data | Note |
|---|---|
| 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 silo | for the calculators, for filling in the profile and for the profile's achievement list (which levels are already reached) |
| Minimum and maximum temperature | for calculating deuterium production; shown next to the planet in the profile |
| Lifeform race | determined 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:
| Data | Note |
|---|---|
| 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:
- the ship counts while the fleet switch is off (default);
- fleets in flight, defence, resource stock;
- messages, espionage reports, the galaxy view;
- the alliance and other players' data;
- officers, items and dark matter;
- payment data and account settings.
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:
- the data read stays on the player's computer until they open the page again (then it is overwritten);
- it can be deleted from the Tampermonkey menu (“🗑️ OGP: delete collected data”) or by removing the script.
7. Server side (starempirex.hu)
7.1 Authentication and protection
- The username is bound to the registered account, and the token is compared with the stored SHA-256 hash in a timing-safe way.
- A suspended account cannot import.
- A wrong username and a wrong token give the same error message.
- 5 failed attempts within 10 minutes cause a 15-minute IP ban.
- At most 1 import per account every 10 seconds, at most 256 KB and 30 planets.
- Every value is filtered by type and range (levels 0–99, lifeform level 0–100). HTML is removed from text fields and their length is limited; unknown fields are not stored.
- The profile is bound to the account's internal ID, so no other account can access it.
7.2 Storage and access
- On the server the profile is in a file bound to the user's account and cannot be accessed directly from the web.
- On the interface only the user themselves can see it, when logged in: on the profile page and in the calculators. It is not public, other users cannot see it, and it is not passed to third parties. The server operator technically has access to the stored files, but does not use the data for any other purpose.
- Based on the universe, the server fills in the public server settings (speed, number of galaxies etc.) from its own database.
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
- Delete profile button on the profile page: deletes all saved OGame data and the import token. The starempirex.hu account is kept.
- Revoke token button: after this the script cannot send data.
- Data handling is described in the starempirex.hu privacy notice. Providing the data is voluntary; processing is based on consent.
8. Compliance with the OGame tool rules
| Rule | Status |
|---|---|
| Automation, macro | none: the script starts no in-game action |
| Timing, delayed action | none; the only timer is the one-time local re-read of the lifeform page, without a request |
| Automatic refresh, polling loop | none |
| Network request on game pages | only 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, cp | none: the script sends no request to the OGame servers, so it causes no activity either |
| Automatic alarm, webhook, Discord | none |
| Direct espionage, alternative interface, bypassing the lobby | none |
| Imitating a dark matter feature | none |
| Ads, footer, premium elements | untouched |
| Fee, subscription, inserted ads | none |
| Private data | data 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 use | the script does not use any OGame API |
| Readable source | not minified, not obfuscated; its behaviour is described in this document |
| Toleration | required for both the script and the server side |
9. Updates
- New installations come from Greasy Fork, and the script manager updates them from there (the Greasy Fork copy has no
@updateURL). - Every new version is announced to Gameforge before release, with a description of the changes.
- The script's source code is publicly and fully readable on Greasy Fork (not compressed, not obfuscated).
- Copies installed earlier from the profile page via a personal link update from it:
/s/ogp/<user ID>/<signature>/starempirex-ogp-importer.user.js. That copy is identical to the approved source; the server only rewrites the@updateURLand@downloadURLlines to the personal link, so Tampermonkey can update without cookies. For a deleted user the link returns 403. - The old
/userscripts/starempirex-ogp-importer.user.jsaddress (older installations) is only served with a logged-in session. If updating does not work that way, the script has to be reinstalled once with the install button on the profile page. - Language: the interface language comes from the universe address, and the script fetches the texts from starempirex.hu (15.5.4). A new language or a corrected translation does not require changing the script.
10. Version history
| Version | Change |
|---|---|
| 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.9 | Also sends the planet's minimum temperature from the Empire view (previously only the maximum). |
| 2.8 | No longer reads the current planet's exact (decimal) production or the planet ID/type meta tag; production comes only from the Empire view. |
| 2.7 | Reads 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.6 | Level 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.5 | Also sends the ships' combat bonuses (structure, shield, weapon) from the Lifeform bonuses page. |
| 2.4 | The floating button appears only in the Empire view and on the Lifeform bonuses page. |
| 2.3 | With an invalid token the script asks for the new one; token can be changed from the panel. |