I've practiced docking with it - I found that I don't get to fly into the dock to, um, dock ... even though the back of the docking bay is close to the models origin ... so what determines this?
You are docked when 75% (could be eighty %, Im not fully sure) of your ship has passed the point of origin of the bay. Therefor is the origin of a bay not defined in the centre or back but always at its front.
Also make sure you defined the docking bay correct, or the system will generate a default bay in the ship centre. For to be recognised as dock with the old subentity definitions, the subentity name has to contain the word 'dock' somewhere in the name. Very user unfriendly, so better define it with the new method and add a is_dock key.
Eric, as per my post in the "things i wish i knew..." thread, when i built the Nuit i could only get the dock working by building the dock at the Origin and then shifting it up to the required position - is that still necessary or does the is_dock now enough to work out the positioning? The dock for one of my new stations is a much longer tunnel than normal stations, if the origin is defined at the front that's going to ruin it, i'll have to work out a way around it :-\
Just checking how the new-style subentities are supposed to work...
Your code should work when two missing semicolons are added. And when the orientation or position has the default value, you just can ignore the entries. So, the following should work
The dock for one of my new stations is a much longer tunnel than normal stations, if the origin is defined at the front that's going to ruin it, i'll have to work out a way around it :-\
The origin of the dock is the position value defined in shipdata. When the dock is long enough, you could define the docks origin a bit more to the centre of the dock and use a corresponding value in shipdata. For checking if a ship is docked, the code only checks the position defined in shipdata. It is about 90% that must have past the position when I read it correct and not the 75% I mentioned before. But the code is a bit complex as it also corrects a bit for not entering perpendicular.
so just to clarify, cos i'm feeling a bit thick at the mo : that position attribute is just for info, it doesn't actually move the dock model itself? it's just a point in space that you have to pass to dock? The wiki suggests it's the subent position, which is why i'm getting baffled as that just sounds like the above situation, of having to build a dock at origin then shift it.
If you want to find out what a ship does and why (or why it doesn't do what you want it to do) AI-logging is what you need. I'm not sure how to enable it for one ship without using the JS-console, but I'm sure others will be able to help.
so just to clarify, cos i'm feeling a bit thick at the mo : that position attribute is just for info, it doesn't actually move the dock model itself? it's just a point in space that you have to pass to dock? The wiki suggests it's the subent position, which is why i'm getting baffled as that just sounds like the above situation, of having to build a dock at origin then shift it.
In Wings3D (or whatever) place the model so that the origin (0,0,0) is in the centre of the front of the docking bay (or to put it another way, there is nothing in the +z direction beyond 0, the whole dock is "behind" the plane made by the X-Y axes).
Then use the sub-ent position when you make your shipdata.plist file for the mother to move the position of the dock sub-ent to the correct place. So if the dock sub-ent is defined as above, then that position would be in the centre of the hole you've cut in your model for the bay.
When sufficient ship crosses the dock x-y plane, it docks.
It s safest to put the dock x-y plane at the mouth of the dock to avoid ships attempting to dock slamming into the back wall.
In my carrier - I have separated the bits I intended to be smoothed and consigned them to a subentity - the only major subentity. It looks like I will need to calve off the docking bay as well.
An alternative would be to create another entity either enclosing the docking bay just outside it or perhaps as a small design feature inside the bay itself - rows of lights say - I can reposition this model to make the docking process work the way I want.
so just to clarify, cos i'm feeling a bit thick at the mo : that position attribute is just for info, it doesn't actually move the dock model itself? it's just a point in space that you have to pass to dock? The wiki suggests it's the subent position, which is why i'm getting baffled as that just sounds like the above situation, of having to build a dock at origin then shift it.
In Wings3D (or whatever) place the model so that the origin (0,0,0) is in the centre of the front of the docking bay (or to put it another way, there is nothing in the +z direction beyond 0, the whole dock is "behind" the plane made by the X-Y axes).
Then use the sub-ent position when you make your shipdata.plist file for the mother to move the position of the dock sub-ent to the correct place. So if the dock sub-ent is defined as above, then that position would be in the centre of the hole you've cut in your model for the bay.
Hope that makes it a little clearer?
that's how i used to do it, for the Nuit etc, it just seemed from the way i was reading it that things had changed. my bad. current thought is to place my tunnel w/ the origin 90% along the length of the tunnel and shift the model into position so that (i hope) you get to fly along the tunnel before hitting the dock trigget at the end.
Confirmed ... okaaay: now to see if I can remember how to convert it.
$ flip -u *.py
yep - that was it.
OK - start console, it says "waiting for connection" ... start Oolite, select a commander and launch ... try to click "run" and it asks me to restart oolite ... then it just sits there.
You also need to install the Basic-debug.oxp. Once you have it installed, run the console, the run Oolite and you should be able to see the console establishing a connection with the game. Once that is done, you can interact with the game in realtime. You generally do not have to click the Run button.
Thanks AC - twas what was needed ... discovered that some scripts weren't loading as I'd renamed them on the outside but neglected to rename their references on the inside. All done now. Also treated the secondary entity as a dock, even though it aint the physical dock, and that made the docking work properly. Shot it with rear laser on the way out and got pulverized by the carrier's 5x fwd mil lasers cool AND saw it launch a defender. I'll add the glows and upload an oxp for people to play with. Prob by the weekend my time.
SB-Navy.oxp
... adds one large carrier (the big triangular one from before) with a naming scheme based on Norse Gods or other godlike beings.
... you need the re2dux oxp installed or the defence ships won't work - these are place fillers, I'll add dedicated navy versions later.
At the mo I'm puzzled that it wont respond to docking requests ... it doesn't need a request, but it should say so.
I'm hoping that folk here will try it out and generally destruct test it find all the holes, maybe fill a few, before I add the other carrier.
Oh - and it is crying out for a normalmap ... anyone want a go?