EnglishGermanFrenchRussianPolishItalianSpanish
Log inRegister
 
External Docking Sorted (real, no scripting) + Custom Asteroid Base (pix)
Post new topic Reply to topic Goto page 1, 2, 3, 4, 5, 6, 7  Next
View previous topic :: View next topic
Author Message
DeadlyDa



MEDAL

Joined: 05 Jan 2004
Posts: 1831 on topic
Location: Wellington, New Zealand
Thank you for registering your game
PostPosted: Fri, 6. Jan 06, 07:22    Post subject: External Docking Sorted (real, no scripting) + Custom Asteroid Base (pix) Reply with quote Print

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 Very Happy Man, did I feel stupid...I probably wasted 30-40 hours on that one Embarassed

(Well, it's not wasted I guess, since I now know how to do custom docking facilities with full automation Rolling Eyes )

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 Very Happy

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 Very Happy

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address MSN Messenger
unfunfofmpc





Joined: 12 Nov 2005
Posts: 296 on topic

Thank you for registering your game
PostPosted: Fri, 6. Jan 06, 08:34    Post subject: Reply with quote Print

Wow, nice stuff indeed. Get rid of those ugly black/white textures at the bottom of the grendel Razz. Anyway, what exactly will this ship-mod include?

Back to top
View user's profile Send private message
AalaarDB





Joined: 29 Jan 2004
Posts: 2279 on topic

Thank you for registering your game
PostPosted: Fri, 6. Jan 06, 08:56    Post subject: Reply with quote Print

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
View user's profile Send private message Send e-mail
X-it





Joined: 06 Nov 2002
Posts: 1217 on topic
Location: Norway
Thank you for registering your game
PostPosted: Fri, 6. Jan 06, 09:29    Post subject: Reply with quote Print

LOL AalaarDB! Very Happy

DeadlyDa, this looks amazing! Surprised 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
View user's profile Send private message
bendyspex





Joined: 13 Apr 2004
Posts: 708 on topic

Thank you for registering your game
PostPosted: Fri, 6. Jan 06, 09:40    Post subject: Reply with quote Print

Amazing, especially since I have just taken over New Income, and need a base for my Teladi Massacre Twisted Evil . 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 Very Happy

Back to top
View user's profile Send private message
CCA





Joined: 07 Feb 2004
Posts: 80 on topic

Thank you for registering your game
PostPosted: Fri, 6. Jan 06, 09:43    Post subject: Reply with quote Print

This looks awesome, I will finally be able to set up my secret special forces base now Very Happy.

Back to top
View user's profile Send private message
twistedtech





Joined: 03 Nov 2003
Posts: 154 on topic
Location: The National Forest
Thank you for registering your game
PostPosted: Fri, 6. Jan 06, 11:19    Post subject: Reply with quote Print

Absolutely out-******-standing!

Brilliant!!


_________________
Try not to let your mind wander... It is too small to be out by itself.
Back to top
View user's profile Send private message
doubleshadow





Joined: 12 Mar 2004
Posts: 671 on topic
Location: Czech Republic, Prague
Thank you for registering your game
modified
PostPosted: Fri, 6. Jan 06, 11:51    Post subject: Reply with quote Print

Why do I have to read the forum to find out what are you up to? Wink

I want that mod too! Very Happy



Last edited by doubleshadow on Fri, 6. Jan 06, 14:53; edited 1 time in total
Back to top
View user's profile Send private message
-XTM-





Joined: 12 Nov 2005
Posts: 1277 on topic
Location: The Netherlands
Thank you for registering your game
PostPosted: Fri, 6. Jan 06, 12:26    Post subject: Reply with quote Print

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
View user's profile Send private message Visit poster's website
Red Spot





Joined: 04 Feb 2005
Posts: 3224 on topic
Location: The Netherlands
Thank you for registering your game
PostPosted: Fri, 6. Jan 06, 12:28    Post subject: Reply with quote Print

awesome Deadly .. Surprised

makes me wonder .. Rolling Eyes

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 .. Rolling Eyes

(I'll ask you in time .. Very Happy )


G


_________________
Last edited by Red Spot on Sat, 2. Jul 05, 20:05; edited 34 times in total
Back to top
View user's profile Send private message Visit poster's website
Kvalyr





Joined: 01 May 2005
Posts: 330 on topic
Location: Ireland
Thank you for registering your game
PostPosted: Fri, 6. Jan 06, 14:42    Post subject: Reply with quote Print

Excellent work, DeadlyDa and Doubleshadow, Kudos to you both. Very Happy


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
View user's profile Send private message
doubleshadow





Joined: 12 Mar 2004
Posts: 671 on topic
Location: Czech Republic, Prague
Thank you for registering your game
PostPosted: Fri, 6. Jan 06, 14:56    Post subject: Reply with quote Print

Zurechial wrote:
Excellent work, DeadlyDa and Doubleshadow, Kudos to you both. Very Happy


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
View user's profile Send private message
Kvalyr





Joined: 01 May 2005
Posts: 330 on topic
Location: Ireland
Thank you for registering your game
PostPosted: Fri, 6. Jan 06, 15:25    Post subject: Reply with quote Print

Quote:
You have to edit the ship's scene file to add the docking point.


I feared as much. Ah well, I'm sure someone else will do it eventually.

Great work, both of you Wink


_________________
- [MOD][AP] ZMissionTweak - Tweak Mission Time-Limits/Rewards
Back to top
View user's profile Send private message
Matthias_N





Joined: 19 Mar 2005
Posts: 120 on topic
Location: Germany
Thank you for registering your game
PostPosted: Fri, 6. Jan 06, 17:01    Post subject: Reply with quote Print

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
View user's profile Send private message
NovaFlyer
Guest








PostPosted: Fri, 6. Jan 06, 17:08    Post subject: Reply with quote Print

*drools* Smile Very Happy

Back to top
Display posts from previous:   
Post new topic Reply to topic Goto page 1, 2, 3, 4, 5, 6, 7  Next
 
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
Control Panel
Login Data
The time now is Tue, 21. May 13, 09:07

All times are GMT + 2 Hours


Board Security

Copyright © EGOSOFT 1989-2009
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.35353 seconds, sql queries = 74