How to design my own systems?

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

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

Post Reply
omti
Posts: 535
Joined: Sat, 5. Jun 04, 21:06
x4

How to design my own systems?

Post by omti » Thu, 3. Sep 20, 16:07

Hello everyone,

I've been thinking about getting into modding X4 and wanted to make some systems of my own. I just don't really have a clue where to start. Do you know if there's some helpful guide for this, or at least some hints for how to begin?
Ohne Neugier wäre die Menschheit immer noch in der Steinzeit oder nicht einmal dort!


Money implies poverty - Ian Banks: The State of the Art

User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13296
Joined: Sun, 15. Feb 04, 20:12
x4

Re: How to design my own systems?

Post by euclid » Thu, 3. Sep 20, 18:15

Hi omti,

I have not yet tried it myself but there is a Galaxy Creator by Killerog and Celludriel which may be what you are looking for. Besides, it's always a good idea to unpack the vanilla files (see sticky in this forum) to learn how the devs code things.

Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786

omti
Posts: 535
Joined: Sat, 5. Jun 04, 21:06
x4

Re: How to design my own systems?

Post by omti » Fri, 18. Sep 20, 22:10

euclid wrote:
Thu, 3. Sep 20, 18:15
Hi omti,

I have not yet tried it myself but there is a Galaxy Creator by Killerog and Celludriel which may be what you are looking for. Besides, it's always a good idea to unpack the vanilla files (see sticky in this forum) to learn how the devs code things.

Cheers Euclid
Hello,

I've tried the galaxy editor and allows you to create a galaxy, but sadly doesn't help with placing my own assets. That's actually where I'm stumped.

