Help for getting ships in X3:TC

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

User avatar
TrixX
Posts: 2035
Joined: Wed, 18. Aug 10, 14:28
x4

Post by TrixX »

Right was messing with pivots last night trying to get them to work and wasn't having much success. However I think it maybe because I am using a TShip entry based off the Springblossom to do so.

Recreating a TShip entry might fix this issue.
Topcross wrote:All objects have the same orientation, to check if your ship is orientated the right way, import an existing ship and match the orientations, then delete the imported ship again. Now for camera's and turret dummies, you just orientate them correctly, the pivot should rotate with it. If you are using 3ds max, the green pivot arrow, the one of the y-axis, is the one the object is pointed to, so a camera will 'watch' in the direction of that arrow, a turretdummy will shoot in that direction. For the engine emmiters, normally it's just importing them and placing them correctly as engine emitters usually point to the back, they are created this way that while that arrow points to the front, the effect goes in the opposite direction of that arrow.
I tried the fx emitters in both positions for the scene file. However neither worked. I only rotated on the z-axis though. I didn't do a full mirror (z, x and y axes).
Topcross wrote:The rear turret is just orientated wrong in your scene, first check if it is orientated correctly in your scene, if it is, it's probably the pivot that is messed up, either correct the pivot manually, or reimport the turret dummy.
Turrets are both pointing rearwards and seem to fire on a 180 degree angle under the ship (not quite what I was intending for rear turrets!). The cameradummy is facing 180 degrees out which is odd since I took it from the Springblossom so it should be looking in the right direction.
Topcross wrote:If the engine emmiters point the wrong way, same the orientation of the pivot is wrong, check what I said earlier about pivots to fix it.
I also tried these in both directions (z-axis rotation of 180) but to no avail. Will try with a rebuilt TShips entry.
Topcross wrote:If a camera is in a ship, this is usually because the path index isn't filled in correctly in your Tships file.
That's what I suspected, hence hating TShips right now ;)
Topcross wrote:The important thing to remember is that the pivot of objects is always used to define their position and orientation.

Hope that helps.
Was working with them but I imagine unless the data is corresponding in TShips things can get pear shaped :lol:
"If you’re not prepared to be wrong, you’ll never come up with anything original."
Sir Ken Robinson
User avatar
TrixX
Posts: 2035
Joined: Wed, 18. Aug 10, 14:28
x4

Post by TrixX »

Ha found the problem. The Scene file is messed up!

The ship is massively too large, yet the flares have been made miniscule. The ship is also off centre, which means that my camera dummies were working but the ship is at fault, with the exception of the rear camera dummy which is still broken. However I'm getting somewhere ;)

Does anyone know of an issue with resizing where DBOX exports the original size and position of the model?
"If you’re not prepared to be wrong, you’ll never come up with anything original."
Sir Ken Robinson
Eightball Maniac
Posts: 36
Joined: Sat, 9. Apr 05, 07:35
x3tc

Post by Eightball Maniac »

I can't answer your questions on this, but it looks like you're making some good progress. Nice work.
User avatar
TrixX
Posts: 2035
Joined: Wed, 18. Aug 10, 14:28
x4

Post by TrixX »

Next bit is altering the mesh and adding more detail. Currently it has a decided lack of small details.

But yeah DBOX is definitely using original size of the model as when I reduce it to 18% it sits in exactly the same co-ordinates as it should be. Topcross, Killerog, any ideas as to why?

EDIT: Fixed the pivots Topcross. I had rotated them on the wrong axis :roll:

EDIT2: Fixing the pivots brought up a new issue. When I export the flares they seem to reduce to 18% of their original size (opposite of the ship) not only that but they now appear in the opposite place they should in their body file. So when the game imports the ship it has the flares facing the wrong way in the middle of the ship at a minuscule size...

To say I'm now confused is an understatement...

Glad I saved it as a scene file beforehand...
"If you’re not prepared to be wrong, you’ll never come up with anything original."
Sir Ken Robinson
Anubitus
Posts: 693
Joined: Fri, 21. Jan 05, 00:44
x4

Post by Anubitus »

ahum.. TrixX mate, you know what.. upload it somewhere so i can take a look at it and maybe i can help you for a change.. :D

wont be home till later tonight tho..
User avatar
TrixX
Posts: 2035
Joined: Wed, 18. Aug 10, 14:28
x4

Post by TrixX »

LOL what would ya like? The 2011 .max file is set perfectly. The bod's after export are the problem as they come out odd sizes...

All pivots are double checked for scene usage, but I get an M7 size ship with no engine fx and camera dummies all stuck in the body :lol:

My TShips details are now correct but won't read the name from an extracted 0001-0044.xml so will have to convert it to .pck or repack it into a fake patch...

Gah it's been a long day!
"If you’re not prepared to be wrong, you’ll never come up with anything original."
Sir Ken Robinson
User avatar
Topcross
Posts: 180
Joined: Sat, 15. Aug 09, 03:30
x3tc

Post by Topcross »

@TrixX, ok not going to work with quotes as its spread over a few replies, and well I'm to lazy atm to putt them all together. :)

I might do a tutorial soon on how to make a scene file as well, as it seems to be a problem for quite a few people as well. :)

But: maybe one thing you should know to start, if you mess up the pivot somehow, it's usually better to import the object again than trying to fix the pivot manually, unless it's a simple matter of rotating it by like 90°.

Also make sure that your ship is orientated the right way, preferably with its pivot centered and position (0,0,0). You should do this before exporting your ship as a body, because obviously if the pivot of your body object is't different to the one in your scene, your ship will be misplaced. Obviously, also do this before starting to add other objects to the scene, no point at all to place those objects if your ship isn't placed correctly as you'll end up having to place them all again.

A third thing, positions are not determined at all in the Tships file, these are defined in the scene. You should see the Tships file as a catalog, in wich general information and reference to every object of every ship is storred, its more than that, it doesn't contain complex informations, it just tells the game where to look for that information.

About the ship not being the correct scale, did you reset the Xform and collapse it before exporting? If you don't collapse it you might end up with this problem if you scaled the ship.
Also make sure that the ships body in your body file is actually the same as the one you use in your scene to place everything correctly. If you happen to export your body in an earlier stage, then scale it down and forget to export and overwrite the old file, you'll obviously have that problem as well.

@Anubitus: haha, the hint that someone should make a textures tutorial made me laugh. :) I probably won't do that any time soon, because I'm not too good at this myself, I know how to use vanilla textures, but that's it, no experience at all to get my own ingame. Atm I don't plan to make my own as I'm trying to make ships that really fit the X lore. :)

EDIT: just noticed your last post. :)
I find it better to add my own textfile, and make a simple script to read the textfile, check the script/mod library for open entries, if you ever plan on releasing your work.

M7s don't have engine emitters normally btw, but if you want to add them, as far as I know they should work.

The camera's being stuck can only be two things as far as I know:
1: your indexes are not correct in your Tships file, remember that if you export your scene again and overwrite an old scene file, it is possible that the indexes are not the same anymore, so you have to check every time you update the scene file. In my experience, the indexes are in the order the objects got added to the scene, but not 100% sure about that.
2: There is something wrong with your componetents file, this will obviously only happen if you edited it.

Its also quite easy to notice the difference between the two: if the camera's are only in the middle of one ship, it is the first case. If they are stuck on all ships, it's the second one.
User avatar
TrixX
Posts: 2035
Joined: Wed, 18. Aug 10, 14:28
x4

Post by TrixX »

LOL I'm using textures that came with the ship (converting the Angelwing XSP file by Vash_the_stampede). Thing is textures work fine for this one, though I would love to know how to texture a ship using the default textures as then I could get the Ancient Aurora in too.

