MODSonline
  Welcome Guest to MODSonline Home | Forums | Register | Login
Main-Menu
Home
Login
Register
Add Download
Add News
Add Tutorial *
Forums

Advertise
Affiliate Store US *
Affiliate Store UK *
Affiliate Store CA *
Angry Letter Generator
Avatar Upload
Calendar of Games
Contact
Downloads
FAQs
Forums
Member List
Member Projects
News
News Grabber *
Policy
Polls
Private Messages
Reviews
Screenshot Gallery
Search
Servers - Game
Store - Shirts *
Subscribe
Topics
Tutorials
Weblinks
Wiki *
Tutorials
CoD Mapping
CoDUO Mapping
CoD2 Mapping
CoD4 Mapping
CoD FAQs
HL2 Mapping
HL2 FAQs
SOF1 Mapping
Crysis Mapping
Q4 Mapping
Doom 3 Mapping
Doom 3 FAQs
UT2K3 Mapping
SOF2 Mapping
SOF2 FAQs

Lightray Modeling
General Modeling
General Modding
Adobe Photoshop
Common Mapping Errors

Readme.txt Generator
Members-Online
Morphisnb [Forum]
Spikenaylor [Tutor]
Welshy [Today]
MasterChief [Today]
Dupont [Tutor]
cz_squishy [Forum]

6 Members and 12 Guests
Chat MODSonline
0 People Now Chatting
MODSOnline TeamSpeak

download TeamSpeak

In-The-News
Sunday, Oct. 12th
MODSonair 149 Live
Friday, Oct. 10th
Far Cry 2 Money, Diamonds, and Blood Trailer
Friday, Oct. 10th
MODSonair Episode 148
Thursday, Oct. 9th
Multiplayer Game Modes Interview
Sunday, Oct. 5th
Help MODSonline Heal Kids and Fight Cancer!
Latest Poll
Would you pay for mod tools?
I would pay a one time fee for mod tools for my favorite title 11.71%
I would pay a monthly/yearly subsrciption fee for mod tools for my favorite title 0%
I already paid for the game - Tools should come bundled because I am just fixing what the developers broke 61.26%
100% definitely NOT! 21.62%
I haven't seen a game yet that wasn't 100% perfect when the developers released it 3.6%
Games are the devil! 1.8%
Read More...
11 comments

Newsletter
Name:
Email:
Newsletter Archives
Your Membership
User Name:
Password:
Register.
In The Forums
S&D bombzone label 'C'
CoD 4 Level Desi.. Posts: (1) Views: (9) by bashup
xmodels
CoD 4 Level Desi.. Posts: (4) Views: (54) by Squit
Far Cry 2 SecuROM DRM Details
News Around the .. Posts: (4) Views: (19) by techno2sl
[Release] mp_cc & mp_cc_night Final
CoD4 Custom Map .. Posts: (5) Views: (76) by CptCool
Extra Life - Save Kids Quake 4 Mods for Dummies
Tutorials: SOF1 Mapping
Mapping and modding for Soldier of Fortune.
Add your tutorial (registered users)

Rating:
Awful Rating Poor Rating Average Rating Good Rating Excellent Rating
Versions: You must be logged in to view history.
Scripting : Setup and Compiling
2003-11-23 10:23:27
In this set of tutorials I will hopefully explain how to get scripts to run, and go through some of the basic commands.
How to set up and compile a script

*note: sorry that the downloads contained in this file are no longer available.

In this set of tutorials I will hopefully explain how to get scripts to run, and go through some of the basic commands. For more information take a look at the scripting doc that comes with the SDK. You can also learn from the sample scripts, so have a look through them too.

I'll assume you've downloaded the SDK, and installed it in its default path, that you know the basics of entity use in SofRadiant and are familiar with editing files in Notepad.


First open the "sample\ds" folder located in the SDK directory. Make a new folder and call it "test".

Copy the "SoFDS.exe" file from the "SDK\bin" directory into this folder. This is the script compiler. There are 2 types of scripts files ".ds", which are un-compiled scripts and ".os" which are the compiled scripts the game runs.

Now to make life easier create a batch file to run the compiler, with the following 2 lines in it. Save it as "compile.bat".

cd c:\progra~1\sofsdk~1\sample\ds\test
sofds test

Obviously substitute the path for your path to the "sdk\sample\ds\test" folder.

Ok now we're ready to start scripting.


The output directory needs to be present before we compile so make a folder in your "SoF\base" directory called "ds", and then in this folder create another called "test". You should end up with something like "c:\games\sof\base\ds\test".

Download the blank script here, and open it in Notepad. Change the output path to point to your "Sof\base\ds\test" folder. This just tells the compiler where to put the compiled script. If the path isn't present it will put it in the root directory. NOTE. You must use forward slashes "/" instead of backwards slashes "\" in the path name.

The include line tells the compiler to include the "header.ds" file when compiling, this contains some pre-defined variables.

Now save the script in the "sdk\sample\ds\test" folder as "test.ds"

Ok, lets make sure it compiles, run the compile.bat file. You should get something like the following in a dos window.


C:\Program Files\SoF SDK\Sample\ds\test>cd c:\progra~1\sofsdk~1\sample\ds\tes

C:\Program Files\SoF SDK\Sample\ds\test>sofds test
DesignerScript Compiler V1.0 (Dec 22 1999 19:03:38)

Processing test.ds...
Wrote C:\games\sof\base\ds\test\test.os...
Size: 420

C:\Program Files\SoF SDK\Sample\ds\test>


If you look in the output folder there should now be a file called "test.os".

If all is well move o­nto the next tutorial.


All logos and trademarks and information in this site are property of MODSonline LLC © 2008.
The comments are property of their posters.
RSS news feeds for MODSonline can be found News.php.
Intergi
Partners
modbase.be
CODAddicts - Call of Duty News & Downloads
The Firing Box
XoXide
Battle for Europe COD2
Call of Duty Headquarters
Frag Universe
Ask About
Advertising
Friends
MODS Reloaded
SOF2 Files and Downloads
ModTheater
Ask About
Advertising
Link to Us
MODSonair
View in iTunes
Please help us to raise in the ranks of podcasting and subscribe to our itunes feed using the link above.
MODSonair Releases
• MODSonair Episode 148
• MODSonair Episode 147
• MODSonair Episode 146
• MODSonair Episode 145
• MODSonair Episode 144
Next Show
The next MODSonair show will air LIVE on:
10/19/2008 11:00 EDT

Time remaining:
Copyright © 2008 MODSonline
Tresware Content Management System Copyright © 2008 Tresware
Website Designed and Hosted   Tresware