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

** Tutorial ** - Hardpoints ver.2

Here you can discuss building custom ships, texturing and 3D modeling in Freelancer

Post Wed Apr 16, 2003 10:07 pm

** Tutorial ** - Hardpoints ver.2

I don't want to step on any toes here. I know there is a current hardpoint tutorial by CW that is really good, but I had trouble understanding it until I was a little more advanced at moding, so I thought I would make one even a nOOb would understand.

First off, you have to open your ship's CMP file and to do that you use everyone's favorite program UTF Edit. Once you have that opened you need to expand the root "\" and then expand "Window2.3db", "Hardpoints" and "Revolute". This will show you a list of your rotatable hardpoints which are your Turrets, etc. It should be noted that these same procedures can be used for the "Fixed" hardpoints too but the only ones there you might want to edit are the CM/Mine launchers.

Select the turret/etc. that you wish to adjust and then expand it. Here you see a list of 5 things.

AXIS = Which axis' will be rotatable
MAX = How far the gun can turn to it's LEFT (might be right)
MIN = How far the gun can turn to it's RIGHT (might be left)
Orientation = Which direction the gun faces
Position = Where the gun is located on the ship

In this tutorial we won't worry about the Position as most people add the hardports graphically using MilkShape which does all of this by itself. What we are concerned with is the rotation and orientation of the turrets because MilkShape sometimes has issues dealing with said things. It should be noted that if you modify the CMP file and then have to go back and make a change in MilkShape you will have to re-edit the CMP file again to ensure your Hardpoints are correct. So here we go.

~~~~~~~~~~~~~AXIS~~~~~~~~~~~~~~

This is shown with a series of 3 numbers, which are either a 1 or 0 followed by a decimal and 6 more 0's... They're pretty easy to understand and here is an example.

0.000000 = X axis, meaning this gun isn't turnable (overridden by Min/Max).
1.000000 = Y axis, this gun has the ability of aiming up and down.
0.000000 = Z axis, Always a 0 because a gun shouldn't move up and down.

If you wanted a gun to only be able to swing left and right without the ability to move up and down simply change the second number to "0.000000 ", it's that easy.

~~~~~~~~~~~~~MIN/MAX~~~~~~~~~~~~~

This is where it gets a little more confusing. These two commands, Min and Max, let the gun know how far it can turn to the left (Min) or the right (Max). This is based on the mathamatical PI (3.1415) formula. The easiest way to figure this out is simply by drawing the left half of a circle and marking the top as 0 and the bottom as 3.1415. Then it's a simple fact of determining, using division, exactly how far you want your gun to turn.

Now, in the MAX and MIN entries I see two numbers. The first is the one you should be interested in. I believe the second (I may be wrong) is how much it can turn on the Y axis (meaning up or down). At any rate, here is an example of how you figure out what the first number should be;

I want my gun to be able to shoot 45 degrees to the left and 45 degreese to the right. Therefore, 45 degreese is 1/4 of the half that we've drawn. That being the case, 3.1415 divided by 4 gives you 0.7854 which would allow the turret to turn 1/4 to the left. So in the Max you would put "0.7854" and in the min you would put "-0.7854". Always remember that MIN is the opposite half of the circle and must be negative.

In the same respect, if you wanted to use 90' which is half of our little chart you would endup with 3.1415 divided by 2, because 90 is half of 180, which equals 1.5708. So you would put "1.5708" in MAX and "-1.5708" in MIN. This would give you 90' rotation to the left and 90' rotation to the right. Simple huh?

~Jay~

Fortune favors the strong mind.

Edited by - Stinger on 2/14/2004 7:43:06 AM

Post Wed Apr 16, 2003 10:08 pm

~~~~~~~~~~~Orientation~~~~~~~~~~~

This has to be the one that kills everyone as it leveled me more than once. Orientation has to do with the gun facing forward/backward, upside right/upside down, and even on it's side. Now, I did alot of testing to make sure this was totally accurate but it might actually be determined by your model so don't bite my head off it it dosn't work out exactly the way you liked. There are three sets of three numbers as you'll soon see. Here is an example of an orientation entry...

1.000000
0.000000
0.000000
0.000000
1.000000
0.000000
0.000000
0.000000
1.000000

Now I'm going to break them up and give them names for this tutorial.

1.000000
0.000000 = FIRST SET
0.000000

0.000000
1.000000 = SECOND SET
0.000000

0.000000
0.000000 = THIRD SET
1.000000


