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).
I've read the manual (bible) on ncb's, and have 2 questions for the SET part:
If I put the following down:
R (b1 !b2 !b2)
Will it have a 2/3rds chance of clearing bit 2 and a 1/3rd chance of setting bit one?
If the Player's Ship's name was the following:
Babylonian
and I did T128 where string 128 was the following:
**S.S. ***
Would the ship's new name be S.S. Babylonian ?
------------------ See I'm the king of the swingers, the Jungle V.I.P., But I've reached the top and had to stop, And that's what's botherin' me.
1. No. The R( ) operator can have a max of two arguements. You can, however, nest the statements.
2. Yes.
------------------ "The day microsoft makes something that doesn't suck will be the day they make vacuum cleaners." -White Lightning
Quote
OrigR> **1. No. The R( ) operator can have a max of two arguements. You can, however, nest the statements.
**
Would this accomplish the desired result?
R(!b2 R(!b2 b1))
with it having a 2/3-chance of clearing bit 2 and 1/3-chance of setting bit one?
(This message has been edited by Limax (edited 08-30-2002).)
Originally posted by Limax: R(!b2 R(!b2 b1))
Would give you a 75% chance (50% in the first clause + 50% of 50% = 25% in the second) of clearing b2 and a 25% (50% of 50%)chance of setting b1.
Kidglove
------------------ Compilers - the ultimate god games.
How would one acomplish a 1/3 probability of three things (or close enough)?
R( b1 R( b2 b3 ) ) would not do this...
R( R( b1 b2 ) R( b3 R( R( b1 b2 ) R( b3 R(...) would though in theory, but is impossible to do in a closed system (aka, not infinity). Therefore, how do we accomplish the R( R( b1 b2 ) R( b3 R( R( b1 b2 ) R( b3 R(...) equivalent in way which is possible to represent in the Nova engine?
Doing a R( R( b1 b2 ) R( b3 R( R( b1 b2 ) R( b3 R(...) for a while (but not to infinity, cut off with a slight bias towards either b1, b2, or b3), would produce a "good-enough" result. But can it get closer? A crön may get us there.
Using the iterative crön entry/exit (set Flags 0x0001), it may be possible to have the crön continue to do something similar to or in the form of R( R( b1 b2 ) R( b3 b4) ), where getting the value of b4 makes it go back and try again until it has either b1, b2, or b3 set. It essentually "finishes" with b4 never being set, and a 1/3 chance of the others being set. Two cröns may be needed to pull off the effect. I'll have to do more experimentation to see if I can get it to happen without any infinite loops (and actually meet the probabilities required).
------------------ Some call me strange. Some call me weird. Some just call me Normal Guy.
couldn't you just do this
(b2|!b1)|b2
2/3 of b2 and 1/3 of !b1.. i think.
------------------ And it was written that no hand but his should wield the Sword held in the Stone, but he did draw it out, like fire in his hand, and his glory did burn the world. Thus did it begin. Thus do we sing his Rebirth. Thus do we sing the beginning. -from Do'in Toldara te, Songs of the Last Age , Quarto Nine: The Legend of the Dragon. Composed by Boanne, Songmistress at Taralan, the Fourth Age
No, no. That is for test expressions. They're talking about set expressions.
------------------ Moderator- (url="http://"http://www.AmbrosiaSW.com/cgi-bin/ubb/forumdisplay.cgi?action=topics&number;=9&SUBMIT;=Go")EV Developer's Corner(/url) (url="http://"http://www.AmbrosiaSW.com/webboard/Forum9/HTML/003091.html")Need Plug Testers?(/url) | (url="http://"http://www.evula.com/survival_guide/")EV/EVO/EVN Survival Guide(/url) | (url="http://"http://www.AmbrosiaSW.com/games/evn/addons.html")Nova Addons(/url) | (url="http://"http://homepage.mac.com/dr_ralph/")Got NovaTools?(/url) | (url="http://"http://www.ambrosiasw.com/cgi-bin/vftp/dl-redirect.pl/TheChallenge102.sea.bin?path=evn/plugins&file;=TheChallenge102.sea.bin")The Challenge v1.0.2(/url) "Many things are possible. A smaller set of things are likely." -pipeline
Originally posted by Normal Guy: **(idea with cröns and nested r-operators) **
After trying it for a while, I came to the conclusion that the R operator doesn't work when you try to nest it. The expression I used "!b4 r(r(b1 b2) r(b3 b4))" in an iterative exit clause of a crön set all the bits b1, b2 and b3.
It didn't go into an endless loop, though, so I'm guessing it evaluated the r-operators before the !b4...
Originally posted by Normal Guy: **How would one acomplish a 1/3 probability of three things (or close enough)?
Urrrgh... now I know why I haven't dared to do much Nova mission experimentation.
------------------ (url="http://"http://www.mazca.com/")Mazca(/url) , Moderator, EV Developer's Corner The King of Pork (url="http://"http://www.AmbrosiaSW.com/cgi-bin/ubb/forumdisplay.cgi?action=topics&number;=9&SUBMIT;=Go")EV Developer's Corner(/url) | (url="http://"http://www.ambrosiasw.com/cgi-bin/vftp/show.pl?product=evn&category;=utilities&display;=date&file;=NovaTools.sit")NovaTools(/url) | (url="http://"http://www.AmbrosiaSW.com/cgi-bin/ubb/forumdisplay.cgi?action=topics&number;=29&SUBMIT;=Go")EV Development FAQs(/url) | (url="http://"http://www.evula.com")Obligatory EVula Link(/url) | (url="http://"http://www.AmbrosiaSW.com/webboard/Forum9/HTML/003196.html")Plugin Recruitment list(/url) | (url="http://"http://www.AmbrosiaSW.com/webboard/Forum9/HTML/003091.html")Plugin Beta-tester list(/url)
Well, 6 tries so far and I haven't been able to get it to work. I need to learn more about the crön resource before I try again. Although it is possible that the crön I'm using is actually working as planned, the mďsns I've set up to test this don't seem to like me much. Oh well. I'll keep you all posted.
If you want to figure out how many times the cron iterates, you could have it give the player an outfit (IFF decoder?).
------------------ Why are you all looking at me like that?
When ever someone asks you "What good is math, I'm never going to use it in real life!", just show him/her this web site
------------------ Power corrupts. Absolute power is kind of neat. --John Lehman,US secretary of the navy
Ta Da! I have done it!
Using two bits (4 possible combos) and non-nested R() things (which aparently don't work anyway), it can be done.
crön: EnableOn: !b1 & !b2 OnStart: R(b1 !b1) R(b2 !b2) Use Iterative Entry Random: 100 Duration: 0
mďsn 1 (or any other resource you wish to be effected by the 1/3 chance): AvailBit: b1 & !b2
mďsn 2: AvailBit !b1 & b2
mďsn 3: AvailBit: b1 & b2
I've done enough trials to satisfy myself that these all have equal chance of occuring (1/3 for each!!!). If !b1 & !b2 is the case, the crön will reactivate and has a 75% chance of changing to useful values in b1 and b2. If that 25% comes up, it will retry until it has a useful value.
Originally posted by Sheer_falacy: **If you want to figure out how many times the cron iterates, you could have it give the player an outfit (IFF decoder?).
For the most part, only one iteration per trail. Theoretically, you should have more than one iteration only about 25% of the time, and extremely rarely any more than that. In a quick trial of ten, only twice was there 2 (20%), and none more than that. Fractions of iterations are not possible of course, or you would expect 2.5 instances.
Excellent. Do you mind emailing me the file you made?