[WIP] Custom Ship mod - Help needed!

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

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

User avatar
Cadius
Posts: 975
Joined: Fri, 5. Dec 08, 13:41
x3tc

[WIP] Custom Ship mod - Help needed!

Post by Cadius » Tue, 26. Feb 19, 20:34

Good day folks, I'm working to get a new ship into the game but have no experience modding X-Rebirth so the system is alien to me. Hoping someone can help give me a few pointers.

XL Mandalay Class Battleship
Image
Image

Questions
1] When you import ships into Blender why are all the parts cut up according to materials and do you have separate them according to materials before exporting?
2] Whats the easiest way to find accurate coordinates and orientation for the ship modules to put into the XML file?
3] Ship engines are counted as 1 module, does this mean I have to create a new engine since my ship has them positioned differently?

Edit: Image links fixed, damn I feel old!

User avatar
Matterom
Posts: 399
Joined: Thu, 20. Aug 09, 08:17
x4

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

Post by Matterom » Tue, 26. Feb 19, 20:48

Not sure about 1, But as for 2 there is a tool for that, https://github.com/rjtwins/X4-Blender-M ... g-and-Drop

And for 3 afaik, if your ship can fit the engines you just have to position the module slot in the right spot. and it should mount them there.

As a side note, cool ship, ... oh wait dam it's Cadius you're back!
My Mods:
Sector Administration: A Tax Mod
Standalone Station Manager Credit Transfer: A vanilla alternative and replacement
1.6 Simple Order Fixes: Small fixes for version 1.6 AI
Simple Carrier Repair: Small Carrier Repair

Cg089
Posts: 80
Joined: Fri, 18. Jan 19, 20:25
x4

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

Post by Cg089 » Tue, 26. Feb 19, 21:13

I'm assuming you're using the old X Rebirth Converter to make .xmf etc files. That works fine for the modeling side of things, but doesn't really work for the XML side of things at the moment. I'm working on fixing it, but still have a lot to go.

Part of the answer for 1] is that there are versions for different levels of detail, 0 being highest level... Highly recommend this thread by BrummBear02 viewtopic.php?f=181&t=414274 if you haven't seen it yet, it goes over a lot of the "gotchas". As for the material part of things, the X Rebirth converter doesn't handle that well at all, so maybe? Hard to say without knowing more about what tools you've been using.

For 3], in X4, engines & shields etc are intended to be modular, but I think you can maybe leave it alone? Perhaps talk to sco1981 or Ojump, they've been porting ships from X Rebirth and have ran into a lot of these issues, and I don't think they changed their engines, but not sure. sco1981's thread: viewtopic.php?f=181&t=409546

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

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

Post by BrummBear02 » Tue, 26. Feb 19, 23:51

ill answer all your question in my tutorial but since making that takes more time then i thought...

1] When you import ships into Blender why are all the parts cut up according to materials and do you have separate them according to materials before exporting?
that one is answered. also adding new materials to x4 is kind of tricky. talk to Forleyor on egosoft discord.
https://discord.gg/qHqdEZ

2] Whats the easiest way to find accurate coordinates and orientation for the ship modules to put into the XML file?
create a small cube in blender, move it to the desired position and press N. Copy the coods. Rotation is a bit tricky and a hassle to be honest. but instead of quaternion you can also use rotation as shown in my screenshot.
you need to add quite some XML connections by hand. bridge for example. again, come egosoft discord and talk to me if u want my help.
Image

3] Ship engines are counted as 1 module, does this mean I have to create a new engine since my ship has them positioned differently?
no they are not. in the XML every engine is one connection. and you need to add them to the same group. if not grouped they act super strange. i didnt group them in my screenshot and honestly dont know why they work. but since they do i didnt bother.

this is how my engines on my split raptor/gangrene chaser something port from X:R to X4 looks

Code: Select all

			<connection name="con_engine_01" group="group_back_engine " tags="engine large ">
				<offset>
					<position x="0" y="45.5" z="-1355"/>
				</offset>
			</connection>
			
			<connection name="con_engine_02" group="group_back_engine " tags="engine large ">
				<offset>
					<position x="0" y="150" z="-1355"/>
				</offset>
			</connection>			
			
			<connection name="con_engine_03" group="group_back_engine " tags="engine large ">
				<offset>
					<position x="0" y="96" z="-1355"/>
				</offset>
			</connection>
Gebt mir einen Spiegel dann schlage ich ihn mit seinem eigenen Gesicht

Cg089
Posts: 80
Joined: Fri, 18. Jan 19, 20:25
x4

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

Post by Cg089 » Wed, 27. Feb 19, 00:51

I forgot to mention - those ships look fantastic! Can't wait to take them out for a spin!

User avatar
KrYcHokE
Posts: 181
Joined: Wed, 2. Dec 15, 14:15
xr

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

Post by KrYcHokE » Wed, 27. Feb 19, 01:02

Yeah, great design!

Cg089
Posts: 80
Joined: Fri, 18. Jan 19, 20:25
x4

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

Post by Cg089 » Wed, 27. Feb 19, 01:15

Another note Cadius - some of the texture stuff on the stock ships is probably related to paint jobs, which if you haven't look at yet are pretty cool :). I might be wrong on this though, BrummBear would know better than me.
Spoiler
Show
You can get them from random ships you capture, or from the new Ventures feature. Of course, uninstalling them destroys them. In the case of Ventures, they're not really destroyed, but you won't get them back until you start another save. Or, if you're playing modded like I often do and/or just hate that they're sort of consumable, there's this mod: https://www.nexusmods.com/x4foundations/mods/37.
Use the "Redesign" entry on the right-click menu to install them. You can also do it from the terminals in front of a docking bay.
There are also at least two cool paint job packs that I haven't tried yet but look fantastic. If your texturing skills are anything like your modelling skills, I'd love to see you make some ;)

