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
Ah, yes, I was looking elsewhere in the REQ. It shouldn't matter.
I'm going to need to see your imp_inf_sand_trooper req as well.
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

It won't let me add multiple attachments for some reason. Seeing as Dark Troopers are their own units, I didn't see why I couldn't add a custom one.
In the Soviet Army, it takes more courage to retreat than advance.

Is the ODF you posted your custom unit, and is it still called "imp_inf_storm_trooper"?
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 13, 2019, 04:54:31 AM #18 Last Edit: May 13, 2019, 07:00:44 AM by KommissarReb
No, by now I made a separate .odf called "imp_inf_sand_trooper". I retained the name back when I attempted to make my custom unit part of "imp_inf_basic". Could it be the blaster rifle is making it unspawnable? I changed the geometry of imp_weap_inf_rifle.odf to all_weap_inf_sniperrifle.odf. I don't know if that's the wrong way to do that.

Should I create an entirely new side, or edit IMP?
In the Soviet Army, it takes more courage to retreat than advance.

I think it might be easiest to see what's gone wrong if you can send me your custom IMP side folder in its entirety. Zip it up and PM me with a link to it so I can take a look and I'll let you know what's wrong and how to fix it.
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

If you can't find anything wrong with it, maybe send me a file of a modified IMP folder with a custom Sandtrooper unit with a blaster rifle that has the geometry of the Rebel sniper rifle so I can compare it to mine and see what's different.
In the Soviet Army, it takes more courage to retreat than advance.

I'm not entirely sure why it wouldn't work for you. Here is a datatest1 folder I created, with the IMP folder you sent me and the correct LVL files referenced in the LUA.
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

It works, although the Sandtrooper is called "imp_inf_sandtrooper" (though that's a minor nitpick and something I could probably fix on my own later).

Was I supposed to edit any .lvl files? I tried using HxD to edit .lvl files, but it wouldn't allow me to even when I run it in administrator (I'm using my laptop where I am the owner). I tried adding the IMP folder to the Sides folder of the custom map I wanted it for, and also copied the faction info from the test .lua, but when I load up that map it only has an ordinary stormtrooper.
In the Soviet Army, it takes more courage to retreat than advance.

I called the ODF as you sent it to me, so that's probably why (the game was looking for "imp_inf_sand_trooper", if you said the ODF was called "imp_inf_sandtrooper" it wouldn't find it)
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

No, that was a typo. It actually said "imp_inf_sand_trooper". I just double-checked my original Datatest1's sides and .req files to make sure I didn't put in "imp_inf_sandtrooper", and so far I still don't know why I can't make custom units.

Just made a fresh test map where I copied your IMP folder into Sides and edited the .lua so it has the custom Imp units, and when I load it up it crashes. In BFront.log this is what came up:

[spoiler]Message Severity: 3
D:\src\FRONTLINE_PC\FrontLine\Source\LuaCallbacks_Mission.cpp(195)
Lua ReadDataFile: Could not open dc:SIDE\imp.lvl

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)

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

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

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

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

Message Severity: 2
D:\src\FRONTLINE_PC\FrontLine\Source\PlanetaryBonus.cpp(128)
Hero class "imp_inf_darthvader" not found for team 2 (check the side's .req file)

Message Severity: 3
D:\src\FRONTLINE_PC\RedEngineFL\Graphics\PC\Shaders\pcTerrainShader.cpp(176)
pcTerrainShader: detail texture expects L8 format!

Message Severity: 3
D:\src\FRONTLINE_PC\FrontLine\Source\Team.cpp(171)
Team  has no unit classes
[/spoiler]
I'm not sure if it's got something to do with the fact that the BFBuilder I'm using was an experimental version Dark_Phantom gave me when I made a post about the one I downloaded not working. Are you sure I don't need to edit any .lvl files?
In the Soviet Army, it takes more courage to retreat than advance.

May 16, 2019, 10:34:24 AM #25 Last Edit: May 16, 2019, 10:38:14 AM by Dark_Phantom
In your addon folder, does SIDE\imp.lvl exist?  Is it a reasonable size (compare to stock imp.lvl)?  Sometimes the only way to tell there was a munge error is if the file is not very big compared to stock.

It has to be in your addon folder when you specify dc:Side\xxx.lvl

Those errors tell me that the file is not where it's supposed to be.
The BOBclan:  A Rich History


Quote from: Unit 33 on November 29, 2014, 03:44:44 AM
'Please, tell me more about the logistics of the design of laser swords being wielded by space wizards' - Some guy on the internet.

May 16, 2019, 11:00:11 AM #26 Last Edit: May 16, 2019, 01:23:00 PM by KommissarReb
It didn't exist, so I copied Giftheck's imp.lvl from his Datatest1 and munged it, but it crashed when I tried loading the map. I don't know how to create .lvl files, and what I found using the search tool still leaves me bewildered.

UPDATE: I got it to work by adding the necessary .lvl files (including Giftheck's imp.lvl) into _LVL_PC/Side. Now all I need to do to figure out how to name "imp_inf_sand_trooper" "Sandtrooper". I click the localize button, and the only two scopes are "level" and "weapons". It won't allow me to create new scopes, and I don't know what the MultiLanguageTool is editing to replace it so I can name my units.
In the Soviet Army, it takes more courage to retreat than advance.

May 17, 2019, 07:23:11 AM #27 Last Edit: May 17, 2019, 07:25:07 AM by Dark_Phantom
Nice, glad you got that figured out.
There are a couple different localization tools, some for just the addon core.lvl and some for the complete game - generally the readme says which.  It's been a while since I've done it, so others might have more insight on what's best for your situation.  You're going to have to edit the imp scope and add a new value, but that's all I know off the top of my head.
I believe I had some success with Bamdur's tool and Sleepkiller's tool, so you have a choice.  Just make sure, again, to read the readme files.
The BOBclan:  A Rich History


Quote from: Unit 33 on November 29, 2014, 03:44:44 AM
'Please, tell me more about the logistics of the design of laser swords being wielded by space wizards' - Some guy on the internet.

I think the problem is I don't know what .lvl files I need to edit in order for custom units to work. It's just the side .lvl's, right? I downloaded HxD to edit .lvl files, but other than replacing text (which IIRC crashed my game) I have no clue how to use it.

Giftheck, when you edited imp.lvl (and the other .lvl files I assume), what did you do? I want to know so I can make custom units on my own. I searched up .lvl in the search engine and didn't find anything that made sense.
In the Soviet Army, it takes more courage to retreat than advance.

Disclaimer: I am not Giftheck.

Claimer:  http://www.swbfgamers.com/index.php?action=downloads;sa=view;down=553 is the side.lvl builders where you can make your very own sides by adjusting the stock sides.

I recommend starting off simple - open up the Dark Trooper odf in notepad (ODF folder), change jet jump to something crazy, run munge.bat, copy and replace the file it creates (in _LVL_PC in the tool's folder) with your stock imp.lvl (located in Data\_LVL_PC\SIDE\) with it.  Go ingame and test the Dark Trooper. The files are set up so that you don't need to do anything crazy to make it work - the hard part is done for you.  The odf (object definition files) are pretty self explanatory, but searching "side.lvl" should bring up some more results.

The hard part is figuring all this stuff out the first time - after that, it gets easier.
The BOBclan:  A Rich History


Quote from: Unit 33 on November 29, 2014, 03:44:44 AM
'Please, tell me more about the logistics of the design of laser swords being wielded by space wizards' - Some guy on the internet.