VR Modding
Moderator: Moderators for English X Forum
VR Modding
I would like to try my hand at modding the VR version, I am downloading from oculus as I type here.
I downloaded the extensions zip that was available, but I would like to create my own mods. I did this with X3AP after getting the required tools.
I see there is a toolset for the vanilla rebirth, but I do not see one for VR, and I do not own the vanilla so those tools are restricted.
Please, how do I get the tools I need for modding VR version?
Thanks
Archaine
I downloaded the extensions zip that was available, but I would like to create my own mods. I did this with X3AP after getting the required tools.
I see there is a toolset for the vanilla rebirth, but I do not see one for VR, and I do not own the vanilla so those tools are restricted.
Please, how do I get the tools I need for modding VR version?
Thanks
Archaine
- ubuntufreakdragon
- Posts: 5195
- Joined: Thu, 23. Jun 11, 14:57
Re: VR Modding
Delete your recently cached pages.Archaine in DevChat wrote:I press the new topic button in the forum and it just jumps back to the main forum page??
Oh and the chat normally takes 4hrs for an answer.
You may want to ask your question here too:
https://forum.egosoft.com/viewtopic.php?t=357464
My X3 Mods
XRebirth, things left to patch:
In General; On Firing NPC's; In De Vries; Out Of Zone; And the Antiwishlist
XRebirth, things left to patch:
In General; On Firing NPC's; In De Vries; Out Of Zone; And the Antiwishlist
Scripting more than modding
I read through the documentation.
I guess I was more interested in scripting modification.
Is this possible in XRebirthVR?
Here is an example of what I mean.
in Alb Prelude I got into the scripting and was able to call them from the command menu through the script editor.
Example of Script to generate orbita defense platform with surrounding laser tower rings and set rules of engagement
$pSector = [PLAYERSHIP] -> get sector
$xCenter = [PLAYERSHIP] -> get x position
$x = $xCenter
$yCenter = [PLAYERSHIP] -> get y position
$y = $yCenter
$zCenter = [PLAYERSHIP] -> get z position
$zCenter = $zCenter + 4000
$z = $zCenter
$Platform = create ship: type=Large Orbital Weapons Platform owner=Player addto=$pSector x=$xCenter y=$yCenter z=$zCenter
= $Platform -> install 3 units of 2 GJ Shield
= $Platform -> install 48 units of Concussion Impulse Generator
= $Platform -> install 1 units of Duplex Scanner
= $Platform -> install 1 units of Triplex Scanner
= $Platform -> install 1 units of Fight Command Software MK1
= $Platform -> install 1 units of Fight Command Software MK2
= $Platform -> install 1 units of Carrier Command Software
= $Platform -> install 1 units of Special Command Software MK1
= $Platform -> install 1 units of Singularity Engine Time Accelerator
= $Platform -> install 250 units of Firestorm Torpedo
= $Platform -> install 250 units of Hammerhead Missile
= $Platform -> install 300 units of Hornet Missile
= $Platform -> install 300 units of Tempest Missile
= $Platform -> install 1000 units of Hurricane Missile
= $Platform -> install 777 units of Mosquito Missile
$TurretCount = $Platform -> get number of turrets
$tCounter = 0
while $tCounter <= $TurretCount
$Platform ->start task $tCounter with script !turret.killenemies.std and prio 0: arg1=$tCounter arg2=null arg3=null arg4=null arg5=null
inc $tCounter =
end
START $Platform -> command COMMAND_KILL_ENEMIES : arg1=null, arg2=null, arg3=null, arg4=null
$Platform ->set fire missile probability to 75
$Platform ->start task 10 with script plugin.missile.def.main and prio 0: arg1=null arg2=null arg3=null arg4=null arg5=null
$Platform ->start task 11 with script ArchOrbitalDefenseBlockSCMiCa2 and prio 0: arg1=null arg2=null arg3=null arg4=null arg5=null
$Platform ->start task 12 with script ArchOrbitalDefenseBlockSCMiFi2 and prio 0: arg1=null arg2=null arg3=null arg4=null arg5=null
$Platform ->start task 13 with script ArchOrbitalDefenseBlockSCMiDe2 and prio 0: arg1=null arg2=null arg3=null arg4=null arg5=null
@ = [THIS] -> call script DevilsHalo16LtowerSmlRngSmlPXZSC :
@ = [THIS] -> call script DevilsHalo16LtowerSmlRngSmlPXYSC :
@ = [THIS] -> call script DevilsHalo16LtowerSmlRngSmlPZYSC :
return null
I guess I was more interested in scripting modification.
Is this possible in XRebirthVR?
Here is an example of what I mean.
in Alb Prelude I got into the scripting and was able to call them from the command menu through the script editor.
Example of Script to generate orbita defense platform with surrounding laser tower rings and set rules of engagement
$pSector = [PLAYERSHIP] -> get sector
$xCenter = [PLAYERSHIP] -> get x position
$x = $xCenter
$yCenter = [PLAYERSHIP] -> get y position
$y = $yCenter
$zCenter = [PLAYERSHIP] -> get z position
$zCenter = $zCenter + 4000
$z = $zCenter
$Platform = create ship: type=Large Orbital Weapons Platform owner=Player addto=$pSector x=$xCenter y=$yCenter z=$zCenter
= $Platform -> install 3 units of 2 GJ Shield
= $Platform -> install 48 units of Concussion Impulse Generator
= $Platform -> install 1 units of Duplex Scanner
= $Platform -> install 1 units of Triplex Scanner
= $Platform -> install 1 units of Fight Command Software MK1
= $Platform -> install 1 units of Fight Command Software MK2
= $Platform -> install 1 units of Carrier Command Software
= $Platform -> install 1 units of Special Command Software MK1
= $Platform -> install 1 units of Singularity Engine Time Accelerator
= $Platform -> install 250 units of Firestorm Torpedo
= $Platform -> install 250 units of Hammerhead Missile
= $Platform -> install 300 units of Hornet Missile
= $Platform -> install 300 units of Tempest Missile
= $Platform -> install 1000 units of Hurricane Missile
= $Platform -> install 777 units of Mosquito Missile
$TurretCount = $Platform -> get number of turrets
$tCounter = 0
while $tCounter <= $TurretCount
$Platform ->start task $tCounter with script !turret.killenemies.std and prio 0: arg1=$tCounter arg2=null arg3=null arg4=null arg5=null
inc $tCounter =
end
START $Platform -> command COMMAND_KILL_ENEMIES : arg1=null, arg2=null, arg3=null, arg4=null
$Platform ->set fire missile probability to 75
$Platform ->start task 10 with script plugin.missile.def.main and prio 0: arg1=null arg2=null arg3=null arg4=null arg5=null
$Platform ->start task 11 with script ArchOrbitalDefenseBlockSCMiCa2 and prio 0: arg1=null arg2=null arg3=null arg4=null arg5=null
$Platform ->start task 12 with script ArchOrbitalDefenseBlockSCMiFi2 and prio 0: arg1=null arg2=null arg3=null arg4=null arg5=null
$Platform ->start task 13 with script ArchOrbitalDefenseBlockSCMiDe2 and prio 0: arg1=null arg2=null arg3=null arg4=null arg5=null
@ = [THIS] -> call script DevilsHalo16LtowerSmlRngSmlPXZSC :
@ = [THIS] -> call script DevilsHalo16LtowerSmlRngSmlPXYSC :
@ = [THIS] -> call script DevilsHalo16LtowerSmlRngSmlPZYSC :
return null
Last edited by Archaine on Mon, 13. Aug 18, 03:19, edited 1 time in total.
- ubuntufreakdragon
- Posts: 5195
- Joined: Thu, 23. Jun 11, 14:57
the main script language of XR is md look up the folders aiscripts and md. (inside the cats)
btw. many of your scripts especially the last one a rather stupid and you can enclose code in [co.de][/co.de] - the points tagseliminates all if clauses and work with quantity which are not a power of 2
btw. many of your scripts especially the last one a rather stupid and you can enclose code in [co.de][/co.de] - the points tags
Code: Select all
$counter = 0
$quantity = 16
$angle.step = 65535 / $quantity
while $counter < $quantity
$angle = $counter * $angle.step
$x = fixed sin $angle
$z = fixed cos $angle
$x = $xCenter + $radius * $x
$z = $zCenter + $radius * $z
inc $counter =
*create stuff
end
My X3 Mods
XRebirth, things left to patch:
In General; On Firing NPC's; In De Vries; Out Of Zone; And the Antiwishlist
XRebirth, things left to patch:
In General; On Firing NPC's; In De Vries; Out Of Zone; And the Antiwishlist
Thanks for that, thought there was a better way.
I'm not a programmer, well wasn't then, kinda pulled all of that out of my butt at the time.
What is the interface to call scripts while in game? There is no script editor, that I have found.
Got the Cat tool running, totally lost at this point, I assume I write my script and append it to a cat, then again how is it envoked in game?
I'm not a programmer, well wasn't then, kinda pulled all of that out of my butt at the time.
What is the interface to call scripts while in game? There is no script editor, that I have found.
Got the Cat tool running, totally lost at this point, I assume I write my script and append it to a cat, then again how is it envoked in game?
actually you can just create a new folder in the extensions folder (which is your own mod you can select from the ingame menu ) and in there create an MD folder where you just add our own MD files. Far easier than messing with Cats/Dats (and also it is not necesary to change the game cats/dats themselves or add such files to the game root - there is always a way to do it with extensions )
Regarding calling Scripts: in for MD you have to define fitting conditions for it to trigger a cue. for Testing purposes <event_object_cycled_weapons object="player.primaryship"/> is a good start since you can easily trigger it.*
example script to print a message on the screen each time the weapons are cycled:
*there are more events available. best get an autocompleting xml editor (based on xsd files) and put both the md.xsd and common.xsd from the games libraries folder inside your md folder, and use the xsi:noNamespaceSchemaLocation="./md.xsd" to use it in your script (maybe needs reloading the File). Alternatively you can search the aforementoined Files with a Text Editor.
Regarding calling Scripts: in for MD you have to define fitting conditions for it to trigger a cue. for Testing purposes <event_object_cycled_weapons object="player.primaryship"/> is a good start since you can easily trigger it.*
example script to print a message on the screen each time the weapons are cycled:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<mdscript name="Example" xsi:noNamespaceSchemaLocation="./md.xsd">
<cues>
<cue name="ExampleCue">
<conditions>
<event_object_cycled_weapons object="player.primaryship"/>
<conditions/>
<actions>
<show_help custom="'Hello World'"/>
<reset_cue cue="this"/> <!-- to repeat this cue when done -->
</actions>
</cue>
</cues>
</mdscript>
*there are more events available. best get an autocompleting xml editor (based on xsd files) and put both the md.xsd and common.xsd from the games libraries folder inside your md folder, and use the xsi:noNamespaceSchemaLocation="./md.xsd" to use it in your script (maybe needs reloading the File). Alternatively you can search the aforementoined Files with a Text Editor.
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
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
Thanks for the assistance. Just getting up and running, lots to absorb.
About to go through the "How to Create a Custom Gamestart tutorial" to get a feel for the system.
I will try you example as a first step.
Is there a way to create a menu button and use that as the trigger?
Any recommendations for free xml editor?
My eventual goal is to import my own custom ship, I have one in Unreal editor that I can explore in VR mode, but it's a static experience. Thought it would be neat to see it working in a real game environment.
Again thanks.
Archaine
About to go through the "How to Create a Custom Gamestart tutorial" to get a feel for the system.
I will try you example as a first step.
Is there a way to create a menu button and use that as the trigger?
Any recommendations for free xml editor?
My eventual goal is to import my own custom ship, I have one in Unreal editor that I can explore in VR mode, but it's a static experience. Thought it would be neat to see it working in a real game environment.
Again thanks.
Archaine
Technically yes, but UI stuff is very diffrent from MD/AIScript. Also it only supports complete file replacements afaik, so each menu can only be changed by one mod each (there is a Mod available which allows multiple mods to hook into the Sidebar though, but i am not familiar with it)Is there a way to create a menu button and use that as the trigger?
In short too much to learn for some quick experimenting imo....
i personally use XmlCopyEdit as Editor and Notepad++ to crawl through Files. Egosoft afaik uses the MS Visual Web Developer.Any recommendations for free xml editor?
Code: Select all
My eventual goal is to import my own custom ship, I have one in Unreal editor that I can explore in VR mode, but it's a static experience.
got an older mod of mine here which adds a Kitbashed new Ship to the Game. not an entirely new Mesh, but its a good start i think:
https://www.dropbox.com/s/zgyoywmi6oqy5 ... us.7z?dl=0
(Not sure if this is the updated Version or the initial one from 2013 though, but as example to build upon it should still work good enough)
Regarding Importing new Meshes i think its best to ask J.L. - he is one of the few i am aware of who has imported custom Meshes into the Game..
will answer further Questions this Afternoon. its already past Midnight here...
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
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
Ok, I have Notepad++ getting XmlCopyEdit now.
Grabbed your dropbox, will work with that a bit.
I will get back with you tomorrow for sure.
Thanks again for the assistance.
Archaine
I got your ship running in the game, I will spend some time to disect it after reading up on the ship system.
(bounced around in the docking bay for five minutes before escaping :)) huh emoticons not working?
XML copy editor gives me validate errors on most of these documents, even the official egosoft ones.
"no decleration found for element 'mdscript, content, etc..'
I assume it is harmless.
I got it to validate my test script by adding a xmlns namespace, still don't fully understand that.
<mdscript xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Arc_Mod" xsi:noNamespaceSchemaLocation="md.xsd">
Completed the XML tutorial on w3schools, makes a little more sense now.
So the xsi namespace pointer gives xml editor the connection to the library for the handy dandy auto-completes. Insanely helpful!
Anyway back to it.
Grabbed your dropbox, will work with that a bit.
I will get back with you tomorrow for sure.
Thanks again for the assistance.
Archaine
I got your ship running in the game, I will spend some time to disect it after reading up on the ship system.
(bounced around in the docking bay for five minutes before escaping :)) huh emoticons not working?
XML copy editor gives me validate errors on most of these documents, even the official egosoft ones.
"no decleration found for element 'mdscript, content, etc..'
I assume it is harmless.
I got it to validate my test script by adding a xmlns namespace, still don't fully understand that.
<mdscript xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Arc_Mod" xsi:noNamespaceSchemaLocation="md.xsd">
Completed the XML tutorial on w3schools, makes a little more sense now.
So the xsi namespace pointer gives xml editor the connection to the library for the handy dandy auto-completes. Insanely helpful!
Anyway back to it.
not my tools - they were created by another user
Also i assume that yes, it will help with X4 because from a technical standpoint its like an Upgraded XR (i would guess its a step similiar as from X2 to X3, but we will see)
Also i assume that yes, it will help with X4 because from a technical standpoint its like an Upgraded XR (i would guess its a step similiar as from X2 to X3, but we will see)
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
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
I rendered the skunk that I pulled. Turned out nice.
The Exterior
https://forums.chaosgroup.com/filedata/ ... id=1006283
https://forums.chaosgroup.com/filedata/ ... id=1006284
https://forums.chaosgroup.com/filedata/ ... id=1006282
https://forums.chaosgroup.com/filedata/ ... id=1006285
https://forums.chaosgroup.com/filedata/ ... id=1006286
https://forums.chaosgroup.com/filedata/ ... id=1006300
The Interior
https://forums.chaosgroup.com/filedata/ ... id=1006289
https://forums.chaosgroup.com/filedata/ ... id=1006288
StudioLighting
https://forums.chaosgroup.com/filedata/ ... id=1006297
https://forums.chaosgroup.com/filedata/ ... id=1006298
https://forums.chaosgroup.com/filedata/ ... id=1006299
Wanted to post them here but don't see a way to upload.
Archaine
The Exterior
https://forums.chaosgroup.com/filedata/ ... id=1006283
https://forums.chaosgroup.com/filedata/ ... id=1006284
https://forums.chaosgroup.com/filedata/ ... id=1006282
https://forums.chaosgroup.com/filedata/ ... id=1006285
https://forums.chaosgroup.com/filedata/ ... id=1006286
https://forums.chaosgroup.com/filedata/ ... id=1006300
The Interior
https://forums.chaosgroup.com/filedata/ ... id=1006289
https://forums.chaosgroup.com/filedata/ ... id=1006288
StudioLighting
https://forums.chaosgroup.com/filedata/ ... id=1006297
https://forums.chaosgroup.com/filedata/ ... id=1006298
https://forums.chaosgroup.com/filedata/ ... id=1006299
Wanted to post them here but don't see a way to upload.
Archaine
Hey UiTrader,
I was going to use your "UTRahanasHybridPlus" as a template and reverse engineer it. After looking through the content in detail, I think maybe a simpler ship might be a better choice. (Like the police car)
The big part I am missing is the connections to the xmf content that represents the ship. Since you were not using any custom meshes, I see no example of where the connections to the mesh data are made, I assume some pointer in your files makes this connection through a xml called out in there somewhere, could you point me in the right direction. I will start picking apart a smaller ship in the mean time, and may find this connection in doing so.
I will be exporting my mesh data from Max and will mimic the format for materials etc. that I am seeing in the imports I have tested. Once I have the dae from max, I assume using the convert tool to turn it into a xmf and then into xml will be the steps needed.
Also finally found the skunk in the dock with the landing gear down, am planning a render for that, took awhile to find, and some skunk parts I was missing are included, like the mining laser, looked everywhere for that and could not find the dae for it. And the weird reverse engine looking things on each side of the lower hull, not sure what those are or where to find them. But they are in the docked version.
Man this is getting thick. But I'm hanging in there.
Archiane
I was going to use your "UTRahanasHybridPlus" as a template and reverse engineer it. After looking through the content in detail, I think maybe a simpler ship might be a better choice. (Like the police car)
The big part I am missing is the connections to the xmf content that represents the ship. Since you were not using any custom meshes, I see no example of where the connections to the mesh data are made, I assume some pointer in your files makes this connection through a xml called out in there somewhere, could you point me in the right direction. I will start picking apart a smaller ship in the mean time, and may find this connection in doing so.
I will be exporting my mesh data from Max and will mimic the format for materials etc. that I am seeing in the imports I have tested. Once I have the dae from max, I assume using the convert tool to turn it into a xmf and then into xml will be the steps needed.
Also finally found the skunk in the dock with the landing gear down, am planning a render for that, took awhile to find, and some skunk parts I was missing are included, like the mining laser, looked everywhere for that and could not find the dae for it. And the weird reverse engine looking things on each side of the lower hull, not sure what those are or where to find them. But they are in the docked version.
Man this is getting thick. But I'm hanging in there.
Archiane
Skunk Landed with the Gear Down. (Vray Renders)
https://forums.chaosgroup.com/filedata/ ... id=1006651
https://forums.chaosgroup.com/filedata/ ... id=1006652
https://forums.chaosgroup.com/filedata/ ... id=1006653
https://forums.chaosgroup.com/filedata/ ... id=1006654
https://forums.chaosgroup.com/filedata/ ... id=1006655
Now with the argon docking area.
https://forums.chaosgroup.com/filedata/ ... id=1006683
https://forums.chaosgroup.com/filedata/ ... id=1006684
https://forums.chaosgroup.com/filedata/ ... id=1006685
https://forums.chaosgroup.com/filedata/ ... id=1006686
https://forums.chaosgroup.com/filedata/ ... id=1006687
Effects
https://forums.chaosgroup.com/filedata/ ... id=1006702
https://forums.chaosgroup.com/filedata/ ... id=1006701
https://forums.chaosgroup.com/filedata/ ... id=1006651
https://forums.chaosgroup.com/filedata/ ... id=1006652
https://forums.chaosgroup.com/filedata/ ... id=1006653
https://forums.chaosgroup.com/filedata/ ... id=1006654
https://forums.chaosgroup.com/filedata/ ... id=1006655
Now with the argon docking area.
https://forums.chaosgroup.com/filedata/ ... id=1006683
https://forums.chaosgroup.com/filedata/ ... id=1006684
https://forums.chaosgroup.com/filedata/ ... id=1006685
https://forums.chaosgroup.com/filedata/ ... id=1006686
https://forums.chaosgroup.com/filedata/ ... id=1006687
Effects
https://forums.chaosgroup.com/filedata/ ... id=1006702
https://forums.chaosgroup.com/filedata/ ... id=1006701
Getting there.
UtiTrader,
I now have my ship in the game!
Complete with Lod's, Collision, and textures.
It has it's own ship group, texture group, etc.
Questions
No need, figured it all out.
Thanks
Archaine
Though I still cannot spawn actors in the skunk and have them work properly, they only have one dialogue option and that is "goodby" If I spawn them on a ship with a dock and assign them to the skunk they work fine. How do you create actor that works directly in the skunk. Does it have a platform entity?
I use the search tool on the forum, but I get no results for anything with it.
I search for "pilot" and it says no results (and I know pilot is mentioned a thousand times in the modding forum?) Just saying my questions are not out of lazyness, I haves spent hours searching.
I now have my ship in the game!
Complete with Lod's, Collision, and textures.
It has it's own ship group, texture group, etc.
Questions
No need, figured it all out.
Thanks
Archaine
Though I still cannot spawn actors in the skunk and have them work properly, they only have one dialogue option and that is "goodby" If I spawn them on a ship with a dock and assign them to the skunk they work fine. How do you create actor that works directly in the skunk. Does it have a platform entity?
I use the search tool on the forum, but I get no results for anything with it.
I search for "pilot" and it says no results (and I know pilot is mentioned a thousand times in the modding forum?) Just saying my questions are not out of lazyness, I haves spent hours searching.
Mesh Modding
Not too many mesh modding post here, so I will contribute from what I have learned.
All of this can exist in a mod folder under extensions - no core packing.
First you have to unpack all the existing data convert xmf to dae with the XRConvertersMain.exe - This will give you a library of examples to work from. Also copy XRConvertersMain.exe and XRConverters.dll into your mod's assets folder to later reconvert your data when your ready. I have a temp folder in my assets directory that I put the dae exported from max in and run the bat file below to reconvert, then copy the xmf's back into the ships data folder.
FOR /R "temp" %%f IN (*.dae) do (
XRConvertersMain.exe exportxmf "temp" "%%f"
)
pause
Set 3dsmax system units to cent and working units to cent or generic.
Importing/exporting max2017-18
Autodesk collada import/export - works best, but does not handle vertex colors and will mess them up so you will have to recolor and alpha these.
Import scale = 1, rest of the settings = default.
Open collada plugin - You get vertex colors, but the mesh is buggy in game, normals or tangents or something messed up. The x-converter will not convert meshes exported with open collada, so Autodesk native will have to be used for export.
I import existing ships dae data in to get proper node layout and naming conventions, node names equate to parts and child names have material data in name (naming conventions is all important in the node tree)
Example.
units_size_xl_capital_destroyer_1 (root node)
......part_heck (dummy node for rear part)
...........part_heckXcollision (collision mesh)
...........part_heckXlod0 (dummy node for rear lod0)
.....................part_heckXlod0XargonXar_hullpattern_01 (visual mesh)
.....................more parts
...........part_heckXlod1 (other levels of detail, usually 4 total)
.....................repeat of the above node with less detailed geo.
The end of the part name is the material info for the part. XargonXar_hullpattern_01 (X's are dividers, first part = directory last part = material name)
Model up your own stuff, rename but keep the node format and create your own mats if you like, create a material group for them in material_library.xml, and put your textures in the assets/textures folder. (tie it all together in material xml - (open it up and look at existing material formats and mimic those but with your own names)
Import in weapons and props from the props folder in the extracted data.
place these where you need, and model around them, (don't export them with your model, they will be replaced by the prop in game, you just need to call out its name an position/rotation in the master ship xml. (I have a script at the end to help get this location data from your model and explain the process in more detail.)
Create your own ship group in shipgroups.xml, and ship type in ships.xml.
I used the existing ship's xml and macro, just renaming stuff and pointing to my new parts(and removing old ones). when you convert your dae's back to xmf it creates an xml that has the part info for your new model, paste new part component data into the ships master xml. (don't forget to point the data connection at the top of the master xml to your own data ie. extensions\modname\assets\shipsize\yourshipname.
Anyway, if anyone wants a clearer tutorial I might put something together, just hard to do without images, and can't post those here.
Here is a maxscript to get location data from your props. open max script editor, create a new script and paste it in, open the listener to see the data.
(--ARC-XpropData - 3dsMax 2018 - should work in lower versions too.
--List of steps you need to do first.
--Zero props to match xworld (ie. turrets - apply xform modifier to prop node(and children) and rotate 180 about x-axis then collapse)
--Zeroing props may differ depending on prop, have not tired very many.
--Place props in relation to master model, and then place prop nodes under root node.
--Rotate root node -90 about x-asis to zero out rotational transforms (y-z axis flip compensation) if woking with z up.
--Select a single prop (just it's main node is fine) and run script to get positon and rotation, cut and paste from script listener into xml.
--I never used Yaw Pitch and Roll rotations, so they will need to be converted (swaped around, made neg/pos, or a mixture)
--Re-rotate your root node back to it's original position before exporting.
--Don't export the props (selectively export or delete props first)
xpos = $.position
px = xpos.x * -1
py = xpos.y
pz = xpos.z
xquat = $.rotation
qw = xquat.w
qx = xquat.x
qy = xquat.y * -1
qz = xquat.z * -1
xrot = $.rotation as eulerAngles
yaw = xrot.z
pitch = xrot.x
roll = xrot.y
format "<position x=\"%\" y=\"%\" z=\"%\" />\n" px py pz
format "<quaternion qx=\"%\" qy=\"%\" qz=\"%\" qw=\"%\" />\n" qx qy qz qw
format "<rotation yaw=\"%\" pitch=\"%\" roll=\"%\" />\n" yaw pitch roll
)
Anyway, hope this helps anyone wanting to work with their own geometry.
Archaine
All of this can exist in a mod folder under extensions - no core packing.
First you have to unpack all the existing data convert xmf to dae with the XRConvertersMain.exe - This will give you a library of examples to work from. Also copy XRConvertersMain.exe and XRConverters.dll into your mod's assets folder to later reconvert your data when your ready. I have a temp folder in my assets directory that I put the dae exported from max in and run the bat file below to reconvert, then copy the xmf's back into the ships data folder.
FOR /R "temp" %%f IN (*.dae) do (
XRConvertersMain.exe exportxmf "temp" "%%f"
)
pause
Set 3dsmax system units to cent and working units to cent or generic.
Importing/exporting max2017-18
Autodesk collada import/export - works best, but does not handle vertex colors and will mess them up so you will have to recolor and alpha these.
Import scale = 1, rest of the settings = default.
Open collada plugin - You get vertex colors, but the mesh is buggy in game, normals or tangents or something messed up. The x-converter will not convert meshes exported with open collada, so Autodesk native will have to be used for export.
I import existing ships dae data in to get proper node layout and naming conventions, node names equate to parts and child names have material data in name (naming conventions is all important in the node tree)
Example.
units_size_xl_capital_destroyer_1 (root node)
......part_heck (dummy node for rear part)
...........part_heckXcollision (collision mesh)
...........part_heckXlod0 (dummy node for rear lod0)
.....................part_heckXlod0XargonXar_hullpattern_01 (visual mesh)
.....................more parts
...........part_heckXlod1 (other levels of detail, usually 4 total)
.....................repeat of the above node with less detailed geo.
The end of the part name is the material info for the part. XargonXar_hullpattern_01 (X's are dividers, first part = directory last part = material name)
Model up your own stuff, rename but keep the node format and create your own mats if you like, create a material group for them in material_library.xml, and put your textures in the assets/textures folder. (tie it all together in material xml - (open it up and look at existing material formats and mimic those but with your own names)
Import in weapons and props from the props folder in the extracted data.
place these where you need, and model around them, (don't export them with your model, they will be replaced by the prop in game, you just need to call out its name an position/rotation in the master ship xml. (I have a script at the end to help get this location data from your model and explain the process in more detail.)
Create your own ship group in shipgroups.xml, and ship type in ships.xml.
I used the existing ship's xml and macro, just renaming stuff and pointing to my new parts(and removing old ones). when you convert your dae's back to xmf it creates an xml that has the part info for your new model, paste new part component data into the ships master xml. (don't forget to point the data connection at the top of the master xml to your own data ie. extensions\modname\assets\shipsize\yourshipname.
Anyway, if anyone wants a clearer tutorial I might put something together, just hard to do without images, and can't post those here.
Here is a maxscript to get location data from your props. open max script editor, create a new script and paste it in, open the listener to see the data.
(--ARC-XpropData - 3dsMax 2018 - should work in lower versions too.
--List of steps you need to do first.
--Zero props to match xworld (ie. turrets - apply xform modifier to prop node(and children) and rotate 180 about x-axis then collapse)
--Zeroing props may differ depending on prop, have not tired very many.
--Place props in relation to master model, and then place prop nodes under root node.
--Rotate root node -90 about x-asis to zero out rotational transforms (y-z axis flip compensation) if woking with z up.
--Select a single prop (just it's main node is fine) and run script to get positon and rotation, cut and paste from script listener into xml.
--I never used Yaw Pitch and Roll rotations, so they will need to be converted (swaped around, made neg/pos, or a mixture)
--Re-rotate your root node back to it's original position before exporting.
--Don't export the props (selectively export or delete props first)
xpos = $.position
px = xpos.x * -1
py = xpos.y
pz = xpos.z
xquat = $.rotation
qw = xquat.w
qx = xquat.x
qy = xquat.y * -1
qz = xquat.z * -1
xrot = $.rotation as eulerAngles
yaw = xrot.z
pitch = xrot.x
roll = xrot.y
format "<position x=\"%\" y=\"%\" z=\"%\" />\n" px py pz
format "<quaternion qx=\"%\" qy=\"%\" qz=\"%\" qw=\"%\" />\n" qx qy qz qw
format "<rotation yaw=\"%\" pitch=\"%\" roll=\"%\" />\n" yaw pitch roll
)
Anyway, hope this helps anyone wanting to work with their own geometry.
Archaine