Multi-Oxxx

Is there a way to check for an outfit multiple times? For example, let's say I only wanted to have the player be able to get a mission if they have at least two Light Blasters. Is there a way to do this?

------------------
The programmer's code of entomology: there's always another bug.
Windows users: stop asking for plugins. (url="http://"http://www.aznt.com/EVN/EVNEW/")Make one yourself.(/url)
(url="http://"http://www.cwssoftware.com")Sephil Saga Website(/url)

No, I don't think there is.

------------------
(url="http://"http://fenris.ma.cx/forum")Fenris(/url)

I'm not sure how feasible that is, but you could do this for the two-light-blasters example:

When you purchase a LB, have it set a bit, call it 9998, and toggle another bit that is otherwise unused, call it 9999. When you buy a second LB, it won't do anything to 9998 (already set), but it will then clear 9999. Then, in the Availability field of the mission, type:

b9998 !b9999

Then, you will not receive the mission until you have two LBs (actually, an even number of them) This won't work in many other cases, but does kind of do what you want.

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

Quote

Originally posted by PBoat101:
**I'm not sure how feasible that is, but you could do this for the two-light-blasters example:

When you purchase a LB, have it set a bit, call it 9998, and toggle another bit that is otherwise unused, call it 9999. When you buy a second LB, it won't do anything to 9998 (already set), but it will then clear 9999. Then, in the Availability field of the mission, type:

b9998 !b9999

Then, you will not receive the mission until you have two LBs (actually, an even number of them) This won't work in many other cases, but does kind of do what you want.

**

Er, doesnt quite work - you would need to also need to reset those bits if the player buys a new ship, and account for wheather his new ship has one, and so on.
Prehapse a BORC-like setup is what you need. May be more effort than it's worth.
-Az
-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-17-2004).)

BORC? 😕

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

Boyd Outfit Resouce Counter, of course!
Not to be confused with BONC, the Boyd Outfit/NCB Counter, or the basic RANC, the Regulus-Aranor NCB Counter.
There is also BITEC, Boyd If-Then-Else Counter, but it doesnt come close to working. (url="http://"http://www.ambrosiasw.com/webboard/Forum9/HTML/004987.html#")http://www.ambrosias...ML/004987.html#(/url) <BONC
-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.

Quote

Originally posted by PBoat101:
**BORC?😕

**

i still don't get it...

------------------
A warrior can shape himself to suit anything in the universe.
A master can shape the universe to suit himself.

Ditto. Couldn't Boyd have explained the system instead of just giving us all those numbers?

Az: just because I didn't read that topic is no reason to talk down to me. (no flames, just let it die.)

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

Quote

Originally posted by PBoat101:
**I'm not sure how feasible that is, but you could do this for the two-light-blasters example:

When you purchase a LB, have it set a bit, call it 9998, and toggle another bit that is otherwise unused, call it 9999. When you buy a second LB, it won't do anything to 9998 (already set), but it will then clear 9999. Then, in the Availability field of the mission, type:

b9998 !b9999

Then, you will not receive the mission until you have two LBs (actually, an even number of them) This won't work in many other cases, but does kind of do what you want.**

Hmm...that might work. Let's see...what about an odd number?

------------------
The programmer's code of entomology: there's always another bug.
Windows users: stop asking for plugins. (url="http://"http://www.aznt.com/EVN/EVNEW/")Make one yourself.(/url)
(url="http://"http://www.cwssoftware.com")Sephil Saga Website(/url)

You could do it using hidden token outfits. Give the player's ship, as default outfits, two copies of outf 129. For outf 128, have its OnBuy be D129 and its OnSell be G129. To test for two copies of outf 128, you just have to test for zero copies of outf 129 by doing a !O129. Of course, this won't work if the player is allowed to have more than two copies of outf 128 and then sells a few (since D129 won't do anything if the player doesn't have any of outf 129), and it also won't work if the player receives outf 128 by any means other than buying it in an outfitter. Also, make outf 129 invisible so it doesn't show up in the player info dialog.

------------------
Get (url="http://"http://www.aznt.com/EVN/EVNEW")EVNEW(/url) - the free, open-source EVN plugin Editor for Windows!

Quote

Originally posted by Aprosenf:
You could do it using hidden token outfits. Give the player's ship, as default outfits, two copies of outf 129. For outf 128, have its OnBuy be D129 and its OnSell be G129. To test for two copies of outf 128, you just have to test for zero copies of outf 129 by doing a !O129. Of course, this won't work if the player is allowed to have more than two copies of outf 128 and then sells a few (since D129 won't do anything if the player doesn't have any of outf 129), and it also won't work if the player receives outf 128 by any means other than buying it in an outfitter. Also, make outf 129 invisible so it doesn't show up in the player info dialog.

Interesting...that might actually work. (Might. Hehe.)

------------------
The programmer's code of entomology: there's always another bug.
Windows users: stop asking for plugins. (url="http://"http://www.aznt.com/EVN/EVNEW/")Make one yourself.(/url)
(url="http://"http://www.cwssoftware.com")Sephil Saga Website(/url)

Quote

Originally posted by PBoat101:
**Ditto. Couldn't Boyd have explained the system instead of just giving us all those numbers?

Az: just because I didn't read that topic is no reason to talk down to me. (no flames, just let it die.)

**

PBoat, in Az's defence, I really don't think that's what he meant. The BORC, BONC, and RANC terminology is very recent, like within the last 2 weeks. I really think he was just trying to point you in the right direction. If you don't understand how those work, don't worry about it. I don't really understand them either, and I can carry on a coherrent discussion with Jonathan.

So, in summary, don't be so defensive. We only want to help.

On topic, there are a number of ways to do this with limited outfit, special case situations (like two LB's). But if you want something that works consistently, you are going to need a counter solution. If you only want to test for two plus outfits (and have it work consistently), I could tell you how, with token outfits and 2 crons. But it's way late and I have to wake up in 3 hours.

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

I guess I did take that a little too personally. Sorry, Az. Anyway, back on topic:

Try using crons to give invisible outfits based on how many of the outfits you have. In the OnPurchase field, set a bit that calls some number of crons. The first cron will test for an invisible outfit, call it 129. If the player doesn't have one, it will be granted. The second cron will also test for 129. If the player has one, outfit 130 will be granted. This way, 129 will be granted the first time the item is purchased, and 130 will be granted the second time.

Then, you can use O130 to test for two of item 128. If you want to test for more, just keep increasing the number of crons and use O131 for 3 outfits, O132 for four, etc.

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

Quote

Originally posted by PBoat101:
**
Try using crons to give invisible outfits based on how many of the outfits you have. In the OnPurchase field, set a bit that calls some number of crons. The first cron will test for an invisible outfit, call it 129. If the player doesn't have one, it will be granted. The second cron will also test for 129. If the player has one, outfit 130 will be granted. This way, 129 will be granted the first time the item is purchased, and 130 will be granted the second time.

Then, you can use O130 to test for two of item 128. If you want to test for more, just keep increasing the number of crons and use O131 for 3 outfits, O132 for four, etc.

**

Hmmmm
That should work - sort of. One would still need a way to deal with people selling blasters though, and with people buying more than one blaster at a time...
-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.

w00t! Thanks guys! I think I'm going to go with PBoat's last suggestion, although all of them are good. The thing is, default outfits could get annoying, and I want to be able to test for any amount, not just an even or odd (I figured out how I'd do odd) amount.

Selling? Hmm...I see what you mean. I'm starting to think I would need two identical outfits, which is a kludgy workaround at best. I do know that I could remove the outfits after they sold all of them, but it would be more difficult for each. Here's a method I came up with:

  • OnSell: B100 (random choice :))

  • cron: activates on B100 & O130; OnStart: D130

  • cron: activates on (B100 & O129) & !O130; OnStart: D129

That should do, shouldn't it?

------------------
The programmer's code of entomology: there's always another bug.
Windows users: stop asking for plugins. (url="http://"http://www.aznt.com/EVN/EVNEW/")Make one yourself.(/url)
(url="http://"http://www.cwssoftware.com")Sephil Saga Website(/url)

(This message has been edited by orcaloverbri9 (edited 01-18-2004).)

Quote

Originally posted by orcaloverbri9:
**w00t! Thanks guys! I think I'm going to go with PBoat's last suggestion, although all of them are good. The thing is, default outfits could get annoying, and I want to be able to test for any amount, not just an even or odd (I figured out how I'd do odd) amount.

Selling? Hmm...I see what you mean. I'm starting to think I would need two identical outfits, which is a kludgy workaround at best. I do know that I could remove the outfits after they sold all of them, but it would be more difficult for each. Here's a method I came up with:

  • OnSell: B100 (random choice :))

  • cron: activates on B100 & O130; OnStart: D130

  • cron: activates on (B100 & O129) & !O130; OnStart: D129

That should do, shouldn't it?

**

Still doesnt work for the person who buys 4 blasters at once. The first one sets the bit and the rest do nothing. How bout:
OnBuy G150 OnSell G151
Crons:
Active on o150 & !o129 OnStart g129 d150
Active on o150 & !o130 & o129 OnStart g130 d150
And so on
With a matching set to go the other direction.
-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.

Quote

Originally posted by Azratax2:
Still doesnt work for the person who buys 4 blasters at once. The first one sets the bit and the rest do nothing. How bout:
OnBuy G150 OnSell G151
Crons:
Active on o150 & !o129 OnStart g129 d150
Active on o150 & !o130 & o129 OnStart g130 d150
And so on
With a matching set to go the other direction.
-Az

I think we're a little off-track here. The two LBs was an example. I'd implement it so that they could only buy X of Y, then check for X of Y, so it should be okay.

------------------
The programmer's code of entomology: there's always another bug.
Windows users: stop asking for plugins. (url="http://"http://www.aznt.com/EVN/EVNEW/")Make one yourself.(/url)
(url="http://"http://www.cwssoftware.com")Sephil Saga Website(/url)

Quote

Originally posted by orcaloverbri9:
**I think we're a little off-track here. The two LBs was an example. I'd implement it so that they could only buy X of Y, then check for X of Y, so it should be okay.

**

That still doesnt work for X>1 if they all get bought at once, unless you use something like the method i presented. X=2. Someone buys 2 Y's at once - the first one would set b100, but the second wouldnt cause b100 is already set. You would need either something like i presented, or a BORC.
-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.

Quote

Originally posted by Azratax2:
That still doesnt work for X >1 if they all get bought at once, unless you use something like the method i presented. X=2. Someone buys 2 Y's at once - the first one would set b100, but the second wouldnt cause b100 is already set. You would need either something like i presented, or a BORC.
-Az

The B100 was for removal upon selling them. Upon buying, it sets B101, which calls the two crons. What are you getting at, exactly?

------------------
The programmer's code of entomology: there's always another bug.
Windows users: stop asking for plugins. (url="http://"http://www.aznt.com/EVN/EVNEW/")Make one yourself.(/url)
(url="http://"http://www.cwssoftware.com")Sephil Saga Website(/url)

Quote

Originally posted by orcaloverbri9:
**The B100 was for removal upon selling them. Upon buying, it sets B101, which calls the two crons. What are you getting at, exactly?

**

I may not know all of what you have done, but i cannot see how your system plans to react to this situation:
Player enters outfiter, clicks on the outfit in question, and then clicks buy X times. If you use bits alone to determine when the crons are run, the crons would react as if he had bought just one. Crons are only run when the date advances, so if you just had it set a bit, the cron coulndt tell how many of the outfit were purchased.

------------------
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.