Edit stock Infantry unit skins via Lua?

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
ModifiedBlox
Private Recruit
Posts: 29
Joined: Wed Jun 18, 2014 4:20 pm
Games I'm Playing :: Battlefront II
Location: United States

Edit stock Infantry unit skins via Lua?

Post by ModifiedBlox »

I'm trying to replace the Felucia default infantry units with the Sniper forest skin. I was looking at the lua, and I was wondering if it was possible to edit the code so
units are in the appropriate environment skin.

Code: Select all

 ReadDataFile("SIDE\\rep.lvl",
                        "rep_inf_ep3_rifleman",
                        "rep_inf_ep3_rocketeer",
                        "rep_inf_ep3_engineer",
                        "rep_inf_ep3_sniper_felucia", 
                        "rep_inf_ep3_jettrooper",
                        "rep_inf_ep3_officer",
                        "rep_hero_aalya",
                        "rep_walk_oneman_atst")
Thanks!
- Modified
User avatar
Kingpin
Jedi
Jedi
Posts: 1096
Joined: Fri Sep 13, 2013 7:09 pm
Projects :: The Sith Wars II
Location: Denver, CO
Contact:

Re: Edit stock Infantry unit skins via Lua?

Post by Kingpin »

You are going to want to look at the unit's odf. For example, if you want to change the "rep_inf_ep3_rifleman" to have the Felucia Sniper model, change the .msh line to the appropriate .msh name.
ModifiedBlox
Private Recruit
Posts: 29
Joined: Wed Jun 18, 2014 4:20 pm
Games I'm Playing :: Battlefront II
Location: United States

Re: Edit stock Infantry unit skins via Lua?

Post by ModifiedBlox »

How do I find the .msh files? (I'm new to this)
MileHighGuy
Jedi
Jedi
Posts: 1194
Joined: Fri Dec 19, 2008 7:58 pm

Re: Edit stock Infantry unit skins via Lua?

Post by MileHighGuy »

I think this tutorial could help you

http://www.gametoast.com/viewtopic.php?f=27&t=12729
User avatar
commanderawesome
Field Commander
Field Commander
Posts: 971
Joined: Tue Aug 13, 2013 11:58 pm
Projects :: Skin Changer - Warfront - Other stuff
Games I'm Playing :: SWBF SWTOR KotOR EaW
xbox live or psn: AaTc_CmdrAwesome
Location: The Universe

Re: Edit stock Infantry unit skins via Lua?

Post by commanderawesome »

Well to answer your first, question, yes you can, example:

Code: Select all

SetClassProperty("rep_inf_ep3_rifleman", "GeometryName", "rep_inf_feluciatrooper")
SetClassProperty("rep_inf_ep3_rifleman", "GeometryLowRes", "rep_inf_feluciatrooper_low1")
But the above methods are much easier.
Post Reply