Adding weapons on originals Freelancer ships
-
Hi mates.
I tried to add 2 torpedo slots to the CSV.
1) First, I used HardCMP to add 2 hardpoints, and I modified the inis (shiparch.ini, goods.ini, market_ships.ini) to make my ship playable and to add the slots. In game, I’m able to buy 1 CD and 1 starkiller tordepo launcher. I can see them at the good place on my ship, but when I want to launch a torpedo or an CD, ammunitions decrease, I hear the sound, but no missile is fired and I do no damage.
2) I tried another way using milkshape 3D to add my 2 hardpoints before using HardCMP. Of course, I need to re-harpoint all the model. This time, CD and torpedoes work. But I lost baydoors animation and the pilot in the cockpit.
Someone have a solution to add these 2 weapons without losing features of the original ship ?
-
Could be the hardpoint are firing into the fuselage?
Adding hardpoints is best done in HardCMP.
Select New - Fixed - HpTorpedo01 and HpTorpedo02.
Use values in the Position X, Y and Z to place the CENTRE of the hardpoint cube on the ship surface at the point you want it. Initially it will be facing forward.
Use orientation X, Y, Z values to point it the right way - or it may cause the problem you see if they are firing into the fuselage!
+X = roll right,
-X = roll left,
+Y = tilt up,
-Y = tilt down
+Z = rotate right
-Z = rotate leftNote - when you change Z values you may not see what you expect in X and/or Y in HardCMP, but it will usually be OK. If you get confused set them all to 0 and start again.
Save the cmp.
Done.
In shiparch.ini ensure you have set the following to permit both CD’s and torps…
hp_type = hp_torpedo_special_2, HpTorpedo01, HpTorpedo02
hp_type = hp_torpedo_special_1, HpTorpedo01, HpTorpedo02hp_torpedo_special_1 enables the hardpoints to use torpedos.
hp_torpedo_special_2 enables the hardpoints to use CDs. -
Ok, it works
The problem was that I made “revolute Hp” instead of “fixed”. Thanks for the help !Last little thing, I don’t see any pilots in my cockpit. In the csv.cmp file, there are 2 hardpoints for that : HpPilot01, and HpPilot02 :
I put this line in shiparch.ini :
pilot_mesh = generic_pilot
But it does nothing. Have an idea ?
-
1. I think there only can be 1 pilot (at HpPilot), because you have no way to tell freelancer to put him at an other Hp.
2. Your torpedos should also work with revolute Hp’s…
A fixed one either makes the laucher face the Hp’s direction if the launcher’s model has a fixed HpConnect, else it will be able to turn 360° what might be stupid… -
That’s correct, the pilot model sits on hardpoint HpPilot only. If you want more than one pilot to be visible you can import the pilot model into your model and export it as a group with your ship.
The pilot model is DATA\EQUIPMENT\MODELS\PILOT\pilot.3db
The revolute hardpoint is designed for weapons that have bases that can swing left & right, like turrets. Guns can scan in any direction so they use fixed Hardpoints normally.
One note here about a specialised weapon - fixed-orifice. These guns, like the cruiser forward gun, should not turn at all, they should only fire in the direction that the fixed hardpoint is pointing, and this is normally forward, in the direction the ship is pointing. For these you should set the line force_gun_ori = true in the weapon_equip.ini entry for that gun’s [Munition] entry.
The torpedo can work as either a fixed hardpoint or as a revolute. The difference is that fixed does not swing left or right, and with revolute hardpoints you specify the left and right swivel angles (in degrees).
Looking from the top of the hardpoint:-
Angle Max = swing left (+ value)
Angle Min = swing right (- value)As you imagine, if the turret was set to swing left 180 and a target ship flew behgind your ship, the turret would have to stop tracking to the left at 180 and swing right round to the right to try to pick up the track again.
So to allow complete tracking I normally set Angle Max = 360 and Angle Min = -360.
Unless there is a fuselage or other part of my ship in the way of the turret - I haven’t tested if it’s possible to shoot and damage my own ship, but it may be possible.
In any case I like realism, so in these cases I try to set swing values that avoid hitting my ship by accident. And in these cases I can see the turret swinging right round to follow a target before it can fire again.
All the best pal.
-
Thanks guys for your help ! My CSV works well… without pilots cause I prefer baydoors animation.
Quarks wrote:
2. Your torpedos should also work with revolute Hp’s…
A fixed one either makes the laucher face the Hp’s direction if the launcher’s model has a fixed HpConnect, else it will be able to turn 360° what might be stupid…That’s right. I made revolute Hp like the first time, and it works. Don’t know what was wrong in my first try. Perhaps Startrader was right : it fired into the fuselage. I set my 2 torpedo Hps like this : Angle Max = 45 and Angle Min = -45. It’s more realistic.
Pirates on our server enjoy this ship very well !
-
If it fired into the fuselage that shouldn’t matter since your own guns (missiles/torpedoes maybe not) ignore your hitbox.
-
Don’t forget HCMP has orientation arrows so you can tell which way things are pointing. In my case all my weapons you revolute hardpoints, if i want them to fire in a straight line, i simply set the rotation settings to 0.
In fact thinking about it, virtually all weapons on vanilla ships, guns, turrets and torpedoes are revolute.
Regarding the CSV model, can someone confirm the baydoors actually work on the original model as the version i had crashed anytime they were used. I ended up buried in animation code and eventually sorted it, same for the prison liner.