[WIP] Custom Ship mod - Help needed!

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

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

linolafett
EGOSOFT
EGOSOFT
Posts: 3544
Joined: Mon, 26. Mar 12, 14:57
x4

Re: [WIP] Custom Ship mod - Help needed!

Post by linolafett »

A thing for you to know:
If ships are longer than 2km and docking sideways, then they will clip into each other when docked at the pier which looks like a fork.
Maybe scale your ship a little bit down to avoid this issue.
01001100 01101001 01101110 01100101 01110011 00100000 01101111 01100110 00100000 01110100 01101001 01101101 01100101 01110011 00101110 00101110 00101110

My art stuff
User avatar
Cadius
Posts: 979
Joined: Fri, 5. Dec 08, 12:41
x3tc

Re: [WIP] Custom Ship mod - Help needed!

Post by Cadius »

linolafett wrote: Thu, 28. Feb 19, 17:44 A thing for you to know:
If ships are longer than 2km and docking sideways, then they will clip into each other when docked at the pier which looks like a fork.
Maybe scale your ship a little bit down to avoid this issue.
Yeah i was kinda worried about that and ai pathfinding. The ship has been adjusted to about the length/width of the colossus.
User avatar
KrYcHokE
Posts: 263
Joined: Wed, 2. Dec 15, 13:15
x4

Re: [WIP] Custom Ship mod - Help needed!

Post by KrYcHokE »

Or do the front docking.
linolafett
EGOSOFT
EGOSOFT
Posts: 3544
Joined: Mon, 26. Mar 12, 14:57
x4

Re: [WIP] Custom Ship mod - Help needed!

Post by linolafett »

Front docking will not completely get rid of the issue, as the ships will at some point rotate to fly away from the dock, but thats mostly a bit further away from the station and will probably work for that ship, its not massively too big. Even larger ships will run into these issues more often.
01001100 01101001 01101110 01100101 01110011 00100000 01101111 01100110 00100000 01110100 01101001 01101101 01100101 01110011 00101110 00101110 00101110

My art stuff
BrummBear02
Posts: 310
Joined: Fri, 3. Oct 08, 20:43
x3ap

Re: [WIP] Custom Ship mod - Help needed!

Post by BrummBear02 »

Cadius wrote: Thu, 28. Feb 19, 17:21
Once exported back into .dae how do I convert it back into .xml? I've tried using a .bat with the export script BrummBear02 posted in the tutorial but it doesn't seem to work.

Code: Select all

FOR /R "..\X4Mod\extensions\xtra_shippack\" %%f IN (*.xml) do (
  XRConvertersMain.exe exportxmf "..\X4Mod" "%%f"
  )
pause


scrolling through the cmd, it seems that XRConverter isn't detecting the .dae. What am I doing wrong here?

Code: Select all

FOR /R "..\X4Mod\extensions\xtra_shippack\" %%f IN (*.dae) do (
  XRConvertersMain.exe exportxmf "..\X4Mod" "%%f"
  )
pause
u are trying to export a xmf. use this.

thats why id like people to tell me when they work with my tutorial. so i can find those small errors of mine ;)
Gebt mir einen Spiegel dann schlage ich ihn mit seinem eigenen Gesicht
User avatar
Cadius
Posts: 979
Joined: Fri, 5. Dec 08, 12:41
x3tc

Re: [WIP] Custom Ship mod - Help needed!

Post by Cadius »

alright it's detecting the dae now, but ran into an issue with textcoord
Image

I suspect it's because I didn't select UV Textures when exporting from blend to dae. I'm using Blender 2.8 and can't find the option though
Image
BrummBear02
Posts: 310
Joined: Fri, 3. Oct 08, 20:43
x3ap

Re: [WIP] Custom Ship mod - Help needed!

Post by BrummBear02 »

you are right on whats causing the error. but im on blend stable build 2.7something so i cant help u with that. i recomend using that ;) as far as i know its not that different from 2.8 since the updates focus on rendering stuff
Gebt mir einen Spiegel dann schlage ich ihn mit seinem eigenen Gesicht
User avatar
Cadius
Posts: 979
Joined: Fri, 5. Dec 08, 12:41
x3tc

Re: [WIP] Custom Ship mod - Help needed!

Post by Cadius »

well, thats throwing a wrench into my work. I've switched over to blender 2.79, the controls feel kinda awkward and it can't open the models I made in 2.8. And for some reason I can't view the model with the textures in the viewport.

Edit: nevermind, textures work fine in 2.79, I just forgot to add a light source
User avatar
mr.WHO
Posts: 9119
Joined: Thu, 12. Oct 06, 17:19
x4

Re: [WIP] Custom Ship mod - Help needed!

Post by mr.WHO »

Holy crap! It's Cadius!
Dude you made my favorite ship pack for X3. Great to see you again for X4!

That new XL battleship fits X4 Argon very well.
User avatar
Cadius
Posts: 979
Joined: Fri, 5. Dec 08, 12:41
x3tc

Re: [WIP] Custom Ship mod - Help needed!

Post by Cadius »

Okay so i've successfully exported using Blender 2.79, but then hit another snag when converting the dae.
Image
what do i do?
mr.WHO wrote: Fri, 1. Mar 19, 12:39 Holy crap! It's Cadius!
Dude you made my favorite ship pack for X3. Great to see you again for X4!

That new XL battleship fits X4 Argon very well.
Hey man, glad to hear it thanks. Yeah I feel despite its flaws, X4 has a lot of potential -reminds me of X3 Reunion at launch.
BrummBear02
Posts: 310
Joined: Fri, 3. Oct 08, 20:43
x3ap

Re: [WIP] Custom Ship mod - Help needed!

