Ascii Sector Wiki

ASCII Sector has a built-in compiled programming language allows users to create their own quests and storylines in the ASCII Sector Universe for other players to play through.

To make a quest, create .txt file in the "quests" folder in your ASCII sector game directory, then rename the file to a name with 8 characters or less. Then, use a raw text file editor (e.g. Notepad on Windows) to type the scripts into the .txt file. (You can use this page or the qmanual.pdf file as a reference for coding)

When you are done, go to the Quest Maker in the Main Menu, then click on the "Compile Quest" button and check for errors in the script by clicking on the file name of your quest. (If it doesn't appear, make sure it's in the "quests" folder). When no errors are detected, the quest is automatically compiled as a .qst file. You can load your quest using the 'Q' key while on the planet and test your script for bugs.

Quest Info[]

Title : <title>
Author : <author>
Required : <title of required quest> : <author of required quest>
<variable name> : <value>

At the beginning of each quest, there needs to be a title Title : <title> and the author's name Author : <author> on the first lines of the script.

You can also add an achievement to your quest, which will appear in your Quine5000's achievements page in the "Stats" section when the quest is completed: Achievement (: achievement number) : ACHIEVEMENT TEXT

If you want your quests to be played in sequence, you can put the title and the author's name of the previous quest using this line of code: Required : <title of required quest> : <author of required quest>

After the quest information, any variables in the script must be given an initial value as an integer. Variables can be used to store numbers that can be changed later in the script, and are declared with <variable name> : <value> For example, this line sets the variable named myvariable to 1:

myvariable : 1

SCENE[]

SCENE <scene name>
   {code}
/SCENE

Every scene must have a <scene name> next to the SCENE text. {code} is the code inside the block which consists of the blocks listed below.

ONLOAD[]

ONLOAD
   MarkNavPoint: <sys> : <num>
   RemoveMission: <mission name>
   RemoveNavPointMark: <sys>/"All" : <num>
   ShowImage: <image> : <dsec>
   Timer: <num> : "Start"/"Stop"/"Set": <gsec>
   Variable: <var> : <num>
/ONLOAD

The ONLOAD block designates the commands to run when the scene is loaded. At the end of the block, /ONLOAD must be typed to signify the end of the block.

MarkNavPoint : <sys> : <num>

This command will highlight Nav <num> in the system name in <sys>. The Nav point will appear in red on the nav computer. MarkNavPoint : Loye : 7 will highlight Nav 7 in the Loye System.

RemoveMission : <mission name>

This will remove the specified mission from the player’s Quine and nav computer and free up its mission slot. A maximum of five quests are allowed at the same time - that’s why it’s important to remove them when they’re no longer needed in the quest.

RemoveNavPointMark : <sys>/"All" : <num>

This command will remove the highlight from the Nav point so that it will no longer appear in red on the nav computer. RemoveNavPointMark : All will remove all the markings on all nav points.

ShowImage : <image> : <dsec> will show <image>.img for <dsec> tenths of a second (deciseconds). ShowImage : holo : 50 will show holo.img for 5 seconds.

Timer : <num> : Start starts timer number <num>. When a timer is running, it increases by 1 every game second. The timer number can only be 1 to 5, since there are a maximum of 5 timers in a quest.

Timer : <num> : Stop stops timer number <num>. Stopping a timer will not it reset it, so starting it again will make it continue from the value it had when it was stopped.

Timer : <num> : Set : <gsec> Sets timer number <num> to a value of <gsec> game seconds.

BARTENDER[]

BARTENDER
   Exemption : <base names>
   <message here>
/BARTENDER

The BARTENDER block specifies a message for the bartender to tell the player. The message is written in the BARTENDER block in the <message here> space. It has a limit of 10 lines and 200 characters per line. Line breaks are ignored in messages.

Exemption : <base names> will make the bartender not to say the messages listed in base names.

Since the character limit for each line is 254 (not counting the spaces before the line), use these two lines below to make the Bartender only deliver the message on XNN-26:

