[TOOL] X4 Universe Generator

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

celludriel
Posts: 163
Joined: Thu, 12. Sep 13, 11:29
x4

Re: [TOOL] X4 Universe Generator

Post by celludriel » Sat, 22. Dec 18, 16:52

tigar wrote:
Sat, 22. Dec 18, 14:45
the skybox(stars and suns) seem to be missing from the example one you gave it might be the 1.5 update or something else but ya it leads to some interesting looks
That is because I didn't include the assets for empty_space in the generator, the example is actually for my x3 galaxy TC

viewtopic.php?f=181&t=408787#p4808134

I've updated the OP with a warning about this behavior

balogt
Posts: 773
Joined: Thu, 18. Dec 03, 09:00
x3

Re: [TOOL] X4 Universe Generator

Post by balogt » Sun, 23. Dec 18, 02:43

Got them all placed in. Lastly how would i add more asteroids beyond what the cluster pack has by default. This can busy up alot of the sectors. Btw looks good thus far. When im done ill share it out.

celludriel
Posts: 163
Joined: Thu, 12. Sep 13, 11:29
x4

Re: [TOOL] X4 Universe Generator

Post by celludriel » Sun, 23. Dec 18, 09:19

balogt wrote:
Sun, 23. Dec 18, 02:43
Got them all placed in. Lastly how would i add more asteroids beyond what the cluster pack has by default. This can busy up alot of the sectors. Btw looks good thus far. When im done ill share it out.
The clusters have a belts property you can use as this:

