#The name of this script will be the same of the solar system (e.g. Sol.txt) #All lines starting with # are comments #All lines starting with : are labels (which can be built-in or custom) #All lines starting with | are zapped labels #All lines starting with ! are commands #All other lines are text, which will be displayed in some text box #If a label appears more than once, when that label is called (either through script or from the game itself in the case of built-in labels) one of those labels will be randomly jumped to. #Each location in a solar system is referred to by a letter, number or other character (specific to that solar system) #These will be handled by drawing that character with overlay over every char of that planet, moon etc. #The overlay will be removed in actual gameplay. #I was thinking that all the solar systems would just be drawn on one board, using the same charset and palette for each. #We should be fine with that many chars with a bit of reuse and it will save time if we're not tempted to draw a unique set of planets for every solar system. #When visiting a planet, the label associated with that planet e.g. :[Q] will be called. This won't necessarily do anything visible to the player (although in some cases it might, in case you want to show a first-time description of the planet or take some other special plot-related action for certain places). Instead, it will be used to set certain variables like the planet's name. #After that, the specific actions related to each planet are handled by calling the built-in label for each action. For example, for our planet referenced by the character 'Q' possible labels might be: #:[Q]Explore #:[Q]Trade #However, these labels will not be specially handled- any you add will appear on the menu when visiting a planet. #The commands !zap and !restore will zap/restore a label; however, unlike MZX, all instances of that label will be zapped or #restored. This can be used on built-in labels (e.g. !zap [Q]Explore) and that will stop that menu option from appearing until it is restored. #There are two more built-in labels #:justentered #:random #The label 'justentered' will be called on entering the solar system. #The label 'random' will be called randomly while exploring the solar system and will be used for random encounter and the like. #Counters will generally just be normal counters, although the game will set some for the purposes of making certain common things easier. #For example, already_seen will contain the number of times the player has performed this specific action on a location (e.g. the number of times the player has explored planet A, traded on planet B etc. #In a similar way, already_reached will contain the number of times the script has reached this specific line of the script before. This can be used for counting the number of times the player has seen this particular random event. #To avoid touching other counters, it might be best to prefix plot-related counters with 'plot_' #Labels, counter names etc. should not contain spaces as spaces are used to delineate params. #!add_choice's [choice text] can contain spaces. #Commands: # !set {counter name} {value} (also works with strings) # !inc {counter name} {value} (also works with strings) # !dec {counter name} {value} (also works with strings) # !if {counter name} {operator} {counter name} {label} # !if {counter name} {operator} {value} {label} # !goto {label} # !gosub {label} (same as !goto but return here after reaching !return) # !return # !zap {label} # !restore {label} # !add_trade {commodity} {price} (this will be the buy price, although for trade goods the sell price will be the same) # !trade (Trade all goods added with !add_trade. This will also reset the !add_trade list) # !add_combat {foe} # !combat (Combat with all enemies added with !add_combat. This will also reset the !add_combat list) # !add_choice [label] [choice text] # !choice (Show a choice selection screen with all choices added with !add_choice. This will also reset that list.) # !mod {filename} (Play the specified file as music) # !sam {filename} (Play the specified file a sound effect) :justentered !set random_rate 10 !return :[A] !set $planet_name Argghjgrhghh !return :[A]Explore Scanning the surface of Argghjgrhghh, you find a cache of precious gems. !inc gems 100 !zap [A]Explore !return :[A]Trade The markets of Argghjgrhghh are always busling with activity, with spacefarers from around the galaxy flocking to find a bargain. !add_trade fuel 10 !add_trade gems 35 !add_trade slaves 500 !add_trade proton_shield 1750 !add_trade gauss_cannon 3250 !trade !return #Two instances of this 'random' label make it twice as likely to happen as instances where only one label appears. :random :random A lone pirate warps in almost right next to you and opens fire. !set $combat_music battle_mus.ogg !add_enemy Pirate !combat !return :random Two space pirates patrolling the area catch your ship in their scanners and attempt to launch an ambush. !set $combat_music battle_mus.ogg !add_combat Pirate !add_combat Pirate !combat !return #If you !return without doing anything visible, the player will never notice that a random encounter has happened. :random !return