How do I add a custom units and heroes into my mod? [Solved]

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Sandtrooper956
Corporal
Corporal
Posts: 158
Joined: Thu Jul 31, 2014 3:58 pm
Projects :: Just some little things
Games I'm Playing :: SWBF2 and EAW
xbox live or psn: No gamertag set

How do I add a custom units and heroes into my mod? [Solved]

Post by Sandtrooper956 »

I recently got into modding and just got some help with some issues I had and now I would like some help adding this custom Darth Maul by Nedarb7 (and of course I would credit him if I were ever to release a mod with this Maul in it). The folder has the following things in it: animation, effects, mshs, and odfs(combo). I honestly have no idea how to do it and I tried reading this tutorial here: http://www.gametoast.com/viewtopic.php?f=27&t=12729 but kinda got confused. :? Thanks for anyone who can help me. Oh yeah, is there anyway I could add custom republic sides into my mod with just the rep.lvl and repshell.lvl?
Last edited by Sandtrooper956 on Wed Mar 18, 2015 7:29 pm, edited 1 time in total.
User avatar
commanderawesome
Field Commander
Field Commander
Posts: 971
Joined: Tue Aug 13, 2013 11:58 pm
Projects :: Skin Changer - Warfront - Other stuff
Games I'm Playing :: SWBF SWTOR KotOR EaW
xbox live or psn: AaTc_CmdrAwesome
Location: The Universe

Re: How do I add a custom units and heroes into my mod?

Post by commanderawesome »

Yes. And you don't even need Repshell.lvl. (That's only there for galactic conquest.)
jedimoose32
Field Commander
Field Commander
Posts: 938
Joined: Thu Jan 24, 2008 12:41 am
Projects :: Engineering Degree
Location: The Flatlands of Canada

Re: How do I add a custom units and heroes into my mod?

Post by jedimoose32 »

To get your Darth Maul in-game you need to just copy the folder 'effects' into your team folder, copy the contents of 'mshs' into the side's msh folder. Copy the contents of 'odfs(combo)' into your side's odf folder. Lastly copy the contents of 'animation/munged' into your side's munged folder (create one if you don't already have one). Then just make sure you make a .req for cis_hero_TCWdhmaul, and include a reference to cis_hero_TCWdhmaul in your side's .req file. Last thing you need to do is reference him in your Lua file.
User avatar
AnthonyBF2
Sith
Sith
Posts: 1255
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: PS2+PSP Overhaul

Re: How do I add a custom units and heroes into my mod?

Post by AnthonyBF2 »

