I think I got it

The key to weapon mountings

Okay, I think I've come across a very simple solution to this problem, which has probably been used before, of making weapon mounts that can hold missiles, bombs, torpedoes, etc. The big problem was to have the counters for open mountings be restored when the weapon is used up. My solution is a little clumsy, but works perfectly. It requires four resources, as opposed to the common three. 1. The token outfit. 2. The weapon. 3. The ammo. 4. The weapon's wëap resource.

Make the token resource.
Make the weapon, and hook it up as you would normally. On buy, take away, a token, on sell add one. Keep in mind, it is a weapon, not ammo.
Make an ammo resource.
Make the weapon outfit so that on buy, you get one of the ammo, or however much you want.
Set up the wëap resource so that the maximum per instance of the weapon is the amount you want per mount.
Enjoy the fruits of your labor.

The key with this approach is not to tie the tokens directly to the ammo, which means a fairly clumsy and difficult (at least for me) system of cröns to replace tokens. Instead, you buy the weapon, which comes with some ammo. You can replace the ammo just by buying it. When you want to buy a new weapon for that mounting, you sell the old weapon (you will need to sell the ammo, too. Otherwise it won't let you sell it.) Then you are free to buy the new weapon, which again comes with ammo. Another cool thing about this is that you can set up other sorts of weapons, so you can attach a blaster cannon to the missile slot instead. What do you guys think?

Sorry, what exactly does this do?

Okay, so a lot of people have come up with a sort of modular weapons system. You have a certain number of mountings, and in each of those mountings, you can put a variety of weapons. Missiles, torpedoes, etc. But it's not a very simple thing to actually do. You need to use a fairly complicated cron system to get them all set up with each other in addition to the standard resources. This is an alternative to that.

So... like gun/turret slots but more of a generic weapon slot? What does ammo have to do with it?

Most people have been making it so you just buy the weapon ammo, and that uses your "token", the weapon mounting point. When you use the ammo, it gives you back the token using a cron. However, while it works, it has been known to have bugs. What I've done here is instead tie the weapon itself to the token, instead of tying the ammo to the token. This gives you a sellable item that removes any need for special crons.

Okay, after reading everything again I think I get it now. The only problem with your setup (that I can see) is you get given the ammo for free when you buy the weapon so you can then use up the ammo and sell the weapon again.

You don't actually have to have that part. I just put that in for convenience of the player. And you do have to pay for the weapon, which is as much as you would pay for that stock of ammo.

Log in to reply