Now, what I've learned is that the FIRST SET controls the gun's actual "figuring out" where it's orientation is. It actually calculates the Y access of the gun, that being, figuring out what is up and down. I'm going to break this down further and explain it here.

First number of the FIRST SET

1.000000 = If the gun is upside right (negative if upside down)
0.000000 = Otherwise

Second number of the FIRST SET

1.000000 = If the gun is on the right side of the hull (negative if on left)
0.000000 = Otherwise

Third number of the FIRST SET

1.000000 = If gun is on front of ship
-1.000000 = If gun is on back of ship
0.000000 = Otherwise

Now, before I go any further I wanted to let you know that there can be some variations in these numbers. They don't always have to be a 1 or a 0. For instance if you wanted the gun to be on a 45' angle then you would devide the 1 by 4 and get your number which is "0.250000". This takes a little more advanced thinking but it's easy once you get the hang of these hardpoints. Now, onto the SECOND SET of numbers.

The SECOND SET of numbers tells the gun what it's rotation is, as far as being on the top of the hull, on the side of the hull, or even on the bottom of the hull. Here are some examples.

-1.000000
0.000000 = A Gun on the right side of the ship.
0.000000

1.000000
0.000000 = A Gun on the left side of the ship.
0.000000

0.000000
1.000000 = A Gun on the top of the ship.
0.000000

0.000000
-1.000000 = A Gun on the belly of the ship.
0.000000

Please note that this orientation must be the same as the orientation for the Y axis. What I mean is that if you put the FIRST SET of numbers as having the gun upside right then you better have the SECOND SET with the gun being upside right. Otherwise, when you get in the game, your guns will do some VERY strange stuff.

The THIRD SET of numbers, the final 3, dictate the orientation of the turret as far as it being facing forward or backward, left or right. This is what most people look for when they're adding hardpoints and here are some examples;

0.000000
0.000000 = The turret facing forward
1.000000

0.000000
0.000000 = The turret facing backward
-1.000000

You can do the same with these as you do with the others, make them face 45' or 90' or whatever direction you wish. The only thing you have to remember is that if you change one of the three SETs you have to make sure the other two make sence. For instance, you wouldn't see this....


0.000000
1.000000 = FIRST SET
0.000000
0.000000
1.000000 = SECOND SET
0.000000
0.000000
0.000000 = THIRD SET
1.000000


This would symbolize a gun that's upside right with the Y axis being to the right of the ship facing forward. Now, the SECOND SET and the THIRD SET are perfectly fine. But you can't have a gun that's upside right with it's Y axis (meaning aiming up) as being to the right. It just isn't right, no pun intended. This gun would think that UP would be RIGHT (as in the direction) when it's supposed to be UP. And it could lead to the gun bouncing around the hull, or worse, a crash.

Well, I hope this tutorial helps out a bit. If there is anything you want further elaboration on please let me know and I'll see what I can do.

~Jay~

Fortune favors the strong mind.

Post Wed Apr 16, 2003 10:32 pm

Me being the clueless 3D'ing newbie that I am, I very much appreciate both CW's and your tutorial

Post Thu Apr 17, 2003 12:39 am

Clueless only means you havn't done it yet, same as Impossible.... *chuckles* Anytime I can be of assistance with a problem, just ask.

~Jay~

Fortune favors the strong mind.

Post Sat Apr 26, 2003 11:26 pm

Can you add hardpionts with Milkshape?

Post Sun Apr 27, 2003 8:31 pm

when your making a new ship in milkshape then yes its easy to add new hardpoints (check out killermatrix's tutorial on making ships) but since there is currently no importer for cmp files then utf is the only way to change/add hardpoints to existing ships.
hopefully HCL will work out the sur files for us and someone will use the info he posted in his cmp exporter thread to make either an importer for milkshape or an exporter for another modeling prog (milkshape is starting to get on my bosom ends ;-).


dr del


dr del was decorated by the queen in 1998 with some cork tiles and two coats of emulsion

Post Mon Apr 28, 2003 12:46 am

B-) First of all, where can I download UTF editor. Also all the ini files are encrypted in FL and I had to use modded ini file to replace them so I can make changes. Where can I find uncompressor?

Post Mon Apr 28, 2003 9:35 am

I've found the UTF editor. Can you teach me about the Position of th Guns too? Thanks for all the informations by the way.

Post Tue Apr 29, 2003 12:57 pm

To position the guns simply use MilkShape and create a hardpoint for each gun, as you would for the engines, shields, CM launcher, etc. Make sure you label them properly;

