Ship Tricks: Mini-Guides. NO 3D modeling required! (Bullwinkle) [Guide][TC][AP]

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

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

Post Reply
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Fri, 8. Jun 12, 05:33

dtrowle wrote:Does X3AP handle ships any different than what X3TC did? Could I have possibly corrupted the scenes file during the extract and copy process? I left the "Decmpress compressed files" and "Queue BOB files to bod compiler" unchecked. Should I have?
Ships are handled the same way in AP as in TC. The only thing to note is that types is in addon, while objects and dds are not:
  • x3ap\addon\types
    x3ap\objects
    x3ap\dds
Anything is possible, but I have not heard of anyone having trouble with corrupting files during extract and copy.

I don't think that compression matters to the game, although it is normal for the files inside of .cats to be compressed.

.Cats are convenient, but they can be confusing. That is why I have not used them in my tutorials. It is too easy to mess up a path in a .cat and find it difficult to debug.

If you want to post the .cat then I will take a look at it. (Probably tomorrow.)
Last edited by DrBullwinkle on Fri, 8. Jun 12, 23:09, edited 1 time in total.

User avatar
Argonaught.
Posts: 1827
Joined: Wed, 6. Nov 02, 20:31
x4

Post by Argonaught. » Fri, 8. Jun 12, 05:34

I had the same invisible ships till i realized what I had done wrong:

For AP the model files should be placed in the TC folder and only files that belong in the types folder go into addon.

if you place everything into the addon folder, wether inside a cat/dat or unpacked, the ship will not be shown correctly.

TLDR:

Your folder structure inside a cat:

addon\types
dds
objects

etc etc

HTH

Argo.
[MOD]X3TC No Fog / [MOD]X3AP No Fog / [MD]X3TC Menagerie Shipyard / [MD]X3AP Menagerie Shipyard
<==<<Argonaught>>==>

XBTF>XT>X2TT>X3R>X3TC>X3AP>X4F

I lurk alot for the most part now
:thumb_up:

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Fri, 8. Jun 12, 05:36

I think I just said that but, yeah, that's the way it works. :)

User avatar
Argonaught.
Posts: 1827
Joined: Wed, 6. Nov 02, 20:31
x4

Post by Argonaught. » Fri, 8. Jun 12, 05:37

DrBullwinkle wrote:I think I just said that but, yeah, that's the way it works. :)
You were too fast there, your post wasn't there when i had hit the reply button :P

Argo.
[MOD]X3TC No Fog / [MOD]X3AP No Fog / [MD]X3TC Menagerie Shipyard / [MD]X3AP Menagerie Shipyard
<==<<Argonaught>>==>

XBTF>XT>X2TT>X3R>X3TC>X3AP>X4F

I lurk alot for the most part now
:thumb_up:

dtrowle
Posts: 351
Joined: Wed, 24. Aug 05, 05:45
xr

Post by dtrowle » Fri, 8. Jun 12, 13:43

Aha! I bet that's what I did wrong then! I'll have to check it after work today but I'm 90% sure my problem is that I have all the scene files inside the addon folder. :D Thanks DrBullwinkle and Argo for the help!

Edit: So I came home for lunch and moved the "objects" folder out of the addon folder and into the main directory of my cat file and it works beautifuly now! 8) It's like the simplest stuff is always the hardest to figure out.

kurush
Posts: 4320
Joined: Sun, 6. Nov 05, 23:53
x3tc

Post by kurush » Fri, 8. Jun 12, 19:03

This is one awesome resource, thank you very much for putting it together.
DrBullwinkle wrote: Note: Main Guns will turn a bomber or missile frigate into a fighter/frigate. The only thing that makes a missile turret a missile turret is the lack of guns. So, if you add the guns, then the M8/M7M will no longer fire missiles via its normal turret commands.
I am trying to understand what exactly this note means. I noticed that adding guns to the missile turrets of M7M kills the barrage command (understandable). Does it also mean that having main guns for example on I that has a dedicated missile turret will kill its barrage command as well? I am contemplating adding a front missile turret with 1 or 2 barrels to some M7 to allow them barrage commands. Any tutorials on adding turrets BTW? Can I just add it using X3 Editor or are there additional tricks?

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Fri, 8. Jun 12, 21:45

kurush wrote:This is one awesome resource, thank you very much for putting it together.
And how thoughtful of you to say so, kurush!

