Quote
Originally posted by The Space Between:
Let's start with the numbers. What are b0 to b9999? They are in reference to the missions, correct? Well, how do I know which missions they refer to?
You don't - the mission bits don't refer to missions, it's the missions which refer to the bits. There's probably a list around somewhere of all the bits which are used by the default scenario so that you can avoid using them in your plugin. Basically, the ATMOSians designated some bits to perform some function before they started (such as b6666, the single-day holdoff crön bit, or b511, the string lockout bit) and used those bits in that function. The rest of the bits are usually just consecutive as the storyline goes along.
Quote
I mainly just want to know how to make a string. I only have one mission right now, because I don't know how to link to the second mission, then third, and so on. That is my main goal for this topic.
Ok, basically the mission bits prevent you from getting a mission until you've completed the one before, and also prevents you from getting the same mission twice, if set up correctly. Have a look at the walkthroughs on ev-nova.net for a bit of help here, but I'll just run through the first few missions of the Wild Geese string and how the mission bits work.
Quote
Mission Bits for WG1:
**AvailBits: !(b800 | b801) & !((b511 | b515) | b6666)
OnAccept: b511
OnRefuse: b801 b6666
OnSuccess: b800 b515 b518
OnFailure: b801 !b511
OnAbort: b801 !b511
OnShipDone: **
Ok, in this case, b800 is the bit when you successfully complete the mission, and b801 is the bit which is set when you refuse, abort or fail. Both of these mission bits prevent you from getting the mission a second time, since they both must not be set in order for you to get the mission. b511 is set when you accept the mission, which prevents you from getting any other storyline (since that is how b511 was used) and b515 and b518 are set when you complete it, which have similar functions. b6666 is the one-day holdoff crön bit - it is used several times in Nova to make the player wait for a day before recieving the next mission. It is cleared every day. Now, once we complete this mission, we now have the following bits set: b511, b515, b518 and b800.
Quote
Mission Bits for WG2:
**AvailBits: b800 & !(b802 | b803)
OnAccept:
OnRefuse: b803 !b511
OnSuccess: b802 R(b804 b805)
OnFailure:
OnAbort: b803
OnShipDone: **
This one is a bit simpler. We have b800 set from the previous mission, which allows us now to do this mission. The !(b802 | b803) in the AvailBits field is to prevent the mission from being recieved twice - b803 is set on refusal or aborting, and b802 is set on success. Also when refusing, b511 is cleared, leaving the player free to enter another storyline, but since b800 is still set, along with b803, the WG string is locked out. And when succeeding, R(b804 b805) happens - this means that either b804 or b805 is set, depending on a random probability, leading to random branches in the storyline.
Quote
Mission Bits from WG3a:
**AvailBits: b804 & !(b806 | b803)
OnAccept:
OnRefuse:
OnSuccess: b806
OnFailure:
OnAbort: b803
OnShipDone: **
This is simpler again. The b804 in the AvailBits means that I can get this mission if b804 was set in the previous mission, and the !(b806 | b803) means that I cannot do this mission a second time (b806) and I cannot do this mission if I have aborted it (b803). There is no penalty for refusing or failing the mission, which means no mission bits are changed in those cases, and I am free to take this mission again. Et cetera.
Now, I hope this is making sense, and I'm not just spouting gibberish. Essentially, the mission bits force the missions to happen in order, and prevents them from repeating. Usually, sequential bits are used for sequential missions, but it doesn't matter what the numbers are, so long as they are not used twice for different functions. One must be careful with mission bits to prevent unpredictable things from happening. For example, in the first two Fed missions, the mission bits are
Quote
Mission Bits for Fed 1:
AvailBits: !(b511 | b515) & !(b50 | b6666)
OnAccept: b511
OnRefuse: b6666
OnSuccess: b50 b512 b515 b518
OnFailure: b50 !b511
OnAbort: b50 !b511
OnShipDone:
Mission Bits for Fed 2:
(b)AvailBits: b50 & !b51
OnAccept:
OnRefuse:
OnSuccess: b51
OnFailure:
OnAbort:
OnShipDone: