[WIP][Tutorial] Building your own ship for dummies 2

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

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

User avatar
Axeface
Posts: 2944
Joined: Fri, 18. Nov 05, 00:41
x4

Re: [WIP][Tutorial] Building your own ship for dummies

Post by Axeface » Sun, 9. Aug 20, 19:37

Kartoffeltorte wrote:
Sun, 9. Aug 20, 05:17
X2-Illuminatus wrote:
Sat, 8. Aug 20, 14:55
*merged with tutorial topic*

If you read a page back, you'll notice that the same error has been reported by ALEX Bemelmans not long ago with a suggestion by BrummBear02 how to fix it and ALEX Bemelmans posting their solution.
Well I tried that, and a lot of other stuff that got proposed, but nothing actually worked. I managed to get the Export batch working once, it created a folder with incomplete Data and a xml, which resulted in nothing actually appearing ingame tho. Not sure how that even created anything, since when I tried it again with the same files, but then got the same error as before.
I played around with that a bit, but the error kept popping up, and when i just deleted everything from that object, it gave me an error for a different object...
I don't know if I just managed to horribly screw something up in the model, resulting in XRConverter having an exestencial crisis, but if someone else that actually knows what they are doing wants to try exporting it themself, have a shot.

https://www.dropbox.com/s/e4vutl9veogpi ... h.dae?dl=0
I got a successful export after doing what I said above, I had to remove a couple of left over materials 'dots stroke' and 'material' from the display mode > blender file > materials dropdown in the outliner.
Oh, also there were some loose verts and edges. Oh, and hillariously, I got a successful export and convert from blender 2.8.... something that never works for me.
Edit: lol brummbear beat me to it by seconds.

BrummBear02
Posts: 308
Joined: Fri, 3. Oct 08, 20:43
x3ap

Re: [WIP][Tutorial] Building your own ship for dummies

Post by BrummBear02 » Sun, 9. Aug 20, 19:44

Axeface wrote:
Sun, 9. Aug 20, 19:37
Kartoffeltorte wrote:
Sun, 9. Aug 20, 05:17
X2-Illuminatus wrote:
Sat, 8. Aug 20, 14:55
*merged with tutorial topic*

If you read a page back, you'll notice that the same error has been reported by ALEX Bemelmans not long ago with a suggestion by BrummBear02 how to fix it and ALEX Bemelmans posting their solution.
Well I tried that, and a lot of other stuff that got proposed, but nothing actually worked. I managed to get the Export batch working once, it created a folder with incomplete Data and a xml, which resulted in nothing actually appearing ingame tho. Not sure how that even created anything, since when I tried it again with the same files, but then got the same error as before.
I played around with that a bit, but the error kept popping up, and when i just deleted everything from that object, it gave me an error for a different object...
I don't know if I just managed to horribly screw something up in the model, resulting in XRConverter having an exestencial crisis, but if someone else that actually knows what they are doing wants to try exporting it themself, have a shot.

https://www.dropbox.com/s/e4vutl9veogpi ... h.dae?dl=0
I got a successful export after doing what I said above, I had to remove a couple of left over materials 'dots stroke' and 'material' from the display mode > blender file > materials dropdown in the outliner.
Oh, also there were some loose verts and edges. Oh, and hillariously, I got a successful export and convert from blender 2.8.... something that never works for me.
Edit: lol brummbear beat me to it by seconds.
call me speedy gonazles.
Gebt mir einen Spiegel dann schlage ich ihn mit seinem eigenen Gesicht

User avatar
Kartoffeltorte
Posts: 4
Joined: Fri, 28. Dec 18, 15:02
x4

Re: [WIP][Tutorial] Building your own ship for dummies

Post by Kartoffeltorte » Sun, 9. Aug 20, 22:17

Finally got it to export aswell, but still not able to make it appear ingame. The debug log spews out a ton of errors all saying
[=ERROR=] 63.51 AssetManager::GetAssetIntern() invalid handle(255:16777215)
[General] 63.51 ======================================
[General] 63.51 ======================================
[=ERROR=] 63.51 [Mesh::Mesh] could not find a valid meshsource for mesh heavy_behemoth_data\fx_licence01-lod0.xmf!
with every single mesh that dares to exist having its own error. I assume that that is not quite how it's supposed to be.
discord is most likely the place you want to go with your failed model.
I also tried the Discord, but no one responded to the errors I ran into, if you don't mind I could DM you directly on Discord, would probably be more convenient than creating a new post on the forum every 12 hours.

BrummBear02
Posts: 308
Joined: Fri, 3. Oct 08, 20:43
x3ap

Re: [WIP][Tutorial] Building your own ship for dummies

Post by BrummBear02 » Sun, 9. Aug 20, 23:03

Kartoffeltorte wrote:
Sun, 9. Aug 20, 22:17
Finally got it to export aswell, but still not able to make it appear ingame. The debug log spews out a ton of errors all saying
[=ERROR=] 63.51 AssetManager::GetAssetIntern() invalid handle(255:16777215)
[General] 63.51 ======================================
[General] 63.51 ======================================
[=ERROR=] 63.51 [Mesh::Mesh] could not find a valid meshsource for mesh heavy_behemoth_data\fx_licence01-lod0.xmf!
with every single mesh that dares to exist having its own error. I assume that that is not quite how it's supposed to be.
discord is most likely the place you want to go with your failed model.
I also tried the Discord, but no one responded to the errors I ran into, if you don't mind I could DM you directly on Discord, would probably be more convenient than creating a new post on the forum every 12 hours.
the errors are most likely because u messed up your path in the xml.

for discord: PM or tag me. i dont watch the channel a lot ;)
Gebt mir einen Spiegel dann schlage ich ihn mit seinem eigenen Gesicht

aurumgallente
Posts: 121
Joined: Sun, 14. Jun 20, 14:45
x4

Re: [WIP][Tutorial] Building your own ship for dummies

Post by aurumgallente » Fri, 11. Sep 20, 17:27

Can you add information about naming rules for parts and required structure of new part? I want to add another part to my ship. To do this I created new empty and changed its name to "anim_merc37". After this I added to that empty another empty with name "anim_merc37Xlod0" and attached to it my part "anim_merc37Xlod0genericXgeneric_p1_hulltexture" with the same name for its geometry. After that I added material with name "generic_p1_hulltexture.001". This part was added to xml file and anim_merc37-lod0.xmf file was generated but ship disappeared from the game.
Image

EDIT
I figured out that I can't use digits without underscore. "anim_m09" doesn't work but "anim_thruster_00" works.

Tsnonak
Posts: 3
Joined: Thu, 16. Nov 17, 10:32
x3tc

Re: [WIP][Tutorial] Building your own ship for dummies

Post by Tsnonak » Sat, 12. Dec 20, 15:09

This is one of the best posts regarding importing ships, I imagine many are interested even if they do not participate...
Hats off to BrummBear!
Bump!
aurumgallente wrote:
Fri, 11. Sep 20, 17:27
Can you add information about naming rules for parts and required structure of new part? I want to add another part to my ship. To do this I created new empty and changed its name to "anim_merc37". After this I added to that empty another empty with name "anim_merc37Xlod0" and attached to it my part "anim_merc37Xlod0genericXgeneric_p1_hulltexture" with the same name for its geometry. After that I added material with name "generic_p1_hulltexture.001". This part was added to xml file and anim_merc37-lod0.xmf file was generated but ship disappeared from the game.
Image

EDIT
I figured out that I can't use digits without underscore. "anim_m09" doesn't work but "anim_thruster_00" works.
I can only suggest; study the extracted files (part-names) and follow those naming-rules "exactly", as well as all other parts.
Best case senario would be to use an original extracted file and "dummy in/replace" with new stuffs.

I'm also just starting out so I am unsure of anything yet... please do share how it goes!

@BrummBear Texture-pipeline would be a good compliment to modeling!

Darcanlos
Posts: 4
Joined: Sun, 2. Dec 18, 11:34
x4

Re: [WIP][Tutorial] Building your own ship for dummies

Post by Darcanlos » Wed, 6. Jan 21, 02:32

Hi. Great tutorial, thanks!

I'm completely new to this and need some help. I'm trying to do a simple mesh modification into one of the ships,but as I'm learning Blender as I go, I might have messed up somewhere. Exported the ship correctly and made a small edit into the mesh in Blender. Could convert back to game format after having several errors that where solved through cleaning, and finally placed the modified files as a mod into the game. Now, my problem is that although the game recognizes the mod and has it active, my changes aren't on the ship. Not sure if it's not loading it. I might have messed up the folder structure or forgotten something?

Created a mod folder under extensions and included a context.xml. Then added the sub folders pointing to the ship: X4 Foundations\extensions\shipinteriors\assets\units\size_s\ship_arg_s_fighter_02_data

Inside that folder I only included the modified files, anim_cockpit-collision.xmf and anim_cockpit-lod0.xmf

Do I need to add the rest of the ship files or do something else if I'm only trying to modify a vanilla ship and not add a new one? Anything else I could be missing?

Thanks for any help!

aurumgallente
Posts: 121
Joined: Sun, 14. Jun 20, 14:45
x4

Re: [WIP][Tutorial] Building your own ship for dummies

Post by aurumgallente » Wed, 6. Jan 21, 06:20

To see your changes you need completely override vanilla ship or make another one. You can't "patch" a ship by including only parts of it in your mod. You can patch only stats of the ship in this way. First, I would copy your "ship_arg_s_fighter_02_data" ship as separate entity with its unique macro and component file, entry in "wares.xml" file and (unnecessary) entry in language file. After that ensure that game recognizes your new ship, launch the game and check if you can see it at wharf, if everything is OK, there will be extra ship model you added. After that replace in your "ship_arg_s_fighter_02_data" folder files you have changed.

Usually it is faster to get an answer at Discord, there always is somebody who knows basics of working with Blender and structure of folders.

Darcanlos
Posts: 4
Joined: Sun, 2. Dec 18, 11:34
x4

Re: [WIP][Tutorial] Building your own ship for dummies

Post by Darcanlos » Wed, 6. Jan 21, 11:16

Thank you very much for the fast answer. So modifying a vanilla ship is not possible then. Will create a new one and try it like this. I will look into discord as well if I hit more problems, which I sure will...

User avatar
Axeface
Posts: 2944
Joined: Fri, 18. Nov 05, 00:41
x4

Re: [WIP][Tutorial] Building your own ship for dummies

Post by Axeface » Thu, 7. Jan 21, 00:04

Darcanlos wrote:
Wed, 6. Jan 21, 11:16
Thank you very much for the fast answer. So modifying a vanilla ship is not possible then. Will create a new one and try it like this. I will look into discord as well if I hit more problems, which I sure will...
Is the change just a model change? You should actually be able to override the stock models just like I do in my engine tint mod.
Try packing your (model) files in a subst_01.dat/dat archive instead of leaving them as loose files, make sure the folder structure and names all match the stock ones.

Darcanlos
Posts: 4
Joined: Sun, 2. Dec 18, 11:34
x4

Re: [WIP][Tutorial] Building your own ship for dummies

Post by Darcanlos » Thu, 7. Jan 21, 08:20

Axeface wrote:
Thu, 7. Jan 21, 00:04
Darcanlos wrote:
Wed, 6. Jan 21, 11:16
Thank you very much for the fast answer. So modifying a vanilla ship is not possible then. Will create a new one and try it like this. I will look into discord as well if I hit more problems, which I sure will...
Is the change just a model change? You should actually be able to override the stock models just like I do in my engine tint mod.
Try packing your (model) files in a subst_01.dat/dat archive instead of leaving them as loose files, make sure the folder structure and names all match the stock ones.
Thanks! Will try this. It's just a model change, yes. Hope this works!

BrummBear02
Posts: 308
Joined: Fri, 3. Oct 08, 20:43
x3ap

Re: [WIP][Tutorial] Building your own ship for dummies

Post by BrummBear02 » Thu, 7. Jan 21, 09:21

on a side note, since you will run into this issue sooner or later, you most likely cant edit the cockpit collision. it will make your game crash. so leave it alone and add the edited part to the part_main or anim_main file. that works.
Gebt mir einen Spiegel dann schlage ich ihn mit seinem eigenen Gesicht

ScarabParamit
Posts: 4
Joined: Thu, 15. Apr 21, 07:39

Re: [WIP][Tutorial] Building your own ship for dummies

