[Guide] How to Make Your Own Universe, From Scratch, For Dummies

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

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

Tranxalive
EGOSOFT
EGOSOFT
Posts: 265
Joined: Mon, 14. Dec 20, 01:49
x4

[Guide] How to Make Your Own Universe, From Scratch, For Dummies

Post by Tranxalive » Fri, 23. Jun 23, 01:29

Version 0.3 - Work In Progress

Disclaimer: I am not an expert in this area by any means. I am really only sharing what I'm learning, that way others can create their own maps quicker for entertainment, or for modding purposes. I am also using Windows 10, so steps or programs may vary on other Operating Systems. Also, if I'm wrong about something, please correct me, and I will fix it. :D

The Right Things
First, before we can begin we need to have the right things for the job. What we will need is: Mod Foundations
Now that we have what we need, we can get started. But first, we need to lay the foundation.
Navigate to the 'extensions' directory where X4 is installed. If you have it installed on Steam, it'll be somewhere around here: (...\Steam\steamapps\common\X4 Foundations\extensions)

Right-Click, and create a folder, you can give it whatever name you like, just make sure it's not too crazy, as it'll be a pain to type later. :wink:
Next, open the folder you just made, right-click and create a new .txt file. (Text Document) Name it 'content'. It's case-sensitive, so it must be typed that way, or it won't work.

Now, we're going to change the file extension from '.txt' to '.xml'. Turn 'File name extensions' on in the 'View' tab of your file browser, if you haven't already. Click the 'View' tab at the top of your file browser, and navigate your cursor to the 'File name extensions' option, and click the box. You should now be able to see each file's extension. Right-Click 'content.txt', and choose rename, hit Right Arrow, until the cursor is at the end, and hit backspace until only the '.' remains, then type in 'xml'. It should be '.xml', hit enter, a warning popup will appear, but don't worry, it's empty so nothing will break. Hit 'Yes' and then celebrate, (crucial step :D ) because you've created the first (technically second) part of your mod.

(Note: For the purposes of this guide, when I refer to 'Notepad' I mean Notepad++.)
Open 'content.xml' in Notepad, and it should empty. If it isn't then you're reading ahead! :P

Copy this...

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<content id="[ID]" version="[VERSION]" name="[NAME]" description="[DESCRIPTION]" author="[YOU!]" date="[DATE]" enabled="0" save="0">
</content>
...and paste it into the file.

Next, you'll need to replace everything with brackets with your own stuff. It should look somewhat like this:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<content id="test" version="001" name="Test Mod" description="I can type what I want, don't tell me what to do." author="Tranxalive" date="2200-01-01" enabled="0" save="0">
</content>
Save and exit the file. If you want, you can launch X4 and check to see if it's there. If you did it right, it should be in the Extensions menu, you should enable it, that way you can test it when we add more stuff.

Now that we've done that, we can move on to some actual content. Oh, no wait. You need to unpack the catalogs if you haven't already. You can launch your X Tools from Steam, and unpack them using the GUI tool. But we'll be doing things the old fashioned way. :)

First make a copy of X4, that way we can unpack everything and still be able to play the game. These next steps will take a long time, so you may as well do something else while your computer is working.

Once X4 is copied, place 'XRCatTool' in the copy of X4. Next, make a .txt file, but give it the extension of '.bat'. Open it up and copy this:

Code: Select all

[Drive Letter]:
cd "...\X4 Foundations"
XRCatTool.exe -in 01.cat -in 02.cat -in 03.cat -in 04.cat -in 05.cat -in 06.cat -in 07.cat -in 08.cat -in 09.cat -out "...\X4 Foundations"
pause
cd "...\X4 Foundations\extensions\ego_dlc_split"
XRCatTool.exe -in ext_01.cat -in ext_02.cat -in ext_03.cat -out "...\X4 Foundations\extensions\ego_dlc_split"
pause
cd "...\X4 Foundations\extensions\ego_dlc_terran"
XRCatTool.exe -in ext_01.cat -in ext_02.cat -in ext_03.cat -out "...\X4 Foundations\extensions\ego_dlc_terran"
pause
cd "...\X4 Foundations\extensions\ego_dlc_pirate"
XRCatTool.exe -in ext_01.cat -in ext_02.cat -in ext_03.cat -out "...\X4 Foundations\extensions\ego_dlc_pirate"
pause
cd "...\X4 Foundations\extensions\ego_dlc_boron"
XRCatTool.exe -in ext_01.cat -in ext_02.cat -in ext_03.cat -out "...\X4 Foundations\extensions\ego_dlc_boron"
pause
cd "...\X4 Foundations\extensions\ego_dlc_ventures"
XRCatTool.exe -in ext_01.cat -in ext_02.cat -in ext_03.cat -out "...\X4 Foundations\extensions\ego_dlc_ventures"
pause