I think the actual asset placement is in assets\environments\cluster (please correct me if I'm wrong), but I can't find the actual models.

Asset Placement in Cluster_01:

Code: Select all

<?xml version="1.0"?>

-<components>


-<component class="celestialbody" name="Cluster_01">

<source geometry="assets\environments\cluster\Cluster_01_data"/>


-<layers>


-<layer>

<waypoints/>


-<lights>


-<omni name="XU Omni01" specularintensity="1" intensity="1" trigger="1" lenseffect="sun_c_01" lighteffect="1" shadowrange="1E+11" range="1E+11" b="255" g="214" r="178" shadow="0">

<lightanimations/>


-<offset>

<position z="3.047736E+08" y="1.62512E+08" x="3.636845E+07"/>

</offset>

</omni>


-<ambient name="XU Ambient001" intensity="1" range="1E+11" b="25" g="0" r="0">

<lightanimations/>


-<offset>

<position z="-1.795577E+08" y="0" x="-3.312582E+07"/>

</offset>

</ambient>

</lights>

</layer>

</layers>


-<connections>

<connection name="container" value="0" tags="contents"/>

<connection name="position" value="1" tags="position"/>


-<connection name="space" tags="celestialbody">

<offset/>

</connection>


-<connection name="Connection01" tags="part animation ">


-<offset>

<position z="-1.215998E+07" y="6283863" x="-8.47047E+07"/>

</offset>


-<animations>

<animation name="loop" end="540000" start="0"/>

</animations>


-<parts>


-<part name="anim_moon_v1">


-<lods>


-<lod index="0">


-<materials>

<material ref="newplanets.moon1_cluster_01" id="1"/>

</materials>

</lod>

</lods>


-<size>

<max z="1.588954E+07" y="1.588954E+07" x="1.588954E+07"/>

<center z="-5.859375" y="0" x="0"/>

</size>


-<size_raw>

<max z="1.588954E+07" y="1.588954E+07" x="1.588954E+07"/>

<center z="-5.859375" y="0" x="0"/>

</size_raw>

</part>

</parts>

</connection>


-<connection name="Connection02" tags="part ">


-<offset>

<position z="62.49999" y="0" x="-62.50001"/>

</offset>


-<parts>


-<part name="part_c14_bg">


-<lods>


-<lod index="0">


-<materials>

<material ref="p1.p1_env_bg_vertexcolor" id="1"/>

</materials>

</lod>

</lods>


-<size>

<max z="5.958535E+08" y="5.967806E+08" x="5.958535E+08"/>

<center z="1.490116E-05" y="0" x="0"/>

</size>

</part>

</parts>

</connection>


-<connection name="Connection03" tags="part ">


-<offset>

<position z="8100447" y="31.25" x="1.226125E+07"/>

</offset>


-<parts>


-<part name="Background">


-<lods>


-<lod index="0">


-<materials>

<material ref="p1.backgroundstars" id="1"/>

</materials>

</lod>

</lods>


-<size>

<max z="4.214036E+08" y="4.25545E+08" x="4.214036E+08"/>

<center z="6.835938" y="0" x="-19.53125"/>

</size>

</part>

</parts>

</connection>


-<connection name="Connection04" tags="part ">


-<offset>

<position z="-1.828789E+07" y="2.607525E+07" x="-2.168762E+07"/>

</offset>


-<parts>


-<part name="smallstar001">


-<lods>


-<lod index="0">


-<materials>

<material ref="p1.staratlas_additive" id="1"/>

</materials>

</lod>

</lods>


-<size>

<max z="3.813411E+08" y="4.325801E+08" x="3.960037E+08"/>

<center z="1.492985E+07" y="3.162189E+07" x="4619483"/>

</size>

</part>

</parts>

</connection>


-<connection name="Connection05" tags="part ">


-<offset>

<position z="2.5291E+07" y="3.966184E+07" x="2.614588E+07"/>

</offset>


-<parts>


-<part name="mediumstar001">


-<lods>


-<lod index="0">


-<materials>

<material ref="p1.staratlas_additive" id="1"/>

</materials>

</lod>

</lods>


-<size>

<max z="3.788643E+08" y="3.557638E+08" x="3.839457E+08"/>

<center z="-2.645953E+07" y="-3.26785E+07" x="-1.38368E+07"/>

</size>

</part>

</parts>

</connection>


-<connection name="Connection06" tags="part ">


-<offset>

<position z="1.932195E+07" y="9507861" x="-1.942081E+07"/>

</offset>


-<parts>


-<part name="bigstar001">


-<lods>


-<lod index="0">


-<materials>

<material ref="p1.staratlas_additive" id="1"/>

</materials>

</lod>

</lods>


-<size>

<max z="3.96179E+08" y="3.429579E+08" x="3.793283E+08"/>

<center z="-555076.2" y="-1221346" x="2.009035E+07"/>

</size>

</part>

</parts>

</connection>


-<connection name="Connection07" tags="part ">


-<offset>

<position z="1.181007E+08" y="-1.341091E+07" x="-2374727"/>

</offset>


-<parts>


-<part name="nebula001">


-<lods>


-<lod index="0">


-<materials>

<material ref="p1.staratlas_additive" id="1"/>

</materials>

</lod>

</lods>


-<size>

<max z="7.035453E+08" y="8.13662E+08" x="8.185373E+08"/>

<center z="-9.536984E+07" y="9.768488E+07" x="1.179926E+07"/>

</size>

</part>

</parts>

</connection>


-<connection name="Connection08" tags="part ">


-<offset>

<position z="1.479708E+08" y="1.899423E+07" x="1.251025E+08"/>

<quaternion qw="-0.9672359" qz="-0.1035581" qy="0.2222116" qx="0.0659738"/>

</offset>


-<parts>


-<part name="planet001">


-<lods>


-<lod index="0">


-<materials>

<material ref="newplanets.planet_cluster01_gasgiant" id="1"/>

</materials>

</lod>

</lods>


-<size>

<max z="5E+07" y="5E+07" x="5E+07"/>

<center z="0" y="1.953125" x="0"/>

</size>


-<offset>

<position z="-31.25" y="-3.90625" x="7.8125"/>

</offset>

</part>

</parts>

</connection>


-<connection name="Connection09" tags="part ">


-<offset>

<position z="1.479708E+08" y="1.899423E+07" x="1.251025E+08"/>

<quaternion qw="-0.9672359" qz="-0.1035581" qy="0.2222116" qx="0.0659738"/>

</offset>


-<parts>


-<part name="Sphere001">


-<lods>


-<lod index="0">


-<materials>

<material ref="newplanets.atmo_cluster01_gasgiant" id="1"/>

</materials>

</lod>

</lods>


-<size>

<max z="5.123737E+07" y="5.125E+07" x="5.123736E+07"/>

<center z="0" y="1.953125" x="0"/>

</size>


-<offset>

<position z="-31.25" y="5.859375" x="7.8125"/>

</offset>

</part>

</parts>

</connection>


-<connection name="Connection10" tags="part ">


-<offset>

<position z="1.479708E+08" y="1.899423E+07" x="1.251025E+08"/>

<quaternion qw="-0.9913649" qz="-8.199835E-02" qy="-4.602822E-02" qx="9.139679E-02"/>

</offset>


-<parts>


-<part name="Object441">


-<lods>


-<lod index="0">


-<materials>

<material ref="newplanets.rings_cluster01_gasgiant" id="1"/>

</materials>

</lod>

</lods>


-<size>

<max z="2E+08" y="1812.668" x="1.999565E+08"/>

<center z="-64187.5" y="358341.8" x="-63085.94"/>

</size>


-<offset>

<position z="15.625" y="5.859375" x="0"/>

</offset>

</part>

</parts>

</connection>

</connections>

</component>

</components>
What's Cluster_01 anyway? Argon Prime?
Ohne Neugier wäre die Menschheit immer noch in der Steinzeit oder nicht einmal dort!


Money implies poverty - Ian Banks: The State of the Art

Realspace
Posts: 1374
Joined: Wed, 15. Nov 06, 10:21
x4

Re: How to design my own systems?

Post by Realspace » Tue, 26. Jan 21, 10:12

Cluster's ids and names are in the defaultmap.xml, the vanilla one. SV has its own

Crekkan
Posts: 25
Joined: Tue, 10. Dec 13, 22:32
x4

Re: How to design my own systems?

Post by Crekkan » Tue, 2. Feb 21, 22:30

The game seriously needs an official galaxy editor : (

BigDangHero
Posts: 6
Joined: Sat, 25. Mar 23, 09:32
x4

Re: How to design my own systems?

Post by BigDangHero » Tue, 4. Apr 23, 00:26

I am learning the same things as omti from 2020, but also finding few resources.

What I have learned:

assets/environments/cluster is where the collision mesh .xmf files and actual placement in the cluster background happen.

assets\textures\environments is where the textures come from, and appear to line up with the <materials> tags in the cluster XMLs. (In the XML they are usually prefixed with newplanets. and have a _cluster_XX suffix in the tag.)

I assume some compiling happens to combine the textures (diff/bump/gradient/clouds/citymap/atmo) into the .xmf, and know that blender and a converter salvaged from the below thread are probably involved.
viewtopic.php?f=129&t=360045#p4308264
Khaak_Slayer wrote:
Thu, 15. Jul 21, 01:38
Edit: https://drive.google.com/file/d/0B5I84p ... _hAdPaa-DQ

This is the 0.2.1 release if anyone else is looking for it.

Doesn't appear to work though. Is there no other way to convert xmf files for editing?
CodeMonkey128 wrote:
Thu, 20. Jan 22, 00:10
Here is a link I found to the source code on reddit that worked for me:

https://cdn.discordapp.com/attachments/ ... .1_src.zip
In game there are blue, teal, and brown/rust gas giants. I assume they are all using the same assets mixed together with different gradient settings.

A walkthrough from someone who has done this (omti if you found your answers over the last two years) would be great!

Dr Reed
Posts: 76
Joined: Fri, 30. Nov 18, 00:05
x4

Re: How to design my own systems?

Post by Dr Reed » Tue, 4. Apr 23, 17:10

Are you looking to use X4 game assets to sculpt new sectors or are you trying to make your own backgrounds and planets ?

BigDangHero
Posts: 6
Joined: Sat, 25. Mar 23, 09:32
x4

Re: How to design my own systems?

Post by BigDangHero » Tue, 4. Apr 23, 23:38

I don't pretend to have any blender skills, so my goal is to use the assets to make new sectors.

I'm learning and getting better.

Post Reply

Return to “X4: Foundations - Scripts and Modding”