Be sure to make your code say ReadDataFile("dc:SIDE\\

and not ReadDataFile("SIDE\\

And checkmark all sides when you munge.
Sandtrooper956
Corporal
Corporal
Posts: 158
Joined: Thu Jul 31, 2014 3:58 pm
Projects :: Just some little things
Games I'm Playing :: SWBF2 and EAW
xbox live or psn: No gamertag set

Re: How do I add a custom units and heroes into my mod?

Post by Sandtrooper956 »

Thanks jedimoose32 but I still have a good amount of questions. Where is the team folder? Sorry if that is a dumb one. And which munged folder do you mean? And everything after that is still a bit confusing. And do the contents of odf(combo) and msh go into the msh and odf folder inside data_ABC, sides, tur?

EDIT
So what i'm saying is I don't really understand where the contents of animation and effects go.
jedimoose32
Field Commander
Field Commander
Posts: 938
Joined: Thu Jan 24, 2008 12:41 am
Projects :: Engineering Degree
Location: The Flatlands of Canada

Re: How do I add a custom units and heroes into my mod?

Post by jedimoose32 »

Read the Jedi creation document that came with the tools. It explains side structure. If you want your unit to be on the CIS team then you'll need to copy the sides cis and common from the assets to your data_ABC/sides directory. The Darth Maul stuff goes in the cis one.
Sandtrooper956
Corporal
Corporal
Posts: 158
Joined: Thu Jul 31, 2014 3:58 pm
Projects :: Just some little things
Games I'm Playing :: SWBF2 and EAW
xbox live or psn: No gamertag set

Re: How do I add a custom units and heroes into my mod?

Post by Sandtrooper956 »

Do you know any programs I can use to open the document? Nothing I have is working....
jedimoose32
Field Commander
Field Commander
Posts: 938
Joined: Thu Jan 24, 2008 12:41 am
Projects :: Engineering Degree
Location: The Flatlands of Canada

Re: How do I add a custom units and heroes into my mod?

Post by jedimoose32 »

Microsoft Office, OpenOffice, probably some others... Just any word processor
Sandtrooper956
Corporal
Corporal
Posts: 158
Joined: Thu Jul 31, 2014 3:58 pm
Projects :: Just some little things
Games I'm Playing :: SWBF2 and EAW
xbox live or psn: No gamertag set

Re: How do I add a custom units and heroes into my mod?

Post by Sandtrooper956 »

Ok, honestly that tutorial in the documents is kinda hard to use when I have everything I need besides a req file..... I really just don't understand a lot of the stuff the tutorial talks about....

EDIT
It might be easier for me for now just to ask how to use custom sides from a rep.lvl in my map and how to change the default heroes. I really feel like I should be able to figure out to do that custom hero thing but I just keep getting confused with those tutorials.
jedimoose32
Field Commander
Field Commander
Posts: 938
Joined: Thu Jan 24, 2008 12:41 am
Projects :: Engineering Degree
Location: The Flatlands of Canada

Re: How do I add a custom units and heroes into my mod?

Post by jedimoose32 »

Okay so in each side folder (e.g. tur, cis, rep...) there can be the following folders:

odf - contains .odf files, these are unit and weapon and vehicle properties
msh - contains .msh, .tga files, these are models and their textures
req - contains .req files, which are basically lists of units and vehicles that will be included in the munged level
effects - contains effects...
munged - mostly contains animation files (.anims, .zaabin, .zafbin) that were premunged but still need to be included with the side
Sandtrooper956
Corporal
Corporal
Posts: 158
Joined: Thu Jul 31, 2014 3:58 pm
Projects :: Just some little things
Games I'm Playing :: SWBF2 and EAW
xbox live or psn: No gamertag set

Re: How do I add a custom units and heroes into my mod?

Post by Sandtrooper956 »

Yeah, I got that. I just don't get really what I need to do with the req files, how to open them, and what to put into them.

EDIT
How about I just tell you what I have so far and we can see from there. In data_ABC, sides I have the three things. 1. The tur folder that is there by default. 2. The common folder I pasted over from the main mod tools folder, assets, sides. And 3. The JDI folder that they used in the document tutorial and that has effects, msh, munged, and odf filled with the stuff from the Maul download. I also have an empty req folder. I hope that helps you understand where I am :D
User avatar
AnthonyBF2
Sith
Sith
Posts: 1255
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: PS2+PSP Overhaul

Re: How do I add a custom units and heroes into my mod?

Post by AnthonyBF2 »

If you req folder is empty, you need to make one. It's not hard.

if your character odf name is jdi_tat_luke(idk the name this is example) your req needs to be
jdi_tat_luke.req

Open notepad and put this data

ucft
{
REQN
{
"class"
"jdi_tat_luke"
}
}

Then "Save as..." and choose "All files" and name it jdi_tat_luke.req
If you don't choose "All files types" it will be saved as jdi_tat_luke.req.txt (basic text file which I'm sure is useless :P )
Save it, then move it inside jdi/req folders.
Then the jdi.req needs to have a new line that says

"jdi_tat_luke"

In your map code use
ReadDataFile("dc:SIDE\\jdi.lvl", "jdi_tat_luke")
Then find SetHeroClass and change the character name to the new one.

I'm not sure this last step is required but I have always done it for custom sides.
In data_mod\build\sides you see things like cis,rep,imp... etc..
Copy one of those to your desktop and rename it JDI
Then inside JDI\munge.bat , edit this batch file so it says JDI and not something like CIS.
Save changes to the batch file in JDI then move JDI folder to data_mod\build\sides

Now if all this is done right your dude will be in the game, but his name will look like
0x00000 or [NULL] but we'll help you with that when time comes.
Sandtrooper956
Corporal
Corporal
Posts: 158
Joined: Thu Jul 31, 2014 3:58 pm
Projects :: Just some little things
Games I'm Playing :: SWBF2 and EAW
xbox live or psn: No gamertag set

Re: How do I add a custom units and heroes into my mod?

Post by Sandtrooper956 »

Okay, its a start. When I go to munge, I see JDI, and I selected that. He still didn't appear in game though D: It might be that data_ABC, _BUILD, sides, and went into the REP folder and to rename it to JDI that there was just munge.bat the munge.bat wasnt names cis or anything. Am I missing something here?

And it seems like it created a folder called SIDE in addon, ABC, data, _LVL_PC but there is nothing in the folder called side. The JDI folder in
data_ABC, _BUILD, sides has lots of TCWdhmaul stuff in it. maybe im using the wrong name for the him..
User avatar
AnthonyBF2
Sith
Sith
Posts: 1255
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: PS2+PSP Overhaul

Re: How do I add a custom units and heroes into my mod?

Post by AnthonyBF2 »

I mean edit the batch file, not rename it.
And don't rename a side folder inside build, copy one and rename it. If REP is gone, you might not be able to make a rep.lvl

Anyway about the batch file, right click on it and select "Edit" , and choose yes to allow if Windows wants to complain about it.

Find the 3 letter side id and make it JDI.

Edit: I always munge "everything" for sides. JDI light saber might look to class parent odf file for values and stuff - if common not munge , game crashes. (common = class parent for alot of guns and weapons values)
Sandtrooper956
Corporal
Corporal
Posts: 158
Joined: Thu Jul 31, 2014 3:58 pm
Projects :: Just some little things
Games I'm Playing :: SWBF2 and EAW
xbox live or psn: No gamertag set

Re: How do I add a custom units and heroes into my mod?

Post by Sandtrooper956 »

Yeah about the renaming thing I know. There is even a TCWdhmaul.lvl in the side folder and it still sin't working....
User avatar
AnthonyBF2
Sith
Sith
Posts: 1255
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: PS2+PSP Overhaul

Re: How do I add a custom units and heroes into my mod?

Post by AnthonyBF2 »

I'm a bit lost at this point, idk if you're adding demo luke or the new assets for maul.
Show me what asset you're using and I'll test it on a mod.
Sandtrooper956
Corporal
Corporal
Posts: 158
Joined: Thu Jul 31, 2014 3:58 pm
Projects :: Just some little things
Games I'm Playing :: SWBF2 and EAW
xbox live or psn: No gamertag set

Re: How do I add a custom units and heroes into my mod?

Post by Sandtrooper956 »

You mean the link? Here it is: https://www.dropbox.com/s/exq9p13nsn0f4 ... 8v2%29.zip If it works for you and i'm doing something wrong we might just have to do this step by step or something. Idk if this matters or not, but my map is an edited Geonosis so there are two world folder in data_ABC, worlds, ABC. They are world one and world 2. I could just try doing this but with a normal new map. And I wasn't adding Luke anywhere XD
User avatar
AnthonyBF2
Sith
Sith
Posts: 1255
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: PS2+PSP Overhaul

Re: How do I add a custom units and heroes into my mod?

Post by AnthonyBF2 »

Drop box requires a bloody sign up, I'll try it later on I'm doing something right now.
Sandtrooper956
Corporal
Corporal
Posts: 158
Joined: Thu Jul 31, 2014 3:58 pm
Projects :: Just some little things
Games I'm Playing :: SWBF2 and EAW
xbox live or psn: No gamertag set

Re: How do I add a custom units and heroes into my mod?

Post by Sandtrooper956 »

No it dosen't, just click the button that says later or something at the bottom of the pop up when it comes up.
User avatar
AnthonyBF2
Sith
Sith
Posts: 1255
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: PS2+PSP Overhaul

Re: How do I add a custom units and heroes into my mod?

Post by AnthonyBF2 »

I got it now, screenshot of working mod http://prntscr.com/6hr5kq

In game Names/Labels not made yet so it appeared like 0x000 but I did get it working perfectly.

Now, bear with me...
Downloaded Nedarb's Maul assets, then this was my process:

In data_mod\sides I made a new folder called "tcw" (and also copied common)
Inside tcw folder, I made 5 more folders.
req,odf,msh,effects,munged...

In the download, copy over odf files, msh files, effects, and put them in accordingly in data_mod\sides\tcw
In Nedarb's download he had pre-made animations, they look like 3 files (zaaffbins, etc) put those in
data_mod\sides\tcw\munged

Create a req file using the post I made earlier, name it tcw.req and the code inside of it follows as (or what ever name is in the character odf file)

ucft
{
REQN
{
"class"
"cis_hero_tcwdmaul"
}
}

tcw.req (remember save as .req not .txt) this file goes in data_mod\sides\tcw

Now in the folder data_mod\sides\tcw\req you will need to make a character-specific req for new Maul.
It's quick if you go to assets\sides and copy a req file (like jawa or gamorrean) and rename it to match the odf name, and also open that jawa or gammorean req in notepad and also change the data inside of it so it reads tcw maul.

Almost done, in build\sides I copied ALL and renamed it TCW, inside TCW, edit munge.bat to munge "TCW" and not "ALL"

Then in map code used ReadDataFile("dc:SIDE\\tcw.lvl", "tcw_what_ever_name_Was")
Then put the same character string for SetHeroClass.

Munged with "everything" for sides.
Made the mod and played as new maul (and I must say good job Nedarb on it) spent a good 10 mins wasting clones on empty platform level.

I think where u got thrown off was his animations files, those are if you wanna change his animations. Not needed if you just wanna munge without changes.
Post Reply