:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::
Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Mon May 29, 2017 12:37 am
All times are UTC + 0
 Forum index » Modding Central » Tiberian Sun Editing Forum » Tutorials Factory
The newbie guide in modding
Moderators: Global Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 1 [13 Posts] View previous topic :: View next topic
Author Message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Thu Aug 21, 2008 8:09 pm    Post subject:   The newbie guide in modding Reply with quote

1. Overview over the different filetypes
2. Changing the inis
3. Adding new stuff, common problems and newbie mistakes
4. Some useful and simple tutorials for beginner

1. Overview over the different filetypes

There are several different filetypes used from the game. Here the most common.

MIX: mix files are like zip files and work as archives for other files.
You can open them with the XCC Mixer which is part of the XCC utilities.
With the Mixer, you can also extract files from them.
To make new mix files you should use the XCC Mix Editor which is imo more reliable. For that copy an original mix, rename it to ecache02.mix, open it, delete all the stuff inside and then add your own new files like vxl or shp.
While the game reads vxl,hva and ini files directly from the main TS directory and also in expandXX.mix files (where XX is a number between 02-99), do SHP files work only in ecacheXX.mix files (XX is a number between 02-99)
Note: If you install a mod make sure that your own mod doesn't shares the same numbers on the mix files.

VXL: the voxel file format of the game. This stores a 3d model of a unit as voxels (volume pixel, or easy 3d cubes). You can edit these files with the Voxel Section Editor. Voxel files do normally contain only one section (e.g. the main body of a tank), but they can also have several sections which normally represent different parts of a unit (e.g. the feet,legs and torso of a mech). The animation for those multiple sections is stored in a HVA file.
While voxel mechs use separate sections in the vxl file, do tanks use a separate vxl file for their turret and barrel. The naming convention is this:
unitname.vxl for the main body
unitnametur.vxl for the turret
unitnamebarl.vxl for the barrel
The game automatically places these files ingame together to one unit. The position of them is defined in their hva file.
Every file of them needs its own hva file! (unitname.hva, unitnametur.hva and unitnamebarl.hva)

HVA: every voxel file needs this file which stores the animation of the voxel sections or at least the position of the voxel in the selection box ingame. You can edit these files with the OS HVA Builder.

SHP: the 2d graphic file format used from the game. It can contain a single image (e.g. a cameo) or a whole unit like the titan with a number of frames. You can edit SHP files with the OS SHP Builder.
SHP files use a 256 colors palette which is stored in the separate file format PAL.

PAL: these files, which store a color palette with 256 colors, are used by SHP files to give them their color. e.g. while units normaly use the unittem.pal or unitsno.pal palette (for the 2 theaters temperat and snow), do civil buildings use isotem.pal or isosno.pal, which don't have the remappable colors. Remappable colors are the 16 red colors in unittem.pal and unitsno.pal in the bottom left of the palette shown in OS SHP Builder. These red colors change to the respective house color in the game.

TMP: these files are used for the terrain of maps. You can edit them with the TMP Studio.

AUD: the sound files used from the game. The game can play aud files only with the format 22050Hz,16Bit,Mono. So if you create them with XCC mixer from a wav file, make sure the wav has this format.

INI: these files are used to define several aspects of the game in form of text. The most common used are art.ini and rules.ini which you can find in TIBSUN.MIX/Local.mix or for Firestorm in expand01.mix as artfs.ini and firestrm.ini.
Other files are sound01.ini for all the sounds in TS and FS and ai.ini for the AI of the computer players.
It's not necessary to put your ini files into a mix file. Indeed it is much more comfortable to simply let them in the main TS directory, so you can easyly edit them and test the modification ingame.


2. Changing the inis

Before you can start changing the inis you have to extract them. Start XCC Mixer and open Tibsun.mix, which you can find in your TS folder (there where your game.exe is placed). In Tibsun.mix you can find several other mix files, where you now open local.mix. In this you can find the rules.ini and art.ini. Right-click on them and extract them in your TS folder. For a more detailed description how to work with mix files you can check out the XCC Mixing 101 tutorial.