Many people read Ship Tricks, but few bother to comment on it. I never know, for sure, whether the small number of questions means that I have explained things well, or whether it means that I have confused everyone with a wall of text. :)
Does it also mean that having main guns for example on an I that has a dedicated missile turret will kill its barrage command as well?
Yes.

To clarify my earlier statement, the only way the game knows that a missile turret is a missile turret is because it has no "Compatible guns". And by "it" I mean the definition of that cockpit type, including the "Compatible guns" tab in TShips, which overrides the "Compatible guns" tab in TCockpits.

M7M's typically use SS_COCKPIT_DEFAULT for their missile turrets. That is the same definition that is used for the "cockpit" viewport in most ships.

So, when you add "Compatible guns" in TShips, you effectively convert your missile turrets into gun turrets.

Interestingly, it appears that the "Compatible guns" tab in TShips also overrides *other* "empty" turret definitions -- not just the "cockpit" turret, and not just SS_COCKPIT_DEFAULT.

As a test, I changed one of the missile turrets on a Cobra to SS_COCKPIT_S_FRONT_M7, which also has no compatible guns defined in TCockpits. So the Cobra had one missile turret with SS_COCKPIT_DEFAULT and the other with SS_COCKPIT_S_FRONT_M7. Unfortunately, when I added a "Compatible gun" in TShips, that gun type became available to both missile turrets.

So it would appear that you cannot cheat your way around this effect. At least, not with any trick that I know.

I am contemplating adding a front missile turret with 1 or 2 barrels to some M7 to allow them barrage commands.
An alternative to adding a turret would be to remove the "Compatible guns" from your M7. That should have the effect of converting the main guns into missile tubes. Since you cannot have both Main Guns and Missile Tubes anyway, that is the much easier mod to do.
Any tutorials on adding turrets BTW? Can I just add it using X3 Editor or are there additional tricks?
I have specifically avoided adding turrets, because it is hard to do without a 3D modeling program. You must add the turret to the scene before you can use it in X3 Editor. I have not had the patience to do it because there are already models that have all available turrets in place.

However, if you really want to do it, the technique is the same as adding main guns. The difference is that you would copy a turret from an existing scene, paste it into your ship's scene, adjust the ordinals, then adjust the placement and rotation values. The rotation values are the next three numbers after the location values.

If you want to dive into the 3D modeling world, Killjaeden wrote a couple of guides that look tempting:

Creating Custom Turrets
Advice on placing turrets

An easier solution for your M7 might be to give it STANDARD docking ports so that you can dock an M8 on it. :)

kurush
Posts: 4320
Joined: Sun, 6. Nov 05, 23:53
x3tc

Post by kurush » Fri, 8. Jun 12, 21:58

DrBullwinkle wrote: Interestingly, it appears that the "Compatible guns" tab in TShips also overrides *other* "empty" turret definitions -- not just the "cockpit" turret, and not just SS_COCKPIT_DEFAULT.
Thanks for clarifying this. It looks like my dream of Normandy Mk3 that can also fire barrages goes down the drain. Well, at least it is possible to have a ship with one missile turrets and lots of regular turrets :) I assume adding gun slots with no guns to the cockpit doesn't make the barrage command available?

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Fri, 8. Jun 12, 22:14

The Normandy is a light frigate, right? I think of it as between a Hyperion Vanguard and Griffon in size and performance. Not the biggest ship in the sky, but with superior speed and more "punch" than its size suggests.

It should dock TP "shuttles" (for your boarding parties), of course. :)

