Page 1 of 1

How to: Reducing side file size (FAQ)

Posted: Sat Apr 14, 2007 3:55 pm
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.

RE: How to: reducing side file size

Posted: Sat Apr 14, 2007 4:07 pm
by YankFan1950
or just delete stuff u don't use in ur lvl it reduced my kashyyyk size by 110 mb unzipped

Posted: Sat Apr 14, 2007 5:13 pm
by MasterYoda91
This should probably be a sticky (or in tut thread)

Posted: Sat Apr 14, 2007 5:54 pm
by t551
Yankfan, most people typically don't put things they don't need in in the first place.

Posted: Sat Apr 14, 2007 10:05 pm
by Caleb1117
Question, Can you change what tga/skin a unit uses though the req?
Offtopic: 300 posts :o Image <---- Warrant officer badge

Posted: Sun Apr 15, 2007 12:47 am
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.

Posted: Sun Apr 15, 2007 8:12 am
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'?

Posted: Sun Apr 15, 2007 9:56 am
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?

Reducing side file size test

Posted: Sun Apr 15, 2007 4:25 pm
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.

Posted: Sun Apr 15, 2007 6:28 pm
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.