BARTENDER
   Exemption : Aeolus, Alasdair Mor, Andingmen, Basin, Bellamy, Bloom, Bounty, BPD-89, Callis, Chi-Chi One, Chi-Chi Two, Daedalus, Dione, Euris, Ganim, Guamao, Haack Naval Base, Hecuba, Hooper's Hope, Iridion, Loye Naval Base, Manurhin, Mimas, Minos, Munroe
   Exemption : New Beijing,  New Frankfurt, Novy Norlisk, Nuk's End, Planck, Priam, Pyrdion, Ragozin, Sediver, Sisyphus, Slavneft, Sneferu, Stille, Totem, Tranton, Trichinas, Xidan
   <message here>
/BARTENDER

If you want the bartender to deliver the dialogue in another base, add XNN-26 next to Xidan at the end of the list, then remove that base (including the comma, if there is one) from the list.


CLEARNAV[]

CLEARNAV
   <system name> : <nav>
   <system name> : <nav>
    ...
   <system name> : <nav>
/CLEARNAV

The CLEARNAV block prevents ships from spawning at the nav points of systems, ensuring that a mission-essential ship isn’t attacked and destroyed by other generated ships, making the quest impossible to continue. It is also used to prevent generated Confed ships from scanning your cargo manifest whenever you don't want to.

This block above clears the Nav 7 (Basin) in the Loye System.

CLEARNAV
   Loye : 7
/CLEARNAV

You can clear as many nav points as you like, or even clear the entire sector by listing all 172 nav points in the sector.

MISSION[]

MISSION <mission name>
   Description : <description>
   Objective : <objective>
   Expiration : <hours until expiry>
/MISSION

The MISSION block creates a mission, and each of them must have a description and at least one objective. Each scene can only have up to five (5) missions.

Description : <description> will give the mission's description which will be displayed in the Quine 5000's missions menu, with spacing between each line.

Objective : <objective> will give the mission's objective which will be displayed in the navigation computer, without line spacing.

OBJECTIVE 1 OBJECTIVE 2 OBJECTIVE 3 OBJECTIVE 4 OBJECTIVE 5 OBJECTIVE 6 OBJECTIVE 7 OBJECTIVE 8 OBJECTIVE 9

An example of mission with objectives displayed in the navigation screen.

Here's an example of a mission block:

MISSION Name
   Description : The mission shown in the right image is created by the following line of code.
   Objective : OBJECTIVE 1
   Objective : OBJECTIVE 2
   Objective : OBJECTIVE 3
   Objective : OBJECTIVE 4
   Objective : OBJECTIVE 5
   Objective : OBJECTIVE 6
   Objective : OBJECTIVE 7
   Objective : OBJECTIVE 8
   Objective : OBJECTIVE 9
/MISSION

A mission can have more than one objective (up to 9). The mission in the block above has 9 objectives, each having a number from 1 to 9 (you can see it in their names). Objective numbers can be referenced in blocks such as Result : Mission : Complete : <objective number> in a trigger block.

SHIP[]

SHIP
   Armor : <1 - 5>
   Attitude : <-125 - 125>
   ECM : <0 - 3>
   Experience : <Rookie, Pro or Ace>
   Faction : Confed, Hunter, Kilrathi, Merchant, Militia, Pirate or Retro
   Gun : <gunType>
   GunBoost : <0 - 3>
   GunCooler : <0 - 3>
   MissileAmount : <0 - 20>
   MissileType : Dumb, Heat, Forf or Torp
   Morale : Timid, Confident or Fanatical
   Name : <name>
   Nav : <nav>
   Order : Attack, Dock, DockNoEngage, DontMove, Escort1-8, Jump, JumpNoEngage, Land, LandNoEngage, MoveTo, MoveToNoEngage or None
   OrderTarget : <target name or number>
   Shields : <1 - 5>
   SpawnCharacters : <0 - 100>
   System : <sysName>
   TurretLeft : <gunType>
   TurretLeftBoost : <0 - 3>
   TurretLeftCooler : <0 - 3>
   TurretRear : <gunType>
   TurretRearBoost : <0 - 3>
   TurretRearCooler : <0 - 3>
   TurretRight : <gunType>
   TurretRightBoost : <0 - 3>
   TurretRightCooler : <0 - 3>
   Type : <ship type>
   Template : <number>
   X : <0 - 46000>
   Y : <0 - 46000>
