Regarding .lua files (FAQ)

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Recruit Womprat Killer
User avatar
Posts: 11
Joined: Thu Apr 30, 2009 11:14 pm
Location: Still in Fonzie times

Regarding .lua files (FAQ)

Postby The_Fonz » Sat May 02, 2009 10:21 pm

when making new command posts and having them actually count for victory, I know that you have to change the objectives file, but its in .lua format, my computer cant read that.

What program do I need in order to be able to open . lua files?

-The_Fonz 8)

Second Lance Corporal
User avatar
Posts: 104
Joined: Thu Aug 23, 2007 8:41 am

Re: Regarding .lua files

Postby Superm9 » Sat May 02, 2009 10:32 pm

You'll find that, in many cases reguarding SWBFII modding, files will open with either notepad (or similar program thereof) or paint/photoshop (or similar program thereof). In this case, you can open the .lua files in notepad. Just off of the top of my head, here are some of the file types and what programs they open in:

.LUA: notepad
.ODF: notepad
.REQ: notepad
.BAK: notepad
.PRP: notepad
.FX: notepad
.SKY: notepad
.TGA: paint/photoshop
.MSH: XSI or similar 3d modeling software (may require conversion to .OBJ filetype)
.WLD: Zeroeditor

Hope that helps! :thumbs: And welcome to modding!

Space Ranger
User avatar
Posts: 2559
Joined: Sat Nov 22, 2008 1:50 pm
Location: Washington, US
Projects :: Life. Work.
Games I'm Playing :: League of Legends
xbox live or psn: No gamertag set

Re: Regarding .lua files

Postby RogueKnight » Sat May 02, 2009 11:16 pm

.wld is also the extention for VRML files though, so that can get confusing.

Jedi
User avatar
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

Re: Regarding .lua files

Postby Frisbeetarian » Sun May 03, 2009 12:36 am

Superm9 wrote:.MSH: XSI or similar 3d modeling software (may require conversion to .OBJ filetype)
.WLD: Zeroeditor

Mesh files can also be viewed in a hex editor so that you may do things such as add transparency. This will become apparent as the need arises.

World Files can also be viewed with notepad or other similar programs, saying it is opened by ZE is not entirely correct unless you append that terminology to other files such as terrain files as well (which can also be opened by notepad).
DarthRogueKnight wrote:.wld is also the extention for VRML files though, so that can get confusing.

The file extension for VRML2.0 files is .wrl not .wld.

Gametoast Staff
Posts: 3471
Joined: Mon Aug 21, 2006 6:23 am

Re: Filetypes found in the BF2_modtools and how to open them

Postby AceMastermind » Sun May 03, 2009 3:24 am

.anim - Animation list file - Text file
.anm - ZE animation data file - Text file
.asfx - Additional sound effects file - Text file
.bak - Backup file - Text file
.bar - Barrier data file - Text file
.bat - Batch file; ASCII text file containing a series of commands - Text file
.bnd - Boundary name-list file - Text file
.cin - Cinematic description(?) file - Text file
.combo - Combination configuration file - Text file
.cus - ? - Text file
.dcl - Decal data file (unused?) - Binary data file *
.enc - Encounter(?) file - Text file
.ffx - Foley effects configuration file - Text file
.fx - Environment(world1) or particle effects file - Text file
.grp - Layer groups file - Text file
.hnt - Hint node data file - Text file
.ldx - Layer description file - Text file
.lgt - Light data file - Text file
.lll - Last loaded layer file - Text file
.log - Error or warning logging file - Text file
.lrg - Line region file(?) - Text file
.lua - Script file - Text file
.lvl - Binary file containing munged and packed game data - Binary data file
.lyr - Layer file - Text file
.mrq - Mode requirement list file - Text file
.msh - SWBF model/animation file - use hex editor to view/edit the binary data **
.mus - Music configuration file - Text file
.obg - Object group file - Text file
.odf - Object definition file - Text file
.option - Optional parameters for VM during compile process - Text file
.pln - Planning data file - Text file
.prp - Prop paint configuration file - Text file
.pth - Path data file - Text file
.pvs - Potentially Visible Set file for portal and sector data - Text file
.req - Requirement files declare what is to be packed into a *.lvl of the same name - Text file
.rgn - Region data file - Text file
.sfx - Sound effects file; list paths to sound samples - Text file
.sky - Sky data file - Text file
.snd - Sound property file - Text file
.st4 - Stream file; list paths to pairs of quadraphonic stream files - Text file
.stm - Stream file; list paths to stream files - Text file
.ter - Terrain data file - Binary data file
.tga - Targa image - View/edit with image editor
.tsr - Sound trigger region config file - Text file
.wld - World file - Text file
.zaabin - Munged animation data file - Binary data file
.zafbin - Munged skeleton data (basepose) file - Binary data file
.zat - Animation debug file - Text file


* Press F11 while in ZE to bring up Decal Edit Mode
** You can also import .msh files into XSI for editing using ZETools


Recommended Text/code file editors:

Note: Don't use WordPad to edit SWBF text files, it produces curly quotes which breaks the syntax.

Recommended Hex editors for viewing/editing binary data:

Recommended image (tga) viewer/editors:



Comparison of hex editors
Comparison of text editors
Comparison of raster graphics editors


There may be other tools that aren't listed here that work. The rule is, find at least one tool that works and that you are comfortable using.

Master Bounty Hunter
User avatar
Posts: 1602
Joined: Mon Jul 16, 2007 1:30 pm
Location: Las Vegas
Projects :: Battlefront Chronicles

Re: Regarding .lua files

Postby Eggman » Sun May 03, 2009 10:10 am

This seems like it could be pretty useful for new modders - maybe it should be added to the Everything You Need thread?

Recruit Womprat Killer
User avatar
Posts: 11
Joined: Thu Apr 30, 2009 11:14 pm
Location: Still in Fonzie times

Re: Regarding .lua files

Postby The_Fonz » Sun May 03, 2009 2:36 pm

Thanks so much! This is really going to help me!

(lol, I didn't know that text editor was used so much!)

Thanks again

Jedi
User avatar
Posts: 1008
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Re: Regarding .lua files

Postby MercuryNoodles » Mon May 04, 2009 3:49 am

Just a minor note, but the bak files open with a text editor because they're usually backups of the lua scripts when dealing with SWBF2. Just be warned that any type of file can be turned into a bak file.

Return to SWBF2 Modding

Who is online

Users browsing this forum: No registered users and 0 guests