(I don't know how you will mimic the stealth drive. )

How about writing a new script for better missile control? In combination with a change in the missile refire rate, you might be able to fake a barrage, or something close to it. However, you would not be able to prevent the player from spamming the "launch missile" button. Unless that player is you, in which case you could remap the launch key (or simply not use it).

You can (and probably should) add gun slots to your missile turret. Just no "Compatible guns".

@dtrowle: Yay! I'm glad you got it working!

dtrowle
Posts: 351
Joined: Wed, 24. Aug 05, 05:45
xr

Post by dtrowle » Sat, 9. Jun 12, 05:17

Okay on to my next problem. What could be the cause of the turrets not firing? And BTW, the energy never moves while I click away on the fire button? Thanks in advance.

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Sat, 9. Jun 12, 07:57

dtrowle wrote:What could be the cause of the turrets not firing?
You will have to give me more information to work with.

All turrets on all ships? If modified turrets -- how are they modified? What turret script? TC or AP? Have you tried being in the turret's cockpit, then pressing "g" to make sure that the guns are assigned to the current weapon group?

dtrowle
Posts: 351
Joined: Wed, 24. Aug 05, 05:45
xr

Post by dtrowle » Sat, 9. Jun 12, 15:08

Sorry, this is in X3AP on the same ship that I'm trying to port as before. All other ships work fine. I've checked the obvious stuff like guns and making sure I'm using group 1, etc. And note that the energy does not drain at all when I hit the fire button.

I did copy over the "ships/props" folder as that is where the "scene" for the turrets is. They do load and appear on the ship but I'm not sure if they have the weapons "loaded" (which I don't know what they will look like with and without since these are custom turrets). Also of note is that they do not follow the camera angle around when you move - they just sit lifeless on t he ship.

