# Res edit mission vs ev edit mission, bits, and flags

how the heck do you do a mission in res edit i mean i can figure some of it out but... falgs, well flags what the hell are they and where the hell do they come from? and a bit, if you wnat to make a mission that has a bits set how do you do that, where do you tell the comp what the bit does?

------------------

The EV/O Bibles should tell you everything you need to know..

------------------
Newton's law of gravity: Your warranty will be subject to void if the MessagePad in your possession travels exactly 9.8^2 meters per second.

AIM: evandrewm

That wasnt very informative was it? Personally, I cant understand the EV(O) bible's description.

Here's how a flag works:
A flag is a hexedecimal number - that means its digits range from 0 to F, if you are unsure, it means that it goes 0 1 2 3 4 5 6 7 8 9 A B C D E F, though any web designer should know that. The flag values are listed in the bible, and they are added like this:
(I'm using dummy values because I'm too lazy to look up the real ones)

can land = 0x00000001
has comodity exchange = 0x00000002
high food = 0x04000000

you add the digits sepearatly from each other, no flag should ever add up to any value over F. The result for this would therefore be:
0x04000003
the 0x at the biggining is just the hexedecimal specifier, it does not go in the actual flag as far as I remember, so in the flag field you would put 04000003

hope this helps

------------------
--blackhole
(url="http://"mailto:blackhole@mac.com")mailto:blackhole@mac.com(/url)blackhole@mac.com

Quote

Originally posted by Andrew M:
**The EV/O Bibles should tell you everything you need to know..
**

True, it should, but it doesn't.
The annotated editions are somewhat better, but there is no single source for everything one needs to know about designing missions. 'EV Objects Formulas' and the 'EV Plug-In Making FAQ' help to fill in the gaps in the bible.

------------------
Joe Burnette

"I find that humans can be divided into only two meaningful categories: Decent Humans and Sonsofbitches; both types appear to be evenly distributed
among all shapes, colors, sizes, and nationalities." -- Keith Laumer

Quote

Originally posted by Hippieguy:
**

how the heck do you do a mission in res edit...

**

With great difficulty
You create a new 'mďsn' mission resource, enter the appropriate data in the fields of the resource, write the mission descriptions and enter the dësc ID numbers in the correct places in the mission, and save the changes. The EVO Bible gives fairly good explanations of what goes in the various fields.

Quote

**

... falgs, well flags what the hell are they and where the hell do they come from?
**

blackhole has given a good explanation, for further info see 'EV Objects Formulas', or the 'EV/EVO Bible Annotated Edition.'

Quote

**
...and a bit, if you wnat to make a mission that has a bits set how do you do that, where do you tell the comp what the bit does?
**

In most basic terms, you put the number(s) of the bit(s) you want the mission to set in the 'CompBitSet' field(s). That simply tells the computer to set the bit(s) on completeion of the mission. To have any other effect, you will have to enter the mission bit number(s) somewhere else, for instance in the 'AvalBitSet' field of another mission, the 'Mission Bit' field of a ship or outfit, or the 'VisBit' field of a system.

------------------
Joe Burnette

"I find that humans can be divided into only two meaningful categories: Decent Humans and Sonsofbitches; both types appear to be evenly distributed
among all shapes, colors, sizes, and nationalities." -- Keith Laumer

in case you hadn't figured it out somehow from the jumbled mess of responses and the sources to which they directed you, i'm going to try to provide you with a somewhat straitforward answer:
(pardon the lack of umlauts and the sort, i'm on an ibm pos and i'm not in the mood to look up all the ascii values)

1. the desc shown when you're first offered the mission: add the mission number to 4000 to get the desc id. the mission number is the misn resource id-128 (i.e. misn 128 is 0, which corresponds to desc 4000). write a suitable description. it should lead up to either an ok or a yes/no button, depending on which flags are set (i'll get to the flags later).
2. the rest of the descs (i'm assuming you don't need help here b/c you didn't specifically ask for it. let me know if you do)
3. the ???stel boxes (see 2)
4. availbitset: if this is -1 the mission is always available (well, as directed by the other info in the resource). if it's >=0 and <=255, it is available if the corresponding bit is set. the bits (binary digits, if you don't like shorthand) look basically like 0000... until you set one (i'm going to use bit 2 as an example, it can be anything from 0 to 255), when it becomes 001000.... i'm assuming they're stored as either 8 long integers or just a 256 bit piece of memory, but i doubt you'll ever need to know this. if the value in the availbitset field is between 1000 and 1255, the mission is only available if the corresponding bit (0-255) is not set.
5. cargo, scan, ships, pay, etc. (see 2)
6. availbitclr: similar to putting 1000-1255 in the availbitset field, this allows you to have two different bits able to deactivate a mission, or to have one bit necessary to activate the mission and another one able to deactivate it.
7. compbitset, compbitset2: if it's -1 nothing happens. if it's 0-255 that bit is set. if it's 1000-1255 the corresponding bit is removed. the fields both do the same thing, which allows you to set/clear up to two bits per mission.
8. flags: shown as a hexadecimal number (probably to strike a balance between the ease of binary and the compactness of decimal numbers), this is a collection of bits. each flag is the next higher binary digit, so that it looks much like the mission bits within the computer. the flags are as follows:
0x0001: auto-aborting (just used to create special ships and/or set bits)
0x0002: doesn't show the red destination arrow after it's accepted
0x0004: can't refuse (just displays an ok button, as opposed to yes/no)
0x0010: infinite auxships. they regenerate every time the player enters a new system
0x0020: removes the outfit given at the beginning of the mission if it fails
0x0040: if the mission is aborted, it subtracts 5x the compreward value from the player's status
0x0080: global penalty if the cargo is jettisoned (the bible says it's ignored)
0x0100: shows the green destination arrow before the mission is accepted
0x1000: gives the mission priority in the bar
note although hex numbers are conventionally notated as 0x???, they go into the flags field as \$???
let me know if there's anything else you need

------------------
if tin whistles are made of tin, what's a fog horn made of?

(This message has been edited by nighthawk (edited 08-16-2000).)

or you could just get FlagMaker 2.

don't ask me where it is! i don't remember!!

------------------
(url="http://"mailto:JAce21@chollian.net")mailto:JAce21@chollian.net(/url)JAce21@chollian.net

Quote

Originally posted by nighthawk:
**

1. availbitset: if this is -1 the mission is always available (well, as directed by the other info in the resource). if it's >=0 and <=255, it is available if the corresponding bit is set. the bits (binary digits, if you don't like shorthand) look basically like 0000... until you set one (i'm going to use bit 2 as an example, it can be anything from 0 to 255)...
**

Those bit numbers are correct only for EV. EVO allows for 512 missions and mission bits, so the bit numbers would be 0 through 511. The values for clearing bits would be 1000 through 1511.

------------------
Joe Burnette

"I find that humans can be divided into only two meaningful categories: Decent Humans and Sonsofbitches; both types appear to be evenly distributed
among all shapes, colors, sizes, and nationalities." -- Keith Laumer