How to: Reducing side file size (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

Post Reply
Syth
General
General
Posts: 784
Joined: Thu Apr 13, 2006 8:46 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: happy fun island

How to: Reducing side file size (FAQ)

Post by Syth »

I notice a lot of maps with big huge 200mb sides with not much changed.
This should help you reduce that (if you understand it)

IF YOU'RE JUST EDITING SKINS (no ODFs)

You're going to make a 'skin side'. Make a new side and name it. In my example Im making 212nd legion skins, so ill call it "212nd". Then make a MSH and REQ folder in your side. In the msh folder, put all the skins you edited.

Next go to the REQ folder and make a new text file for each skin you edited. For example, if i edited the rep_inf_ep3trooper.tga i'd make a notepad file called "212_inf_ep3trooper" (it doesn't matter what you call it though). Now open up the newly made file, and add the below.

Code: Select all

ucft
{
      REQN
    {
	  "texture"
	  "skin name.tga"
    }
}
You might notice a skins req is different from a unit req
Another example is the clone sniper, which needs two parts in his req because he has 2 textures.

Code: Select all

ucft
{
      REQN
    {
	  "texture"
	  "rep_inf_ep3sniper"
    }
       REQN
    {
	  "texture"
	  "rep_inf_ep3sniper_cape"
    }
}
Do this for each skin you edited.
Next open up the SIDE req file, in my case its called 212nd.req.
In it, add the names of all your req files. My req would look like this-

Code: Select all

ucft
{
    REQN
    {
        "lvl"    
        "212_inf_ep3armoredpilot"
        "212_inf_ep3trooper"
        "212_inf_ep3_jettrooper"
        "212_inf_ep3_officer"       
        "212_inf_ep3_sniper"       
    }
}
Basically you've just made a 'skin' side. Lastly, to over-write the shipped skins just load your skins in your maps LUA, just like you would units. But make sure you load the skins after all the other sides, or nothing is changed.
This is what is in my LUA.

Code: Select all

   ReadDataFile("SIDE\\212nd.lvl",
                            "212_inf_ep3armoredpilot",
                            "212_inf_ep3_sniper",
                            "212_inf_ep3_officer",
                            "212_inf_ep3_jettrooper",
                            "212_inf_ep3trooper")



IF YOU'RE JUST EDITING ODFs

This was pointed out by another member. Basically you edit the shipped sides just as you normally would. After you do, add this line to any edited ODF under [GameObjectClass]
ClassParent = "name"
"name" being the original ODF. So if I edited the jet trooper ODF id put

Code: Select all

ClassParent         = "rep_inf_ep3_jettrooper"
Just a note though, the edited ODFs name should be one other then the ClassParent = name. You can do this for weapons and vehicles too (unless i'm mistaken). Basically this gets rid of the need for msh's and tga's because the unit will get them from the class parent.
Then in your LUA load your side AND the side containing the Parent ODFs.

SO if i edited the jettrooper with this technique this is what LUA would look like.

Code: Select all

    ReadDataFile("SIDE\\REP.lvl",
			     "rep_inf_ep3_jettrooper")
    ReadDataFile("dc:SIDE\\REP.lvl",
			     "new_inf_ep3_jettrooper")
A HINT on 1st person

In your custom sides you only need FPM of the weapons, unit and vehicle FPM is included the game data so you can delete it from your side.
YankFan1950

RE: How to: reducing side file size

Post by YankFan1950 »

or just delete stuff u don't use in ur lvl it reduced my kashyyyk size by 110 mb unzipped
MasterYoda91

Post by MasterYoda91 »

This should probably be a sticky (or in tut thread)
t551
General
General
Posts: 791
Joined: Sat Jul 16, 2005 3:23 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Post by t551 »

Yankfan, most people typically don't put things they don't need in in the first place.
Caleb1117
2008 Most Original Avatar
Posts: 3096
Joined: Sun Aug 20, 2006 5:55 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set
Location: X-Fire: caleb1117 ಠ_ಠ

Post by Caleb1117 »

Question, Can you change what tga/skin a unit uses though the req?
Offtopic: 300 posts :o Image <---- Warrant officer badge
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Post by Teancum »

For those people who must copy the all/imp/rep/cis sides to their map there's a VERY simple way to cut down filesize. Open up [sidename].req in your data_[project name]/sides/[sidename] folder. Remove line entries for stuff you're not using.

For example, if you're using Episode II clones, remove the lines that have all the Episode III clones, and remove lines for any vehicles and heroes you're not using.
Alpha

Post by Alpha »

And this keeps the Visual Munge from munging those files, correct? But you would be required to clean and munge if you wanted to reduce that way, right, Tean'?
MasterYoda91

Post by MasterYoda91 »

So, would this mean if for example you wanted the convenience of having every file you might possibly need in your levels folder for convenience, you could copy all the sides assets into your level and as long as you set up your REQ files properly there would be no major impact on your munged folders size?

I tend to copy the whole sides folder into my level to make sure ive not missed anything out that would cause my maps to crash.

Kind of Off Topic: At the moment my map is crashing, i have copied all files into the sides that i have changed and my Luas are as far as i can tell set up correctly, yet my map still crashes?
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3284
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Reducing side file size test

Post by AceMastermind »

Alpha wrote:And this keeps the Visual Munge from munging those files, correct?
I put this to the test by checking the files size of only the necessary munged files and then throwing 2mb worth of random textures in one of my custom side's msh folders, then munged again and Visual Munge will still munge the files even though they're not called by anything, but the random files are not copied over to your compiled project in:
LucasArts\StarWarsBattlefrontII\GameData\addon\ABC\data\_LVL_PC\SIDE

So, if you want to reduce munge time also, then remove those unused files from your side's folders.
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Post by Teancum »

Exactly. All files in the folders will be processed in the first part of the munge (the _BUILD_PC folder). But the req will only put whatever files it needs in the final LVL file.
Post Reply