Here is the scene file entry in Tships (I've hit enter a few times to try and wrap it in the forum):

Code: Select all

_cp_scene;1048576;48;600000;0.02;5;8;7;9;5;5;80000;80000;86;0;4;0;3;0;5;0;6;0;0;0;0;32;5;1;650000;37;38;0;20;10;OBJ_SHIP_M2;5;1;0;
ships\props\cameradummy;11;2;1;ships\props\cameradummy;12;3;2;
ships\props\cameradummy;16;4;3;ships\props\cameradummy;20;5;4;
ships\props\cameradummy;24;5;1;0;1;0;1;12;2;3;1;4;ships\XTC\props\hugeturret_dummy;13;
ships\XTC\props\hugeturret_weapon;3;5;4;ships\XTC\props\hugeturret_dummy;14;
ships\XTC\props\hugeturret_weapon;3;9;4;ships\XTC\props\hugeturret_dummy;15;ships\XTC\props\hugeturret_weapon;3;13;12;3;3;13;4;
ships\XTC\props\hugeturret_dummy;17;ships\XTC\props\hugeturret_weapon;3;17;4;
ships\XTC\props\hugeturret_dummy;18;ships\XTC\props\hugeturret_weapon;3;21;4;
ships\XTC\props\hugeturret_dummy;19;ships\XTC\props\hugeturret_weapon;3;25;12;4;3;25;4;ships\XTC\props\hugeturret_dummy;21;
ships\XTC\props\hugeturret_weapon;3;29;4;ships\XTC\props\hugeturret_dummy;22;
ships\XTC\props\hugeturret_weapon;3;33;4;ships\XTC\props\hugeturret_dummy;23;
ships\XTC\props\hugeturret_weapon;3;37;12;5;3;37;4;ships\XTC\props\hugeturret_dummy;25;
ships\XTC\props\hugeturret_weapon;3;41;4;ships\XTC\props\hugeturret_dummy;26;ships\XTC\props\hugeturret_weapon;3;45;4;
ships\XTC\props\hugeturret_dummy;27;ships\XTC\props\hugeturret_weapon;3;1;4305500;1;1;0;4305500;200000;0;0;SS_SH_A_M2P;

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Sat, 9. Jun 12, 15:22

.
Last edited by DrBullwinkle on Fri, 30. Nov 12, 19:41, edited 1 time in total.

Aegyen
Posts: 245
Joined: Sat, 31. May 08, 19:33
x4

Post by Aegyen » Sat, 9. Jun 12, 15:29

That actually looks correct, considering he has added custom turrets, minus the line returns, of course.

Question, did you add the turret information to the Components file in /types?...

The Components file has the SCTYPE_LASER entries, where it tells the game where to find those turret models in the directory, and has the coordinates of where they are supposed to be placed on the model. This info is generated by DBOX as well, from 3DS.

There would also have to be Dummies file entries, for the animations. (rotation/elevation, etc)

dtrowle
Posts: 351
Joined: Wed, 24. Aug 05, 05:45
xr

Post by dtrowle » Sat, 9. Jun 12, 15:44

Yes, I added the line returns so it wouldn't stretch forum :P hope that didn't confuse anyone.

The components file would be where the problem lies then because I haven't messed with that yet. I'll play with that some today and see what I can do. I should just basically be able to copy the entry from the components file in the mod that I am porting this from into my own right?

Aegyen
Posts: 245
Joined: Sat, 31. May 08, 19:33
x4

Post by Aegyen » Sat, 9. Jun 12, 15:50

You could do exactly that, copy the corresponding entries from the Components, and Dummies files, and add them to yours. BUT, big but here, the Components file has the coords for where those turrets are to be placed, on the ship it was designed to go with. So, keep in mind, if you end up with a huge wart of a turret on the nose of your ship, now you know why.. :P

In other words, this is something that should be done with 3DS, to get them where you want them, on the ship you are modifying....
Last edited by Aegyen on Sat, 9. Jun 12, 15:52, edited 1 time in total.

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Sat, 9. Jun 12, 15:52

All of my ships have a number in the first "column".

I think you know that you never "just copy" records in types files. You always have to increment the line counter at the top of the file (or section) when you do a copy-and-paste.

Kodiak88
Posts: 55
Joined: Thu, 15. Oct 09, 16:17
x3tc

Post by Kodiak88 » Sat, 9. Jun 12, 20:48

Hm, this is only slightly On Topic, but I figured asking here would be better than starting my own thread.

I'm looking for a tutorial on pulling ships from a mod (the Babylon 5 mod for TC) and repackaging them into my own personal use (not distributed) mod.

I understand how to edit ships, or clone existing ships and editing them, but am unclear on what exactly needs to be copied over for a brand new ship to be added.

dtrowle
Posts: 351
Joined: Wed, 24. Aug 05, 05:45
xr

Post by dtrowle » Sat, 9. Jun 12, 21:02

Kodiak88: That is exactly what I'm trying to do (port ships from other mods and merge them into my own mod).

I thought it would be relatively easy and that I just needed to copy the relevant scene files into the right place and add an entry into the Tships file using X3Editor. But it seems to be more complicated as I'm finding out that if that ship has custom turrets then you have to mess with the componenets and dummies file.

I also understand that Cycrow's plugin manager can import a ship into an XSP package and then you can install it from there. The problem I'm having is that the Xtended mod has 3 fake patches so the pluginmanager can't look in all of them for the files...I guess I could merge them.

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Sat, 9. Jun 12, 21:14

Kodiak88 wrote:I'm looking for a tutorial on pulling ships from a mod ... and repackaging them into my own personal use (not distributed) mod.
That's an excellent question, Kodiak. I may make a tutorial about that somewhen.

In the meantime, the short story is:
  • 1) In X3 Editor, "Open with VFS" your TShips from which you want to copy. Let's call this the "source".

    2) In the left-hand column, Copy (to the clipboard).

    3) Still in the left-hand column, Paste to End. You should now have a new ship with an ID like: PASTED_OBJECT_1. Change the ID to something you will recognize (that is unique). Example: MY_WHITE_STAR_M6.

    4) Pull down the File Menu and select Save As... Click the button to "Switch to system dialog". Save TShips as a text file: TShips-WhiteStart.txt (probably in your types folder).

    5) You have created a copy of your TShips file that has a copy of the source ship at the end.

    6) Open the source TShips.txt in a text editor. Make sure that line-wrapping is off.

    7) The last line should be your new ship. Copy the entire line to the clipboard, and paste into your "target" TShips file. (If you do not already have a TShips file on disk, then repeat the above steps 1, 4, and 5 to create one.)

    8 ) Increment the line count at the top of your target TShips file.

    You should now have a new TShips file with your new ship in it!

    9) In X3 Editor, look at your target ship. Select the Model tab, and notice the paths to the model and scene.

    10) Copy the model and scene from source to target. Use exactly the same folder structure on the target that was used on the source.

    11) If you are lucky, then you are done. Try the Smoke Test ("plug it in and see if it smokes").

    12) If you are unlucky, like dtrowle, then you may also need to copy entries in the types\Components and types\Dummies files. Dummies, in particular, has an oddball layout that makes it difficult to copy a dummies record. Sadly. :(

    You will have to use your finest reverse-engineering skills to figure it out, I'm afraid. It is not all that hard if you understand what you are looking at. If you do not, then I have yet to figure out an easy way to describe it. (I did try to explain it on page 2).
@dtrowle: AFAIK, the Plugin Manager only imports the TShips entry into the Creator (although it is hard to tell because there is no documentation). You still have to wrangle components and dummies yourself. Maybe.

Post Reply

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