Code: Select all

  "clusters": [
    {
      "id": "01",
      "name": "Argon Prime",
      "description": "Argon Prime",
      "music": "music_cluster_02",
      "sunlight": "1",
      "economy": "0.75",
      "security": "0.75",
      "x": 0,
      "y": 0,
      "backdrop": "empty_space",
      "factionHq": "ARGON",
      "factionStart": {
        "faction": "ARGON",
        "name": "The Argon Saga",
        "playerName": "Vel Driar",
        "description": "The Argon Federation is a proud place to call home: the center of culture, science and learning in the universe. This pride is born of a long and storied history; of a bold and daring risk to lure the greatest threat the universe has known away from Earth and a sacrifice to save a home they would never return to. The Argon people were forced to began anew in a place unfamiliar to them and have thrived since. Do you have what it takes to continue this saga?"
      },
      "connections": [
        {
          "targetClusterId": "03",
          "connectionType": "SE"
        },
        {
          "targetClusterId": "05",
          "connectionType": "S"
        }
      ],
      "stations": [
        {"type": "SHIPYARD", "race":  "ARGON", "owner": "ARGON", "faction": "ARGON"},
        {"type": "WHARF", "race":  "ARGON", "owner": "ARGON", "faction": "ARGON"},
        {"type": "DEFENCE", "race":  "ARGON", "owner": "ARGON", "faction": "ARGON"}
      ],
      "belts": [
              {"type": "ORE", "x":  "-100000", "y": "100000", "rotation": "250"},
      ]
    },
This will disable random belt placement for this specific cluster. You have the following belts available

ORE, ICE, HYDROGEN,HELIUM, METHANE, NVIDIUM;

killerog
Posts: 3464
Joined: Fri, 28. Oct 05, 16:31
x4

Re: [TOOL] X4 Universe Generator

Post by killerog » Sun, 23. Dec 18, 14:49

Thought I would post a quick sneak peak of the tool me and celludriel are working on. This will generate the JSON that is used by his tool. Its very early in its development so its a bit rough around the edges still.

Image
Image

balogt
Posts: 773
Joined: Thu, 18. Dec 03, 09:00
x3

Re: [TOOL] X4 Universe Generator

Post by balogt » Sun, 23. Dec 18, 23:59

I remember when you just started getting into the modding circle killerog, you have come along way Sir. thanks for the asteroid code as well.

balogt
Posts: 773
Joined: Thu, 18. Dec 03, 09:00
x3

Re: [TOOL] X4 Universe Generator

Post by balogt » Mon, 24. Dec 18, 00:04

cell you said that code will disable random belt placement in the cluster, is there by any chance some code already in place that randomly generates asteroids in sectors upon creation of the universe. cause all I would need to do is UP that number and occurance then poof tons of asteroids all the time.

balogt
Posts: 773
Joined: Thu, 18. Dec 03, 09:00
x3

Re: [TOOL] X4 Universe Generator

Post by balogt » Mon, 24. Dec 18, 00:46

hum I seem to get errors around line 51 with the [ ] brackets being the source. not sure how to fix that.

balogt
Posts: 773
Joined: Thu, 18. Dec 03, 09:00
x3

Re: [TOOL] X4 Universe Generator

Post by balogt » Mon, 24. Dec 18, 00:51

{"type": "ORE", "x": "-100000", "y": "100000", "rotation": "250"}, the comma at the end of this line was the issue. removed at and comp;iled perfectly. TY

balogt
Posts: 773
Joined: Thu, 18. Dec 03, 09:00
x3

Re: [TOOL] X4 Universe Generator

Post by balogt » Mon, 24. Dec 18, 01:52

so iadded the lines, no issues compiling yet I used argon prime as my example and there were no asteroids..do I add this line to cluster packs or the x3galaxy json file?

celludriel
Posts: 163
Joined: Thu, 12. Sep 13, 11:29
x4

Re: [TOOL] X4 Universe Generator

Post by celludriel » Mon, 24. Dec 18, 02:05

balogt wrote:
Mon, 24. Dec 18, 00:04
cell you said that code will disable random belt placement in the cluster, is there by any chance some code already in place that randomly generates asteroids in sectors upon creation of the universe. cause all I would need to do is UP that number and occurance then poof tons of asteroids all the time.
If you look on the top of the json file you'll notice

Code: Select all

  "seed": "20051028",
  "minRandomBelts": 3,
  "maxRandomBelts" : 5,
The seed is to have always the same random results, the minRandomBelts the minimum of random belts will appear in a cluster if you did not set the belts property maxRandombelts means the maximum that can appear.
balogt wrote:
Mon, 24. Dec 18, 00:51
{"type": "ORE", "x": "-100000", "y": "100000", "rotation": "250"}, the comma at the end of this line was the issue. removed at and comp;iled perfectly. TY
In standard JSON format there are no trailing commas allowed (this is not javascript)
balogt wrote:
Mon, 24. Dec 18, 01:52
so iadded the lines, no issues compiling yet I used argon prime as my example and there were no asteroids..do I add this line to cluster packs or the x3galaxy json file?
They should have been there here is an example from my first runs

Code: Select all

  "clusters": [
    {
      "id": "01",
      "name": "Argon Prime",
      "description": "Argon Prime",
      "music": "music_cluster_02",
      "sunlight": "1",
      "economy": "0.5",
      "security": "0.25",
      "x": 0,
      "y": 0,
      "backdrop": "empty_space",
      "gamestart": true,
      "connections": [
        {
          "targetClusterId": "03",
          "connectionType": "SE"
        },
        {
          "targetClusterId": "05",
          "connectionType": "S"
        }
      ],
      "belts": [
        {"type": "ORE"},
        {"type": "ORE"},
        {"type": "HYDROGEN"}
      ]
    },
x, y and rotation are optional, but I've given them as an example so you would know they are there

balogt
Posts: 773
Joined: Thu, 18. Dec 03, 09:00
x3

Re: [TOOL] X4 Universe Generator

Post by balogt » Tue, 25. Dec 18, 06:15

So far so good. One hopefully last question. There are no teladi warfs that produce the falcon.how does one make that happen

celludriel
Posts: 163
Joined: Thu, 12. Sep 13, 11:29
x4

Re: [TOOL] X4 Universe Generator

Post by celludriel » Tue, 25. Dec 18, 10:54

balogt wrote:
Tue, 25. Dec 18, 06:15
So far so good. One hopefully last question. There are no teladi warfs that produce the falcon.how does one make that happen
I"ve not looked into that material yet, you best make a new topic for that one or join the modding discord

celludriel
Posts: 163
Joined: Thu, 12. Sep 13, 11:29
x4

Re: [TOOL] X4 Universe Generator

Post by celludriel » Wed, 26. Dec 18, 12:41

Bugfix for the Y location of the clusters. If you are using my tool, you probably want to check your Y values. Now each X and Y coordinate in the json will be the exact same as the X and Y coordinates in the game. Also the property starterZoneName has been removed it served no longer a purpose with FactionStarts on cluster level

User avatar
Shuulo
Posts: 1629
Joined: Mon, 14. Apr 08, 17:03
x4

Re: [TOOL] X4 Universe Generator

Post by Shuulo » Fri, 15. Mar 19, 19:04

Wondering if this one is dead. Updates planned?

kyrah
Posts: 59
Joined: Mon, 14. Mar 16, 16:41
x4

Re: [TOOL] X4 Universe Generator

Post by kyrah » Tue, 26. Mar 19, 14:18

Wondering too. Is this still working? Is there a complete x3 tc universe?

Tomonor
EGOSOFT
EGOSOFT
Posts: 1683
Joined: Wed, 12. Sep 07, 19:01
x4

Re: [TOOL] X4 Universe Generator

Post by Tomonor » Tue, 26. Mar 19, 14:54

kyrah wrote:
Tue, 26. Mar 19, 14:18
Wondering too. Is this still working? Is there a complete x3 tc universe?
How could there be a complete X3TC-state universe if 3 core races are missing?
Image

celludriel
Posts: 163
Joined: Thu, 12. Sep 13, 11:29
x4

Re: [TOOL] X4 Universe Generator

Post by celludriel » Sat, 20. Mar 21, 11:26

Well it seems my tool is still working I just tested it out with a fresh install of X4

https://steamuserimages-a.akamaihd.net/ ... F3037181C/

Pretty glad it is still working, universe is still as dead as it can be though. Trying to put life into it was to much a frustration with the xml commands never doing what I asked them to do.
Last edited by Terre on Sat, 20. Mar 21, 19:02, edited 1 time in total.
Reason: Images posted directly to the forums should not be greater than 640x480 or 100kb, oversize image now linked

celludriel
Posts: 163
Joined: Thu, 12. Sep 13, 11:29
x4

Re: [TOOL] X4 Universe Generator

Post by celludriel » Fri, 16. Apr 21, 00:40

Updated the main post with a new version

Halpog
Posts: 437
Joined: Sat, 13. Feb 21, 14:09
x4

Re: [TOOL] X4 Universe Generator

Post by Halpog » Fri, 16. Apr 21, 15:37

hmm sounds realy good but i have some questions
iam reffering mostly to the x3TC universe,as example, because i still have this universe in mind

how does it work at all ? i mean ....i get the x3TC universe. and how than x4 handles this ?
where are the races placed ?imean splitc, argon, the split factions, HOP and so on,
how does x4 places them , handles them, and in what way , x4 is still playable than with the plots and all ?

when u dont have borons, at x4, how does a x3tc universe fallin place without them in x4 ?

what about all this stations, x4 places at a sector ? how this will play out with the x3 universe ?

Post Reply

Return to “X4: Foundations - Scripts and Modding”