Page 1 of 2

Making unplayable models playable/ How to's.

Posted: Wed May 06, 2015 11:43 am
by SGHenry93
Okay, so I am new to modding SWBF2. I have decided what I want my first mod to be. It's a seemly simple one but I have a feeling I picked a tough first mod. My goal is to remake or improve the existing Republic Gunship, visually for the most part. I'll worry about arming it after I get one working.
I have found a modded map with a model of a gunship I absolutely love, it looks great! Of course only problem is that its just a piece of scenery. How would I go about taking it from the map and making it playable for use on any map. I don't care about animations yet. I just want to get a better looking gunship flying and blasting droids. I would like to completely replace the default gunship with my modded one, if thats possible. I have a feeling I have a long and frustrating road ahead of me...... :)

Re: Making unplayable models playable/ How to's.

Posted: Wed May 06, 2015 2:14 pm
by jedimoose32
Depending on the model you're hoping to use, it may not actually be that difficult. You'll need to know how to modify an existing side (read through the FAQ/Everything You Need Thread Version 2.0 and/or watch https://www.youtube.com/watch?v=REt4uCIaP1M). Simply move the .msh and .tga files for the gunship model into the msh folder of your side and change the rep_fly_gunship_sc.odf so that it references the name of your custom .msh file instead of the default one. You will most likely have some problems with animations (as you're already aware) and all weapons will fire from the root of the model instead of their proper positions on the ship. I don't think any of that will crash the game, though.

Re: Making unplayable models playable/ How to's.

Posted: Wed May 06, 2015 4:45 pm
by SGHenry93
I figured I would have to do something along those lines. I have been watching his videos, very helpful. I haven't gotten to this one yet. Just so happens its the next one up, perfect. I do have another question. Would I be able to modify an existing map to use the same gunship instead of making a new map to use it on?



This is the gunship I will be using. A member here pointed me to it.

http://www.swbfgamers.com/index.php?act ... ;down=1164

Re: Making unplayable models playable/ How to's.

Posted: Wed May 06, 2015 5:16 pm
by Sandtrooper956
Well you will need the asset for the new Gunship. Not sure if you can just rip it from another map, you might need the map's source files.

Re: Making unplayable models playable/ How to's.

Posted: Wed May 06, 2015 9:19 pm
by SGHenry93
Nuts! I can create a world, edit the world, make it playable, spawn default vehicles but that is it. I tried doing what you said JediMoose, but it hasn't worked. The gunship I have has everything needed to make it run. I just don't quite know what I am doing. I've read through all the FAQ's and getting started stuff but it's hasn't help much. Ideas anyone?

:cpu:

Re: Making unplayable models playable/ How to's.

Posted: Wed May 06, 2015 9:22 pm
by Noobasaurus
List your steps that you tried. What went wrong when you tried to use it?

Re: Making unplayable models playable/ How to's.

Posted: Thu May 07, 2015 2:24 pm
by SGHenry93
Actually I just discovered why it's not working. It's for BF1. Nuts! I don't know if you can make that work or not. Anyone?

Re: Making unplayable models playable/ How to's.

Posted: Thu May 07, 2015 3:37 pm
by jedimoose32
When you say "it's" for BF1, do you mean the model is in a BF1 format? Or do you mean that you're trying to implement the new gunship into BF1?

What type of file is the gunship? .msh?

Re: Making unplayable models playable/ How to's.

Posted: Fri May 08, 2015 12:52 am
by hunpeter12
BF1 .msh files work fine with the second game. However, you should look around the .odf - there might be properties which don't work for BF2.

Re: Making unplayable models playable/ How to's.

Posted: Fri May 08, 2015 2:30 pm
by SGHenry93
The file has three folders in it. msh, munged, and odf. This is all the readme says

Readme
This is my, adopted for SWBF1, upgraded LAAT Gunship.
The model is almost stock, but with new parts.

Features:

1. New more realistic ball turrets added.
2. SWBF2 takeoff animation added.
3. New interrior model parts added
4. New chunks added.
5. New textures & render effects added.

Thanks to Pandemic and LucasArts for SWBF assets, and Ande for ZETools.

You can use it as you wish, but if you release it in your mod, you should credit me!

Credits: me, Sereja.
link to download: http://www.swbfgamers.com/index.php?act ... ;down=1164

Re: Making unplayable models playable/ How to's.

Posted: Fri May 08, 2015 3:07 pm
by AceMastermind
SGHenry93 wrote:...
Readme
This is my, adopted for SWBF1, ...
...
2. SWBF2 takeoff animation added.
...
I don't know what files are in that download, but I do know SWBF1 didn't require an *.anims file (list of munged animations) for animations to work, this is a SWBF2 thing. If no *.anims file exist then you will need to create one in order to use it in SWBF2.

Create a text file in the munged folder and name it whatever the zaabin/zafbin is named and give it a anims extension.
If your zaabin file is called rep_fly_gunship.zaabin, then your anims file should be called rep_fly_gunship.anims
Copy and paste this into your new anims file:

Code: Select all

ucft
{
	ANIM
	{
		"takeoff"
	}
}

Re: Making unplayable models playable/ How to's.

Posted: Fri May 08, 2015 3:30 pm
by SGHenry93
This is technically a side mod correct? So before I munge my new world I need to copy "rep" side folder from the assets folder into my SIDES folder for my new world ABC_data?

Re: Making unplayable models playable/ How to's.

Posted: Fri May 08, 2015 3:36 pm
by jedimoose32
Yes, and the common side folder as well. Also don't forget to change the ReadDataFile("SIDE\\rep.lvl ...") to ReadDataFile("dc:SIDE\\rep.lvl ...").

Re: Making unplayable models playable/ How to's.

Posted: Fri May 08, 2015 4:11 pm
by SGHenry93
jedimoose32 wrote:Yes, and the common side folder as well. Also don't forget to change the ReadDataFile("SIDE\\rep.lvl ...") to ReadDataFile("dc:SIDE\\rep.lvl ...").



Ah, I see, I forgot the common folder. Read Data File???

Re: Making unplayable models playable/ How to's.

Posted: Fri May 08, 2015 4:15 pm
by jedimoose32
Yes, in your world/era's .lua file (e.g.: ABCc_con.lua), located in data_ABC\Common\scripts\ABC. Scroll about 1/3 of the way down the file and you'll see it. You also need to make sure the gunship is listed just below that as well. So it should look something like this:

Code: Select all

	ReadDataFile("dc:SIDE\\rep.lvl",
							 "rep_inf_ep3_rifleman",
							 ...etc...
							 "rep_fly_gunship_sc")

Re: Making unplayable models playable/ How to's.

Posted: Fri May 08, 2015 4:25 pm
by SGHenry93
jedimoose32 wrote:Yes, in your world/era's .lua file (e.g.: ABCc_con.lua), located in data_ABC\Common\scripts\ABC. Scroll about 1/3 of the way down the file and you'll see it. You also need to make sure the gunship is listed just below that as well. So it should look something like this:

Code: Select all

	ReadDataFile("dc:SIDE\\rep.lvl",
							 "rep_inf_ep3_rifleman",
							 ...etc...
							 "rep_fly_gunship_sc")
Do I leave it as "rep_fly_gunship_sc") ? or do I change it to the name of my gunship I am trying to use? Secondly if I am renaming it to my gunship how will I know its actual name? Where will that be listed? Sorry for being so needy. Haha I am such a noob at modding. :funny2:

