Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
NCB abuse inside!
OK, it's lazy question time again. I could test this out, but I won't be able to run EVN or read background sources for a while, so I'll ask the rest of you instead.
I've got a misn that has an NCB test expression with 21 terms, all listed in series with no nesting parentheses or 'or' operators. (Yes, that sounds insane, but trust me -- there's a reason for it.) Perhaps unsurprisingly, this doesn't work right: the mission shows up when few (or maybe none) of those conditions have been met. I see two possible reasons:
There's a limit to NCB test string length, and I've reached it. If that's it, what is the limit?
I've got no explicit logical 'and' operators (&) between the expressions. I have another mission that similarly leaves the 'ands' implicit between its three NCB conditions (the test string is !b12 O136 b15), and I thought I had tested that that was working correctly. Do I need the '&'s in my 21-condition mission? Did I blow my testing on the 3-condition mission?
I'll test this out myself eventually if no one else can answer, but I'm hoping someone out there will save me the bother!
try using () and +
@dr--trowel, on Dec 15 2007, 06:16 AM, said in The Very Long Test String... Thread:
Availability bit expressions require logical operators to work properly. So you need "&", "|" and "!" (along with a bunch of nesting parentheses). That said, I did try to use a huge number of terms in ARPIA2 once for the "X Investigation" thing, and it didn't work. So test with an increasing number of said terms to be sure it works every single time
@dr--trowel, on Dec 15 2007, 05:16 AM, said in The Very Long Test String... Thread:
I've got a misn that has an NCB test expression with 21 terms, all listed in series with no nesting parentheses or 'or' operators.
Is there a particular reason you've not included operators?
Anyways, if you run out of room in the string (I don't remember exactly how many characters a field can accept, but you're probably close or over it), you can condense bits using cröns. Say you want to condense two terms, b1 and b2. If b1 and b2 are set, launch a cron that sets b3. If b1 is set and b2 is clear, then launch a cron that sets b4 etc. Then, just check for bit 3, 4, 5, or 6 depending on what you need. Sure, it takes 4 cröns to condense two expressions, but you can shorten the length of your strings that way. Plus, maybe the only critical configurations of bits 1 and 2 are if they're both set, in which case one cron can fire if 1 and 2 are set, and one can fire for all the other combinations.
I earnestly hope that made sense.
Thanks folks. I guess I must have not properly tested the misn with three terms in its set string. I'll add '&'s to both that misn and the more complex one. I may also use crons to condense bits, as Archon suggested. As a side benefit, I can use those crons to check for completion of sub-sets of player accomplishments, which might help with pilotlog interpretation down the road.
Yeah, you need the parentheses too. Even if it's just & & & etc you need to have (a & (b & (c & d))) in order for it to work properly.
@guy, on Dec 15 2007, 08:51 PM, said in The Very Long Test String... Thread:
OK, I get that now.
For reference, here's the longest test string I see in the EV Nova files:
((b17 & b221) & (b812 & (b850 & !b851))) & !(b237 | b819)
This is for misn 908. It contains seven terms. There are also several six-termers; for my own work, I'll probably try to keep to that length or shorter.
Well try a long one with correct syntax and see. I'd be surprised if there were any length restrictions other than the length of the field (255 chars), it's just the longer it is the easier it is to mess up the parentheses or something.
@guy, on Dec 16 2007, 01:51 AM, said in The Very Long Test String... Thread:
I find the much-easier-to-read "(a & b) & (c & d)" to work just fine.
(EDIT) I'm coming to hate the "B" smileys.
This post has been edited by Eugene Chin : 16 December 2007 - 12:33 AM
@guy, on Dec 16 2007, 03:57 AM, said in The Very Long Test String... Thread:
I'm pretty sure that there is a limit, but it's a high one. I'm basing the assumption off of my attempt to create a chär resource that would set all the bits one would have after completing the stock Fed scenario. It did not work because of the field length. Granted, it was a very long string.
Uhg, sorry about the more-archaic-than-usual style. I just came off of 2+ hours of writing missions revolving around Aurorans.
This works, as far as I can tell:
((((((((((((e144 & e145) & e129) & e128) & e130) & e131) & b4) & e133) & e134) & e135) & e136) & e132) e149) & (e146 & e154)
...and I'm drawing the line on my testing at 15 terms. Anyone else who wants to can push this farther, but I'm through!
Also, since I'm the doubting sort, I confirmed for myself that the parentheses are most definitely needed; without them, only the end of the string seems to be evaluated. When e128 and e129 were true, "e144 & e128 & e129" fired even if e144 was false. "(e144 & e128) & e129" works properly.