Making a simple BBS message tutorial (Page 2 of 3)

Written by Roguey,

Making a simple BBS message tutorial, written by Roguey


Making a BBS news post

Now we have a BBS template complete, we need to make a new script from the template. This saves us a lot of time when we want to create more than 1 bbs news/mission.

So on the list of scripts, find plugin.bbs.template and press c. This will copy our template and ask us for a name, this time type: plugin.bbs.example1. Yea I know its boring, but this is a basic example. Once done, edit the script plugin.bbs.example1.

First thing we probably want to do is increase the odds of our text appearing from 6.. to say 99. I dont really what this number does apart from higher the value, the higher chance of appearing. So change that value on line 6 (if you have the comments on your template).

So now we want to post some news to the BBS for the player to read. At this time we are simply going to send a string to the player. I would not recommend storing text inside a final BBS script, but this since this is a demo, who cares?

So insert a new line after elseif $Event == 'offer'... line. Now we need to variable ive called mine msg (short for message). After-which add the following string:

Hello the x galaxy! im a new scripter posting here. Please be nice

Well... your string doesnt need to say that... add what you like to be honest. Now we need to insert a blank line under our $msg statement. So add one, then press enter. Okay.. we looking for set quest state in General Commands:

set quest state with message: quest=<Var/Quest> state=<Var/Number> msg=<Var/String>

Add it, and when ask for script input set object. The second detail, press enter, then select select constant and add Quest.Offered. Now set msg= to the variable msg. It should look something like this:

Our basic BBS script so far.

This script is done for now, so save it and return the script list.

Making the setup script

Now we have our BBS script, we need to make a small setup script. This setup script tells the script editor about your new BBS script and how many simultaneous instances of your bbs message can be appear. This setup script can contain 1 or more bbs missions, so if you plan on making more bbs content you could combine into one setup script (if that makes things easier for you).

So if not already jump into the script editor and create a new script. Make sure that the keywords setup. appear before your name, otherwise the script editor wont recognize your script as a setup script (ie. ran everytime the game is loaded or a new game is started). So lets name this new script setup.bbs.basic. This script wont be very complex because it will be only one line long. So look for this command (under General commands

register quest script <Script Name> instance multiple=<Var/Number>

When asked for script input (ie. the first value), we need to search for our small bbs script (plugin.bbs.example1). At the top of the list will be scripts marked with a ! - these are signed egosoft scripts. Our small bbs wont be signed, so scroll down to the bottom and start looking for our script. Once you have found it, select it and press enter.

We now need to set the <?>ie. instance multiple. If you want this bbs text to be hard to find enter a low value like 1, however you want this text to be seen a lot, enter in a high number. Just bung in 999 for now. You should have something like this:

The contents of setup.bbs.basic

That is the setup script - easy eh? Now we need to try our little bbs script. So save this script, exit your game and either load in a save or start a new game. After the game has started, you will need to look around for our bbs text. Hopefully without too much looking around you should find it, it should look something like this:

The output of our BBS script

Lets improve on this by loading our text from a language file.

Next: Loading from the language file
<< Previous Page - Next Page >>