The ships pivot is centred for the scene (though the centre of the body isn't ideal for the scene so that was altered). The Body file was created using a selective export as a body file from the scene file.

I actually fixed all pivots manually and they are fine now in max just not in the scene file.

However this xform stuff I've never heard of and sounds like whats causing the issue as I had to scale the ship and the flares (both of which are causing the current problems).

So how do I collapse the xform...


EDIT: OOOH there's a online help function with MAX 2011 :D
"If you’re not prepared to be wrong, you’ll never come up with anything original."
Sir Ken Robinson
User avatar
Topcross
Posts: 180
Joined: Sat, 15. Aug 09, 03:30
x3tc

Post by Topcross »

It is impossible that your scene in 3ds max is correctly and your scene file wrong, unless either your DBOX is doing something wrong, our there is still a mistake in your max file that you don't see.

I'm not saying it is not possible at all to correct the pivots manually, just saying it's better to import a new body, usually saving both time and effort, and it also lowers the chances on mistakes.

Reset X form and collapse can be found both in the utilities tab.

Reseft Xform, resets the white box around all objects to the minim size possible, alligned to the 'world'. Collapse collapses everything to one mesh.

Ok, I'll consider a texture tutorial but I don't think I'm the guy to do it, my knowledge on that part of the ship making is even lower than the others. :p
User avatar
TrixX
Posts: 2035
Joined: Wed, 18. Aug 10, 14:28
x4

Post by TrixX »

I bet its the reset xform that needs doing ;)

When I say perfect I mean I have them all perfectly aligned and everything right size, etc...

When I export they return to different size values and positions. I'm guessing this relates to xform :shock:

PS I'm a bit of a noob with Max, used to modelling in Rhino and having nothing to do with textures :p
"If you’re not prepared to be wrong, you’ll never come up with anything original."
Sir Ken Robinson
User avatar
Killjaeden
Posts: 5366
Joined: Sun, 3. Sep 06, 18:19
x3tc

Post by Killjaeden »

A scene can't change the size of an object.
And Xform can't break anything if you didn't break it yourself.
[ external image ]
X-Tended TC Mod Team Veteran.
Modeller of X3AP Split Acinonyx, Split Drake, Argon Lotan, Teladi Tern. My current work:
Image
User avatar
TrixX
Posts: 2035
Joined: Wed, 18. Aug 10, 14:28
x4

Post by TrixX »

Never said the scene did ;)
What was occuring is that upon export with DBOX it was reverting to a different size and position (the originals in both cases) which was causing the alterations in size. The actual MAX scene renders correctly, the BOD scene didn't due to the data being used to export not being fixed in max. So by resetting the xform I believe this fixes the export issue as it changes the mesh position and size data to conform with the current position instead of remembering the original data incase it needs to revert to it.

Well that's what the help file said :D

I didn't even know what xform was until Topcross mentioned it :lol:
"If you’re not prepared to be wrong, you’ll never come up with anything original."
Sir Ken Robinson
User avatar
Topcross
Posts: 180
Joined: Sat, 15. Aug 09, 03:30
x3tc

Post by Topcross »

As far as I know, you only have to reset the Xform when exporting a body, the only thing that is used in a scene file are the pivot positions and orientations and the names, which are the paths. So I'd be really supprised if this would help with your scene.

And as Killjaeden says, if your ship isn't scaled correctly this has nothing to do with the scene, as I said it is something with your object, maybe I didn't point this out to well.

Anyway if your object is not the right size, it can only be due to the fact that there is something wrong with your body file, scene doesn't determine size.
User avatar
TrixX
Posts: 2035
Joined: Wed, 18. Aug 10, 14:28
x4

Post by TrixX »

That's fine. It was the body files that were corrupt in size anyway. The positioning in the Scene file was ok, but the size of the different parts in the scene file is still off. Oddly though this helps me check a theory about the collision box and the ship being in the scene file.

Using Collapse and Reset XForm, I managed to get a correct sized body file for the trails and the ship.
"If you’re not prepared to be wrong, you’ll never come up with anything original."
Sir Ken Robinson
Anubitus
Posts: 693
Joined: Fri, 21. Jan 05, 00:44
x4

Post by Anubitus »