https://www.nexusmods.com/x4foundations/mods/233
https://www.nexusmods.com/x4foundations/mods/242

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

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

Post by BrummBear02 » Wed, 27. Feb 19, 01:33

where to apply paint jobs is done via a specific channel in the vertex color. dirt maps are handled the same. i wont go into detail here but this should give a rough idea
Image
Gebt mir einen Spiegel dann schlage ich ihn mit seinem eigenen Gesicht

Staberind
Posts: 117
Joined: Wed, 5. May 10, 23:32
x4

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

Post by Staberind » Wed, 27. Feb 19, 05:06

Groovy! good to see you here, Looks like a nice craft.
I'm still floundering in blender as well, I'd imagine you can assign a hardpoint for engines, using the drag and drop tool, I'm still doing blender 101 & have yet to look into X4's needs for textures and co-ordinates for uv's and so on.
I think I can cheese some things with your Kha'ak models regarding engine placement & bridge, but have to make a quality set of turrets, capital and regular, &
the same with weapons, hopefully using the same textures so everything fits smoothly.
Aladna Hill, Again, AP, 3.1. in the last Game worthy of the "X" title. <<<< X4 might just be changing this. :?:

User avatar
Cadius
Posts: 975
Joined: Fri, 5. Dec 08, 13:41
x3tc

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

Post by Cadius » Wed, 27. Feb 19, 16:55

Matterom wrote:
Tue, 26. Feb 19, 20:48
Not sure about 1, But as for 2 there is a tool for that, https://github.com/rjtwins/X4-Blender-M ... g-and-Drop
Ahh nice! that makes it easier to gauge the size as well.
BrummBear02 wrote:
Tue, 26. Feb 19, 23:51
ill answer all your question in my tutorial but since making that takes more time then i thought...
Thanks, I''ve been following your tutorial since the first post. Pretty much what got me back into modding X.
Cg089 wrote:
Wed, 27. Feb 19, 00:51
I forgot to mention - those ships look fantastic! Can't wait to take them out for a spin!
Thanks, its a kitbash though. My last serious mod was like 6 years ago, it's taking some time trying to relearn 3d modelling.
BrummBear02 wrote:
Wed, 27. Feb 19, 01:33
where to apply paint jobs is done via a specific channel in the vertex color. dirt maps are handled the same. i wont go into detail here but this should give a rough idea
Image
Hang on, so paint job area is assigned in blender? I thought you just assign the hull_pattern material to it.
Staberind wrote:
Wed, 27. Feb 19, 05:06
Groovy! good to see you here, Looks like a nice craft.
I'm still floundering in blender as well, I'd imagine you can assign a hardpoint for engines, using the drag and drop tool, I'm still doing blender 101 & have yet to look into X4's needs for textures and co-ordinates for uv's and so on.
I think I can cheese some things with your Kha'ak models regarding engine placement & bridge, but have to make a quality set of turrets, capital and regular, &
the same with weapons, hopefully using the same textures so everything fits smoothly.
True, khaak and some xenon appears to be ported from x3 anyway. I assume the fx and textures would already be there.

Bubonosaure
Posts: 118
Joined: Tue, 13. Nov 18, 01:26
x4

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

Post by Bubonosaure » Wed, 27. Feb 19, 18:07

Not helpful but daaaamn. I want to try this bad boy on the left so bad !! :D

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

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

Post by BrummBear02 » Wed, 27. Feb 19, 20:40

Cadius wrote:
Wed, 27. Feb 19, 16:55
Matterom wrote:
Tue, 26. Feb 19, 20:48
Not sure about 1, But as for 2 there is a tool for that, https://github.com/rjtwins/X4-Blender-M ... g-and-Drop
Ahh nice! that makes it easier to gauge the size as well.
BrummBear02 wrote:
Tue, 26. Feb 19, 23:51
ill answer all your question in my tutorial but since making that takes more time then i thought...
Thanks, I''ve been following your tutorial since the first post. Pretty much what got me back into modding X.
BrummBear02 wrote:
Wed, 27. Feb 19, 01:33
where to apply paint jobs is done via a specific channel in the vertex color. dirt maps are handled the same. i wont go into detail here but this should give a rough idea
Image
Hang on, so paint job area is assigned in blender? I thought you just assign the hull_pattern material to it.
actually i like to import the actual part i want the coods for since the templates in the drag and drop thingy dont really give me an idea how it will look.

you should tell people so, apreachiation keeps people going ;) but glad i inspired u :D

and yes, paint jobs are defined via vertex color and not via material.

compare this to the blender screenshot i posted yesterday.

Image
Gebt mir einen Spiegel dann schlage ich ihn mit seinem eigenen Gesicht

User avatar
KrYcHokE
Posts: 181
Joined: Wed, 2. Dec 15, 14:15
xr

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

Post by KrYcHokE » Wed, 27. Feb 19, 21:47

Dont know why, but max lost any second vertex color channel information :|

Cg089
Posts: 80
Joined: Fri, 18. Jan 19, 20:25
x4

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

Post by Cg089 » Wed, 27. Feb 19, 23:47

Did you put through the old XR converter? if so, that's probably why. It's not built for X4, I'm working on fixing it.

User avatar
KrYcHokE
Posts: 181
Joined: Wed, 2. Dec 15, 14:15
xr

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

Post by KrYcHokE » Wed, 27. Feb 19, 23:54

Its not converter, for blender all works fine.

Post Reply

Return to “X4: Foundations - Scripts and Modding”