Re-Texturing Stock Maps Through LUA (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
User avatar
Nedarb7
Lieutenant General
Lieutenant General
Posts: 676
Joined: Sat Sep 22, 2012 3:41 pm

Re-Texturing Stock Maps Through LUA (FAQ)

Post by Nedarb7 »

So I was working on Civil War Era and I felt that the normal texture for coruscaunt didn't fit the
era. After a while of thinking I came up with the idea to re-texture it through the lua.
And it resulted like this (much more fitting):
Hidden/Spoiler:
Image
Okay now that I'm done explaining what happened and showing a picture here's how I did it

1# First create a new side and call it Textures (example) now make a req and set it up like this:
Hidden/Spoiler:
[code]ucft
{
REQN
{
"lvl"
"whateveryouwanttocallit"
}
}[/code]
now copy the cor1 tga files (or the map your re-texturing's tga files) in the assets folder and place them in your sides msh folder. Edit them however you want.
Next go into the req folder and create :
whateveryouwanttocallit
Now place the names of the tga files you edited in it like this:
Hidden/Spoiler:
[code]ucft
{
REQN
{
"texture"
"Cor1_temple_floor"
"cor1_bldg_minorhall01"
"cor1_bldg_minorhall02"
"cor1_bldg_minorhall03"
"cor1_bldg_minorhall04"
}
}[/code]
Now the side is ready.

2#Now that the side is ready open up your stock maps lua and find this:
Hidden/Spoiler:
[code]SetSpawnDelay(10.0, 0.25)
ReadDataFile("cor\\cor1.lvl","cor1_Conquest")
SetDenseEnvironment("True")
-- SetMaxFlyHeight(25)
--SetMaxPlayerFlyHeight (25)
AddDeathRegion("DeathRegion1")[/code]
and add these lines:
Hidden/Spoiler:
[code]SetSpawnDelay(10.0, 0.25)
ReadDataFile("cor\\cor1.lvl","cor1_Conquest")
SetDenseEnvironment("True")
-- SetMaxFlyHeight(25)
--SetMaxPlayerFlyHeight (25)
AddDeathRegion("DeathRegion1")

ReadDataFile("dc:SIDE\\Textures.lvl",
"whateveryouwanttocallit")[/code]
3#Go to "Data_***/_BUILD/Sides" and make a folder called Textures.

After that go into "Data_***/_BUILD/Sides/ALL" and copy a munge.bat
and clean.bat and paste them into "Data_***/_BUILD/Sides/Textures"

Then munge with EVERYTHING selected for sides and your done!

EDIT; ADDED STEP 3
Last edited by Nedarb7 on Mon Dec 03, 2012 4:30 pm, edited 1 time in total.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Re-Texturing Stock Maps Through LUA

Post by Marth8880 »

Huh, that actually makes a lot of sense. :o Thanks for the info! :thumbs:
User avatar
yuke5
Field Commander
Field Commander
Posts: 945
Joined: Wed Jun 29, 2011 10:42 pm
Games I'm Playing :: SWBF2 TF2 RC KOTOR
xbox live or psn: My steam is yuke5.
Location: Vermont

Re: Re-Texturing Stock Maps Through LUA

Post by yuke5 »

That is very cool! Maybe it could be used to make certain maps fit certain eras. Now THAT would be super cool, like a reskinned Death Star for clone wars or something. Thank you for sharing your knowledge.
User avatar
DarthSolous
Chief Warrant Officer
Chief Warrant Officer
Posts: 351
Joined: Fri Sep 14, 2012 4:28 pm
Projects :: No Mod project currently.
Games I'm Playing :: SWBF2 Halo Minecraft
xbox live or psn: No gamertag set
Location: Wielding the Dark Side of the Force on Korriban

Re: Re-Texturing Stock Maps Through LUA

Post by DarthSolous »

yuke5 wrote:That is very cool! Maybe it could be used to make certain maps fit certain eras. Now THAT would be super cool, like a reskinned Death Star for clone wars or something. Thank you for sharing your knowledge.
Very useful :mrgreen:
User avatar
Nedarb7
Lieutenant General
Lieutenant General
Posts: 676
Joined: Sat Sep 22, 2012 3:41 pm

Re: Re-Texturing Stock Maps Through LUA

Post by Nedarb7 »

This method works for sky as well.
Just get the texture of the sky from the stock maps
world1 folder. Set it up the same way.
I haven't tried the terrain but it should work the same.
Post Reply