Gun/Missile = Hp/Revolute/HpWeapon##
Turret = Hp/Revolute/HpTurret##
Torpedo = Hp/Revolute/HpTorpedo##

Replace the ## with whatever number of hardpoint it is, eg., 01, 02, 03.... It's that easy. All you need to do then is open the file in the UTF editor and ensure that your gun is facing the right direction and has the proper arc. That's why we don't mess with the position while in the UTF editor. MilkShape does that for us.

~Jay~

I've just had the most disturbing encounter with a mad woman on the Holodeck. - Holographic Doc

Post Sat May 10, 2003 3:33 pm

One thing that tripped me up with this is that Min and Max are based on your weapon's y axis, so if you have a gun that's upside down, like under a wing, you have to adjust accoridingly. Max will be how far left a gun turns while Min will be how far right. Also be sure the hardpoints aren't already created in the cmp file and just not turned on,(included) in the shiparch.ini file. The sabre already has HpWeapon07 and 08 defined in the .cmp file all you have to do is add them to shiparch.ini. I'm going to try and find other unused hardpoints on other ships. Also, here is a list of the ships ref.# in shiparch.ini, ship name, and directory/filename in the data\ships folder

SHIPS_ARCH:
_id_ _name_ _location \ships+ -->
237001 "Armored Transport">\utility\transport_armored\transport_armored.cmp
237002 "Barracuda">\bounty_hunter\bh_elite\bh_elite.cmp
237003 "Hammerhead">\bounty_hunter\bh_vheavy_fighter\bh_vheavy_fighter.cmp
237004 "Piranha">\bounty_hunter\bh_fighter\bh_fighter.cmp
237005 "Bretonia Battleship">\bretonia\br_battleship\br_battleship.cmp
237006 "Bretonia Destroyer">\bretonia\br_destroyer\br_destroyer.cmp
237007 "Crusader">\bretonia\br_elite\br_elite.cmp
237008 "Cavalier">\bretonia\br_fighter\br_fighter.cmp
237009 "Clydesdale">\bretonia\br_freighter\br_freighter.cmp
237010 "Bretonia Gunboat">\bretonia\br_gunship\br_gunship.cmp
237011 "Stiletto">\border_world\bw_elite\bw_elite.cmp
237012 "Sabre">\border_world\bw_vheavy_fighter\bw_vheavy_fighter.cmp
237013 "Dagger">\border_world\bw_fighter\bw_fighter.cmp
237014 "Dromedary">\border_world\bw_freighter\bw_freighter.cmp
237015 "Starflier">\civilian\cv_starflier\cv_starflier.cmp
237016 "Startracker">\civilian\cv_startracker\cv_startracker.cmp
237017 "Hawk">\civilian\cv_fighter\cv_fighter.cmp
237018 "Falcon">\civilian\cv_elite\cv_elite.cmp
237019 "Eagle">\civilian\cv_vheavy_fighter\cv_vheavy_fighter.cmp
237020 "Centurion">\pirate\pi_elite\pi_elite.cmp
237021 "Titan">\pirate\pi_vheavy_fighter\pi_vheavy_fighter.cmp
237022 "Legionnaire">\pirate\pi_fighter\pi_fighter.cmp
237023 "CSV">\utility\csv\csv.cmp
237024 "Heavy Lifter">\utility\heavy_lifter\heavy_lifter.cmp
237025 "Kusari Battleship">\kusari\ku_battleship\ku_battleship.cmp
237026 "Kusari Destroyer">\kusari\ku_destroyer\ku_destroyer.cmp
237027 "Dragon">\kusari\ku_elite\ku_elite.cmp//>\kusari\ku_blood_dragon\ku_dragon.cmp
237028 "Drake">\kusari\ku_fighter\ku_fighter.cmp
237029 "Drone">\kusari\ku_freighter\ku_freighter.cmp
237030 "Kusari Gunboat">\kusari\ku_gunship\ku_gunship.cmp
237031 "Liberty Cruiser">\liberty\li_cruiser\li_cruiser.cmp
237032 "Liberty Dreadnought">\liberty\li_dreadnought\li_dreadnought.cmp
237033 "Defender">\liberty\li_elite\li_elite.cmp (or)-->\liberty\li_elite2\li_elite2.cmp
237034 "Patriot">\liberty\li_fighter\li_fighter.cmp
237035 "Rhino">\liberty\li_freighter\li_freighter.cmp
237036 "Luxury Liner">\utility\luxury_liner\luxury_liner.cmp
237037 "Mining Ship">\utility\mining\mining.cmp
237038 "Nomad Battleship">\nomad\no_battleship\no_battleship.3db
237039 "Nomad Fighter">\nomad\no_fighter\no_fighter.3db
237040 "Nomad Gunboat">\nomad\no_gunship\no_gunship.3db
237041 "Anubis">\order\or_elite\or_elite.cmp
237042 "Order Ship">\order\or_elite\or_elite.cmp
237043 "Osiris">\order\or_osiris\or_osiris.cmp
237044 "Wolfhound">\corsair\co_elite\co_elite.cmp
237045 "Bloodhound">\corsair\co_fighter\co_fighter.cmp
237046 "Mule">\corsair\co_freighter\co_freighter.cmp
237047 "Prison Liner">\utility\prison_liner\prison_liner.cmp
237048 "Repair Ship">\utility\repair\repair.cmp
237049 "Rheinland Battleship">\rheinland\rh_battleship\rh_battleship.cmp
237050 "Rheinland Cruiser">\rheinland\rh_cruiser\rh_cruiser.cmp
237051 "Valkyrie">\rheinland\rh_elite\rh_elite.cmp
237052 "Banshee">\rheinland\rh_fighter\rh_fighter.cmp
237053 "Humpback">\rheinland\rh_freighter\rh_freighter.cmp
237054 "Rheinland Gunboat">\rheinland\rh_gunship\rh_gunship.cmp
237055 "Train">\utility\freight_train\freight_trainx2.3db
237056 "Large Train">\utility\freight_train\freight_trainx3.3db
237057 "Transport">\utility\transport_small\transport_small.cmp
237058 "Large Transport">\utility\transport_large\transport_large.cmp

