Ambrosia Garden Archive
    • Please help a rusty old programmer...


      All this newfangled nova programming is getting on my tit, and I need a few answers. Even though I've read the bible, some things just don't add up:

      1. Why put an exclemation mark in front of a mission bit? And don't you DARE say 'negate' in your answer... I read the bible, and it didn't make any sense to me. I don't know what negate means. :frown:

      2. If someone has the time, perhaps a full explanation of shan and other related recorses. I know what they are, but in NovaTools, how do you copy animation and stuff. I'm making a plug that uses no new graphics, but I wouldn't mind a fiddle with 'em anyway.

      That's it for now, but more questions will be on the way. Cheers in advance.

      --gav

      ------------------
      Visit the (url="http://"http://www.ambrosiasw.com/webboard/Forum10/HTML/005883.html#")Anglo-American Dictionary(/url), a well of priceless information!

    • Quote

      Originally posted by pistgavin:
      1. Why put an exclemation mark in front of a mission bit? And don't you DARE say 'negate' in your answer... I read the bible, and it didn't make any sense to me. I don't know what negate means.:frown:

      !bX is true if bX is false, and the other way around. That's what negation means in this instance.

      'glove

      ------------------
      Compilers - the ultimate god games.
      (edit) I wish there was a preview feature on this board. (/edit)

      (This message has been edited by Kidglove II (edited 05-03-2003).)

    • 2. A shan refers to seperate Rlë* or pict resources through its BaseImage, GlowImage, etc fields.

      The best way to do ship graphics in nova is to convert them to RlëD's or Rlë8's. The program to do this conversion can be downloaded off this site: (url="http://"http://w00tware.ev-nova.net/")http://w00tware.ev-nova.net/(/url)

      After you have created your sprites, you place them into the plug-in and set the corresponding image fields in the shan to the sprites you just created. If you want to use pict sprites, you must have a normal sprite and a mask sprite. The general convention with RlëD's and Rlë8's is, since the mask is always included, increment it by two for each ship.

      Resource Numberings
      In Nova the BaseImage sprite (where the baseic ship image with no running lights or engine flares is displayed) startes at RID 1000 to 1200. Alternate sprites from 1200 to 1400 (see arouran thunderforge for example). The engine flare sprites are from 1400 to 1600. Running lights from 1600-1800. Weapon glows from 1800 upwards. THe sheild graphics were never used in Nova.

      Of course, this numbering system is not set in stone, but it would be best to follow it so that you maintain compatability with other plug-ins.

      I hopet hat helps.

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

    • Quote

      Originally posted by pistgavin:
      **
      1. Why put an exclemation mark in front of a mission bit? And don't you DARE say 'negate' in your answer... I read the bible, and it didn't make any sense to me. I don't know what negate means.:frown:

      **

      Again I present my Nova bit guide , this guide should slove all the bit issues you may have , including this one. If you need more help just post.

      Good luck,

      Entarus,

      ------------------------------------------------------
      A explanation of Nova Control Bits

      Here follows an explantion of nova control bits. Bits we’re also available in previous versions of EV , but in nova they became much more powerful but also more difficult. Control bits are an essential part of making things happen in Nova, so I suggest you read trough this section carefully. I use parts from the EVN bible and explain each part.

      - In Nova there are 10000 Nova Control bits (nbc’s). Control bits are accessed through logical expressions that allow powerful and logical scripting. These expressions are divided into two types test and set.

      Test
      These are boolean expressions(Boolean means that they can be TRUE or FALSE) that are used to determine when something happens; for example, when a mission is to be offered, or when a particular ship should be made available for purchase. In general, if the logical expression defined in a given test expression field evaluates to be true (nonzero), the associated property will be activated (mission becomes available, ship appears, etc ).

      Lets explain this with an example :

      We have made a ship , and want to add this into our plug , but we don’t want to give it to the player right away. He must complete a difficult mission before he’s is allowed to buy the ship.

      We can use nbc’s to accomplish this. We will use the Availability field of the ship resource for this. It’s a test field we enter a ceratin expression in to the field. The player will be able to purchase our type of ship when the expression evaluates to true.

      We decide to use bit 4999 for this.

      -In the mission’s OnSuccess field( it’s a SET field , as explained below) we enter the following : b4999

      -In the Availability field in the ship resource we enter the same :
      b4999

      Lets see what happens : All bits are turned off as default. So we presume bit 4999 is unused and its turned off. When the player completes the mission , the Onsuccess field will be exectuted. This means that bit 4999 will be turned ON. Remember that our Availability field tested for bit 4999 to be true (ON)? So when bit 4999 is turned on the ship will appear , because all conditions are met. The ship will not appear as long as bit 4999 is false (OFF). You can use all SET fields to turn 4999 ON after a certain event.

      There are several terms and operators to test. Lets have a look at them :

      bxxx Lookup the value of control bit xxx. Bits are numbered from b0 to b9999.
      pxxx Check if the game is registered ((P)aid for) ... evaluates to 1 if
      the game is registered or is unregistered but less than xxx days have
      elapsed. Evaluates to 0 only if unregistered for more than xxx days.

      G Lookup the player's gender - 1 if male, 0 if female

      Oxxx Returns 1 if the player has at least one of outfit item ID xxx, 0 if not

      Exxx Returns 1 if the player has explored system ID xxx, 0 if not

      | Logical or operator

      Can be used to test if an expression is
      true OR the an other expression is true.

      & Logical and operator

      Can be used to test if an expression is
      true AND another expression is true.

      ! Logical negation operator

      Can be used to test if an
      expression is FALSE

      ( ) Parenthetical enclosure

      The Nova evaluator is fairly primitive, it may do unpredictable
      things if you give it an expression like b1 & b2 | b3 ... instead, use proper
      parentheses to make it b1 & (b2 | b3) or (b1 & b2) | b3, as appropriate.

      Let see this in two examples :

      b13 & (b15 | !b72)

      This will test if bit 13 is true , and either bit 15 is true or bit 72 is false. If both conditions are met the associated property will be activated .

      !(B42 | B53) & b103

      This will test if either bit 42 is false or bit 53 is false and if bit 103 is true. If both conditions are met the associated property will be activated .

      Note that if you leave the field for a test expression blank, it will
      evaluate to true as a default.

      Also note: The Oxxx operator also considers any carried fighters that are
      deployed when it examines the player's current list of outfits, although this
      feature may be confused if presented with a universe that includes multiple
      fighter bay weapons that launch the same ship type, or different outfits that
      grant the same fighter bay ammo.
      Set

      We’ve briefly touched SET expressions in our first example. Now we will go into detail. The following text comes STRAIGHT from the EVN bible.

      Always read the EVN bible , it’s a very important tool.

      These are simpler than the test expressions... basically all you are doing here is listing what bits you want to be modified when the expression in a give field is invoked. This will happen when the player does something (completes a
      mission, buys an item, etc.) as defined by the other resources. The syntax of set expressions is best illustrated by an example:

      b1 b2 !b3 ^b4

      In this set expression, bits 1 and 2 will be set, bit 3 will be cleared, and bit4 will be toggled to the opposite of whatever it was previously. No parentheses
      are supported for set expressions. Note that if you leave a set expression
      blank, no control bits will be altered.

      n this set expression, bits 1 and 2 will be set, bit 3 will be cleared, and bit
      4 will be toggled to the opposite of whatever it was previously. No parentheses
      are supported for set expressions. Note that if you leave a set expression
      blank, no control bits will be altered.

      One other feature of the set expression is the ability to make random decisions.
      By specifying R(<op1> <op2> ) you can make Nova randomly pick one of the two
      possible choices and execute it, skipping the other one. For example:

      b1 R(b2 !b3)

      ...this expression will set bit 1, and then either set bit 2 or clear bit 3,
      but not both at once. Which operation will be picked is completely random, which
      allows for the design of interesting mission strings that branch unpredictably.

      There are also a number of other operators that allow you to do many interesting
      things:

      Axxx - if mission ID xxx is currently active, abort it.

      Fxxx - if mission ID xxx is currently active, cause it to fail.

      Sxxx - start mission ID xxx automatically.

      Gxxx - grant one of outfit item ID xxx to the player

      Dxxx - remove (Delete) one of outfit item ID xxx from the player

      Mxxx - move the player to system xxx. The player will be put on top of the
      first stellar in the system, or in the center of the system if no
      stellars exist there.

      Nxxx - move the player to system xxx. The player will remain at the same
      x/y coordinates, relative to the center of the system.

      Cxxx - change the player's ship to ship type (ID) xxx. The player will keep all of his previous outfit items and won't be given any of the default
      weapons or items that come with ship type xxx.

      Exxx - change the player's ship to ship type (ID) xxx. The player will keep all of his previous outfit items and will also be given all of the default
      weapons and items that come with ship type xxx.

      Hxxx - change the player's ship to ship type (ID) xxx. The player will lose
      Any nonpersistent outfit items he previously had, but will be given all of the default weapons and items that come with ship type xxx.

      Kxxx - activate rank ID xxx.

      Lxxx - deactivate rank ID xxx.

      Pxxx - play sound with ID xxx.

      Yxxx - destroy stellar ID xxx.

      Uxxx - regenerate (Un-destroy) stellar ID xxx.

      Qxxx - make the player immediately leave (absquatulate) whatever stellar he's
      landed on and return to space, and show a message at the bottom of the
      screen. The message is randomly selected from the STR# resource with
      ID xxx, and is parsed for mission text tags (e.g. <PSN> and <PRK> )
      but not text-selection tags like those above (e.g. {G "he" "she"} )
      (see dësc and mďsn resource descriptions for more examples)

      Txxx - change the name (Title) of the player's ship to a string randomly
      selected from STR# resource ID xxx. The previous ship name will be
      substituted for any '*' characters which are encountered in the
      new string.

      Xxxx - make system ID xxx be explored.

      ------------------
      -Nothing lasts forever-
      (url="http://"http://www.AmbrosiaSW.com/cgi-bin/ubb/forumdisplay.cgi?action=topics&number;=9&SUBMIT;=Go&urgaylol;=yes")EV Developer's Corner(/url)
      (url="http://"http://www.ambrosiasw.com/cgi-bin/ubb/forumdisplay.cgi?action=topics&forum;=Uplink+web+board&number;=69") Uplink Forum(/url)
      (url="http://"http://www.apple.com")iMac, Therefore, I am(/url)

    • Okay, I'm gonna try to simplify these last few posts with regard to logical operators.

      There are three basic logical operators, just as there are three primary colors. As with colors, these three operators can be combined to perform any function you could possibly imagine. These three operators are put together to create your computer, your printer, your TV, your radio, and a gazillion other things.

      The three operators are AND , OR , and NOT. Since all electronics function in binary, (yes or no, true or false, 1 or 0), these operators work as follows:

      AND -- ONLY has an output of TRUE if ALL inputs are TRUE. Represented in the EV3 engine with the ampersand "&" symbol.
      Scenario Alpha: Inputs: b1=TRUE, b2=TRUE, b3=TRUE, b4=TRUE. Expression: b1&b2;&b3;&b4.; Output: TRUE.
      Scenario Beta Inputs: b1=TRUE, b2=TRUE, b3=FALSE, b4=TRUE. Expression: b1&b2;&b3;&b4.; Output: FALSE. NOTE: While I only listed Bit 3 as FALSE, any combination of the four would have resulted in an output of FALSE.

      OR -- Has an output of TRUE if ANY of the outputs are TRUE. Represented in the EV3 engine with the absolute value "|" symbol.
      Scenario Alpha: Inputs: b1=TRUE, b2=TRUE, b3=TRUE, b4=FALSE. Expression: b1|b2|b3|b4. Output: TRUE.
      Scenario Beta: Inputs: b1=FALSE, b2=TRUE, b3=FALSE, b4=FALSE. Expression: b1|b2|b3|b4. Output: TRUE. NOTE: If using strictly OR operators, ALL bits have to be FALSE to result in an output of FALSE.

      NOT -- Also called in "Inverter". ONLY has an output of TRUE if ALL of the outputs are FALSE. Represented in the EV3 engine with the factorial or exclamation point "!" symbol.
      Scenario Alpha: Inputs: b1=TRUE, b2=FALSE, b3=FALSE, b4=FALSE. Expression: b1!b2!b3!b4. Output: FALSE.
      Scenario Beta: Inputs: b1=FALSE, b2=FALSE, b3=FALSE, b4=FALSE. Expression: b1!b2!b3!b4. Output: TRUE.

      Combinations and Order of Operations -- The EV3 engine takes its order of operations just like a calculator or computer: from left to right. However, you can change the order by placing parentheses or brackets "(x)" around a part of the expression.
      Scenario Alpha: Inputs: b1=TRUE, b2=FALSE, b3=TRUE, b4=TRUE. Expression: (b1&b2;)|(b3!b4). Translation: (Bit 1 AND Bit 2) OR (Bit 3 NOT Bit 4). Output: FALSE.
      Scenario Beta: Inputs: b1=TRUE, b2=FALSE, b3=FALSE, b4=TRUE. Expression: !b1|(b2&b3;)|b4. Translation: NOT Bit 1 OR (Bit 2 AND Bit 3) OR Bit 4. Output: TRUE.

      I hope that all makes sense. If not, just let me know, and I'll try to explain it better.

      Good luck and God Bless,
      -- spacecowboy

      ------------------
      Suddenly, the little scoutship disappeared and then reappeared right behind the alien warfleet. The gravitic ship's captain hailed the armada. "You are going to be destroyed, but I will give you a choice as to how you want to spend eternity: big pieces, little pieces, or quarks?"
      Dead silence.
      "Quarks it is, then."

      (This message has been edited by spacecowboy (edited 05-03-2003).)