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:compiling
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:10 pm
Scripting : Compiling

I would like to encourage all mappers to get into basic scripting as it adds so many possibilities to your maps...

Lesson 1 - compiling

The first thing you need to learn is how to compile a ds script into an os file.

To begin scripting - you can follow this tutorial for setting up the compiler -

http://www.modsonline.com/Tutorials-read-24.html

Or - do the following... (my method which I think is a bit easier to understand)

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

Look inside the SDK folder and find the folder called "Sample"
copy the sdk/sample folder to the root of your drive which is usually c:/

you now have the folder c:\sample

In the c:\sample\ds folder - make a new folder called "test"
Copy the SoFDS.exe file from the SDK\bin directory into this folder

This is where it all happens - in c:\sample\ds\test folder

Now, You open or create ds files with notepad- and you save them in notepad with a ds file extension - test.ds (for example)

Make yourself a blank script by opening any tsr1 script (included in SoFSDK/sample\ds\tsr1 folder ) and deleting everything except the first 2 lines

The first line just sets up commands to use and is always present in every script you will make

If you look at the 2nd line of the blank script - this is the output directory for the OS

Set it to output to the same folder ie c:\sample\ds\test (or any other folder you choose) by changing the lines to this...

#include "../common/header.ds"
output "C://sample/ds/test"

Notice the double // - make sure these are present in the line or sometimes the script will not compile

When you have a script to compile - ie you have a ds file in the c:\sample\ds\test folder - then do the following...

You need to open a "command prompt" window - you may know this as a "dos box"

There is an icon for it in Windows if you press the start button and look in "All Programs/Accessories" or you can go to START/RUN and type CMD and then press ENTER


In the box - type...

cd c:\sample\ds\test

(to change to the directory)

if the ds file is called test.ds - you then type

sofds test

If the ds file is called teleport.ds then you would have typed
sofds teleport

etc

You will then see the processes taking place in the window - and test.os should appear in your output folder
OS files are binary and cannot be edited in Notepad

That's it! - simple and easy

The method in Modsonline of making a compile.bat file is purely to automate this so it contains the same commands....ie

cd c:\sample\ds\test
sofds test

...though you may notice that each time you use this you need to change "test" to match the name of your new script - and it also does not show the processes at work so you cannot see if an error has occurred - I never use this method

To test this out and see if you can compile correctly - try compiling one of the sample ds scripts from tsr1 - The only thing you need to change is the output directory as explained above

If it compiles into an os file - you have succeeded!


Demise RDAM


edited on Oct. 15, 2006 04:12 pm by SeTanTA
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

»