Paste it. You'll need to replace the '[Drive Letter]' with the letter of the drive you stored it on, such as C: or D:. You'll also need to replace the '...' with the path to \X4 Foundations. You can get that easily by clicking the "Directory Navigation Thingy" at the top of your file browser, copy it, and paste it and replace the ellipses with them. After that, it should look something like this:

Code: Select all

C:
cd "C:\Program Files (x86)\Steam\steamapps\common\X4 Foundations"
XRCatTool.exe -in 01.cat -in 02.cat -in 03.cat -in 04.cat -in 05.cat -in 06.cat -in 07.cat -in 08.cat -in 09.cat -out "C:\Program Files (x86)\Steam\steamapps\common\X4 Foundations"
pause
cd "C:\Program Files (x86)\Steam\steamapps\common\X4 Foundations\extensions\ego_dlc_split"
XRCatTool.exe -in ext_01.cat -in ext_02.cat -in ext_03.cat -out "C:\Program Files (x86)\Steam\steamapps\common\X4 Foundations\extensions\ego_dlc_split"
pause
cd "C:\Program Files (x86)\Steam\steamapps\common\X4 Foundations\extensions\ego_dlc_terran"
XRCatTool.exe -in ext_01.cat -in ext_02.cat -in ext_03.cat -out "C:\Program Files (x86)\Steam\steamapps\common\X4 Foundations\extensions\ego_dlc_terran"
pause
cd "C:\Program Files (x86)\Steam\steamapps\common\X4 Foundations\extensions\ego_dlc_pirate"
XRCatTool.exe -in ext_01.cat -in ext_02.cat -in ext_03.cat -out "C:\Program Files (x86)\Steam\steamapps\common\X4 Foundations\extensions\ego_dlc_pirate"
pause
cd "C:\Program Files (x86)\Steam\steamapps\common\X4 Foundations\extensions\ego_dlc_boron"
XRCatTool.exe -in ext_01.cat -in ext_02.cat -in ext_03.cat -out "C:\Program Files (x86)\Steam\steamapps\common\X4 Foundations\extensions\ego_dlc_boron"
pause
cd "C:\Program Files (x86)\Steam\steamapps\common\X4 Foundations\extensions\ego_dlc_ventures"
XRCatTool.exe -in ext_01.cat -in ext_02.cat -in ext_03.cat -out "C:\Program Files (x86)\Steam\steamapps\common\X4 Foundations\extensions\ego_dlc_ventures"
pause
Feel free to remove the 'pause's in between each DLC, but I keep them there for organization.

After that, save the file, and exit. Double click the .bat and let it do it's thing. If you kept all the pauses in there, be sure to check regularly to continue the process.

Once that's done, while we're here, we'll convert all the .xmls into .daes, as you'll need them in that format to open the sector backgrounds in Blender later.

Make a copy of the files you just unpacked, yes, it takes up space, but it's good to have both. Copy and paste all of the XRConverters into the file you just put all of the copied unpacked catalogs in. Create another .bat file, and copy and paste this into it:

Code: Select all

FOR /R "..\[Path]\" %%f IN (*.xml) do (
  XRConvertersMain.exe importxmf "..\[Path]" "%%f"
  )
pause

Replace the '[Path]', with... well, the path. It should look something like this:

Code: Select all

FOR /R "..\.cats and .dats\" %%f IN (*.xml) do (
  XRConvertersMain.exe importxmf "..\.cats and .dats" "%%f"
  )
pause
After that, double click the .bat, and let your computer work. This will definitely take a while. Go eat, or watch TV, just do something fun while you wait. :)

Once, that's finally done, the most painful part (for you) is over. And we can get started at last...
Last edited by Tranxalive on Mon, 26. Jun 23, 21:11, edited 2 times in total.

Tranxalive
EGOSOFT
EGOSOFT
Posts: 265
Joined: Mon, 14. Dec 20, 01:49
x4

Re: [Guide] How to Make Your Own Universe, From Scratch, For Dummies

Post by Tranxalive » Fri, 23. Jun 23, 01:29

Protogalaxy
Before we can jump into making entirely new sectors, we first have to understand how things work, and oftentimes, the best way to learn is to reverse engineer things.

Go to where your unpacked X4 is, the one that still has the .xmls. Don't worry, we'll be using the unpacked .daes later. Go to the 'maps' directory. It should be full of a few maps, such as (at the time of this post) xu_ep2_universe, the current map you play in, demo_universe, the one that you play in in the tutorial, and Station Design Simulator, and blackgalaxy.

We'll be using blackgalaxy, as it's a good simple example to use for a test map. Go ahead and copy it now.

Go back to your mod in the X4 that's still packed and ready to be played. Create a new folder where your content.xml is, and call it 'maps'. Enter it, and paste 'blackgalaxy' into it. But we're not going to be calling it that. Go ahead and name it whatever you like. Just make sure it's not too crazy of a name, as you might regret it later when you're typing it in later. Go into the folder you just renamed and take a look. There should be the following files:
  • 'blackcluster.xml'
  • 'blackgalaxy.xml'
  • 'blacksector.xml'
  • 'blackzone.xml'
You can rename these files to match the name of your map. I.E. 'testcluster', 'testgalaxy', etc. You may also wish to make cluster, sector, and zone plural, just for accuracy later, but it's not necessary.

(Note: I'll be referring to those files by their hierarchy placement, as I can't predict what names people will use.)
Open up 'galaxy.xml' in Notepad, and take a look.

It should look like this:

Code: Select all

<?xml version="1.0"?>
<macros xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <macro name="blackgalaxy_macro" class="galaxy">
    <component ref="standardgalaxy" />
    <connections>
      <connection name="Cluster_black_connection" ref="clusters">
        <macro ref="Cluster_black_macro" connection="galaxy" />
      </connection>
      <connection name="Cluster_black_wl_connection" ref="clusters">
        <macro ref="Cluster_black_wlight_macro" connection="galaxy" />
      </connection>
    </connections>
    <properties>
      <identification name="effect_universe" owner="argongovernment" />
    </properties>
  </macro>
</macros>
We're going to edit this to make sure it not only works, but follows our naming scheme. In general you'll want to edit these files kind of like this:

Code: Select all

<?xml version="1.0"?>
<macros xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <macro name="[NAME]galaxy_macro" class="galaxy">
    <component ref="standardgalaxy" />
    <connections>
      <connection name="Cluster_[NAME]_connection" ref="clusters">
        <macro ref="Cluster_[NAME]_macro" connection="galaxy" />
      </connection>
    </connections>
  </macro>
</macros>
You'll notice that I got rid of the 'w' connection, and the 'properties', this is because they really don't do anything. Change the '[NAME]'s to match the name of your map for easy reference.
It should look something like this:

Code: Select all

<?xml version="1.0"?>
<macros xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <macro name="testgalaxy_macro" class="galaxy">
    <component ref="standardgalaxy" />
    <connections>
      <connection name="Cluster_test_connection" ref="clusters">
        <macro ref="Cluster_test_macro" connection="galaxy" />
      </connection>
    </connections>
  </macro>
</macros>
Next, we're going to edit 'cluster.xml' (or clusters, if you made it plural.) Basically, replace 'black' with your map name. Also, get rid of each 'properties' and the 'w' part, as they're useless. It should look like this now:

Code: Select all

