Page 1 of 1

Edit stock Infantry unit skins via Lua?

Posted: Fri Jun 27, 2014 12:36 pm
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

Re: Edit stock Infantry unit skins via Lua?

Posted: Fri Jun 27, 2014 12:40 pm
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.

Re: Edit stock Infantry unit skins via Lua?

Posted: Fri Jun 27, 2014 12:50 pm
by ModifiedBlox
How do I find the .msh files? (I'm new to this)

Re: Edit stock Infantry unit skins via Lua?

Posted: Fri Jun 27, 2014 1:24 pm
by MileHighGuy
I think this tutorial could help you

http://www.gametoast.com/viewtopic.php?f=27&t=12729

Re: Edit stock Infantry unit skins via Lua?

Posted: Fri Jun 27, 2014 3:15 pm
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.