I couldn't find this info on the forums, so I created a notepad file to help me find ships easier.
Hope this helps y'all

Post Tue May 13, 2003 1:27 am

Hey everybody, I was just wondering if anyone else has had problems when adding new hardpoints for torpedo's & cruise disruptors? I tried adding one to the armored transport and it shows up fine and can have stuff mounted onto them ok. But my problem is this, when they fire, the missles dont get launched. The sound effect & ammo drain happens, but still no torpedo or disruptor gets launched :'( Can anyone help me here with any suggestions as to what might be wrong?

Post Wed May 14, 2003 4:53 am

Jackel, perhaps the question's misplaced, but I am in dire need of some tutorial or explanation about how are beauties like the TIEs, the Shadow Crab, and the Firespray created, from editing the first byte to adding the last detail... so far, I have all the tools (HCl's UTF editor and BINI, and MilkShape 1.6.6), but I feel like I've missed a thing or two, like, for example: just how do you edit ships in Milkshape? Sorry for asking such a pathetic thing, but I want to stop feeling like I'm the ultimate n00b. Thanx!

------
"You want to do what I do? Easy thing. Practice. Everyone was a newbie once."

Post Thu May 15, 2003 8:10 pm

I have followed these directions to the letter. I'm trying to modify the Titan. I see no changes whatsoever in my ship when I start Freelancer. I've added a couple of torpedo launchers in place of the outboard guns on the fins. I modified the CMP file and shiparch.ini just as instructed. I even looked at other tutorials. Nothing is happening except that I was able to change the 2 class 9 gun slots to Class 10 slots.

I also noticed a strange thing about the Titan CMP file. The titan has 2 class 9 hardpoints and 4 class 10 hardpoints. That makes 6 guns if I can still count. Only 5 guns are declared in the CMP file. I checked the Sabre to see if it had a similar (error?), but it had all guns declared in the CMP file. Is there something special about the Titan?

Thank You. Glock 36. Asset Recovery R US

Post Fri May 23, 2003 7:46 pm

Glock, i think there may be something odd about the titan, i had some strange results with the Legionarre which is from the same family. I added some hardpoints to each of the wings but in the game instead of being next to each other they were in a row. i also found that there seemed to be a missing HP in the cmp file.

Post Sat Jun 07, 2003 5:02 am

Here's something I found while trying to fix the Kusari Cruiser Forward Gun:

The gun itself has rotation values for it's model, and the KCFG had a very small radius. so if ya are trying to use a weapon model that is not normally used by a player, and it isn't working right, try looking in the cmp for the weapon model.

P/-/3@R D@ D@\/\/G F00lZ

Check out what I'm doing for Reynen's Mod @ my website!

Return to Freelancer 3D Modeling and Texturing Forum