<?xml version="1.0"?>
<macros xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <macro name="Cluster_test_macro" class="cluster">
    <component ref="standardcluster" />
    <connections>
      <connection name="cluster_test_sector01_connection" ref="sectors">
        <offset>
          <position x="0" y="0" z="0" />
        </offset>
        <macro ref="cluster_test_sector01_macro" connection="cluster" />
      </connection>
      <connection ref="content">
        <macro>
          <component connection="space" ref="cluster_test" />
        </macro>
      </connection>
    </connections>
  </macro>
</macros>
Open up 'sector.xml' and 'zone.xml'. Do the same same thing; get rid of 'properties', and the 'w's, and change 'black' to your map name. After, that, congratulations! :D Your map has it's foundation made!

Edit: Make the 'Cluster' and 'Sector' lowercase in sector.xml, and cluster.xml for the sector macro, if you're using that format, as it causes a weird issue that causes the game not to see the sector. It might just be from me using 'test' as my map name, but do if it crashes, that's probably why. :)

Making Your Map Recognized By The Game
Go back to your main mod directory. It's time to allow the game to actually see your map, so we can actually enter it later.

Create a new folder and call it 'index'. Enter it, and create two .xml files. Name one 'components.xml', and the other 'macros.xml'. We'll start with 'components.xml' first. Open it up in notepad.
Copy and paste this into it.

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<!-- ?xml-stylesheet href="index.xsl" type="text/xsl" ? -->
<index>
	<entry name="cluster_[MAP NAME]" value="assets\environments\cluster\cluster_black"/>
</index>
Change the [MAP NAME] to your map name, but we'll keep 'cluster_black' as is for now. We'll be back to it soon enough. :wink:

Now, open up 'macros.xml', and copy and paste this into it:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<index>
	<entry name="[NAME]galaxy_macro" value="extensions\[MOD NAME]\maps\[MAP NAME]\[NAME]galaxy"/>
</index>
I think you understand what's happening here. That's right, it's typing time. Replace all the things surrounded by brackets with the correct paths.
It should look something like this:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<index>
	<entry name="testgalaxy_macro" value="extensions\test\maps\testgalaxy\testgalaxy"/>
</index>
And before you ask, no. That's not all the typing we'll be doing. Copy and paste these into the file.

Code: Select all

	<entry name="Cluster_[NAME]_macro" value="extensions\[MOD NAME]\maps\[MAP NAME]\[NAME]cluster"/>
	<entry name="cluster_[NAME]_sector01_macro" value="extensions\[MOD NAME]\maps\[MAP NAME]\[NAME]sector"/>
	<entry name="tzoneCluster_[NAME]_Sector01_Zone_macro" value="extensions\[MOD NAME]\maps\[MAP NAME]\[NAME]zone"/>
	<entry name="tzoneCluster_[NAME]_Sector01_Zone02_macro" value="extensions\[MOD NAME]\maps\[MAP NAME]\[NAME]zone"/>
You know what to do here. Once you're done, it should look something like this:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<index>
	<entry name="testgalaxy_macro" value="extensions\test\maps\testgalaxy\testgalaxy"/>
	<entry name="Cluster_test_macro" value="extensions\test\maps\testgalaxy\testcluster"/>
	<entry name="cluster_test_sector01_macro" value="extensions\test\maps\testgalaxy\testsector"/>
	<entry name="tzoneCluster_test_Sector01_Zone_macro" value="extensions\test\maps\testgalaxy\testzone"/>
	<entry name="tzoneCluster_test_Sector01_Zone02_macro" value="extensions\test\maps\testgalaxy\testzone"/>
</index>
And with that, our map now exists. Let's visit it, shall we?
Last edited by Tranxalive on Mon, 26. Jun 23, 21:11, edited 4 times in total.

Tranxalive
EGOSOFT
EGOSOFT
Posts: 265
Joined: Mon, 14. Dec 20, 01:49
x4

Re: [Guide] How to Make Your Own Universe, From Scratch, For Dummies

Post by Tranxalive » Fri, 23. Jun 23, 01:30

Visiting Your Map... Oh, Look! A Detour!!
That's right. As some Boron used to say: "It not that easy." :boron: ...it never is with Boron...

Unfortunately, X4 doesn't have a way to select maps, so we can't just load into it easily, but don't worry, there's a way to access it, and still keep the regular map(s) playable too!

