Sun Jun 15, 2003 7:19 pm by Victor
Ok, it's possible but it takes some work and you kind of have to cheat the system. Here's what I did so the main guns from battleships, cruisers, destroyers and whatnot couldn't be mounted on ships other than the one they were designed for.
First, I needed one free weapon class, I had already made changes to the turret classes so I decided to use gun_special_10. I went through and changed every weapon that used that hardpoint to instead use gun_special_9 and removed the class 10 hardpoints from every ship that had them. In the end there were no more class 10 guns and no ship that could mount class 10 guns either.
Then, each "specialty" gun that was designed to fit on a specific ship was given the hp_type of gun_special_10 and the guns were mounted as part of the ship package in goods.ini (e.g. addon = vic_li_cruiser_forward_gun01). The price of the gun will be added to the price of the ship when it's sold and you can not buy the gun seperately. When you trade in the ship you'll see the gun suddenly appear in your inventory but you won't be able to mount it on anything because no ship has class 10 mounts (<- this is the important part).
This is the only way that works completly that I've found. If you assign no class or a bogus class (like gun_special_11) to the weapon it will be mountable on any ship harpoint. If you give the ships class 10 hardpoints they will all be able to mount the weapons and they won't be restricted to a single ship.
You may also want to give the new weapon very high hit points as the player won't be able to replace it if it gets destroyed.
Remember...
Free up one VALID weapon class of your choice, make sure no "regular" weapons use that class and that NO ship can mount that class of weapons. The class can be gun or turret as far as I know for certian, but torpedo should work also.
You only need to free up one weapon class to have as many ship specific weapons as you want for as many different ships as you need.
Use your new class for the weapons that you don't want player to be able to mount/remove and make sure to add the weapon to the ship in the ship's package in goods.ini. You don't need to sell the weapon anywhere as they won't be able to mount it anyway.
Hope that helps.
Edited by - Victor on 15-06-2003 20:23:22