glad you are making progress trixx.. :)

erm, when placing turrets, should i import the dummy file into the ship scene or should i import the scene file for the turret into the ship scene..?

if i understand the workings of the game correcly, one would import the dummy file, place it in the scene and export it with the rest of the scene into the ship scene file and when you start the game the dummy gets replaced by the real thing, is this correct..?

EDIT: after some tinkering with this, i realy doubt this is the way to do this.. :p
killerog
Posts: 3464
Joined: Fri, 28. Oct 05, 16:31
x4

Post by killerog »

Yep you import the dummy into the scene file. Line it up and the game engine replaces it with the turrets scene file.
Image
User avatar
TrixX
Posts: 2035
Joined: Wed, 18. Aug 10, 14:28
x4

Post by TrixX »

Well everything works ok to a point now. The Ship is now M6 size (slightly bigger than a Heavy Centaur in length) and all the guns fire correctly and the aren't aimed like those of the Vali ;)

The Camera's all work fine now the ship's the right size (though I did note the ship is semi-translucent when sun based light sources are aimed at it).

Also managed to confirm my collision detection box theory seeing as the scene file insists on having an m7 size ship in it. When docking normally you dock, it autosaves and then the docking clamp is extended. Now with the bigger collision box it extends before docking, and when having ships fly in formation, they stay in formation, though I think the collision box for my ship is a little large (ship is 18% the size of the collision box!!!) it showed the point well :)

The only issue I do have is the flares not showing. Last time I created the scene file it removed the flare objects and replaced them with an untextured box. Strangely enough the flares never appeared ingame, but for the moment I can live with that.

Just making an edited version of the ship with more detail and actual weapons instead of invisible ones.
"If you’re not prepared to be wrong, you’ll never come up with anything original."
Sir Ken Robinson
User avatar
TrixX
Posts: 2035
Joined: Wed, 18. Aug 10, 14:28
x4

Post by TrixX »

Another quick question, is there a limit on docks for cap ships? Mainly because for some cap ships having a compliment of 20 fighters is like having a swarm of fleas to take on dogs...
"If you’re not prepared to be wrong, you’ll never come up with anything original."
Sir Ken Robinson
User avatar
Topcross
Posts: 180
Joined: Sat, 15. Aug 09, 03:30
x3tc

Post by Topcross »

I think the moment the docking clamps move depends on your performance, for me they always move at the same time I dock followed right by an auto safe.

The number of fighters in a hanger bay has no limit as far as I know, though keep it at realistic numbers. While a hanger of 1000 fighters might be awesome, it is not realistic, will kill your performance when those have to dock/launch and it is almost impossibler to manage. :p

I myself however also think that the carriers are sometimes a bit small and I'm going to creata a whole line of supercarriers (after I finished some other stuff I've planned.).

For the docking/launching bays, as far as I know all vanilla ships use one docking bay and a certain number of launching bay, for example carriers have 8 launching bay while the lighter M7 carriers have less than that. You just have to consider if you want your carrier to be able to launch its fighters fast or not. :)

Not sure what flares you mean btw, the ones of the engines?
User avatar
TrixX
Posts: 2035
Joined: Wed, 18. Aug 10, 14:28
x4

Post by TrixX »

The Engine Trails (flares as they aren't particles) similar to the stock Springblossom and Sabre for instance. For some reason my Scene file won't keep them the same size or even in the same orientation.

For me the clamps in vanilla will always move after the autosave. When I alter the size of the hull in a scene file to be between 20% and 500% bigger the clamps move first then the autosave occurs. The actual hull though doesn't alter it's position from the clamps, hence my theory that the Scene file contains the autopillock collision data, but not the actual hit data for weapons.

Easy way to test is to do change it on the Sabre and do a Terran start. Land at the dock in Neptune straight away and check with two different scene files.
Even better spawn a group of 4 Sabre's and tell them to follow you while in a wing and compare results between the two scene files too :)
"If you’re not prepared to be wrong, you’ll never come up with anything original."
Sir Ken Robinson

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”