/SHIP

The SHIP block creates a ship. A maximum of thirty (30) ship blocks are allowed per scene.

Armor : <1 - 5> is the armor level of the ship. If no armor level is specified, the armor level is defaulted to 1.

Attitude : <-125 - 125> is the ship's attitude towards the player. Ships with an attitude of -125 to -20 are declared hostile and attack the player. -19 to 19 is neutral and 20 to 125 is friendly.

If no attitude is specified, the game will set the attitude according to the player's faction standings. For instance, pirate ships declared in a SHIP block without a specified attitude will attack the player when their faction standings towards the pirates are hostile, and they will not when it is friendly or neutral.

ECM : <0 - 3> is the ship's electronic counter measures (ECM), ranging from 1 to 3. The higher the ship's ECM level, the more likely the ship breaks a locking missile. If no ECM level is specified, the ship will have 0 ECM.

Experience : <Rookie, Pro or Ace> is the experience of the ship. If the experience level is omitted, the ships experience is set to Pro by default.

Faction : <faction> is the ships faction, which can only be Confed, Hunter, Merchant, Militia, Pirate, Retro, or Kilrathi.

Gun : <gunType> is the type of the ship's forward facing gun, as set by the parameter <gunType>. The type of gun can only be one of Laser, Mass Driver, Meson Blaster, Neutron Gun, Particle Cannon, Ionic Pulse Cannon, Tachyon Cannon, Plasma Gun, Fusion Cannon or None. If no gun type is specified,

Escort1 2 3 4 5 6 7 8

All 8 escort positions, with the @ sign representing the escorter's ship.

SHIPDIALOGUE[]

SHIPDIALOGUE <name>
   STEP <step number>
      ChangeScene : <scene>
      Goto : <step>
      QuestDone (: <message>)
      Ship : <line>
      Timer : <num> : "Start"/"Stop"/"Set": <gsec>
      Variable : <var> : <num>
      Player : <go to step> : <reply>
   /STEP
/SHIPDIALOGUE

CHARACTER[]

CHARACTER
   Color : <0 - 255>
   CriticalWounds : <amount of critical wounds>
   EquipmentHead : <name> (: <condition>)
   EquipmentLeftBelt : <name> (: <condition>)
   EquipmentLeftHand : <name> (: <condition>)
   EquipmentLeftShoulder : <name> (: <condition>)
   EquipmentRightBelt : <name> (: <condition>)
   EquipmentRightHand : <name> (: <condition>)
   EquipmentRightShoulder : <name> (: <condition>)
   EquipmentTorso : <name> (: <condition>)
   Faction : Civilian, Confed, Hunter, Kilrathi, Merchant, Militia, Pirate, Police or Retro
   FirstName : <firstname>
   Gender : <gender>
   HealthHead : <0 - 100>
   HealthLeftArm : <0 - 100>
   HealthLeftLeg : <0 - 100>
   HealthRightArm : <0 - 100>
   HealthRightLeg : <0 - 100>
   HealthTorso : <0 - 100>
   HealthTotal : <0 - 124>
   HomeName : <base or ship name>
   HomeType : <base or ship>
   LastName : <lastname>
   Movement : Global, Local or None
   Order : Attack, None, Protect or Talk
   OrderTarget : target name
   Precision : <1 - 200>
   Speed : <1 - 200>
   Strength : <1 - 200>
   Template : <num>
   X : <1 - 88>
   Y : <1 - 84>
/CHARACTER

CHARACTERDIALOGUE[]