Post by ScarabParamit » Wed, 21. Apr 21, 10:01

Very helpfull ...but what about this interesting "Moving connections around and other XML file stuff" ...?

I kind of got .xml figured out, but connections i didn't touch yet and will just have to use super powers of reverse engineering also known by ancient sorcerers as "copypasta" ritual.
In worst case scenario like with 90% of subject in life ...test & trial paid in time blood, sweat & tears...and high power bills.

As i see it... for now at least, i can either modify ships on .xmf level, fusing them together and do not even need any ship .xml edits... or slowly reverse engineer other connected parts and paste their duplicates to same ship .xml file as long as connections have proper naming?

first one seems only way to bring new ships while second seems like good way to expand and modify existing ships if one build proper repository of ingame elements ...wonder how it is with optmisation.

aurumgallente
Posts: 121
Joined: Sun, 14. Jun 20, 14:45
x4

Re: [WIP][Tutorial] Building your own ship for dummies

Post by aurumgallente » Fri, 23. Apr 21, 14:14

Every connection is a part of a ship. It can be visible or invisible to a player. For example, landing gears are visible, position of pilot's eyes is invisible, trail emmitters are visible only when ship is moving. For most of connections it's obvious what it is, some of them are ship details, others are slots for shields and weapons.
For optimization you need to make 3 versions for every ship part. lod0 is the heaviest and visible from point blank range. lod3 is the most primitive and visible from afar. Some tags can make a difference - look at small parts and decoration elements, they are not visible from some range.

User avatar
Axeface
Posts: 2944
Joined: Fri, 18. Nov 05, 00:41
x4

Re: [WIP][Tutorial] Building your own ship for dummies

Post by Axeface » Sat, 24. Apr 21, 15:36

Does anyone know how we can avoid conflicts with page id="x"? (with other mods)

XOSPECTRE

Re: [WIP][Tutorial] Building your own ship for dummies

Post by XOSPECTRE » Fri, 24. Feb 23, 11:28

Cant make that xr converter running created 2 bat files and what next tutorial sais its nake but how should i associated xnl files or just click on that fules whith do nothing just open cmd whith that command and pause on the end . How to extract models to dae ? This tutorial obiviously forget some between steps

XOSPECTRE

Re: [WIP][Tutorial] Building your own ship for dummies

Post by XOSPECTRE » Fri, 24. Feb 23, 13:07

Ok i created video exactly what im doing whith patch and folders please can someone refer what im doing wrong i cant create dae files im frustrated :rant:

Video follows https://youtu.be/Mh48YZOM8DM

Mikalichou
Posts: 5
Joined: Fri, 21. Apr 23, 10:36

Re: [WIP][Tutorial] Building your own ship for dummies

Post by Mikalichou » Mon, 24. Apr 23, 07:11

BrummBear02 wrote:
Mon, 18. Feb 19, 23:28
Hello Forks,

Ill try to create a complete walkthrough to creat an S sized ship that fully works.
Bit of a shot in the dark, but all the screenshots in your original post don't seem to be available anymore (only the thumbnails)

Any chance you still have the originals?

BrummBear02
Posts: 308
Joined: Fri, 3. Oct 08, 20:43
x3ap

Re: [WIP][Tutorial] Building your own ship for dummies

Post by BrummBear02 » Mon, 24. Apr 23, 21:35

weird. dont know why that happened. they are still there. just remove the last letter before the .png

https://i.imgur.com/n97CIP6t.png -> https://i.imgur.com/n97CIP6.png
Gebt mir einen Spiegel dann schlage ich ihn mit seinem eigenen Gesicht

User avatar
THE_TrashMan
Posts: 723
Joined: Mon, 25. Apr 11, 12:05
x4

Re: [WIP][Tutorial] Building your own ship for dummies

Post by THE_TrashMan » Thu, 27. Apr 23, 12:11

I'm looking at the Boron examaples from Egosoft. FFS, why is it 300 Mb? All textures?

I see capital ships have no bridge model, but a marker. I assume the ship model is loaded into that place? Can we make new bridges? New landing gear?
- Burning with Awesomeness

- Pontifex Maximus Panaidia Est Canicula Infernalis

Post Reply

Return to “X4: Foundations - Scripts and Modding”