Important Message

You are browsing the archived Lancers Reactor forums. You cannot register or login.
The content may be outdated and links may not be functional.


To get the latest in Freelancer news, mods, modding and downloads, go to
The-Starport

Ship Docking Problems

The general place to discuss MOD''ing Freelancer!

Post Wed Jan 04, 2006 4:02 pm

Ship Docking Problems

Hi everyone!

I'm currently finishing the next version of the Monkey Universe Mod and have come across one bug, which I could not solve and do not really know how to solve.

Some of my new VHFs (models by Baene) have problems when docking with jumpgates and tradelanes.
If you approach the gate or the lane in a straight line from directly the front of the lane and the jumpgate, there is no problem and the ships dock as normal.

However, if you fly near for example towards a jumpgate and not directly at the center, but slightly above the center, the ships get problems. Normally a ship would then make a 360 degree turn and dock with the gate (all other ships do this). However some of the new models do the turn, but then do not approach the gate from the right angle. They do not directly fly towards the center of the gate (where the jump-nebulöa-thingy appears), but a bit above this and then they stop (as they do not get into the docking area, which actually sucks them into the gate and triggers the gate tunnel sequence).

I first thought this had something to do with the settings of the ships in the three manouevouring lines (rotation inertia, steering torque and the third one). However, I used the same ones, as in some ships, which do not have these problems and so this cannot be the problem.
I then tried to find bugs in the code of the shiparch.ini, but there are no problems. I even cloned the code of a working ship, except of the nickname and model referring lines and still got the problem with the new ship.

Therefore I'm quite sure that the problem has to do with the actual ship models. I found out that all the buggy ships have one difference to the other ships. They do not have a "HpHeadLight" hardpoint. Could this be a problem?
Another thought was the HpMount, however, as usual and like the working ships, all the buggy ships have the HpMount a bit under the center of the ship. Can there still be a problem with this harpoint?

So, which hardpoints or model related things can cause such an error (missing HpHeadLight, or a mistaken HpMount, or something else?) or can there be something else, causeing this?

Please help me with this, as I'm totally clueless, how to solve this, thanks!

Post Wed Jan 04, 2006 9:00 pm

Which ships from that ship pack? Becuase I use a few myself from his frist one and they work fine for me.
Have you done any editing to the models? Such as the tradelanes and jumpgates and the ships. Becuase that could effect things if you made a mistake editing them.
Any editing that has to do with the tradelanes or jumpgates that you have done can effect it. So look it over one by one and see if there is any error.

Sorry if that doesn't help any, I haven't done any editing to the tradelanes or JG's in my mod yet. But it does sound like it is an error with the model.

Post Thu Jan 05, 2006 2:16 pm

Hi!

Thanks for the reply!

One of the models, which has this problem is the Nephthys VHF from the Asgard 2.1 Mod (another one is the Demon MK2 also from Asgard 2.1).

