Page 1 of 1

Minimizing file size

Posted: Tue Nov 14, 2006 2:15 am
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.

Posted: Tue Nov 14, 2006 4:01 am
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

Posted: Tue Nov 14, 2006 11:04 am
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.

Posted: Tue Nov 14, 2006 11:56 am
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....

Posted: Thu Nov 16, 2006 8:38 pm
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?

Posted: Thu Nov 16, 2006 8:42 pm
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.

Posted: Thu Nov 16, 2006 9:37 pm
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") 

Posted: Sat Nov 18, 2006 11:43 pm
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

Posted: Sun Nov 19, 2006 12:09 pm
by ]v[
However...I think that "rep_inf_ep3armoredpilot.msh" and "rep_inf_clonecommander.msh" also don't support "OverrideTexture"s....