[Tool/Info] VS Code Complete, Asset Converter, Blender Integration - Beta

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

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

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

[Tool/Info] VS Code Complete, Asset Converter, Blender Integration - Beta

Post by Cg089 » Wed, 8. May 19, 12:10

I've been meaning to make this post for a while, but it's about time I actually did. Arc_ made a converter for X: Rebirth a number of years back, and unfortunately, he vanished. I've been working on improving it to work better for X4. This is heavily WIP, and may break at any point. Keep backups of your files, people.

Source:
https://github.com/Cgettys/X4Converter/tree/master


Features:
  • WIP - Asset Import/Export - via Collada
  • WIP - Animation support
  • WIP - Blender integration
  • WIP - Multimat support
  • WIP - Nested component handling
  • Cross-platform!

Credits:
  • The entire dev team for making an awesome game.
  • Arc_ for making the original X: Rebirth converter tool
  • CBJ & linolafett for providing info on the ANI & XMF file formats, in addition to making an awesome game
  • BrummBear, Forleyor, jmattspartacus, mewosmith, Ojump, & everyone else from the Discord who have provided ideas, insight, feedback & encouragement
  • moneyl, Sir Kane, Bobbe, and many others from various other Discords who provided valuable insight into blender & how to go about figuring on binary file formats, to name a few
  • Aftershock_81 for independently reverse engineering a good part of the ANI format, thus unintentionally guilting me into actually making a post
Last edited by Cg089 on Sat, 3. Aug 19, 21:55, edited 5 times in total.

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

Re: [Tool/Info] Asset Converter & Blender Integration - WIP

Post by Cg089 » Wed, 8. May 19, 12:11

I'm still working on the Asset Converter, but in the mean time, I've created an extension for Visual Studio Code to autocomplete scriptproperties. You can find it at https://github.com/Cgettys/X4CodeComplete; simply download the .vsix file & install it and enjoy!
I highly recommend using it in conjunction with the excellent guide ledhead900 put together, as this plugin fills in the gaps that that solution cannot handle. That guide is available here: viewtopic.php?f=181&t=416621

Credit to Mewosmith for the idea.
Changelog:
v1.0.0 5/10/2019 - Initial release
v1.0.1 5/11/2019 - Overhaul of basically everything
v1.0.2 5/11/2019 - Hopefully, no more duplicate suggestions. Also, Peek/Go to definition for script properties!
Last edited by Cg089 on Sat, 11. May 19, 12:45, edited 4 times in total.

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

Re: [Tool/Info] Asset Converter & Blender Integration - WIP

Post by Cg089 » Wed, 8. May 19, 12:14

[Reserved]

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

Re: [Tool/Info] Asset Converter & Blender Integration - WIP

Post by Cg089 » Wed, 8. May 19, 12:15

[Reserved]

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

Re: [Tool/Info] Asset Converter & Blender Integration - WIP

Post by linolafett » Wed, 8. May 19, 13:31

Thanks for your work and and thanks to everyone helping! Much appreciated.
01000100 01101111 00100000 01110011 01110000 01101100 01101001 01110100 00100000 01100101 01100001 01110100 00100000 01100011 01101111 01101111 01101011 01101001 01100101 01110011 00111111

My art stuff

User avatar
Axeface
Posts: 1965
Joined: Fri, 18. Nov 05, 01:41
x4

Re: [Tool/Info] Asset Converter & Blender Integration - WIP

Post by Axeface » Thu, 9. May 19, 06:14

Sounds amazing. Keeping a close eye on this and thank you. I have some tentative plans for some ships, I can model but i'm a complete moron when it comes to the technical side of things so it sounds like this will help me a lot.

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

Re: [Tool/Info] Asset Converter & Blender Integration - WIP

Post by Staberind » Thu, 9. May 19, 13:40

This is Awesome and I am looking forwards to it, especially if it can make sense of the new texture format, Blender & real life have been griefing me for a bit so, I had to put the Xtr4 import on the back burner.
this will probably prod me back into doing stuff, I really think X4 could do with XR's Solid & Liquid transporters & just importing them from XR means they don't get the benefit of groovy paintjobs or faction colours.
Aladna Hill, Again, AP, 3.1. in the last Game worthy of the "X" title. <<<< X4 might just be changing this. :?:

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

Re: [Tool/Info] Asset Converter & Blender Integration - WIP

Post by BrummBear02 » Thu, 9. May 19, 13:58

Uh. That already is possible without much trouble since the xr ships only use normal textures and no multimat. I don't think he did any changes to the material/ texture handling?
Gebt mir einen Spiegel dann schlage ich ihn mit seinem eigenen Gesicht

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

Re: [Tool/Info] VS Code Complete, Asset Converter, Blender Integration - WIP

Post by linolafett » Mon, 13. May 19, 09:38

Paint mod masking is done via vertex colours (vertex illumination channel). XR assets are not set up to support that, as this system did not exist at the time.
01000100 01101111 00100000 01110011 01110000 01101100 01101001 01110100 00100000 01100101 01100001 01110100 00100000 01100011 01101111 01101111 01101011 01101001 01100101 01110011 00111111

My art stuff

User avatar
Misunderstood Wookie
Posts: 370
Joined: Mon, 15. Mar 04, 09:07
x4

Re: [Tool/Info] VS Code Complete, Asset Converter, Blender Integration - WIP

Post by Misunderstood Wookie » Mon, 13. May 19, 10:23

Peek and Go to Def
.... LEGEND
*modified*
MOD Aspiring Freelancer GameStart
MOD Variety and Rebalance Overhaul Icon Pack
I lost my Hans and should not be flying Solo.
Image

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

Re: [Tool/Info] VS Code Complete, Asset Converter, Blender Integration - Beta

Post by Cg089 » Sat, 3. Aug 19, 22:50

I've put up the source code for my converter etc in the first post. I'm still working on it when I have time, and it's buggy and unfinished right now, but hopefully the information will come in handy. Thanks again to everyone who helped - especially CBJ and Lino, they were a great help!

User avatar
RoverTX
Posts: 1176
Joined: Wed, 16. Nov 11, 19:37
x4

Re: [Tool/Info] VS Code Complete, Asset Converter, Blender Integration - Beta

Post by RoverTX » Mon, 21. Oct 19, 04:34

Any chance of adding more to the readme about how to build?

Max Bain
Posts: 918
Joined: Wed, 27. Jun 18, 19:05
x3ap

Re: [Tool/Info] VS Code Complete, Asset Converter, Blender Integration - Beta

Post by Max Bain » Mon, 21. Oct 19, 08:36

Is this Linux only or Windows as well? Just curious because I read "sudo"...
Also some screenshots would be welcome ;).
X4 Editor (view stats of objects and make your own mod within a few clicks) viewtopic.php?f=181&t=421306
XR Ship Pack (adds several ships from XR) viewtopic.php?f=181&t=419641
Weapon Pack (adds several new weapons) viewtopic.php?f=181&t=421266

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

Re: [Tool/Info] VS Code Complete, Asset Converter, Blender Integration - Beta

Post by Cg089 » Mon, 21. Oct 19, 22:50

RoverTX wrote:
Mon, 21. Oct 19, 04:34
Any chance of adding more to the readme about how to build?
Done. Sorry, I've been really busy with school, and it's still very much WIP. I've written some notes about building it on Windows; it should be possible and I think I did do it at one point.. I've also been able to cross-compile it from Linux to Windows using Polly in the past; I'll provide Windows release builds at some point when I have time and it's less stable.
Max Bain wrote:
Mon, 21. Oct 19, 08:36
Is this Linux only or Windows as well? Just curious because I read "sudo"...
Also some screenshots would be welcome ;).
Cross-platform (using MinGW to build a Windows binary). In fact, the X Rebirth/X4 catalog tool that Egosoft released is Windows only, though I was able to get it to run with Wine. As noted in the readme now, and I think it's said elsewhere, but you need to extract the game files before the tool is any good. Linux is my native environment, but it should work just fine on Windows; I made sure to handle filepaths pretty carefully. If you run into issues on Windows, let me know. Again, note that this is very much WIP.

RE: screenshots, the main portion of this is a command-line tool, so there isn't much to see. I could do that for the Blender part, which is even more WIP, but it really doesn't add much to see in and of itself. I might link some animations imported into Blender at some point when that's a bit more polished. The most interesting screenshots will come from stuff imported into the game using the tool, someday hopefully :wink:.
It's also a bit finicky about how you work on mod files at the moment; they basically have to be exactly where the game pretends they are after import. I'll try to write more about it later, but basically what I'm doing is relying on that directory structure being right so that I can properly import and export textures, allowing you to use existing textures easily etc. Hopefully soon-ish it'll also let you preview how mounted items look, again relying on that directory structure.

Post Reply

Return to “X4: Foundations - Scripts and Modding”