Go back to your main mod directory, and create a new folder. Name it 'libraries'. Enter it, and create a new .xml file and name it 'gamestarts.xml'. Open it, and copy and paste this into the file.

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<gamestarts>

  <add sel="/gamestarts/groups">
    <group group="[NUMBER]" name="{[PAGE ID], [INDEX]}" />
  </add>

</gamestarts>
If you're interested in making custom gamestarts, this small bit is very important, as it ensures it won't override anything, and it'll only add to the list of options, even when they update the game with more.

Edit the [NUMBER], but leave [PAGE ID] and [INDEX] alone for now, we'll be back for it later. Make sure the number is at least more than 15, as it should hopefully not interfere with official content, and other player's mods.

Now, we're going to make our very own gamestart for testing. Go to the unpacked .xml assets and go into 'libraries', and look at 'gamestarts.xml'. Scroll down and find 'x4ep1_gamestart_flightschool'. It's nice and simple, and only needs slight modification. Copy and paste it into your mod's gamestarts.xml.

I'll simplify it for you, that we can understand things better.

Code: Select all

  <gamestart id="[NAME]" name="{[PAGE ID],[INDEX 2]}" description="{[PAGE ID],[INDEX 3]}" image="gamestart_flightschool" group="[NUMBER]">
    <info>
      <item name="{1021,8}" value="{[PAGE ID],[INDEX 4]}" />
      <item name="{1021,13}"  value="{1021,7013}" />
      <item name="{1021,9}"   value="{1021,51}" />
      <item />
      <item name="{1021,1}" value="{1021,43}" />
    </info>
    <cutscene ref="scenario_flightschool" voice="gamestart_flightschool_selected" />
    <type name="{1021,96}" description="{PAGE ID,INDEX 5}" />
    <player macro="character_player_scenario_combat_argon_macro" money="100000" name="{[PAGE ID],[INDEX 4]}">
      <inventory>
        <ware ware="weapon_gen_spacesuit_laser_01_mk1" amount="1" />
        <ware ware="weapon_gen_spacesuit_repairlaser_01_mk1" amount="1" />
        <ware ware="software_scannerobjectmk3" amount="1" />
      </inventory>
      <theme paint="painttheme_player_01" />
    </player>
    <universe ventures="false" visitors="false"/>
  </gamestart>
You know what to do, edit the bracket stuff, but leave the Page IDs, and Indices alone for now. It's actually unnecessary to edit them anyways, at least for the gamestart, it's just for organization and customization. You may have noticed, I took out the location part, don't worry, we'll replace the old one with something that works. I took it out, because the game will try to spawn us on a station that doesn't exist, so we'll need a ship.

Go back to the unpacked X4's gamestarts.xml, and let's take a new location section. You can find your own, or you can just use this:

Code: Select all

	<location galaxy="[MAP NAME]galaxy_macro" zone="cluster_[MAP NAME]_sector01_macro">
      <position x="0" y="0" z="0"/>
      <rotation yaw="0" pitch="0" roll="0"/>
    </location>
Copy it, and paste it after '<type'. Edit the stuff.

Now we'll need a ship. Again, you can take whatever, or use mine:

Code: Select all

      <ship macro="ship_par_s_fighter_01_a_macro">
        <loadout>
          <macros>
            <engine macro="engine_par_s_combat_01_mk1_macro" path="../con_engine_01" />
            <engine macro="engine_par_s_combat_01_mk1_macro" path="../con_engine_02" />
            <engine macro="engine_par_s_combat_01_mk1_macro" path="../con_engine_03" />
            <weapon macro="weapon_gen_s_laser_01_mk1_macro" path="../con_weapon_02" optional="true" />
            <weapon macro="weapon_gen_s_guided_01_mk1_macro" path="../con_weapon_01" optional="true" />
            <shield macro="shield_par_s_standard_01_mk1_macro" path="../con_shield_01" optional="true" />
          </macros>
          <ammunition>
            <ammunition macro="missile_guided_light_mk1_macro" exact="10" optional="true" />
            <ammunition macro="eq_arg_satellite_01_macro" exact="5" optional="true"/>
            <ammunition macro="env_deco_nav_beacon_t1_macro" exact="5" optional="true"/>
            <ammunition macro="eq_arg_resourceprobe_01_macro" exact="5" optional="true"/>
          </ammunition>
          <software>
            <software ware="software_targetmk1" />
          </software>
          <virtualmacros>
            <thruster macro="thruster_gen_s_allround_01_mk1_macro" />
          </virtualmacros>
        </loadout>
      </ship>
