How do yall deal with specialty ammo?

Say I wanted to have a rack that mounted both "standard" and "wacky" missiles.
However, i want it such that nomatter what happens, the player can never have more than 12 missiles mounted on any given rack. I was origionally thinking of ripping off Masa's invisille token outfits, but then i realized that then the rack could only be used once (ie, you could never reload it, because you cant regrant the token everytime the weapon is fired). Aside from instituting a modified BORC (which i would rather not use for something so trivial), does anyone have any ideas?
-Az

------------------
It is here. EVNEW Public Beta (url="http://"http://www.aznt.com/EVN/EVNEW")www.aznt.com/EVN/EVNEW(/url)
Stuffit is a piece of .sit.

That's tricky, Azratax. A BORC would do it.

But if you don't mind one limitation on the system, it's simple enough to not worry about. That limitation is the time you can reload it- only when it's empty. You probably see exactly where I'm going with just that. You have invisible missile tokens (what solution of mine would be complete without them), that are granted when you buy the rack (racks- would have to be multiples to fire the different missiles). When you buy a missile, you lose a token. The last part is a misn or cron (either would work), that checks this !O(token) & !O(Missile) & !O(WackyMissile), and if true, grants you a full load of tokens.

Edit: just realized the part about it only working for a single launcher... I'd swear I'd solved that problem! Let me keep hacking at this...

It's obviously not ideal, but it's very simple- only one cron/misn needed, and one extra outfit- which sounds like an admirable trait for this kind of small effect. A little creative writing could make it all better, anyway.

But I'm going to sleep on it- I've given a little thought to this problem in the past, but the above was the best I've ever come up with for it without getting crazy. I'll let you know If I come up with anything.

------------------
~Charlie
Sephil Saga Homepage: (url="http://"http://www.cwssoftware.com")www.cwssoftware.com(/url)

(This message has been edited by Masamune (edited 01-09-2004).)

Crons are bad for this. You want to process it with misns instead so that someone can take off, fire, land and reload immediately. In other words, you need a BITEC.

Outfit ... OnPur ......... OnSel ............. Function
1 .......... D3 .............. G3 ................. Standard missile ammo, max of 12
2 .......... D3 .............. G3 ................. Wacky missile ammo, max of 12
3 ...................................................... Missiles allowed
4 ...................................................... Temp counter
5 ...................................................... Temp holder
6 ......... G7 (G3)*12 ... D7 (D3) *12 ... Standard launcher, increases max of 1 by 12
7 ...................................................... Wacky launcher, increases max of 2 by 12

Using increase max means that you can't just buy the launcher, buy some missiles, sell of the launcher, buy the launcher, buy some missiles etc. in order to get over the limit. You can only sell the launcher if you've sold the rack.

Due to the odd behaviour of the fields for weapons, may need over Gxxx and Dxxx operators in there.

Syst ... Visability
1 ....... ((O1 & b1) | (O2 & b2) | (O5 & (b4)) | (O4 & b3)) & !b0
2 ....... ((!O1 & b1) | (!O2 & b2) | (!O5 & (b4)) | (!O4 & b3)) | b0
Each syst contains spob 1

Misn ... OnSuc . ...... On Ab
1 ............................ b1 (!b0 S2 b0 A2)*12 !b1 b4 (!b0 S3 b0 A3)*12 !b4 b2 (!b0 S4 b0 A4)*12 !b2 b4 (!b0 S5 b0 A5)*12 !b4 (D3)*12 b3 (!b0 S6 b0 A6)*12 !b3
2 ........ D1 G4 G5 .......
3 ........ D5 G1 ............
4 ........ D2 G4 G5 .......
5 ........ D5 G2 ............
6 ........ D3 D4 ............
The misn destination is spob 1. Misn 1 auto starts when you enter an outfitter and autoaborts instantly.

Requires: 6 misn, 5 ncb, 5 outf, 2 syst, 1 spob.

May be necessary to use 2 misns in place of the first of the character limit is too small, bearing in mind that anything with (Zxxx)*n means type out Zxxx n times. In that case you would simply have misn 1 start and abort the misn holding the rest of the code.

Note that this works only if you have 1 rack. I think it should work fine if you capture more than 12 missiles. There would be ways to do it for more than 1 rack, involving nesting a few more misns.

------------------
(url="http://"http://homepage.mac.com/jonathanboyd/evn/index.html")Classic4Nova plug-in(/url)

Try this:

Create an outfit with no modtypes and call it "missile rack" or whatever. Have the OnPurchase field make the missiles available. Each 'missile' is actually a launcher with a Gxxx that gives a missile. The outf for the missile has empty name fields and the missiles are labelled normally. The max for missiles is 12, but you can use the Increase Max modtype to lower the max of the 'wacky missiles' from 12 to 11. The wacky missiles behave in the same way toward toward the normal missiles. This way, you can never have more than twelve.

You can also use the Increase Max modtype to increase the maximums by 12 with every rack you purchase.

------------------
"Nothing is impossible with crons and submunitions."
-me

Boyd: Your magic-syst visibility trick doesnt work for me or others, but this may be because we are mis-implementing it.
Could you test and give us an implementation of it that works?

Quote

Originally posted by PBoat101:
**Try this:

Create an outfit with no modtypes and call it "missile rack" or whatever. Have the OnPurchase field make the missiles available. Each 'missile' is actually a launcher with a Gxxx that gives a missile. The outf for the missile has empty name fields and the missiles are labelled normally. The max for missiles is 12, but you can use the Increase Max modtype to lower the max of the 'wacky missiles' from 12 to 11. The wacky missiles behave in the same way toward toward the normal missiles. This way, you can never have more than twelve.

You can also use the Increase Max modtype to increase the maximums by 12 with every rack you purchase.

**

This doesnt work either.
1. If i buy 12 missiles, they will all launch within 1 reload period because each gives a new launcher.
2. Modtype 27 multiplies the max quantity by the number of outfits of modtype 27 that you have for that outfit. You cant make it simply modify the maximum that you havce.
-Az

------------------
It is here. EVNEW Public Beta (url="http://"http://www.aznt.com/EVN/EVNEW")www.aznt.com/EVN/EVNEW(/url)
Stuffit is a piece of .sit.

It actually might not be too far from a workable solution, Az.

The biggest is that it's impossible to have one outfit be both weapon and launcher in a single outfit. You could Gxxx for the launcher with the missile, but that creates book-keeping problems because the launcher remains when the weapon is launched. The solution to that is a cron that removes launchers in excess of your current missiles. That just leaves the increased rate of fire issue. What I'd do is set the "One shot at a time" flag- which will make the rate of fire dependant on the lifespan of the missile. Not ideal, but possibly better than nothing. The other option would be a really high reload rate. The rate would stay constant because the launchers are not discarded, but the rate would vary depending on how many of each type of missile you have. A rack with 12 normal missiles would fire them really fast compared to a rack with 6 normal missiles, or a 50/50 mix of normal and wacky missiles.

You would of course have to use an invisible token system for the actual missile slots, the tokens being replaced when the launchers are rebalanced by the cron.

------------------
~Charlie
Sephil Saga Homepage: (url="http://"http://www.cwssoftware.com")www.cwssoftware.com(/url)

Quote

Originally posted by Masamune:
**It actually might not be too far from a workable solution, Az.

The biggest is that it's impossible to have one outfit be both weapon and launcher in a single outfit. You could Gxxx for the launcher with the missile, but that creates book-keeping problems because the launcher remains when the weapon is launched. The solution to that is a cron that removes launchers in excess of your current missiles. That just leaves the increased rate of fire issue. What I'd do is set the "One shot at a time" flag- which will make the rate of fire dependant on the lifespan of the missile. Not ideal, but possibly better than nothing. The other option would be a really high reload rate. The rate would stay constant because the launchers are not discarded, but the rate would vary depending on how many of each type of missile you have. A rack with 12 normal missiles would fire them really fast compared to a rack with 6 normal missiles, or a 50/50 mix of normal and wacky missiles.

You would of course have to use an invisible token system for the actual missile slots, the tokens being replaced when the launchers are rebalanced by the cron.

**

I cannot see why we need to grant extra launchers.
How bout this:
Each missile rack is a Normal Missile laucher and grants 12 missile tokens, 12 other missile tokens, and a Wacky Missile Launcher.
Each missile dxxxs a missile token when bought and gxxxs when sold.
Then a BORC like thing recharges them based on the number of missile and "other missile" tokens.
The problem is the take-off, fire, land situation - i think the date advances as you take off, not as you land.
-Az

------------------
It is here. EVNEW Public Beta (url="http://"http://www.aznt.com/EVN/EVNEW")www.aznt.com/EVN/EVNEW(/url)
Stuffit is a piece of .sit.

(This message has been edited by Azratax2 (edited 01-13-2004).)

(This message has been edited by Azratax2 (edited 01-13-2004).)

Yeah, the date advances on take-off, not when landing. Kind of annoying, but I think its generally the best way to do it.

That is going to prove problematic for you, though. You could have a mission start when you land, but you really need an iterative cron... hmm. That would be a problem with any of the above solutions as well... or maybe it' just late and I'm not thinking straight... quite possibly the case. Oh well, I have a long night of creating filler missions... fun fun fun...

------------------
~Charlie
Sephil Saga Homepage: (url="http://"http://www.cwssoftware.com")www.cwssoftware.com(/url)

Quote

Originally posted by Masamune:
**Yeah, the date advances on take-off, not when landing. Kind of annoying, but I think its generally the best way to do it.

That is going to prove problematic for you, though. You could have a mission start when you land, but you really need an iterative cron... hmm. That would be a problem with any of the above solutions as well... or maybe it' just late and I'm not thinking straight... quite possibly the case. Oh well, I have a long night of creating filler missions... fun fun fun...

**

Its such a simple sounding effect too.
-Az

------------------
It is here. EVNEW Public Beta (url="http://"http://www.aznt.com/EVN/EVNEW")www.aznt.com/EVN/EVNEW(/url)
Stuffit is a piece of .sit.