Author Topic: .cs files, please read!  (Read 1139 times)

how do i install .cs files to use in the game, do i need a program cause normally it comes up as a code?

A file with a .cs extention is either one of the following:
A) a C# source code file (If you code in C#, or use Notepad++, you'd know this :P)
or
B) A TorqueScript source code file. (The moar likely case.)

Don't worry about the meaning of A, unless you code in C#, which I highly doubt.
You don't need anything fancy to be able to code in TorqueScript, all you need is good old Notepad. I'd personally reccommend that you get something better for that, (DO NOT USE WORDPAD OR MICROSOFT WORD!!!!) like Notepad++.
The nice thing about TorqueScript is the fact that you DO NOT have to compile it in order to have it run properly, all you have to do is save as a .cs file and execute it somehow...

For your question anyway, this is all you have to do:
1. Download the .cs from the forums or wherever.
2. It should've opened in Notepad.
3. Use Save As to save it to your Add-Ons folder.
4. Use the add-ons dialog in order to enable it.
5. Enjoy. You're done.

What Kirby said, but most (for Add-Ons) .cs files just go in the Add-Ons folder, no special directories, though larger and more complex mods may use specialized directories.

You can also manually 'load' any file containing TorqueScript (most likely it will be a .cs) by simply using:

Code: [Select]
exec(PATH);

Whilst using this function all '\' (backslashes) must be changed to '/' (forwardslashes) due to common syntax (/ are used in strings, i.e. /c3 (color))

e.g.

Code: [Select]
exec("Add-ons/Client/Script.cs");