Welcome Guest ( Log In | Register )

Closed TopicStart new topic
> Getting started with Tiberian Sun modding
The DvD
post Oct 9 2006, 10:32 PM
Post #1

Group Icon

Group: Root Admin
Posts: 740
Joined: 27-May 06
From: The Netherlands
Member No.: 2
Alliance: Nod
Favorite game: Tiberian Sun

Originally posted by tomb on the TiberiumSun.com forums here:



I sorta missed this kind of tutorial, so I wrote one. It turned out a bit longer than I had originally anticipated... biggrin.gif

This tutorial is for those of you who are just getting started with modding Tiberian Sun. Though this tut is also useful with modding Red Alert 2, as it uses the same engine and the INI files are very similar, I will mainly aim at modding Tiberian Sun, and my examples will use coding from Tiberian Sun. Please note that various features avaliable in Red Alert 2 (like spinning helicopter rotors) are NOT avaliable in TS. Also, several things are "hard-coded" in the game. This means the code that controls a certain feature is located in the game's EXE file, and cannot be altered - untill Westwood/EA provides us the source code that is.

Though there are GUI INI-editors out there (SunEdit2k and TibEd), I would ask you to refraim from using them. Though they make the job faster and easier, they also have a lot of (annoying) limitations and often create more bugs than with manually editing the INI's.

What do I need?
To MOD Tiberian Sun, you will need several tools. I have several tools avaliable for download on my site, and they can also be downloaded at TiberiumSun.com. First and foremost, you will need the XCC-utils. This package contains - among other things - the XCC-Mixer, which allows you to open MIX files, extract files from them, or view/playback several other filetypes used in Tiberian Sun. It also contains the MIX-editor, which allows you to create your own MIX files.

Secondly, you will need a simple plain text-editor like Notepad or Wordpad, which are both supplied with all Windows versions.

Other (optional) tools you might need are:
SHP Builder - to create/edit SHP files, which are 2D graphics
Voxel Section Editor - to create/edit VXL files, which are 3D graphics
HVAEdit - to create/edit HVA files, which are used alongside VXL files (used mainly for aligning the VXLs with eachother and the gamefield)
Voxel Viewer - to view completed VXL files

Which INI files!?
The following files are of importance:
RULES.INI -- Contains game setting like strength and price of an object, weapon settings and all that jazz. You'll do most of you editing here.
FIRESTRM.INI -- An extension to RULES.INI for Firestorm
ART.INI -- Contains all the graphical settings and stuff
ARTFS.INI -- An extension to ART.INI for Firestorm

The RULES.INI and ART.INI files can be found in the file LOCAL.MIX, which in turn can be found in TIBSUN.MIX (in the game directory). The FIRESTRM.INI and ARTFS.INI can be found in EXPAND01.MIX (in the game directory). You can extract these files using the XCC mixer.

Starting to edit - editing an existing unit
To start off, you'll need to extract the file "RULES.INI" from the game (see above). Put it in any place you want (either game directory or not). Next, open it with the text editor of your choice (ie: Notepad/Wordpad). Now don't get discouraged by the size of the file, and the amount of text in it. Everything is quite simple. There are also a lot of explenations to be found in the file, making everything even easier than it already is.

For this part of the tutorial, we will edit the GDI Titan and give it better armor and make it cheaper. First, you'll need to find the Titan. Most text-editors (like Notepad and Wordpad) have a search-feature which can be activated by hitting ctrl + F. Type in "Titan", and hit Enter. You will find a section that should look like this:

; Medium Mech
ThreatPosed=40; This value MUST be 0 for all building addons
DamageSmokeOffset=100, 100, 275

Here, you can change several settings for the TITAN. Change the Armor=Heavy in Amor=Concrete, and change Strength=400 into Strength=500. Also, change Cost=800 into Cost=400

Now the Titan has heavier and more armor and is half the price!

-- To apply these changes to the game, read the chapter "Applying your MOD" to be found below.

Creating a new unit
There are several unused models in the game which were possibly created in some alpha-stage of creating the game and they were left in the MIX files. Among these models is a medium tank (called 2TNK), which we will use for this part of the tutorial. You can create your own model if you wish, but I will not cover that in this tutorial. The easiest way to create a new unit is to copy an existing one, and edit it appropriately. But before you do that, you'll need to add it to the list of vehicles. In the RULES.INI file is a section called [VehicleTypes]. This is a list of all the vehicles (buildable or not) in the game. A vehicle will not work unless it is listed here. Add the new unit to the bottom of the list by giving it a unique number (one that isn't used in the list yet), then - like all the others - add a = and then the INI-name of the unit. This INI name must be unique as well. For this, we will use the name 2TNK (which is also the name of the model file). Now, we will need to copy an existing unit. We'll use the Disruptor for this, as it is a (technically) simple ground vehicle. That way, we won't have to change any complicated things. So copy the section of the disruptor (named [SONIC]) and paste it just below the Disruptor entry. Change the [SONIC] into [2TNK], and make any changes you find appropriate (weapon, armor, price, whatever) into anything you'd like. I advice you to give the new unit
the same armor, weapon etc as the Titan. Don't forget to name the tank properly (just name it Medium Tank).

Wait! Don't go! We're not done yet! We still need to add the unit to the ART.INI file. Extract and open up the ART.INI file and copy the secton [SONIC]. It looks like this:


Now, change [SONIC] to [2TNK] and remove the lines TurretOffset=-64 and PrimaryFireFLH=0,0,150. We won't need those two tags. Now that's all set, lets get on with applying our changes to the game.

Applying your MOD
There are two ways to apply your MOD to the game. Either place all the edited (and new files) in the main game directory, or create new MIX files, place your files in them, and put the MIX files in the game directory. If you have a complicated MOD, I advice you to create new MIX files, so the TS directory doesn't all cluttered up. This is especially usefull if you wish to distribute your MOD. You can't just create a MIX file and give it any name you want, nor can you add any file to them. There are two filesnames you can give: EXPAND##.MIX and ECACHE##.MIX (where ## is a number between 01 and 99). I'd advice you to pick a number between 02 and 99, as the name EXPAND01.MIX is already used by Firestorm. A higher MIX file number means a higher priority for that file. Settings in a RULES.INI file located in EXPAND05.MIX will override the settings in a RULES.INI file in EXPAND02.MIX. You should consider the original RULES.INI file to be located in EXPAND00.MIX. Now, you can't just stick any file in the EXPAND## and ECACH## files. Each MIX file has its own filetypes.



You can use the XCC mix editor to create the new MIX files and add your modified and newly created files to them. Then just copy the MIX files to the main game directory, and launch the game!

Please contact me on msn if you need me for anything, thanks.
Go to the top of the page
: | +Quote Post

Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


Lo-Fi Version Time is now: 19th October 2019 - 10:03 AM