[Tool] .xmf/.xac <-> .dae converter

The place to discuss scripting and game modifications for X Rebirth.

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

antoniut
Posts: 198
Joined: Sat, 4. Oct 14, 13:07
xr

Post by antoniut » Mon, 16. Mar 15, 23:36

The xac conversion (body meshes) doesn't work properly. It works enough
for xmf, but seems that to apply textures to new xmf meshes is not so ease. Pls correct me if I'm wrong

Vim Razz
Posts: 1842
Joined: Tue, 2. Nov 10, 02:20
x4

Post by Vim Razz » Tue, 17. Mar 15, 00:56

Yeah, it's the animated stuff he got stuck on if I recall correctly.

So static xmf models it can handle, but xac and animated xmf are too much.

oliverjanda
Posts: 309
Joined: Sun, 14. Feb 10, 17:47
xr

Post by oliverjanda » Tue, 17. Mar 15, 09:28

NodusCursorius wrote:Just a note:

I'm using Blender 2.73a (latest) and the converter on the first page and it is working perfectly, so far.

Importing with the built-in COLLADA plugin that Blender comes with and choosing "Import Units" as an option (not sure if that is even needed). Modifying things in Blender, exporting it with the default COLLADA settings. Using arc_'s tool to convert prior, and afterwards of course.
The tool does not for me.
Which operating system do you use?
cmd or Powershell?
tell me anything that may be usefull! :)

User avatar
NodusCursorius
Posts: 112
Joined: Mon, 13. Jan 14, 15:51
x4

Post by NodusCursorius » Fri, 20. Mar 15, 09:35

oliverjanda wrote:The tool does not for me.
Which operating system do you use?
cmd or Powershell?
tell me anything that may be usefull! :)
  • Windows 8.1 64x
  • cmd.exe
  • Blender 2.73a 64x
  • .cat files extracted with official X Rebirth Tools
  • Boxer-briefs, for the combination of support and comfort.

oliverjanda
Posts: 309
Joined: Sun, 14. Feb 10, 17:47
xr

Post by oliverjanda » Fri, 20. Mar 15, 10:05

Thx, I got it working myself yesterday at night. I think it was some kind of path issue. I changed a model and importet it but there were many parts missing ingame.

User avatar
xrook
Posts: 205
Joined: Fri, 31. Jul 15, 01:25

Post by xrook » Mon, 21. Sep 15, 22:32

did i do this correctly??

Code: Select all

C:\Users\miguel\Downloads\XRConverters\XRConvertersMain.exe importxmf "C:\Users\miguel\Downloads\X_Rebirth_Save_Game_Editor v0.1.21" "C:\Users\miguel\Downloads\X_Rebirth_Save_Game_Editor v0.1.21\01.cate\assets\units\size_s\units_size_s_ship_ar_military_04.xml"
Last edited by xrook on Tue, 22. Sep 15, 18:36, edited 1 time in total.

User avatar
xrook
Posts: 205
Joined: Fri, 31. Jul 15, 01:25

Post by xrook » Tue, 22. Sep 15, 17:58

none? im asking here cuz cmd keeps telling me system cannot find the specified path

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Tue, 22. Sep 15, 18:18

just a vague guess but i think this programm didnt like spaces in the path - could be wrong though, never used it.

also you should point to an completely extracted Game i think (meaning all cats/dats are extracted into the same folder) - you extracted each of them into a diffrent one and point to the folder containing these seperate folders so the converter cannt find the index files (not sure if it uses them, but it would be plausible)
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

User avatar
xrook
Posts: 205
Joined: Fri, 31. Jul 15, 01:25

Post by xrook » Tue, 22. Sep 15, 18:31

main app has stopped working

Moncada
Posts: 111
Joined: Fri, 4. May 12, 14:49
xrvr

Post by Moncada » Thu, 24. Mar 16, 11:35

I get too application has stopped working aswell
When the program executes windows goes "nope!" and it crashes

Nope! It was user error.
Disregard this

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Fri, 25. Mar 16, 10:26