Copy and paste it after '<player', but before '<inventory>'.

Now, we'll deal with those pesky Page ID's and Indices.

Go back to your main mod directory and create a new folder, call it 't'. Yes, that's it. Just 't'. Enter it, and create a new .xml and call it just '0001.xml'. If you want to add different languages for your mod, there should be an explanation on how to do that on this forum, but we won't be getting into that for this guide.

Open it, and copy and paste this:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<diff>
	<add sel="/language">
		<page id="[PAGE ID]" title="[TITLE]" descr="[DESCRIPTION]" voice="yes">
			<t id="[INDEX]">[TEXT]</t>
		</page>
	</add>
</diff>
You know the drill. Be sure to make the Page ID high enough also, again, to ensure it doesn't override official and other modder's content. You'll also need to switch between your gamestarts.xml and this to make sure the numbers match. Add more "t"s as necessary. You can name the Titles, Descriptions, and Texts whatever you want.

Once you're done, '0001.xml' should look something like this:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<diff>
	<add sel="/language">
		<page id="755000" title="Test Gamestarts" descr="Test Gamestarts... description." voice="yes">
			<t id="10">Test Gamestarts</t>
			<t id="20">Test Gamestart</t>
			<t id="30">A Gamestart to test if things are working properly.</t>
			<t id="40">Dan Banna</t>
		</page>
	</add>
</diff>
...And your 'gamestarts.xml' should look something like this:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<gamestarts>

  <add sel="/gamestarts/groups">
    <group group="200" name="{755000, 10}" />
  </add>
  
  <gamestart id="test_start" name="{755000,20}" description="{755000,30}" image="gamestart_flightschool" group="200">
    <info>
      <item name="{1021,8}" value="{1021,7002}" />
      <item name="{1021,13}"  value="{1021,7013}" />
      <item name="{1021,9}"   value="{1021,51}" />
      <item />
      <item name="{1021,1}" value="{1021,43}" />
    </info>
    <cutscene ref="scenario_flightschool" voice="gamestart_flightschool_selected" />
    <type name="{1021,96}" description="{1021,97}" />
	<location galaxy="testgalaxy_macro" zone="cluster_test_sector01_macro">
      <position x="0" y="0" z="0"/>
      <rotation yaw="0" pitch="0" roll="0"/>
    </location>
    <player macro="character_player_scenario_combat_argon_macro" money="100000" name="{755000,[INDEX 4]}">
      <ship macro="ship_par_s_fighter_01_a_macro">
        <loadout>
          <macros>
            <engine macro="engine_par_s_combat_01_mk1_macro" path="../con_engine_01" />
            <engine macro="engine_par_s_combat_01_mk1_macro" path="../con_engine_02" />
            <engine macro="engine_par_s_combat_01_mk1_macro" path="../con_engine_03" />
            <weapon macro="weapon_gen_s_laser_01_mk1_macro" path="../con_weapon_02" optional="true" />
            <weapon macro="weapon_gen_s_guided_01_mk1_macro" path="../con_weapon_01" optional="true" />
            <shield macro="shield_par_s_standard_01_mk1_macro" path="../con_shield_01" optional="true" />
          </macros>
          <ammunition>
            <ammunition macro="missile_guided_light_mk1_macro" exact="10" optional="true" />
            <ammunition macro="eq_arg_satellite_01_macro" exact="5" optional="true"/>
            <ammunition macro="env_deco_nav_beacon_t1_macro" exact="5" optional="true"/>
            <ammunition macro="eq_arg_resourceprobe_01_macro" exact="5" optional="true"/>
          </ammunition>
          <software>
            <software ware="software_targetmk1" />
          </software>
          <virtualmacros>
            <thruster macro="thruster_gen_s_allround_01_mk1_macro" />
          </virtualmacros>
        </loadout>
      </ship>
      <inventory>
        <ware ware="weapon_gen_spacesuit_laser_01_mk1" amount="1" />
        <ware ware="weapon_gen_spacesuit_repairlaser_01_mk1" amount="1" />
        <ware ware="software_scannerobjectmk3" amount="1" />
      </inventory>
      <theme paint="painttheme_player_01" />
    </player>
    <universe ventures="false" visitors="false"/>
  </gamestart>

