How to increase ammo

I'm currently working on a plug and I want to increase the amount of ammo on some ships, but I want the ammo to remain dependent on the amount of space of the ships. I don't want to use weapon bursts or increase the amount of space on the ships because I want the ships to have the same amount of space relative to the rest of the outfits. And I don't want to increase the amount of space the ships have and all the outfits except the ammo. Is there anyway to do this?

If I understand properly, you want maxammo counts to be relative to free mass, without actually consuming free mass?

Hmmm....it's probably doable, but not at all easy. Simplest way would probably be to just define 3 or 4 "mass classes", and make an associated weapon for each with its own maxammo count. You could control which one of the (otherwise identical) weapons was offered via contribute and require bits.

If you wanted to try allowing upgrades from one class to another, that would be doable as well, although the complexity would explode if you took it much beyond that.

I agree, it might be able to be done, but would involve lots of crons, and swaping and re-checking every day... very complicated.

Lindley's suggestion to use 'mass classes' is they way I would go, but if that is too resource/require bit heavy (depending on how many weapons and classes you'll have) here is another way to use classes that might scale better.

Set the standard amount of max ammo to the lowest incriment between classes. Set this max in the outfit resource.
Use an invisible outfit to ModMax the ammo outfit.
Then give each ship an appropriate number of these as default outfits.

So if you have a base max of 5, you can define new maximums in increments of 5.

Even if the number of max ammo is different (but if the proportion of max ammo is still the same) for different weapons, you can do this with up to four weapons at once with a single outfit.

Remember, ModMax multiplies the max outfits (ammo) by the number of ModMaxes that point to it.

So, you could even state exactly how much ammo you get, if the base ammo is only 1, by giving the same number of ModMax outfits.

Likewise, you can upgrade/downgrade capacity buy buying/selling other ModMax items, just rember you can't sell ANY ModMax outfits if you have any outfits they point to.

This post has been edited by Desprez : 11 June 2007 - 08:44 PM

Thanks, the max ouf worked.