if anyone uses inux - i have extended my Bash game extraction Script to also convert model files.

Prerequisites:
=> Requires Wine
=> Copy the Ego X Rebirth Tools from an existing installation over to linux (next to the X Rebirth folder - like in windows)
=> Extract this Program into that Folder
=> put the code below in a shell Script also in the tools Folder and make it executeable:

Code: Select all

#!/bin/bash
cd ../X\ Rebirth
date +"%T"
echo "================================================================"
# Delete previously extracted Files - we want a fresh extraction
if [ -d XR_extracted ]; then 
  echo "============= removing previously extracted Files.. ============"
  rm -rf XR_extracted
  echo "============= done.™ ==========================================="
fi
date +"%T"
# Create Folder for Extracting all Cats/Dats and extract them there
mkdir XR_extracted
echo "============= extracting current Game files... ================="
wine ../X\ Rebirth\ Tools/XRCatTool.exe -in *.cat -out XR_extracted
echo "============= done.™ ==========================================="
date +"%T"
echo "============= converting mesh files... ========================"
# Convert all mesh files
for f in $(find XR_extracted/assets -name '*.xml'); do 
  echo -ne "================================================================"\\r
  echo "= converting $f"
  wine ../X\ Rebirth\ Tools/XRConvertersMain.exe importxmf ./XR_extracted $f
