@coraxus, on Nov 23 2007, 05:15 PM, said in Cool Nova Hacks:
Realistic bays like the super carrier usually houses all kinds of fighters. I assume the reason why EV has to have certain kind of bays for each fighter is due to the limit of the game engine at one time. But with Nova, you can now have one bay that houses all kinds of fighters. First, create a bay, and in the onpurchase bit field, grant invisible 0 ton bays that pertains to various fighters. Finally, to really limit the number of fighters one can have, you can add a ton or two on the fighters themselves.
Not to toot my own horn, but this was solved while trying to create a system to swap fighter loadouts.
As already stated, launching a fighter does indeed free up mass allowing you to purchase indefinitely.
The solution is to have multiple bays that carry one fighter each, and buying a fighter actually buys the fighter and its bay. Replacing a destroyed fighter becomes a bit sticky, but doable. (Requires a outfit that scraps allocated fighter space that belongs to a dead fighter)
The main difficulty was preventing exploitation, and so the solution got a bit complex. It's not what you would call light-weight, but not outrageous either.
Briefly, this method allowed the following:
- a way have all your different fighters fit in one large bay.
- a way to hold fighters based on fighter mass, not an arbitrary fixed bay size. And also prevents abuse by launching fighters to free up mass.
- a way to change the weapon loadouts of fighters in your bay, to perform different combat roles.
- ability to introduce prerequisites to make certain fighter or loadouts available or not. (Bay upgrades, certain weapons on hand, etc.)
Original discussion here.
Actually, point 2 is out of date. Fighters can be held based on mass AND a max number of fighters per particular bay type, if desired.
So you could do it where the bay can accommodate as many fighters as your ship can carry, in addition to makeing different bay sizes.
Such as, a minimal bay that can hold two fighters of any (or particular) types. Or a large bay that can hold up to ten fighters, etc. You can mix and match bays to increase your max.
Note: I have to update where the samples are hosted as the old spot is defunct.
I might make a new example as I seem to recall my final implementation was a bit more streamlined and advanced than the sample plug.