How can I change the look of a unit for my map?

Started by KommissarReb, May 11, 2019, 11:43:39 AM

Previous topic - Next topic
I'm trying to turn the Stormtrooper into a Sandtrooper, so what I did was I went into Datatest1/Sides/IMP/ODF (test1 is the map name) and went into imp_inf_storm_trooper and changed "stormtrooper" to "shocktrooper" for all geometry parameters. I also wanted to reskin the Stormtrooper blaster rifle to look like the Rebel Marksman's sniper rifle (but still function as a blaster rifle) so I brought the all_weap_inf_sniperrifle files into the ODF and MSH folders, but when I playtest the map it still shows the standard stormtrooper with an E-11 blaster rifle.

I read through all the tutorials listed in the modding tutorials subforum and couldn't figure this out.
In the Soviet Army, it takes more courage to retreat than advance.

Could you post your LUA and ODF(s) by chance?
"Birth, pain, fear, death; the cycle of existence." -Dread Master Calphayus.

SWBF1 Maps: Tatooine: Mos Anek, Kashyyyk: Village, Naboo: Province, Tatooine: Gulch.

SWBF2 Maps: Space Carida.

Here the imp_inf_storm_trooper.odf that I edited. I also edited imp_weap_inf_rifle.odf in the same folder to use the rebel sniper rifle geometry. I copied the rebel sniper rifle files to the IMP folder, so I don't know what I'm not doing right.
In the Soviet Army, it takes more courage to retreat than advance.

We need the LUA script as well to be able to tell you what's going on.
In Progress:
--Star Wars: Battlefront - Anniversary Edition (formerly Star Wars: Battlefront - Legacy Edition)
--Endor: Imperial Base

On Hold:
--Star Wars Battlefront: Elite Squadron For SWBF1

May 12, 2019, 01:48:35 AM #4 Last Edit: May 12, 2019, 02:03:10 AM by KommissarReb
Here's the GCW .lua (my test map is GCW only). I already tried getting the Imperials use the imp_inf_storm_trooperdesert (which is mostly the same) but for some reason it results in the stormtrooper not appearing in the unit selection.

It will only allow me to have one attachment per post, which is why I originally only had one attachment. I changed the geometry values for the imp_weap_inf_rifle.odf file in Sides/IMP/ODF to use the Rebel sniper rifle's geometry, and I copied the rebel sniper rifle files into the imperial folders.
In the Soviet Army, it takes more courage to retreat than advance.

Change this line

ReadDataFile("SIDE\\imp.lvl",

To this

ReadDataFile("dc:SIDE\\imp.lvl",
In Progress:
--Star Wars: Battlefront - Anniversary Edition (formerly Star Wars: Battlefront - Legacy Edition)
--Endor: Imperial Base

On Hold:
--Star Wars Battlefront: Elite Squadron For SWBF1

The Sandtrooper still won't appear. Just now I tried renaming "imp_inf_tat" everywhere to "imp_inf_sand_trooper" and added it to the imp.req in the "IMP" folder in "SIDES", but the Sandtrooper still won't appear.
In the Soviet Army, it takes more courage to retreat than advance.

What does SPTest tell you when you load the level? You can find the log as BFront.txt.
In Progress:
--Star Wars: Battlefront - Anniversary Edition (formerly Star Wars: Battlefront - Legacy Edition)
--Endor: Imperial Base

On Hold:
--Star Wars Battlefront: Elite Squadron For SWBF1

Several errors came up, one that said "not enough classes to remove for imp_inf_darthvader" and a few about the command posts. But I don't think the ones complaining about the command posts or music are as relevant as the class one.

Where can I find BFront.txt? I ran BFTest in the Battlefront folder.
In the Soviet Army, it takes more courage to retreat than advance.

Where is your Battlefront installed? If it's installed in Program Files on Windows 10, BFront.txt won't be in the same folder. It'll be in your VirtualStore:

C:\users\[your user name]\AppData\Local\VirtualStore\Program Files (x86)\LucasArts\Star Wars Battlefront
In Progress:
--Star Wars: Battlefront - Anniversary Edition (formerly Star Wars: Battlefront - Legacy Edition)
--Endor: Imperial Base

On Hold:
--Star Wars Battlefront: Elite Squadron For SWBF1

QuoteMessage Severity: 2
D:\src\FRONTLINE_PC\FrontLine\Source\Team.cpp(531)
Team missing class "imp_inf_sand_trooper" (check the side's .req file)

I don't know what I'm not doing right. I got the pilot version of Luke Skywalker to work on my test map ( and even tried out playing as him) but I can't make a custom unit?
In the Soviet Army, it takes more courage to retreat than advance.

I'm asking you to post a lot here but it all helps figuring it out. Can I see the REQ file for your side?
In Progress:
--Star Wars: Battlefront - Anniversary Edition (formerly Star Wars: Battlefront - Legacy Edition)
--Endor: Imperial Base

On Hold:
--Star Wars Battlefront: Elite Squadron For SWBF1

Oh I don't mind. I just changed the .lua again so that imp_inf_basic.req has the ordinary stormtrooper again and imp_inf_sand_trooper.req is it's own category (like the dark trooper).

Message Severity: 2
D:\src\FRONTLINE_PC\FrontLine\Source\Team.cpp(531)
Team missing class "imp_inf_sand_trooper" (check the side's .req file)

Also does this message mean that I have to remove the Dark Trooper or something so I can use my custom unit, or do I need entirely new custom units in order to have one that's different?

Message Severity: 3
D:\src\FRONTLINE_PC\FrontLine\Source\Team.cpp(558)
Not enough slots to remove for special class "imp_inf_darthvader"
In the Soviet Army, it takes more courage to retreat than advance.

Not too sure about the last one, but looking at your .REQ file, there's no reference there to an 'imp_inf_tat' or 'imp_inf_sand_trooper' anywhere.
In Progress:
--Star Wars: Battlefront - Anniversary Edition (formerly Star Wars: Battlefront - Legacy Edition)
--Endor: Imperial Base

On Hold:
--Star Wars Battlefront: Elite Squadron For SWBF1

I just downloaded my file and it says "imp_inf_sand_trooper" at the bottom of the list. Also I remember reading somewhere that the order they come in matters. Is that true?
In the Soviet Army, it takes more courage to retreat than advance.