This tutorial may seem a little complicated - but if you take each file and complete them individually it becomes very easy -
Lines of text are called "strings" The complete list of text strings for a map are known as a "string package"
Let us create a string package for a co-op map...
For this you need 3 files
1. The script or os file that will "print" the commands to the screen 2. The ds file that contains the numbers/identities of the strings of text 3. The sp file that contains the actual words/logos that will be printed
The sp file is made in notepad and saved with the file extension of sp ie RDAM.sp
The ds and sp file should be called a relevant name - for this example tutorial I will
call it RDAM.ds and the sp file will be called RDAM.sp
Let us begin...
First we need to know what text we want to appear on screen
Imagine that I have a co-op map in which I want the following 5 lines of text to
appear...
1. "Rescue the hostages !" 2. "Danger : Watch out for Landmines" 3. "This door is locked" 4. "Activate the switch !" 5. "Congratulations - You have won!"
First I need to summarise the text into one word - so the text above becomes in short...
As I am going to call everything RDAM I need to create a blank ds file in notepad and
save it as RDAM.ds - this is totally blank with no text in it at all
The first line defines the name of the string package...
#define PACKAGE_RDAM 0x64
This line must be written as above with the # symbol and all letters in capitals The number at the end is a coded number that just sets up the text lines to use numbers within a certain range
Now we are ready to list the lines of text and give each one its own number The sequence of numbers are as follows...
That should be more than enough for an average map - if more are needed I usually make a
second string package for the map
The first line of text which we called "RESCUE" is defined like this...
#define RDAM_RESCUE 0x6400
You can see that the name of the string package (RDAM) is written together with the name of the text string (RESCUE) and then a number - It is good practice to create a number of spaces between the text and the number - keep the spaces in the line to make it appear clear
So if I define all the strings our ds file will now look like this... ----------------------------------------------
(Note that this forum post incorrectly displays the above lines - there should be about 10 spaces in between the writing and the numbers) -------------------------------------------------
Save this as RDAM.ds
That's it for the ds file - this ds file is NOT compiled into an os file You simply place this ds file in the same folder as the script file that WILL be
compiled later into an os file
If you have followed my tutorials you should put this RDAM.ds file into the
C:\Sample/ds/test folder
Now we need to make the sp file that contains the actual text strings that the RDAM.ds
file refers to - so open a text file in Notepad to begin...
The sp file starts like this...
VERSION 1 ID 100 REFERENCE RDAM DESCRIPTION "RDAM Specific Strings" COUNT 5
For now - don't worry about the Version and ID number - just include it in your file The REFERENCE just needs to be the same name as your ds file = RDAM - The description can be anything within the quotation marks - I just keep it standard and write, as above, "RDAM specific strings" The COUNT is the number of text strings you have defined which in this example= 5
The next lines are the most important to get correct Each statement must be within brackets etc and is like code - if you have any punctuation or spaces in the wrong place then the file will not work There is a variety of ways to display the text - to keep it simple for the moment I will make all the text appear in the middle of the screen The first section will look like this...
INDEX 0 { FLAGS SP_FLAG_CENTERED REFERENCE RESCUE TEXT_ENGLISH "Rescue the hostages !" TEXT_GERMAN "Rescue the hostages !" TEXT_FRENCH "Rescue the hostages !" }
The index defines the number of the text string that must match the number in the RDAM.ds file - the first text string begins at zero
The REFERENCE is the name we gave this text string in RDAM.ds
The actual text is within quotation marks and you can see that there are 3 languages that you can translate into
If somebody is running SoF with French language setting then they will see the message after the TEXT_FRENCH - I have obviously not bothered to translate but you may like to do this - If you went through every string package in SoF then you may see that you could write say Russian words instead of German maybe and add a new language to SoF completely - but that is another story...
If I add the other text strings in a similar manner I will now have a file that looks like this...
VERSION 1 ID 100 REFERENCE RDAM DESCRIPTION "RDAM Specific Strings" COUNT 5 INDEX 0 { FLAGS SP_FLAG_CENTERED REFERENCE RESCUE TEXT_ENGLISH "Rescue the hostages !" TEXT_GERMAN "Rescue the hostages !" TEXT_FRENCH "Rescue the hostages !" } INDEX 1 { FLAGS SP_FLAG_CENTERED REFERENCE DANGER TEXT_ENGLISH "Danger : Watch out for Landmines" TEXT_GERMAN "Danger : Watch out for Landmines" TEXT_FRENCH "Danger : Watch out for Landmines" } INDEX 2 { FLAGS SP_FLAG_CENTERED REFERENCE LOCKED TEXT_ENGLISH "This door is locked" TEXT_GERMAN "This door is locked" TEXT_FRENCH "This door is locked" } INDEX 3 { FLAGS SP_FLAG_CENTERED REFERENCE ACTIVATE TEXT_ENGLISH "Activate the switch !" TEXT_GERMAN "Activate the switch !" TEXT_FRENCH "Activate the switch !" } INDEX 4 { FLAGS SP_FLAG_CENTERED REFERENCE WINNER TEXT_ENGLISH "Congratulations - You have won!" TEXT_GERMAN "Congratulations - You have won!" TEXT_FRENCH "Congratulations - You have won!" }