Helloes, I've been looking for a script that can automatically align factory nodes for placement. While FCC helps, it doesnt do much for mines and still has room for improvement.
Should one exist please let me know.
Having not found one I've started digging to see if its feasable to do so based on the constraints of scripting using my experience in coding in other languages.
Math options seem severely limited but there seem to be some math libraries that would help with it.
The goal would be to select an already placed factory, and one to place. Choose nodes from both factories (numerically, in order of appearance in the bod file), distance and rotation of second factory around that node.
The bod files seem to contain information of the positioning and rotation of the node in relation to the factory. Therefore one would need to calculate the offset off the node, then trace a vector x distance to where the other node would be and calculate the point and rotation the second factory must have to make the node be in the correct position and rotation.
It doesnt not seem possible to draw information in the bod files directly ingame as far as ive found (to get the data on the nodes). So one owuld need to parse all the scene files for the factories with a custom parser (which i could make) after extracting them (probably using x3 editor) and crease an array with the values one could index after getting the factory type.
I need help interpreting the scene files that come with x3 editor. Ive eye'd the code for dbox2 but all the flag posibilities make it confusing.
P 16; B dummy_connection; N Bdummy_connection; b // idx 18
{ 0x2002; -439161; 5939; 190296; 0.500000; 0.707107; -0.707107; -0.000000; -1; 1; } // 0
From my searches -439161; 5939; 190296; refer to the position of the node relative to the factory, sideways, upwards, forward.
0.707107; -0.707107; -0.000000; are the rotation. and the last number, 1; is the animation frame.
But what values are those in and what ratio do they have with ingame meters? Same with the rotation, what values are they and how do they translate to degrees or radians?
And a more general scripting question, does the station class have some sort of public variables that can be called? like station.type or something of the sort or is everything processed through the script functions like [retvar] = [var/station] get type of (just guessing at this).
Factory node alignment script (request / help with script / BOD scene format )
The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
Post Reply
1 post
• Page 1 of 1
Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”
Jump to
- English Forums
- ↳ X4: Foundations
- ↳ X4: Foundations - Spoilers
- ↳ X4: Foundations - Technical Support
- ↳ X4: Foundations - Scripts and Modding
- ↳ Construction Community
- ↳ X Wiki Discussion
- ↳ X Rebirth Universe
- ↳ X Rebirth VR Edition
- ↳ X Rebirth - Technical Support
- ↳ X Rebirth - Scripts and Modding
- ↳ X³: Farnham's Legacy
- ↳ X³: Farnham's Legacy - Scripts and Modding
- ↳ X Trilogy Universe
- ↳ X³: Terran Conflict / Albion Prelude / Farnham's Legacy - Technical Support
- ↳ X³: Terran Conflict / Albion Prelude - Scripts and Modding
- ↳ X³: Reunion, X²: The Threat, X-T and X-BTF - Technical Support
- ↳ X³: Reunion - Scripts and Modding
- ↳ X²: The Threat - Scripts and Modding
- ↳ Creative Universe
- ↳ Off Topic English
- Deutschsprachige Foren
- ↳ X4: Foundations
- ↳ X4: Foundations - Spoilers
- ↳ X4: Foundations - Technische Unterstützung
- ↳ X4: Foundations - Scripts und Modding
- ↳ X Rebirth Universum
- ↳ X Rebirth VR Edition
- ↳ X Rebirth - Technische Unterstützung
- ↳ X Rebirth - Scripts und Modding
- ↳ X³: Farnham's Legacy
- ↳ X³: Farnham's Legacy - Scripts und Modding
- ↳ X Trilogie Universum
- ↳ X³: Terran Conflict / Albion Prelude / Farnham's Legacy - Technische Unterstützung
- ↳ X³: Terran Conflict / Albion Prelude - Scripts und Modding
- ↳ X³: Reunion, X²: Die Bedrohung, X-T und X-BTF - Technische Unterstützung
- ↳ X³: Reunion - Scripts und Modding
- ↳ X²: Die Bedrohung - Scripts und Modding
- ↳ Kreative Zone
- ↳ Off Topic Deutsch
- Forum Français
- ↳ X4: Foundations
- ↳ Support et Aide pour X4: Foundations
- ↳ Script et Modding pour X4: Foundations
- ↳ L'Univers X Rebirth
- ↳ Support et Aide pour X Rebirth
- ↳ Script et Modding pour X Rebirth
- ↳ Support et Aide pour la Trilogie X
- ↳ L'Univers de la Trilogie X
- ↳ Script et Modding pour la Trilogie X
- ↳ Off Topic Français
- Forum Italiano
- ↳ X4: Foundations
- ↳ Supporto Tecnico per X4: Foundations
- ↳ Script e Modding per X4: Foundations
- ↳ L'Universo di X Rebirth
- ↳ Script e Modding per X Rebirth
- ↳ Supporto Tecnico per X Rebirth
- ↳ L'Universo della Trilogia di X
- ↳ Script e Modding per la Trilogia di X
- ↳ Supporto Tecnico per la Trilogia di X
- ↳ Off Topic Italiano
- Polskie Fora
- ↳ Polskie / Polish X-Forum
- ↳ Polskie / Polish Off Topic
- Other Languages
- ↳ Česky / Czech X-Forum
- ↳ Dansk / Danish X-Forum
- ↳ Español / Spanish X-Forum
- ↳ Nederlands / Dutch X-Forum
- ↳ Português / Portuguese X-Forum
- ↳ Русский / Russian X-Forum
- DevNet: General
- ↳ MSCI Reference
- DevNet: X4: Foundations
- ↳ X4: Foundations - Public Beta Feedback
- DevNet: X Rebirth
- ↳ XR - Technical Troubleshooting