Now that rules.ini and art.ini are in your TS folder you can start to edit them.

The first rule is, always use a simple texteditor like notepad. Tools like tibed mess up the inis and don't give you all the possibilities which you get by manual editing.
The second rule is, never make so much changes at once that you can't trace back what you have done, or you get serious problems if you once get an IE (Internal Error) because you made a mistake and the game crashes.

rules.ini, the probably most important file for editing the game. It stores all the information about units, buildings, weapons, superweapons and general game behaviour. Since nearly all keys have a comment about what they do and how they work, i won't explain here in detail how to create a new unit or a new weapon. The easiest way is to simply copy an original unit/building or weapon and then change this copy. But make sure that if you created a new unit or building, you've added it to the respective Types list with a new entry. The most important lists are
[InfantryTypes]
[BuildingTypes]
[AircraftTypes]
[VehicleTypes]
[Warheads]
[Animations]

art.ini is another important file, which stores all the animations and graphical stuff for the game. Here you can find among other things, for all buildings and units a respective entry which tells the game everything it needs to know about the animations it should play, the length of frames for those animations and additional information like the point from where a unit fires its gun (see PrimaryFireFLH or SecondaryFireFLH)


3. Adding new stuff, common problems and newbie mistakes

If you want to add new buildings or units, you have to take care of several aspects.
1. The name of the entries in the ini files (art.ini, rules.ini sound01.ini etc) must match with the filename of the SHP, VXL, AUD file.
2. Use always uppercase for the entries in the inis (e.g. MYUNIT). The game is case sensitive and if you write [MYTank] in art.ini and 51=MyTank in rules.ini in the VehicleTypes list, the game simply can't find this unit and you have an invisible unit ingame.
3. Do not use any special character like space, points etc in the ID fields (e.g. [My New.Tank*Is#awesome] <- that is wrong).
4. SHP units must be in ecacheXX.mix files! (XX = number between 02-99) else the game can't find them and the unit/building is invisible ingame
5. MIX files are sometimes corrupt and cause an IE while loading a game. If this happens, delete all the content of the mix file and add it again.
6. VXL files must have a respective HVA file. Again must their name match with the respective ini entry.
7. If you add new entries to art.ini or rules.ini, add these right after or before the corresponding original stuff. (keep the inis well-ordered as good as possible)
8. If you want to add new animations to the game, you have to make sure that you have added all Firestorm anims to the [Animations] list in your rules.ini before you add your own stuff. Or you get the nasty savegame bug. You can find a tutorial which fixes this problem on tibweb.
9. Never change/edit the original MIX files. Add stuff by using expandXX.mix or ecacheXX.mix files. Only for a real total conversion and when you know what you're doing, you can touch any of the original mix files.
10. Never change the order of any of the original rules.ini lists like
[InfantryTypes]
[BuildingTypes]
[AircraftTypes]
[VehicleTypes]
[Warheads]
[Animations]
Always add your new stuff at the end of these lists.
11. Check out original stuff and look how it is set/used. You'll learn much more this way, than asking here on the forum how every ordinary key works.
12. Use a copy of an existing original object when trying new things, rather than writing a complete code yourself, where you can easyly miss several keys.
13. Buildings use for each theater (snow & temperate) a file with a certain prefix in their name: CA,GA,NA for arctic/snow maps and CT,GT,NT for temperate maps. If the SHPs for a building are only present for one theater, they will be invisible ingame in the other theater. Thus avoid using the prefixes if you don't have theater specific SHPs or create duplicates of the SHPs and give them the other prefix.
14. A good way to avoid problems with the firestorm inis like described in point 7, is to use the UMP. This one moves all FS stuff to TS, which makes ini editing easier and it also fixes already many bugs of vanilla TS/FS.
That's why it's highly recommended to install the UMP before starting a mod.

I hope this tutorial makes an end to the constantly repeated newbie questions

4. Some useful and simple tutorials for beginner
-Creating a new unit
-Making airplanes fly parallel to the ground
-How to add voxels to your mod
-(**) How to add downloaded units,buildings and graphics

P.S. to all those newbies, please use the Forum search before you ask simple questions about modding the game, since after 8 years almost everything has been asked before. Wink

Key Words: #Tutorials #Modding #TiberianSun #Firestorm #Rules.INI #Art.INI #XCCUtilities #OSSHPBuilder #VoxelSectionEditorIII #OSHVABuilder #TMPStudio #TMPBuilder 

_________________
SHP Artist of Twisted Insurrection. Main Nod building SHP creator.

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant unit, 1 Scrin unit, 1 GDI building

Tools
TMP Shop
C&C Executable Modifier

Last edited by Lin Kuei Ominae on Sun Nov 16, 2014 12:07 pm; edited 21 times in total

Back to top
View user's profile Send private message
Somebody Else
Cyborg Soldier


Joined: 05 Mar 2008

PostPosted: Thu Aug 21, 2008 9:02 pm    Post subject: Reply with quote

Excellent guide Smile Nice one.
_________________


- Somebody Else

Back to top
View user's profile Send private message
Paranoia
Cyborg Specialist


Joined: 04 Aug 2007

PostPosted: Thu Aug 21, 2008 11:59 pm    Post subject: Reply with quote

Really well written and easy to read.
I'm sure this will be very helpful to people new to modding.

Back to top
View user's profile Send private message
Ixonoclast
General


Joined: 11 Aug 2008
Location: Somewhere up high.

PostPosted: Fri Aug 22, 2008 3:18 am    Post subject: Reply with quote

Useful, yes.

Useful atm, no.

Very Happy I think I broke some files... And corrupted all my savegames... :/

Back to top
View user's profile Send private message
Orac
President


Joined: 11 Jul 2008
Location: New Zealand

PostPosted: Fri Aug 22, 2008 6:33 am    Post subject: Reply with quote

Great, I can finally understand how to mod.
The same technique applies to RA2, seeing as they're basically the same engine, yes?

Last edited by Orac on Thu Nov 06, 2008 7:47 am; edited 1 time in total

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Fri Aug 22, 2008 8:47 am    Post subject: Reply with quote

mostly yes, though RA2 has some different names for MIX files.
There you have no ecacheXX.mix files (XX=02-99), but ecacheX.mix files (X=1-9)
_________________
SHP Artist of Twisted Insurrection. Main Nod building SHP creator.

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant unit, 1 Scrin unit, 1 GDI building

Tools
TMP Shop
C&C Executable Modifier

Back to top
View user's profile Send private message
John Galt
Commander


Joined: 01 Aug 2003
Location: Galt's Gulch

PostPosted: Fri Aug 22, 2008 9:51 am    Post subject: Reply with quote

Quote:
There you have no ecacheXX.mix files (XX=02-99), but ecacheX.mix files (X=1-9)
Nonsense... Any name in the form of ecache*.mix works.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Team Black
Defense Minister


Joined: 25 Sep 2006
Location: Georgia, USA Posts: Over 9000

PostPosted: Sat Aug 23, 2008 12:40 pm    Post subject: Reply with quote

Nice job LKO...
I'm actually planning to make a full video tutorial on modding (one of these days)

this list will serve as a handy guideline Smile provided I even get around to completing it!
_________________
The Fall of Hammerfest - Epic Tiberian chain story

Tiberian Odyssey mapping department
The Team Black Index - Steam: TeamBlack aka BeastMode

Back to top
View user's profile Send private message
Aro
Alcohol Fueled


Joined: 10 Sep 2006
Location: Birmingham, United Kingdom

PostPosted: Mon Mar 23, 2009 10:38 pm    Post subject: Reply with quote

May I suggest a sticky for this tutorial?
_________________


Twisted Insurrection [Version 0.6]
Twisted Insurrection OST [Vol. 6]
Twisted Insurrection: Gallery

Tiberian Sun Client (Includes UMP)

Back to top
View user's profile Send private message Send e-mail Visit poster's website
Machine
Commander


Joined: 01 Feb 2007
Location: National Reference Laboratory for IPNV

PostPosted: Mon Mar 23, 2009 11:36 pm    Post subject: Reply with quote

I second this motion. Though, IMHO it could use some small reformatting.

Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Tue Mar 24, 2009 12:59 am    Post subject: Reply with quote

which kind of reformatting? can you give an example?

however, i've updated a bit the tutorial.
-in point 2 it's now described in short how to extract the ini's and where to place them (also a link to TB's mixing guide)
-added new point 4 with some useful beginner tutorials

if there are more things to add/change let me know. Wink
_________________
SHP Artist of Twisted Insurrection. Main Nod building SHP creator.

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant unit, 1 Scrin unit, 1 GDI building

Tools
TMP Shop
C&C Executable Modifier

Back to top
View user's profile Send private message
Machine
Commander


Joined: 01 Feb 2007
Location: National Reference Laboratory for IPNV

PostPosted: Tue Mar 24, 2009 2:17 am    Post subject: Reply with quote

The point of reformatting the text would be to make it easier to read, since IMO it's quite tiring to read a block of text. Just extra spacing between certain lines, and fixing the spelling a bit.

IMO it should be something like this:
Quote:

1. Overview over the different filetypes

There are several different filetypes used by the game. Here is a list of the most common:

MIX: mix files are like zip files and work as archives for other files.
You can open them with the XCC Mixer which is part of the XCC utilities.
With the Mixer, you can also extract files from them.
To make new mix files you should use the XCC Mix Editor which is IMO more reliable. For that copy an original mix, rename it to ecache02.mix, open it, delete all the stuff inside and then add your own new files like vxl or shp.
While vxl,hva and ini files can be read from the main TS directory and also from expandXX.mix files (where XX is a number between 02-99). SHP files work only in ecacheXX.mix files (XX is a number between 02-99).

VXL:...


Besides adding some extra spacing and fixing the lower case letters after a point, I also edited some sentences, though editing them shouldn't be a priority.

On a related note when the XCC mix editor worked on my pc (couldn't get it to work on vista), I just always made new mixes from scratch, now I use the mixer for that, and haven't bothered to check if the mix editor works fine.
Anyways, IMO, the XCC mixer is more intuitive to work with it than the Mix editor, as it just works by drag and dropping, something anyone should be already used to from using explorer.
Also a you should mention to not use some numbers for the mix files, since those are used by some projects like the Terrain and Civilian Expansion.

Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Tue Mar 24, 2009 11:10 am    Post subject: Reply with quote

I don't know why but i can't drag and drop in XCC Mixer from the right browser panel into the left while having an open mix in the left. I can only extract from the mix and delete in it. (i use XCC Mixer 1.45 U)
So if i have to drag and drop from the explorer into the Mixer too, i prefer using the small Mix Editor as it doesn't takes up the whole screen and works quite the same way.

I can mention to avoid using some numbers for the mixes, but since this is a beginner guide this isn't really necessary imo and even more confusing, because then come questions like "what's XTX. My TS doesn't has the mix. Where can i download it." etc. In addition it belongs imo to common sense to check if there are filename conflicts if you install a mod while having already an own mod. Wink

Machine wrote:

While vxl,hva and ini files can be read from the main TS directory and also from expandXX.mix files (where XX is a number between 02-99). SHP files work only in ecacheXX.mix files (XX is a number between 02-99).

I'm not sure about this sentence. It sounds for me like it is readable for the user while i wanted to express the way the game reads and finds the file.
I changed mine and i think it works now.

Thanks for your feedback. Smile
_________________
SHP Artist of Twisted Insurrection. Main Nod building SHP creator.

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant unit, 1 Scrin unit, 1 GDI building

Tools
TMP Shop
C&C Executable Modifier

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [13 Posts] View previous topic :: View next topic
 Forum index » Modding Central » Tiberian Sun Editing Forum » Tutorials Factory
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

Wildcard SSL Certificates
[ Time: 0.3164s ][ Queries: 11 (0.0054s) ][ Debug on ]