Minimizing file size

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
Rikino

Minimizing file size

Post by Rikino »

What's the best way to add a few things to a side without adding all the extra stuff, which takes up so much space? Like, to just change the skins of all the droids without adding the extra 40MB to the finished map?
It seems like I'd have to make a new side, and just copy over all the droids I'm changing into it, but is there any easier way?

Oh, and any other tips on how to make a completed map smaller size-wise would be appreciated.
]v[

Post by ]v[ »

Using shipped data as much as possible....

Mission LUA is the one like recipe, a necessary material and the cooking method to the map are written in it. For example, "ReadDataFile()" to prepare and "SetClassProperty()" to cook.

When I make a unit with Stormtrooper's model/performance and Luke's Lightsaber, my side.lvl doesn't have MSH at all. If the LUA loads "imp_inf_rifleman" and "all_hero_luke_jedi" from shipped imp.lvl and all.lvl, MHSs need not be put in (DC:)side.lvl. 'ClassParent = "imp_inf_rifleman"' ([GameObjectClass]) and 'WeaponName1 = "all_weap_lightsaber"' ([Properties]) are written in the ODF.

And when I reskin EP3 Clone Trooper, I make side lvl with my skin, "ReadDataFile()" it, and add 'SetClassProperty("rep_inf_ep3_rifleman", "OverrideTexture", "<skin_name>")' in "ScriptPostLoad()" of the LUA.

Or when I reskin Stormtroopers, I rename my texture to "imp_inf_trooper.tga", and "ReadDataFile()" it in "ScriptPostLoad()" of the LUA.

I cannot explain it enough in English....
This is my mod and its source. These might serve as a reference.
http://www.gametoast.com/index.php?name ... pic&t=7649
Last edited by ]v[ on Tue Nov 14, 2006 7:07 am, edited 7 times in total.
Rikino

Post by Rikino »

Thanks, I think I get it. So what I do is make a side with the units' odfs and mshs but not the textures. In the lua, I load the shipped assets with the textures I want before the units in my actual side, and the game will use the textures on my units from the otherwise unused shipped assets? I'll try that.
]v[

Post by ]v[ »

I went to the restaurant in the vicinity last night. To our regret, hamburger was not on the menu though I wanted to eat it. Therefore I ordered bread, salad, and hamburg steak, and I made a
hamburger by using them.

What I try to say is that there seems to be no problem if all data the unit uses are loaded when teams are set up. But when "SoldierAnimation" is greatly insufficient with a lot of unused units, the game often seems to crash....
fat_walrus

Post by fat_walrus »

So I could just put a msh (that's it) in Side>bob (let's say it's called "rep_inf_ep3_clonecommande2") and I wanted to reskin the clone commander. Would this be my LUA?

Under function ScriptPostLoad()

Code: Select all

    SetClassProperty("rep_inf_ep3_engineer", "OverrideTexture", "rep_inf_clonecommande2")
Under function ScriptPostLoad()

Code: Select all

	ReadDataFile("dc:SIDE\\bob.lvl",
					"rep_inf_ep3_clonecommande2")
Is this correct?
GuitarMan
Command Sergeant Major
Command Sergeant Major
Posts: 268
Joined: Tue Jul 11, 2006 6:41 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 GuitarMan »

Uhhh, if I understand the question correctly, you can just take all the stuff that you don't need out of the .req file.
]v[

Post by ]v[ »

>>fat_walrus

bob/req/rep_inf_ep3_clonecommande2.req

Code: Select all

ucft
{
    REQN
    {
	"texture"
	"rep_inf_ep3_clonecommande2"
    }
}
Under function ScriptInit()

Code: Select all

   ReadDataFile("dc:SIDE\\bob.lvl", 
               "rep_inf_ep3_clonecommande2") 
fat_walrus

Post by fat_walrus »

Oh, I got that. I just thought that could be a way to override textures using LUAs instead of having to make a whole new side. My mistake
]v[

Post by ]v[ »

However...I think that "rep_inf_ep3armoredpilot.msh" and "rep_inf_clonecommander.msh" also don't support "OverrideTexture"s....
Post Reply