I used to create basic mods back in the old days, and I'm back at it.
I'm currently making an expanded version of the old First Contact scenario (It's pretty much going to be a smaller local neighbourhood, but I hadn't heard of that until I'd half made mine

)
Now I've added in a few 'mini-games' for bored players, and one such game is that the pirates have stolen a terran starbase and fitted it with everything they have, so you get a base kitted out with thick armor, factory, heavy shields, flames, lots of rapid2s and a laser3. Hopefully it'll be a nasty beast to take on with anything less than a team of players.
Good luck, the max volume is 32,767, so try adjusting the volume levels of the modules so the Pirates
really have a unique base, or else you'll trip the game to bitch about the ship being overweight. You might have to make a new module list just for the Pirates.
I've designed the ship, and when I added it as just another ship in the dat file it all worked happily. Now I'm trying to make it only usable by pirates, so I did this:
#IF [race] == Pirate
[race] Stolenbase etc. etc.
#ENDIF
Now I can't run the scenario offline, it gives me the usual blank error when you mess it up. I can't for the life of me see what is wrong with that command.
The game expects it to be used by ALL races. This trick works on the Destroyer, as it "swaps" the Destroyer design for the Raider. You need to create a separate ship design file for this if you want custom ship classes for any race. You also need to define the bitmaps the Pirate ships will use. If you want, I can give you my pirate ship bitmap file that I use for my scenarios.
Next question: Is there any way that I could make this ship usuable as a pirate dock and protected by the normal SB Damage and SB Pop-Damage?
Give it two tractors (or more) and it should kick in as a "proper Starbase/Dock", it also needs a factory for the dock to actually function, or else the only thing it has above others is the shields won't go down if towing something.
And Lastly: Is there any way I can restrict the ship to not allow players to use it?
Create a new rank, I use this for the Dueling Arena so nobody uses the base:
Starbase 17 17 55000000 31500 protect 10 100