Post by BrummBear02 »

you should really join discord ^^

you need to clean up your model.

press tab to go edit mode, press A to select everything, left bottom press mesh, press clean up, press delete loose.
then enter UV editing if u made changes to UV maps, klick in 3d view part and select all. (pressing A again) then select the UV map and unlink it again. now export.

[ external image ]
[ external image ]

also u can stay at 2.8 if its that bad for you to switch down to 2.7x but then ull have to play around till u find the correct export options ^^
Gebt mir einen Spiegel dann schlage ich ihn mit seinem eigenen Gesicht
User avatar
Cadius
Posts: 979
Joined: Fri, 5. Dec 08, 12:41
x3tc

Re: [WIP] Custom Ship mod - Help needed!

Post by Cadius »

Thanks Brumm, I got the model ingame now but i think I messed up something since the ship looks rusty AF.
https://i.imgur.com/LYeLXeV.jpg


{Images posted directly to the forums should not be greater than 640x480 or 100kb, oversize image now linked - Terre}
User avatar
Matterom
Posts: 424
Joined: Thu, 20. Aug 09, 08:17
x4

Re: [WIP] Custom Ship mod - Help needed!

Post by Matterom »

Cadius wrote: Sat, 2. Mar 19, 06:04 Thanks Brumm, I got the model ingame now but i think I messed up something since the ship looks rusty AF.
Do you have one rendered outside the build menu? maybe with a skin?? The build menu can have odd texture artifacting, though.. never usually with a default skin.
My Mods:
Sector Administration: A Tax Mod
User avatar
Cadius
Posts: 979
Joined: Fri, 5. Dec 08, 12:41
x3tc

Re: [WIP] Custom Ship mod - Help needed!

Post by Cadius »

I messed up the vertex coloring, fixed it now and it appears correctly in the build menu. Now coding issues i think, I got the ship in the build menu but when i build it the shipyard doesn't complete the construction. The timer jumps straight to 0.00 and sits there. The shipyard isn't lacking resources since it says Everything is OK in the build menu.
BrummBear02
Posts: 310
Joined: Fri, 3. Oct 08, 20:43
x3ap

Re: [WIP] Custom Ship mod - Help needed!

Post by BrummBear02 »

its been a while since i ran into that issze. its defenitly something in the ship XML or macro file. sadly i cant tell u the exact cause, id need to take a look on the files.
Gebt mir einen Spiegel dann schlage ich ihn mit seinem eigenen Gesicht
User avatar
mr.WHO
Posts: 9119
Joined: Thu, 12. Oct 06, 17:19
x4

Re: [WIP] Custom Ship mod - Help needed!

Post by mr.WHO »

I wonder how much work is needed for mod made ship to work with ingame "paint mods"?
I mean there is 50+ paints, so you need to made them all work one by one or there is some kind of template, so that you just need to texture ship once and it will work with all paint mods?
User avatar
KrYcHokE
Posts: 263
Joined: Wed, 2. Dec 15, 13:15
x4

Re: [WIP] Custom Ship mod - Help needed!

Post by KrYcHokE »

All paint mods just tailed on the areas marked by red mask in second vertex color channel.
BrummBear02
Posts: 310
Joined: Fri, 3. Oct 08, 20:43
x3ap

Re: [WIP] Custom Ship mod - Help needed!

Post by BrummBear02 »

mr.WHO wrote: Sat, 2. Mar 19, 15:52 I wonder how much work is needed for mod made ship to work with ingame "paint mods"?
I mean there is 50+ paints, so you need to made them all work one by one or there is some kind of template, so that you just need to texture ship once and it will work with all paint mods?
viewtopic.php?p=4849134#p4849134
Gebt mir einen Spiegel dann schlage ich ihn mit seinem eigenen Gesicht
User avatar
Cadius
Posts: 979
Joined: Fri, 5. Dec 08, 12:41
x3tc

Re: [WIP] Custom Ship mod - Help needed!

Post by Cadius »

Progress! I got the ship ingame - basically rebuilt the xmls using BrummBear's Split Raptor.
https://i.imgur.com/vt1VyUS.jpg
https://i.imgur.com/yuO1EBG.jpg
There's a bit of an issue with the ship though, all the mesh that I mirrored in blender seem to have inverted textures but look completely fine in the build menu.



{Images posted directly to the forums should not be greater than 640x480 or 100kb, oversize image now linked - Terre}
BrummBear02
Posts: 310
Joined: Fri, 3. Oct 08, 20:43
x3ap

Re: [WIP] Custom Ship mod - Help needed!

Post by BrummBear02 »

oh, i remember the raptor xml beeing a mess with commented out stuff and leftovers from learning

when u mirror meshes in edit mode the normals get flipped. u now have to flip normals by hand or use the bisect tool to cut your model in half and mirror it again using the mirror modifier, which doesnt flip normals.

press N, scroll down and activate backface culling. that way faces u look at from the wrong side will get see through. not suited for actual modeling but great for checking normals.

if u select a face in edit mode u can go mesh -> normals - flip normals. also works if u select multible faces.

the bisect way: go edit mode, select all by pressing A, on the left go tools, Bisect. Draw a line somewhere. press F6. plane normal X is 1, rest is 0. check clear inner or outer box. not both. done, ur mesh is cut in half in the middle along the Y axis.
now go object mode, select your mesh in the outliner, go modiiyers (the blue wrench) add modifier, generate - mirror. if ur origin isnt centered this might behave funny so generade a duplicate of ur mesh first and merge it after u confirmed the mirror worked the way u want.
Gebt mir einen Spiegel dann schlage ich ihn mit seinem eigenen Gesicht

Return to “X4: Foundations - Scripts and Modding”