Re: Making unplayable models playable/ How to's.

Posted: Fri May 08, 2015 4:32 pm
by jedimoose32
The entry under ReadDataFile needs to be the name of the .odf file of your vehicle/unit. So if you are using a custom one with a different name, like rep_fly_super_duper_gunship.odf, then you will need to enter "rep_fly_super_duper_gunship" under ReadDataFile. Also make sure that "rep_fly_super_duper_gunship" is listed in rep.req (in the Sides\rep folder). There also needs to be a .req called rep_fly_super_duper_gunship inside Sides\rep\req, which needs to contain:

Code: Select all

ucft
{
	REQN
	{
		"class"
		"rep_fly_super_duper_gunship"
	}
}

I'm assuming by "actual name" you mean what will show up in-game. To change that you need to go to data_ABC and use the editlocalize tool. Go to entity -> rep, and right click rep. Then choose New Key. Name the key "fly_super_duper_gunship" (without quotes, and yes, leave "rep_" out, since you are already under the "rep" tree). Press enter. Make sure your new key is selected. On the right hand side there should be a couple of large blank text boxes. Use the left-most one to enter the name of the ship. Do the same with all other languages besides English (you don't have to but it is a good habit to get into). Then Save (can take 10 - 20 seconds to save, be patient). Close the Multi Language Tool, and go munge the world with Common checked.

Re: Making unplayable models playable/ How to's.

Posted: Fri May 08, 2015 4:39 pm
by SGHenry93
Okay, I believe I got it. The odf name is rep_fly_gunship2
But when I open the odf named the above it reads:

[GameObjectClass]
ClassLabel = "flyer"
GeometryName = "REP_LA_AT_Gunship2.msh"

But I assume that has only to do with the geo. The name I want to use in the read data file is the odf name. Correct?

Re: Making unplayable models playable/ How to's.

Posted: Fri May 08, 2015 4:42 pm
by jedimoose32
You're right about the GeometryName property - that just defines which .msh file will be used by the vehicle.
The name you want to use in ReadDataFile is technically the name of the vehicle's .req (as I mentioned in my previous post, you will need one of these for the vehicle to show up in-game). However the .req has the same name as the .odf so you can definitely think of it that way, too.

Re: Making unplayable models playable/ How to's.

Posted: Fri May 08, 2015 4:47 pm
by SGHenry93
jedimoose32 wrote:You're right about the GeometryName property - that just defines which .msh file will be used by the vehicle.
The name you want to use in ReadDataFile is technically the name of the vehicle's .req (as I mentioned in my previous post, you will need one of these for the vehicle to show up in-game). However the .req has the same name as the .odf so you can definitely think of it that way, too.
Okay, great. The install seems pretty easy. Put the msh, odf, and munged files in which folder? Common, or the sides common or rep folder? I was thinking sides rep folder. Correct?