Quote
Originally posted by MavHunterExtreme:
**So how do you know what numbers you need for the bit fields when connecting missions together?
**
How do we know what bit numbers to use?
We choose them arbitrarally. Bits can be numbered b0-b9999, though most of these arnt used in stock nova (and are left open to plugin developers).
There is no reason ATMOS had to choose b511 and b515 as the storyline exclusion bits - they just picked them and then used them. Now, if we wanted to add a new storyline/mission to nova, we would of course have to make sure we didnt use the same bits that Nova does accidentally (unless we wanted to consider the bits from the stock scenario, for example, if we wanted to have our storyline mutually exclusive with the nova storylines.)
Hopefully there would be some order to the bits we used (a storyline we made would use all consecutive bits, there would be no bits hanging around in the middle of a big range of unused bits, etc), but they dont have to be. I think ATMOS chose the bits they used by taping a chart of all the possible mission bits to the wall and throwing darts at it (atleast the bits used for each storyline are continuous, usually). (I am sure there was a method to thier madness, but I'll be damned if i can figure it out)
Now an example:
If we decide to use bits starting at 1000 for a new storyline, the first mission might look like:
Availability: !b1000 & !b1001
OnSuccess: b1000 <Dont offer again if player has done it
OnRefuse: b1001 <Dont offer again if player has refused it
The second mission might look like
Availability: b1000 & !b1002
OnSuccess: b1002
If the player refused the first mission, b1001 would be set, and thus that mission wont be offered again.
If the player completed the first mission, b1000 would be set, and that would make the second mission available, and cause the first mission to not be offered again.
Note: If this was a storyline that would want to be mutually exclusive with the Nova storylines, the first mission would want to look like this:
Availability: (!b1000 & !b1001)&!(b511 | b515)
OnAccept: b511
OnAbort: !b511
OnSuccess: b1000 b515
OnRefuse: b1001
(because we want it to act like a main storyline in nova, we would want to do the same things that the stock scenario does: Set b511 when the player accepts the first mission in a string, and b515 when they complete it)
Also:
To expand on what was said by someone else, in a TEST string (such as an availability field)
bxxx & byyy (Both bits xxx and yyy must be set)
bxxx | byyy (One or both of xxx and yyy must be set)
!bxxx & byyy (bit xxx must not be set, bit yyy must be)
bxxx & (byyy & bzzz) (Bits xxx,yyy,and zzz must be set)
Etc.
There are a few operators other than bxxx (that test for ship type, outfit type, ranks, etc)
Be aware that bxxx & byyy & bzzz is WRONG, and will cause Nova to behave strangely (see: not the way you want it to). When writing test strings, you must parenthesize religiously.
bxxx byyy is also WRONG.
Set strings are alot simpler - they are just a space-separated list of commands:
Bxxx (set bit xxx)
!bxxx (unset bit xxx)
^bxxx (set bit xxx if it isnt set, unset it if it is - Unused in stock scenario)
There are also a pile of other crazy set opperators that can destroy planets, start, abort, and fail missions, and so on.
-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 02-04-2004).)
(This message has been edited by Azratax2 (edited 02-04-2004).)
(This message has been edited by Azratax2 (edited 02-04-2004).)