</gamestarts>
After that, we should be able to visit our map for real this time. ...I swear. :lol:

Mind Over Matter
Load up X4, and open the menu to start a new game. Our gamestart should be there now, go ahead and start a new game with it.

Hmm... There seems to be a problem with the lighting. Specifically, there is no lighting. Let's fix that. Fortunately, it's very easy to fix, we just need a background.

Go back to your main mod directory. Create a folder and call it 'assets'. Go into assets and create a new folder called 'environments'. Go into that, and create a folder called 'cluster'. Here's where the sector backgrounds are stored, it's a bit of a pain to create your own custom backgrounds, but it can be done. Create a new folder called 'macros' while you're here, but stay in cluster for a moment.

We're not going to dive into that yet though. For now, let's just use a background that's already made. Open your unpacked X4, (.xml variant) and go to assets, environments, and cluster. You can pick whichever one you want, just make sure the set matches. For example, I'll be taking 'Cluster_23'. You'll want to take the .xml, and the DATA.ANI file. After that take the _data folder. Then go into the macros folder, and take the macro for that, but you'll also want to scroll down and take the tCluster macro for it too.

After that, rename them to follow your scheme. Keep the DATA.ANI in all caps. I don't know if it matters, but just keep it that way for now.
Now, we get to edit the .xmls. Open each of them up, and replace the old names with the new ones. In the main .xml, edit the path so it leads to the new files. For the component references, change those so they match with the value you put in for the components.xml.

This...

Code: Select all

<component name="Cluster_23" class="celestialbody">
		<source geometry="assets\environments\cluster\Cluster_23_data"/>
		<layers>
...should become something like this!

Code: Select all

	<component name="test_01" class="celestialbody">
		<source geometry="extensions\test\assets\environments\cluster\cluster_test_01_data"/>
		<layers>
Be sure to keep the 't' in the "t file."

Now, go back to components.xml, and edit the path so it leads to our new .xml file. Next, go to macros.xml, and add in the new macros we just added. The regular and the 't' in the macros folder.

Once that's done, let's take a look at our sector now.

And congratulations! Your sector now has a background! Now, let's give our sector some properties to make it normal. :)
Last edited by Tranxalive on Mon, 26. Jun 23, 21:09, edited 4 times in total.

Tranxalive
EGOSOFT
EGOSOFT
Posts: 265
Joined: Mon, 14. Dec 20, 01:49
x4

Re: [Guide] How to Make Your Own Universe, From Scratch, For Dummies

Post by Tranxalive » Fri, 23. Jun 23, 01:30

Reserved: 3

Tranxalive
EGOSOFT
EGOSOFT
Posts: 265
Joined: Mon, 14. Dec 20, 01:49
x4

Re: [Guide] How to Make Your Own Universe, From Scratch, For Dummies

Post by Tranxalive » Fri, 23. Jun 23, 01:30

Reserved: 4

Tranxalive
EGOSOFT
EGOSOFT
Posts: 265
Joined: Mon, 14. Dec 20, 01:49
x4

Re: [Guide] How to Make Your Own Universe, From Scratch, For Dummies

Post by Tranxalive » Fri, 23. Jun 23, 01:31

Reserved: 5

Tranxalive
EGOSOFT
EGOSOFT
Posts: 265
Joined: Mon, 14. Dec 20, 01:49
x4

Re: [Guide] How to Make Your Own Universe, From Scratch, For Dummies

Post by Tranxalive » Fri, 23. Jun 23, 01:31

Reserved: 6

Tranxalive
EGOSOFT
EGOSOFT
Posts: 265
Joined: Mon, 14. Dec 20, 01:49
x4

