Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 11 Guests
Online:

LATEST FORUM THREADS

»
warfare
CoD4 Map + Mod Releases
Voting menu on maps
CoD+UO General
Hauling 911
CoDBO3 General

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Soldier of Fortune
Category: SoF Mapping
Mapping, modeling, scripting, skinning and all forms of editing for the game Soldier of Fortune, the original game.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked subscribe
Author Topic: Scripting : Advanced text on screen + logos
SeTanTA
General Member
Since: Aug 25, 2004
Posts: 202
Last: Apr 7, 2008
[view latest posts]
Level 4
Category: SoF Mapping
Posted: Sunday, Oct. 15, 2006 08:16 pm
Scripting: Advanced text on screen + logos

In this tutorial I will give you examples of different ways to display your text pictures and logos

Refer to the previous tutorial regarding setting up a ds, os and sp file and how to print the text strings in your map

For these examples I am assuming that the string package name is RDAM

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

Here is an original SoF text string

INDEX 0
{
FLAGS SP_FLAG_CAPTIONED
REFERENCE C3D2
TEXT_ENGLISH "JOHN: Doesn't sound like you have a choice, captain."
TEXT_GERMAN "JOHN: Sieht so aus, als hätten Sie keine Chance, Captain."
TEXT_FRENCH "JOHN: Je crois que vous n'avez pas le choix, capitaine."
}

Notice the translated text for German and French users as previously mentioned

The main thing I am pointing out here is the FLAGS
This example has SP_FLAGS_CAPTIONED
This makes the text appear at the bottom of the game screen and is mainly used in the original SoF game to provide sub-titles when a character is speaking. Text colour is yellow


In the script you would put...

print RDAM_C3D2
-----------------------------------------------------------


INDEX 0
{
FLAGS SP_FLAG_TYPEAMATIC
REFERENCE JAN
TEXT_ENGLISH "Map Construction: Jan R'dam\nDate: 1/1/06\nTime: 23:20"
TEXT_GERMAN "Map Construction: Jan R'dam\nDate: 1/1/06\nTime: 23:20"
TEXT_FRENCH "Map Construction: Jan R'dam\nDate: 1/1/06\nTime: 23:20"
}



The above example has the flags SP_FLAGS_TYPEAMATIC which will print the text in the bottom left hand corner of the game screen in green writing letter by letter as if it is being received as a message
The letter "n" before date and time cause that text to be printed on a new line
So the text will appear as....

MAP construction: Jan R'dam
Date: 1/1/06
Time: 23.20

To see this in action - load any of the RDAM co-op maps

In the script you would put...

print RDAM_JAN

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


INDEX 0
{
FLAGS SP_FLAG_CENTERED
REFERENCE RESCUE
TEXT_ENGLISH "Rescue the hostages !"
TEXT_GERMAN "Rescue the hostages !"
TEXT_FRENCH "Rescue the hostages !"
}



With the flags SP_FLAG_CENTERED the text will appear in yellow writing in the middle of the game screen

In the script you would put...

print RDAM_RESCUE

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

To make a logo or picture appear - you will need to convert your picture into an m32 texture of a standard size
I make all mine 256x256 pixels
The m32 file must be in sof/base/pics/console folder which you may have to create
Imagine I have a 256x256 m32 file of a RDAM logo in that folder and it is called logo_RDAM.m32


In the ds file it is still referenced by a single word - same as any other text string

ie in a RDAM.ds file I have the reference...

#define RDAM_LOGO 0x6400

so there is no difference there

In the sp file you have something like the following...

INDEX 0
{
FLAGS SP_FLAG_CENTERED SP_FLAG_CREDIT
REFERENCE LOGO
TEXT_ENGLISH "50;50;3;1;0.5;0;255;0;console/logo_RDAM"
TEXT_GERMAN "50;50;4;1;1;0;255;0;console/logo_RDAM"
TEXT_FRENCH "50;50;3;1;0.5;0;255;0;console/logo_RDAM"
}


Use the same flags as in the example above
The first few numbers are the position of the picture on the game screen + time to display it etc - you can change these and experiment with different positions etc but I nearly always leave it as it is so that the picture is centred in the screen

The last 3 numbers are important - these are the RGB values given to the picture
In the above example, I want the RDAM logo to appear as a bright green colour so the last 3 numbers represent this as an RGB value of 0 255 0

If you have a real picture with many colours etc then you will want this to be white or pale yellow to show all the colours
The RGB value would probably be 255 255 0 Think of it as a coloured light shining on your picture and you will get the right idea


Here is an example with a different RGB value...

INDEX 0
{
FLAGS SP_FLAG_CENTERED SP_FLAG_CREDIT
REFERENCE LOGO
TEXT_ENGLISH "50;50;3;1;0.5;255;255;0;console/logo_RDAM"
TEXT_GERMAN "50;50;4;1;1;255;255;0;console/logo_RDAM"
TEXT_FRENCH "50;50;3;1;0.5;255;255;0;console/logo_RDAM"
}


In the script you would put...

print RDAM_LOGO

To see many more examples - extract the STRIP folder from pak0 (in sof/base folder) and take a look inside...

P.S. The simplest method of getting text on screen would be to put..

print "message"

...in your script - but this displays white writing in the top left corner of the screen , same as an error message so is not much use really


That's it !

Easy

Hope this helps

Demise RDAM

edited on Oct. 15, 2006 04:17 pm by SeTanTA
Share |
supersword
General Member
Since: Jul 28, 2004
Posts: 1989
Last: Nov 22, 2011
[view latest posts]
Level 8
Forum Moderator
Im a fan of MODSonair
Category: SoF Mapping
Posted: Monday, Oct. 16, 2006 06:31 am
Awesome... lot's of tutorials. I guess I should ask. Would it be fine if I added these tutorials to what is already available in the SOF section? I'm asking for all the tutorials you have posted recently.
Share |
SeTanTA
General Member
Since: Aug 25, 2004
Posts: 202
Last: Apr 7, 2008
[view latest posts]
Level 4
Category: SoF Mapping
Posted: Monday, Oct. 16, 2006 08:37 am
Yes, that is np Supersword - I would appreciate if you could do that

There will probably be at least another 4 tutorials produced in the near future to add also

Bot animation is popular and also how to manipulate triggers etc but I am open to suggestions if anybody would like to see a specific scripting tutorial...


Demise RDAM[thumbs_up]
Share |
Restricted Access Topic is Locked subscribe
MODSonline.com Forums : Soldier of Fortune : SoF Mapping

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»