using SWBF2 unit models in SWBF

Started by Led, March 10, 2012, 06:24:54 PM

Previous topic - Next topic
March 10, 2012, 06:24:54 PM Last Edit: March 25, 2012, 11:40:52 AM by Buckler
Snake has a tutorial, but I find it rather confusing.  His tutorial is at:
http://www.swbfgamers.com/index.php?topic=2177.0

As explained in the comments of the post, it is more complicated that it needs to be.



Follow my instructions below to get the unit MODEL and SKIN from SWBF2 into SWBF.  You will
need to mess around with the ODF of the unit if you want weapons modifications.



First, use BFbuilderPro and create a REP side for MODID: peng01
(if you don't know how to do this, you got some learnin' to do)

use windows file explorer and right click on the folder:
C:\LucasArts\BFBuilder\Datapeng01

select properties, and uncheck "read only" and hit OK or apply to all subfolders


I will replace clone trooper with EP3 armoured pilot.


go here
C:\BF2_ModTools\assets\sides\rep\msh
get the files

rep_inf_ep3armoredpilot.msh
rep_inf_ep3armoredpilot.msh.option
rep_inf_ep3armoredpilot.tga
rep_inf_ep3armoredpilot.tga.option
rep_inf_ep3armoredpilot_low1.msh
rep_inf_ep3armoredpilot_low1.msh.option



copy them to
C:\LucasArts\BFBuilder\Datapeng01\Sides\REP\MSH

go here:
C:\LucasArts\BFBuilder\Datapeng01\Sides\REP\ODF

and open
rep_inf_clone_trooper.odf

Make the beginning of this file look like this:
and save it


[GameObjectClass]

ClassLabel          = "soldier"
GeometryName       = "rep_inf_ep3armoredpilot.msh"


[Properties]
FootWaterSplashEffect    = "watersplash_sm"
WaterSplashEffect    = "watersplash_md"
WakeWaterSplashEffect   = "watersplash_wade"

Label             = "Republic Trooper"
UnitType         = "trooper"
IconTexture       = "rep_trooper_icon"
MapTexture          = "troop_icon"
MapScale          = 1.4

GeometryName       = "rep_inf_ep3armoredpilot"
GeometryLowRes         = "rep_inf_ep3armoredpilot_low1"

FirstPerson       = "REP\reptroop;rep_1st_trooper"
FirstPersonFOV         = "70"
ThirdPersonFOV         = "65"
AnimationName      = "all_inf_snowtrooper"


clean and munge

retrieve your new REP.lvl file, and place it in
C:\Program Files\LucasArts\Star Wars Battlefront\GameData\Data\_LVL_PC\SIDE

(back up your original first)


A couple of tips:  always back up your files before you make additional changes
always do one change at a time and see if it works before making more changes




start up a game, and instead of clone trooper, you see this dude:



I think the others will work the same way.  I leave that to you and ask that you report the results.  The skirts are an issue, I think.  They will not animate, and they may not appear, dunno.  Give it a try.

------------------------------

Dealing with low res models


Low res models are used a lot.  Even up close.  If you do not have a low res model, the unit will "wink out" and seem to disappear and re-appear.


Some models that were made by modders do not come with a low res version.  Here is what you need to do:
find your standard res model and the TGA file that goes with it.

In the previous example, it was
rep_inf_ep3armoredpilot.msh
rep_inf_ep3armoredpilot.msh.option
rep_inf_ep3armoredpilot.tga


You will need to find a low res model that will skin similar to this one.  Perhaps the basic clone trooper from SWBF would work:  rep_inf_trooper_low1.msh

it takes some experience and trial and error to know if it will work.

The TGA file (skin file) name is stored inside the MSH file.  We need the rep_inf_trooper_low1.msh to use the TGA file that we want:  rep_inf_ep3armoredpilot.tga

Note that the models are different resolutions, but the TGA file is the same for both.

Here is what I have been doing.  I hex edit the low res msh file so that inside of it is the name of the TGA file that I want.  I use xvi32 for a hex editor:
http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm#download


open the file rep_inf_trooper_low1.msh and search for TGA.

In this file you will find that it calls:  rep_inf_trooper.tga
Notice that there are 15 characters before .tga

We need to rename our new TGA file something that is exactly 15 characters before the .tga.
so copy  rep_inf_ep3armoredpilot.tga
and rename it to:  rep_inf_ep3armo.tga

Use the hex editor to over write  rep_inf_trooper with rep_inf_ep3armo

Save the file.


Now, you may not want to over-write the low res mesh name of trooper.  So copy the edited file:
rep_inf_trooper_low1.msh and rename it to:
my_trooper_low1.msh


and call it out in the ODF file


[GameObjectClass]

ClassLabel          = "soldier"
GeometryName       = "rep_inf_ep3armoredpilot.msh"


[Properties]
FootWaterSplashEffect    = "watersplash_sm"
WaterSplashEffect    = "watersplash_md"
WakeWaterSplashEffect   = "watersplash_wade"

Label             = "Republic Trooper"
UnitType         = "trooper"
IconTexture       = "rep_trooper_icon"
MapTexture          = "troop_icon"
MapScale          = 1.4

GeometryName       = "rep_inf_ep3armoredpilot"
GeometryLowRes         = "my_trooper_low1.msh"

FirstPerson       = "REP\reptroop;rep_1st_trooper"
FirstPersonFOV         = "70"
ThirdPersonFOV         = "65"
AnimationName      = "all_inf_snowtrooper"



munge the file, and try it in game.  See if it works.  If you dont like the low res msh result,
try again with another file.

Quote from: Abraham Lincoln. on November 04, 1971, 12:34:40 PM
Don't believe everything you read on the internet

Quote from: Buckler on March 10, 2012, 06:24:54 PM
Snake has a tutorial, but I find it rather confusing.  His tutorial is at:
http://www.swbfgamers.com/index.php?topic=2177.0

As explained in the comments of the post, it is more complicated that it needs to be.

Eh, sorry. Doing it the complicated way makes it as SWBF2 as possible but yeah thanks for the simpler tut.
=AaTc= Forever

SALLY....

-Retired Modder

March 12, 2012, 01:03:17 PM #2 Last Edit: March 12, 2012, 01:41:59 PM by {TcF}Dr.Penguin
Thanks a lot!

March 28, 2012, 11:26:03 AM #3 Last Edit: March 28, 2012, 11:29:09 AM by Unit 33
Also you can simply rename the .msh files that you want to use to the name of the .msh you would like to replace. It requires no complex hex usage. And you can just dump the .tga's in there. I tried it and it works fine!

Quote from: Unit 33 on March 28, 2012, 11:26:03 AM
Also you can simply rename the .msh files that you want to use to the name of the .msh you would like to replace. It requires no complex hex usage. And you can just dump the .tga's in there. I tried it and it works fine!

Right, that works fine.  The TGA file is contained in the MSH though, so be careful if you need that TGA file for another purpose--then you need to hex edit.

Quote from: Abraham Lincoln. on November 04, 1971, 12:34:40 PM
Don't believe everything you read on the internet