|
|
 |
View previous topic :: View next topic |
 |
|
|
|
|
Author |
Message |
|
|
|
|
|
DeadlyDa

Joined: 05 Jan 2004 Posts: 1831 on topic Location: Wellington, New Zealand

|
Posted: Fri, 6. Jan 06, 07:22 Post subject: External Docking Sorted (real, no scripting) + Custom Asteroid Base (pix) |
|
|
Ok...progress of sorts.
I've put in a ton of time and energy into my R&D efforts trying to understand how X3 worked. I had managed to create custom turrets with moving parts, and several custom docking facilities (internal and station). Unfortunately, my method was massively complicated and when I tried to apply it to creating a simple external docking facility, it turned into an exercise in futility. I ended up wasting a huge amount of time without any success.
During an exchange with Doubleshadow I mentioned it...and he leaped to the rescue with a simple 1-line fix Man, did I feel stupid...I probably wasted 30-40 hours on that one
(Well, it's not wasted I guess, since I now know how to do custom docking facilities with full automation )
Before I go further, a word of warning....
If you haven't been playing around with the new type files...and are not already reasonably comfortable with basic ship modding, the following won't make much sense. If you do find this "heavy going", you should take a bit of time to look at the scripting and modding information which is posted in the old X2 forums...most of it is directly applicable to X3.
OK...before getting out your secret squirrel decoder rings, here is a bit of eye-candy to keep you interested
First, the custom asteroid base that will be included in the ship mod I will soon be releasing (see this thread http://forum2.egosoft.com/viewtopic.php?t=118210 ).
...and an inside view of the fighter hanger bay:
Here are some shots of the external docking. As you can see, I have implemented 2 separate docking parts; one for fighters only, and another that will handle M6, TP, and TS class ships.
OK...here we go...
First, a quick look at the "complicated" approach, which involves modifications to both Dummies.txt and CutData.txt.
The best way to understand how to do this is to open those two files in a text editor, and follow the definitions of the old X2 00079.bod docking part by using the example of the "dock5port" docking facility.
The way it works is:
1. The old 79 part is defined in Dummies.txt in section SDTYPE_DOCK, and references the part 9009.
2. The 9009 part doesn't physically exist, but via the CutData.txt file references the "stations\docks\dock5portsscenetemp" bod file.
3. The "stations\docks\dock5portsscenetemps" is an embedded bod (scene) file which includes 5 19023 objects (which turn out to be the actual docking arm scenes).
4. The 19023 objects are defined in the SDTYPE_ANIMATED section of Dummies.txt, and in turn reference part 9010.
5. The 9010 part is another "virtual" part that, via the CutData.txt file references the actual "stations\docks\dock5ports_arm_scene" scene file.
Whew! Well, along comes Doubleshadow to the rescue
He found a simple 1-line fix that works just like the old X2 external docking port. There aren't any cool X3 animations, but it is simple and works perfectly.
What he found was that you could add a single line to the SDTYPE_ANIMATED section of Dummies.txt that references a renamed version of the 00535.bod part (which is the reference part for fighter docking positions). See the two line I have included below for a couple of "live" examples.
DS and I have been playing around with the various flags in Dummies.txt, and here is what we have found so far:
For ship flags:
++ ANIMATEDF_DOCKPORT_FIGHTER - allows M5, M4, and M5 class ships to dock.
++ ANIMATEDF_DOCKPORT_STANDARD - allows M5, M4, m3, M6, TP, and TS class ships to dock.
++ ANIMATEDF_DOCKPORT_HUGESHIP - Support for M1, M2, and TL class ships.
For the docking action/capabilities flags:
++ ANIMATEDF_DOCKPORT_UDDOWN - ship will be pushed "down" slightly - like what you see when you undock from a station (other than trading stations, which use launch ports).
++ ANIMATEDF_DOCKPORT_BELOW60 - controls the angle of the docking guidance lights, and rotates them down by 60 degrees.
++ ANIMATEDF_DOCKPORT_HANGAR - ship will "disappear" when docked, like at trading stations and capital ships.
++ ANIMATEDF_DOCKPORT_STARTONLY - These ports are only used for launching ships (usually fighters).
++ ANIMATEDF_DOCKPORT_LANDONLY - These ports will only be used for docking a ship, and need to be used in conjunction with one or more ports defined with the "STARTONLY" flag.
++ ANIMATEDF_DOCKPORT_QUICKLAUNCH - This will cause the ship to depart the dock at full speed
It doesn't take a rocket scientist to see that there may well be a number of flags we know nothing about. Also, by defining new flags, and implementing code to handle them, Egosoft can easily add additional functionality.
One thing to remember when adding lines to Egosoft type files; make very sure you check for the presence of a line count at the beginning of a file or section of a file. For example, simply adding lines to a section of Dummies.txt is a useless exercise unless you also increment the line count for the section. Having said that, not every type file has this constraint...so it's up to you to check.
For my soon-to-be-released mod, here are the two lines I have added to the SDTYPE_ANIMATED section of Dummies.txt:
| Code: |
ships\props\new_535_ExtDock_dummy;ANIMATEDF_DOCKPORT_FIGHTER;0;
ships\props\new_TP-TS_ExtDock_dummy;ANIMATEDF_DOCKPORT_STANDARD;0; |
If you just want to use the parts I have built, I should have the first release of my ship/station mod out this weekend, and it will include at least the above two lines. I have also added in a double laser turret (modeled on the old 00091.bod part from X2) with full rotation...like the Egosoft-supplied "big_turret" weapon.
_________________

- Also check out the DDTC Forums, and the X-Wiki |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
unfunfofmpc
Joined: 12 Nov 2005 Posts: 296 on topic

|
Posted: Fri, 6. Jan 06, 08:34 Post subject: |
|
|
Wow, nice stuff indeed. Get rid of those ugly black/white textures at the bottom of the grendel . Anyway, what exactly will this ship-mod include?
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
AalaarDB
Joined: 29 Jan 2004 Posts: 2279 on topic

|
Posted: Fri, 6. Jan 06, 08:56 Post subject: |
|
|
If you ever want to join the military, or become a space mogul, here's a tip. Do not post a picture of your base with an arrow pointing to the super secret hidden entrance!!!!
_________________ My Scripts |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
X-it
Joined: 06 Nov 2002 Posts: 1217 on topic Location: Norway

|
Posted: Fri, 6. Jan 06, 09:29 Post subject: |
|
|
LOL AalaarDB!
DeadlyDa, this looks amazing! M3 docked with an M6 docked with an M2. Love it!
And we can actually fly around inside the docking bay like in X2/X-t? Excellent! Off to find a suitable asteroid now. Cheers!
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
bendyspex
Joined: 13 Apr 2004 Posts: 708 on topic

|
Posted: Fri, 6. Jan 06, 09:40 Post subject: |
|
|
Amazing, especially since I have just taken over New Income, and need a base for my Teladi Massacre . Any idea when this will be release, and will the M3 docking to an M6 be for all ships, and the same for M6 to M2.
Great work 
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
CCA
Joined: 07 Feb 2004 Posts: 80 on topic

|
Posted: Fri, 6. Jan 06, 09:43 Post subject: |
|
|
This looks awesome, I will finally be able to set up my secret special forces base now .
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
twistedtech

Joined: 03 Nov 2003 Posts: 154 on topic Location: The National Forest

|
Posted: Fri, 6. Jan 06, 11:19 Post subject: |
|
|
Absolutely out-******-standing!
Brilliant!!
_________________ Try not to let your mind wander... It is too small to be out by itself. |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
doubleshadow
Joined: 12 Mar 2004 Posts: 671 on topic Location: Czech Republic, Prague

 |
Posted: Fri, 6. Jan 06, 11:51 Post subject: |
|
|
Why do I have to read the forum to find out what are you up to?
I want that mod too! 
Last edited by doubleshadow on Fri, 6. Jan 06, 14:53; edited 1 time in total |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
-XTM-

Joined: 12 Nov 2005 Posts: 1277 on topic Location: The Netherlands

|
Posted: Fri, 6. Jan 06, 12:26 Post subject: |
|
|
Very impressive research!!!
_________________ The Xtended Mod
Need Help?
Ask Questions / View the FAQ's at TheXUniverse Forums
Read the News on Mod Developments at our Website |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Red Spot

Joined: 04 Feb 2005 Posts: 3224 on topic Location: The Netherlands

|
Posted: Fri, 6. Jan 06, 12:28 Post subject: |
|
|
awesome Deadly ..
makes me wonder ..
I'm working on a 'produce my own fighters' script ..
but using the PHQ .. wich s^(ks ..
now I'll make it with that anyway .. but if I could, in time, hook it up to your own 'secret astroid ship production plant' that would be even better ..
(I'll ask you in time .. )
G
_________________ Last edited by Red Spot on Sat, 2. Jul 05, 20:05; edited 34 times in total |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Kvalyr
Joined: 01 May 2005 Posts: 330 on topic Location: Ireland

|
Posted: Fri, 6. Jan 06, 14:42 Post subject: |
|
|
Excellent work, DeadlyDa and Doubleshadow, Kudos to you both.
Can external-docking only be applied to new/edited ship models or could it be applied to existing M6s etc without model-editing?
What I mean is; does it only require you to edit existing text/xml files to allow external docking of small ships on M6/etc or do the models of the M6s need to be edited to add docking-tags/locations, as well as editing the text files?
_________________
- [MOD][AP] ZMissionTweak - Tweak Mission Time-Limits/Rewards |
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
doubleshadow
Joined: 12 Mar 2004 Posts: 671 on topic Location: Czech Republic, Prague

|
Posted: Fri, 6. Jan 06, 14:56 Post subject: |
|
|
| Zurechial wrote: |
Excellent work, DeadlyDa and Doubleshadow, Kudos to you both.
Can external-docking only be applied to new/edited ship models or could it be applied to existing M6s etc without model-editing?
What I mean is; does it only require you to edit existing text/xml files to allow external docking of small ships on M6/etc or do the models of the M6s need to be edited to add docking-tags/locations, as well as editing the text files? |
You have to edit the ship's scene file to add the docking point. Ironically, the old X2 ships can work right away, you would just have to change the types/Dummies.txt.
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Kvalyr
Joined: 01 May 2005 Posts: 330 on topic Location: Ireland

|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
Matthias_N
Joined: 19 Mar 2005 Posts: 120 on topic Location: Germany

|
Posted: Fri, 6. Jan 06, 17:01 Post subject: |
|
|
So the steps to add external docking to a ship are the following?
1. Copy "objects\v\00535.bod" two times, rename one to "new_535_ExtDock_dummy.bod" and the other to "new_TP-TS_ExtDock_dummy.bod".
2. Place them both in "objects\ships\props\" and add the two lines to "types\Dummies.txt".
3. Add a new path to the ships scene file with eighter "new_535_ExtDock_dummy" or "new_TP-TS_ExtDock_dummy" depending on what ships should be allowed to dock.
4. Change the ships count for docking slots in the "types\tships.txt" file to a negative value, equal to the ammount of docking paths you added to the ships scene file.
Is this right?
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
NovaFlyer Guest
|
Posted: Fri, 6. Jan 06, 17:08 Post subject: |
|
|
*drools* 
|
|
|
|
|
|
|
Back to top |
|
|
|
 |
|
|
|
|
|
|
|
 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
 |
|
|
|
|
|