Re: [Guide] How to Make Your Own Universe, From Scratch, For Dummies

Post by Tranxalive » Fri, 23. Jun 23, 01:31

Reserved: 7

Tranxalive
EGOSOFT
EGOSOFT
Posts: 265
Joined: Mon, 14. Dec 20, 01:49
x4

Re: [Guide] How to Make Your Own Universe, From Scratch, For Dummies

Post by Tranxalive » Fri, 23. Jun 23, 01:31

Reserved: 8

Tranxalive
EGOSOFT
EGOSOFT
Posts: 265
Joined: Mon, 14. Dec 20, 01:49
x4

Re: [Guide] How to Make Your Own Universe, From Scratch, For Dummies

Post by Tranxalive » Fri, 23. Jun 23, 01:32

Reserved: 9

Tranxalive
EGOSOFT
EGOSOFT
Posts: 265
Joined: Mon, 14. Dec 20, 01:49
x4

Re: [Guide] How to Make Your Own Universe, From Scratch, For Dummies

Post by Tranxalive » Fri, 23. Jun 23, 01:32

Reserved: 10

Kiran190
Posts: 5
Joined: Sat, 28. Oct 23, 07:13
x4

Re: [Guide] How to Make Your Own Universe, From Scratch, For Dummies

Post by Kiran190 » Mon, 30. Oct 23, 01:40

hi,plz come back, and finish your guide!!!

Candaan001
Posts: 51
Joined: Mon, 25. Oct 21, 06:33
x4

Re: [Guide] How to Make Your Own Universe, From Scratch, For Dummies

Post by Candaan001 » Mon, 30. Oct 23, 03:37

Kiran190 wrote:
Mon, 30. Oct 23, 01:40
hi,plz come back, and finish your guide!!!
I'll second this!
I actually got excited when I saw this post.

NitramAkloh
Posts: 47
Joined: Fri, 5. May 23, 09:56
x4

Re: [Guide] How to Make Your Own Universe, From Scratch, For Dummies

Post by NitramAkloh » Mon, 30. Oct 23, 18:09

I also hope for this. At least please the part that describes how to set up and connect jump gates. I still don't understand the logic behind it. :)

Tranxalive
EGOSOFT
EGOSOFT
Posts: 265
Joined: Mon, 14. Dec 20, 01:49
x4

Re: [Guide] How to Make Your Own Universe, From Scratch, For Dummies

Post by Tranxalive » Mon, 30. Oct 23, 20:13

I'll try to continue this guide, and learn how to properly set up a map. :)

I will admit that I was unfortunately distracted shortly after writing what I did, and I had a bunch of stuff to deal with. Sadly, I now have even more stuff to do, but if I remember to come back to this, I'll try to finish it. It's been a while, so I've forgotten a good bit of what I learned, it's a good thing I wrote it down! :D

So now I'm currently retracing my steps and getting back to where I was before. :)

Candaan001
Posts: 51
Joined: Mon, 25. Oct 21, 06:33
x4

Re: [Guide] How to Make Your Own Universe, From Scratch, For Dummies

Post by Candaan001 » Mon, 30. Oct 23, 23:47

Tranxalive wrote:
Mon, 30. Oct 23, 20:13
I'll try to continue this guide, and learn how to properly set up a map. :)

I will admit that I was unfortunately distracted shortly after writing what I did, and I had a bunch of stuff to deal with. Sadly, I now have even more stuff to do, but if I remember to come back to this, I'll try to finish it. It's been a while, so I've forgotten a good bit of what I learned, it's a good thing I wrote it down! :D

So now I'm currently retracing my steps and getting back to where I was before. :)
Thanks for your hard work Tranxalive.
If you want, make some rough notes on the process and I'm happy to have a go at building and adding my own notes.
I'm sure many others would have a go if they had a rough outline of the process.

NitramAkloh
Posts: 47
Joined: Fri, 5. May 23, 09:56
x4

Re: [Guide] How to Make Your Own Universe, From Scratch, For Dummies

Post by NitramAkloh » Tue, 31. Oct 23, 18:57

Glad to hear from you again. Take all the time that you need. No hurry please. 8)

Return to “X4: Foundations - Scripts and Modding”