CHARACTERDIALOGUE character name
   Character : <dialogue>
   Player : <dialogue>
   Goto : <num>
   IF Accept, Timer, Variable, Credits
      if conditional is true, conversation continues here
   ELSE
      if untrue, it continues here
   /ELSE
   Reply : <gotostep> : <reply>
   STEP step number
      Character : character dialogue
      Reply : <gotostep> : <reply>
   /STEP
/CHARACTERDIALOGUE

TRIGGER[]

TRIGGER
   Event : AreaEntered : area (: <base>)
           Boarded (: <shipName>)
           CargoBought : <cargo> (: <base>)
           CargoInHold : <cargo> : <num>
           CargoSold : <cargo> (: <base>)
           CharacterBlinded (: <name>)
           CharacterHitByPlayer (: <name>)
           CharacterKilled (: <name>)
           CharacterKilledByPlayer (: <name>)
           CharacterOrderCompleted : <name>
           CharacterShotByPlayer (: <name>)
           CharacterStunned (: <name>)
           Credits : <num>
           DistanceTo : <nav> : <meters>
           Docked (: <shipName>)
           FactionAttitude : <faction> : <-125 - 125>
           ItemAcquired : <item>
           ItemLost : <item>
           Jumped (: To, From : <system>)
           Landed (: <base>)
           Launched (: <base>)
           Mission : <mission> : Completed, Expired or Failed (: <objective>)
           NavVisited : <system> : <nav>
           ShipDestroyed (: <shipName>, <shipType> or <faction>)
           ShipDestroyedByPlayer (: <shipName>, <shipType> or <faction>)
           ShipHitByPlayer (: <shipName>, <shipType> or <faction>)
           ShipIdentified (: <shipName>, <shipType> or <faction>)
           ShipOrderCompleted : <shipName>
           Timer : <num> : <gsec>
           Variable : <var> : <num>
   Result : ChangeCharacterOrder : <name> : Attack, BoardDockedShip, BoardPlayerShip, LeavePlayerShip, None, Protect or Talk
            ChangeCharacterOrderTarget : <name> : <target>
            ChangeScene : <scene>
            ChangeShipAttitude : <shipName> : <-125 - 125>
            ChangeShipOrder : <shipName> : Attack, Dock, DockNoEngage, DontMove, Escort1-8, Jump, JumpNoEngage, Land, LandNoEngage, MoveTo, MoveToNoEngage or None
            ChangeShipOrderTarget : <shipName> : name or number of target
            CreateCharacter : template number
            CreateItem : item number : <item> (: weight in grams)
            CreateShip : template number
            MarkNavPoint : <system> : <nav>
            Mission : mission name : Completed, Expired or Failed (: objective number)
            PlaceItem : <item> : base, ship  (: <x> : <y>)
            PlaceItem : <item> : <name> (or Player) (: LeftShoulder, RightShoulder, LeftBelt, RightBelt, LeftHand, RightHand, Backpack or Locker))
            QuestDone (: achievement number)
            RemoveCargo : <cargo> : <num>
            RemoveCredits : <num>
            7
            RemoveItem : <item>
            RemoveMission : <mission>
            RemoveNavPointMark : <system> or All : <nav>
            RenameItem : <item> : new <item>
            ShowImage : <image> : <dsec>
            Timer : <num> : Start, Stop, Set : <gsec>
            Variable : <var> : <num>
   Repeats : <num>
/TRIGGER

TRIGGER blocks are used in almost every quest script. Each trigger must contain at least one event (the condition) and one result (the action(s) executed when said condition is fulfilled).

There are so many types of events and results a trigger can have that we had to use a scroll box to display all of them! However, it is important to note that each trigger can have no more than 5 events and 5 results.

DRAW IMAGE[]

Fanmade Quine6000

ASCII Sector has a built-in ANSI painting program you can use to draw images with. It can be accessed by clicking on "Quests" in the main menu, then on "Draw Image". Images drawn in the can be saved and displayed by using ShowImage : <image> : <dsec> in the ONLOAD block or as a result in a TRIGGER block.