done
echo "============= done.™ ==========================================="
date +"%T"
#
# Do the same for all Extensions present - seperate cases for subst(itute) and ext(ension) cats/dats
for f in extensions/*; do
  echo "================================================================"
  date +"%T" 
  echo -ne "================================================================"\\r
  echo "=========== extracting $f "
  if [ -f "$f/ext_01.cat" ]; then
    echo "= ext part ====================================================="
    if [ -d "$f/ext" ]; then 
      rm -rf $f/ext
    fi
    mkdir "$f/ext"
    wine ../X\ Rebirth\ Tools/XRCatTool.exe -in $f/ext_*.cat -out "$f/ext"
  fi
  if [ -f "$f/subst_01.cat" ]; then
    echo "= subst part ===================================================="
    if [ -d "$f/subst" ]; then 
      rm -rf $f/subst
    fi
    mkdir "$f/subst"
    wine ../X\ Rebirth\ Tools/XRCatTool.exe -in $f/subst_*.cat -out "$f/subst"
  fi
  echo "= done.™ ======================================================="
done
echo "= Extraction of Game and Mod Files complete - have fun ;) ======"
echo "================================================================"
date +"%T"
it extracts all files from the Cats/Dats into a folder called XR_extracted in the Game Root, converts all model files in the assets Folder there to dae and after that extracts all mod cats/dats in an ext sub-folder for the ext one and an subst sub-folder for the subst cats/dats. no model conversion for mods/dlcs yet..
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

mbhm
Posts: 78
Joined: Wed, 21. Mar 07, 18:13
x4

Post by mbhm » Thu, 14. Jul 16, 21:39

Hmm ..
No suitable reader found for the file format of file "E:\Entwicklung\X-RebirthDEV\ORIGINAL\assets\environments\cluster\cluster_a_data\anim_lavamoon-lod0.xmf".
The call was:

Code: Select all

e:\X_Extract\XRConvertersMain.exe importxmf E:\Entwicklung\X-RebirthDEV\ORIGINAL E:\Entwicklung\X-RebirthDEV\ORIGINAL\assets\environments\cluster\cluster_a_data\anim_lavamoon-lod0.xmf

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Thu, 14. Jul 16, 22:06

you have to pass it an xml file i think... a component file to be precise..

try this call and look into the resulting file (cluster_a.dae):

Code: Select all

e:\X_Extract\XRConvertersMain.exe importxmf E:\Entwicklung\X-RebirthDEV\ORIGINAL E:\Entwicklung\X-RebirthDEV\ORIGINAL\assets\environments\cluster\cluster_a.xml
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

User avatar
YOYOMAN_MODDER
Posts: 62
Joined: Fri, 30. Dec 11, 20:32
x4

Post by YOYOMAN_MODDER » Sun, 31. Jul 16, 11:05

Hi there! Did you know anyway solution to convert .xmf file by drag&drop operation on converter.exe? Current solution is terrible for me.

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Sun, 31. Jul 16, 11:40

not the .exe but you can put a .bat next to it where you can drop files on and the rest should be handled automatically:

Code: Select all

XRConvertersMain.exe importxmf "D:\X Rebirth files" %1
note that you have to replace "D:\X Rebirth files" with your own Folder containing all extracted Files, since its unlikely this one applies to you
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

User avatar
YOYOMAN_MODDER
Posts: 62
Joined: Fri, 30. Dec 11, 20:32
x4

Post by YOYOMAN_MODDER » Sun, 31. Jul 16, 12:19

UniTrader wrote:not the .exe but you can put a .bat next to it where you can drop files on and the rest should be handled automatically:

Code: Select all

XRConvertersMain.exe importxmf "D:\X Rebirth files" %1
note that you have to replace "D:\X Rebirth files" with your own Folder containing all extracted Files, since its unlikely this one applies to you
Thanks UniTrader))) :)

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Mon, 31. Oct 16, 00:00

just expanded my windows bat extraction script to also convert all available mesh files. its not as extensive as the linux bash script though :D
short usage guide:

1. Install EGOs X Rebirth Tools
2. Extract the Tool from this Topic into the X Rebirth Tools folder
3. create a new bat file with this content:

Code: Select all

RD /S /Q "..\X Rebirth\XR_extracted"
mkdir "..\X Rebirth\XR_extracted"
XRcatTool.exe -in "..\X Rebirth\01.cat" "..\X Rebirth\02.cat" "..\X Rebirth\03.cat" "..\X Rebirth\04.cat" "..\X Rebirth\05.cat" "..\X Rebirth\06.cat" "..\X Rebirth\07.cat" "..\X Rebirth\08.cat" "..\X Rebirth\09.cat" "..\X Rebirth\10.cat" -out "..\X Rebirth\XR_extracted"
FOR /R "..\X Rebirth\XR_extracted\assets" %%f IN (*.xml) do (
  XRConvertersMain.exe importxmf "..\X Rebirth\XR_extracted" "%%f"
  )
pause
4. Execute it - completing may take about 30 mins (and it will delete a previous extraction first to keep it up to date)

hope this helps anyone
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

HammerSun
Posts: 94
Joined: Tue, 12. Dec 06, 12:15
x4

Post by HammerSun » Tue, 22. Nov 16, 05:27

UniTrader wrote:just expanded my windows bat extraction script to also convert all available mesh files. its not as extensive as the linux bash script though :D
short usage guide:
......
hope this helps anyone
Thx for your tools and code, but i've found model like size_xl_cs_omicron_ship, units_size_xl_transporter not converted corevtly, the .dae file contained almost nonthing.

uladraz
Posts: 1
Joined: Wed, 5. Apr 17, 19:36
xr

Can someone repost the tool? The original link is no longer valid

Post by uladraz » Wed, 5. Apr 17, 19:45

Can someone repost the tool? The original link is no longer valid

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Wed, 5. Apr 17, 21:37

just looked through my Tools folder, i still have it. I have also included my current Scripts for Extraction (those for linux/bash are the most developed, the ones for windows/bat are very basic in comparision)
https://www.dropbox.com/s/eu13z2xqom0k8 ... ls.7z?dl=0
For best usage also create a new Folder "X Rebirth Tools" NEXT TO the X Rebirth Folder and drop the Contents of this Archive and also egos Official Cat Tools inside:
https://www.egosoft.com/download/x_rebi ... wnload=589
they also work with Linux + Wine ;)

After Extracthing thes Programs/Files start the "extract and convert xmf.sh" (linux) or "extract XR in subfolder and convert xmf.bat" (windows) to extract everything and convert all xmf files which this Tool can handle. This may take a while though, but you will have an easier time when not having to extract every single file ;)
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

Post Reply

Return to “X Rebirth - Scripts and Modding”