I did not edit any other model (neither the junpgates, nor the tradelanes. The only new thing are the ships and as I said, some of them have these problems.

They can dock, if you approach the jumpgate or tradelane in a straight line, however, if the ship has to turn and navigate for starting the docking sequence, these models get problems and the ships cannot dock.

It might be a problem with some of the ini files, however, I'm quite sure that it is a problem of the shipmodel itself, as I used the same code with another model and did not get any problems there.

My only idea, was the missing HpHeadLight hardpoint, which I will try to add now and see, if it helps. However, I doubt this and want to know, if some other hardpoint problem, or at least some other mistake in the model can cause such a problem.

Please help me with this, thanks!

Post Sat Jan 07, 2006 3:19 pm

Hi again!

I tested my theory with the missing HpHeadlight hardpoint and it did not work. So this is not the problem.

A description of the bug once again:

Some of the models I use have problems, when docking on jumpgates or tradelanes. They do not line up correctly and head for the center of the gate/lane, as it should be normally. Instead they head for a ninvisible point, which is outside of the docking sphere and so the docking sequence does not function (either the ship just stops and floats in space, or it goes in a never ending straight line past the lane/gate.

As the coding in the ini files (shiparch.ini) is similar to other working ships, I thought that it could be a problem of the model itself.
My question now: What can cause such problems (wrongly positioned HpMount maybe, or a sur file, which does not fit in any way to the model?) and how can I solve them?

Please help me with this!!! Thanks!

Post Sun Jan 08, 2006 12:47 pm

Maybe you should have the maker of the model look at it and fix it up again if you are having this problem.
Maybe he can get it to work.

Post Mon Jan 09, 2006 2:44 pm

well - HpMount should be oriented on 0,0,0 at position 0,0,0 - the mission property should be can_use_berths.You may want to try using FLmodeltool or FLaddradius to fix the model

Post Mon Jan 09, 2006 5:28 pm

Definately get a better matchup on the SUR files with the ships. Lazy folks who've not built proper SURs for a given model can cause all sorts of bad behaviors (including, but not limited to, things such as docking problems, lead recticle not matching target vectors, etc.).

Secondly... look at the physics side of things. If physics are extremely "mushy" (i.e., linear_drag doesn't cancel out the mass quickly) then ships can have docking problems very easily. This is not easy to solve- when it comes to Tradelanes, there simply isn't any solution that's great, as raising the docking_sphere radius may well result in ships docking with the point sideways, and only gradually straightening out.

Thirdly... if all else fails, try putting the HpMount on 0 Y, put it at the front of the ship, and then see what it does. What the FL engine tries to do is align the HpMount with the HpDockMount. This involves it calculating a vector from that tri. But, it can get "confused" if the centerpoint (which seems to be defined from the SUR, not the CMP, whereas for drawing purposes the CMP is the center) is off-center. FLModeltool occasionally places the SUR's centerpoint far enough from the CMP's origin that you will see some strange behaviors, especially with larger objects.

So... basically... docking problems can be fairly complicated. But usually if you run a SUR through FLModel Tool (using a "fresh", un-modded SUR) you will get good results.

Post Tue Jan 10, 2006 2:22 am

Hi!

Many thanks for all the replies!!!

Argh, you were right, the problem are the sur files. However, I still do not know how to solve the problem.

Here's an example: I have one model, which is similar to the Anubis. Therefore I used the original Anubis sur file on it. Now, the model was run through FLModelTool (for radius and center being right) and then put into the game. With the original Anubis sur file, it works perfectly.
However, the Anubis sur file does not fit totally, as it is situated wrongly on the model. The nose is not covered totally and at the back, the sur file is longer than the model.
If I now change the sur file with FLModelTool (fit to cmp option), it just gets moved to the front of the ship, so that the whole nose is covered and the back is not anymore longer than the cmp. I can clearly see, that the sur file was only moved in one direction, but not changed in size or so.
Now, the docking problems appear.
Of course, I thought, I just move the HpMount to the front (because the sur file has been moved) and it will be okay. So, I moved the HpMount in the same direction as the sur (also the same length) and tried it again. Unfortunately, the docking problems still appear.

Now, how can I solve this? I have to resize the sur file with FLModelTool (I used the original unmodded Anubis sur file). But then, where do I hve to move the HpMount? Or, how can I exactly find out, how to position the HpMount so that it works??? Can maybe FLModelTool tell me, where the center of the new sur file is?

Please help me with this! Thanks!

Post Tue Jan 10, 2006 9:47 am

@ Black Eagle, I've been adding some of the older ships to my own mod, and found that alot of the sur files don't fit.

start FLModelTool and load in the cmp file your having problems with, on the right you have a window with 2 sets of info "old data" and "new data" there should be a difference in both sets, if there is then just click "save" to make a new cmp thats been recentered. Now select the sur you want to use and "resize" it using the "fit to cmp" option and then "save" it. Now have a look at it in HardCmp and load in the sur to see if it fits, Having just done this to a dozen ships I know it should work OK

**shuffles of with a new headache**

Post Tue Jan 10, 2006 12:16 pm

Hi!

Thanks Bejaymac, however, this is exactly what I did. First loaded the cmp in FLModelTool and saved it with the new data. And then I loaded the sur and clicked "fit to cmp" and used the cmp I just saved.
When I look at it in HardCMP, it seems to be good and the sur fits great to the cmp. However, ingame I still have the dockingproblems then...

Thanks anyway and to anyone else, please post here, if you know something!

Post Tue Jan 10, 2006 1:52 pm

sorry Bejaymac!!!

I thought I had done exactly what you said before, but must have missed something.
I just did it again and now it works, all the new ships can dock everywhere!

Many thanks for the help to everyone!

Black Eagle

Post Tue Jan 10, 2006 2:57 pm

Black Eagle it was the saving of the altered cmp it took me about a dozen trys before I figured out that was the important part.

**shuffles of with a new headache**

Post Tue Jan 10, 2006 4:19 pm

NP, glad to help

Post Wed Jan 11, 2006 7:07 am

Yes, could be the saving, but whatever...

Many thanks again for the help, Monkey Universe 1.85 will be released in the next days and that's also because of you!

Black Eagle, leader of the Monkey Universe Modding Team

Return to Freelancer General Editing Forum