SWBF CUSTOM

The best way to custom your games.
 
HomeFAQSearchMemberlistUsergroupsRegisterLog in

Share | 
 

 [solved] Add a custom class (for swbf 2)

View previous topic View next topic Go down 
AuthorMessage
Cdt Fox
Clone Trooper Lieutenant Major
Clone Trooper Lieutenant Major
avatar

Messages : 179
Registration Date : 2014-11-30
Age : 17
Location : France

PostSubject: [solved] Add a custom class (for swbf 2)   8/5/2015, 3:27 pm

Hi,

I want to know how to add a custom class in addition of the original ones Smile Smile

Thanks


Last edited by Cdt Fox on 11/30/2015, 11:22 am; edited 2 times in total
Back to top Go down
View user profile
razac920
PFC
PFC
avatar

Messages : 22
Registration Date : 2013-08-05
Age : 24
Location : Philadelphia, Pennsylvania, USA

PostSubject: Re: [solved] Add a custom class (for swbf 2)   8/8/2015, 2:05 am

Use AddUnitClass, see the Hero Assault on Mos Eisley script for example usage.
Back to top Go down
View user profile
Zoyarox Craszen
Sergeant
Sergeant
avatar

Messages : 41
Registration Date : 2015-07-14

PostSubject: Re: [solved] Add a custom class (for swbf 2)   8/8/2015, 11:01 am

razac920 wrote:
Use AddUnitClass, see the Hero Assault on Mos Eisley script for example usage.

I tried two different variants to get another officer to work. I tried AddUnitClass and changing the troop so it asks for the second commander as marine.
But neither works for me, I added the class name in the req file, setup_teams, the SetupTeams section and ReadDataFile section of the lua, but it doesn't appear in the game at all.

The troop is (so far) just the default officer with different weapons, health and shield... The normal officer works.

Here is the odf:
Spoiler:
 
Back to top Go down
View user profile
razac920
PFC
PFC
avatar

Messages : 22
Registration Date : 2013-08-05
Age : 24
Location : Philadelphia, Pennsylvania, USA

PostSubject: Re: [solved] Add a custom class (for swbf 2)   8/8/2015, 12:22 pm

Okay, here's how to get an extra class working:

1. Make the unit's ODF (and all weapon ODF's, if new), and put in the odf folder
2. Make the unit's REQ, and put it in the req folder
3. Add the unit's class name to the SIDES .req file
4. Copy, paste, and rename the ALL folder in _BUILD/Sides to be [your side 3 letter name] (so that the side actually munges
5. Leave setup_teams alone, leave the setupteams section alone
6. AFTER you see the ReadDataFile for the IMP team, copy and paste a read data file for your unit, and be sure it looks like ReadDataFile("dc:SIDE\\[side 3 letter name].lvl","your custom unit classname")
7. After the SetupTeams section, add a line AddUnitClass([team number, or IMP],"your custom unit classname",[min number in battle],[max number in battle])
Back to top Go down
View user profile
Zoyarox Craszen
Sergeant
Sergeant
avatar

Messages : 41
Registration Date : 2015-07-14

PostSubject: Re: [solved] Add a custom class (for swbf 2)   8/8/2015, 1:32 pm

1. I have that in \Sides\imp\odf now, is that correct?
I followed all the steps, but I don't see the use of another folder at _BUILD\Sides ? I named the folder "fmo" and there is everything in, that is in _BUILD\Sides\ALL...
The other steps I followed should be correct Smile
Back to top Go down
View user profile
razac920
PFC
PFC
avatar

Messages : 22
Registration Date : 2013-08-05
Age : 24
Location : Philadelphia, Pennsylvania, USA

PostSubject: Re: [solved] Add a custom class (for swbf 2)   8/8/2015, 2:10 pm

No, that is not okay. You need to put your unit's ODF in the sides folder you are actually using (in this case, that seems to be fmo).
Back to top Go down
View user profile
Zoyarox Craszen
Sergeant
Sergeant
avatar

Messages : 41
Registration Date : 2015-07-14

PostSubject: Re: [solved] Add a custom class (for swbf 2)   8/8/2015, 2:16 pm

So I just created the folder "fmo" in XXX\Sides and put basically every file in the imp folder in tehre, so everything should be there. Munged everything, but I still don't have the troop ingame Neutral
Back to top Go down
View user profile
razac920
PFC
PFC
avatar

Messages : 22
Registration Date : 2013-08-05
Age : 24
Location : Philadelphia, Pennsylvania, USA

PostSubject: Re: [solved] Add a custom class (for swbf 2)   8/8/2015, 2:21 pm

Why are you copying so many files over??? Keep fmo empty except for fmo.req, [unit].odf in odf, and [unit.req] in req. Do NOT use the imp.req, as it does not list your unit, make your own req files.
Back to top Go down
View user profile
razac920
PFC
PFC
avatar

Messages : 22
Registration Date : 2013-08-05
Age : 24
Location : Philadelphia, Pennsylvania, USA

PostSubject: Re: [solved] Add a custom class (for swbf 2)   8/8/2015, 2:23 pm

Please read BF2_ModTools/documentation/BF2 Jedi Creation.doc
It tells you exactly step by step what you need to do to make a new unit class, with pictures and everything.
Back to top Go down
View user profile
Zoyarox Craszen
Sergeant
Sergeant
avatar

Messages : 41
Registration Date : 2015-07-14

PostSubject: Re: [solved] Add a custom class (for swbf 2)   8/8/2015, 2:28 pm

I really appreciate all your help, razac!
My troop is still not in the game, so yeah, I will just go and read that again and begin from the start...

Thanks a lot anyways Smile
Back to top Go down
View user profile
Zoyarox Craszen
Sergeant
Sergeant
avatar

Messages : 41
Registration Date : 2015-07-14

PostSubject: Re: [solved] Add a custom class (for swbf 2)   8/8/2015, 3:25 pm

I just redid everything and followed the instructions again.
The map didn't even start, but I fixed that. Now everythign works marvelous except that my troop is still not in the game...


I hope someone can help me, because I'm so stuck. It's probably something simple and I'm just too exhausted to see it...
Here is everything in the \Sides\FMO folder:
Spoiler:
 
Back to top Go down
View user profile
Cdt Fox
Clone Trooper Lieutenant Major
Clone Trooper Lieutenant Major
avatar

Messages : 179
Registration Date : 2014-11-30
Age : 17
Location : France

PostSubject: Re: [solved] Add a custom class (for swbf 2)   11/19/2015, 7:53 pm

So I have made a req file and ODFs for my new unit but I have some problems with my lua....I think...
I don't know if I should start a new "ReadDataFile" (I have made the "addunitclass" line too), etc....because I'm working with the republic stock side. (My 3 letters are "rep")
So I think I didn't place the lines at the right place.....

Here my lua:
Spoiler:
 
And my errors:
Spoiler:
 

Help me
Back to top Go down
View user profile
Icemember
Dark Trooper Phase 1 Class
Dark Trooper Phase 1 Class
avatar

Messages : 1233
Registration Date : 2010-07-29
Age : 36
Location : Bespin: Cloud City

PostSubject: Re: [solved] Add a custom class (for swbf 2)   11/20/2015, 1:50 am

Must look like this because you are adding a new custom class.

ReadDataFile("dc:SIDE\\rep.lvl",                
               "rep_inf_ep3_rifleman",
               "rep_inf_ep3_rocketeer",
               "rep_inf_ep3_engineer",
               "rep_inf_ep3_sniper",
               "rep_inf_ep3_officer",
               "rep_inf_ep3_jettrooper",
               "rep_hero_obiwan",
               "rep_walk_oneman_atst",
               "rep_inf_ep3_cody")

As for the 2nd part, he wont be able to play on any stock maps unless you edit a stock map and munge.
If you want him to appear in a edited stock map, add one of these lines to the line up

marine  = { "rep_inf_ep3_cody",1, 4},
or
pilot  = { "rep_inf_ep3_cody",1, 4},

SetupTeams{
       rep = {
   team = REP,
   units = 32,
   reinforcements = 150,
   soldier  = { "rep_inf_ep3_rifleman", 9, 25},
   assault  = { "rep_inf_ep3_rocketeer",1, 4},
   engineer = { "rep_inf_ep3_engineer",1, 4},
   sniper   = { "rep_inf_ep3_sniper",1, 4},
   officer  = { "rep_inf_ep3_officer",1, 4},
   special  = { "rep_inf_ep3_jettrooper",1, 4},
           marine  = { "rep_inf_ep3_cody",1, 4},
           
       },

Or simply replace one of the units

SetupTeams{
       rep = {
   team = REP,
   units = 32,
   reinforcements = 150,
   soldier  = { "rep_inf_ep3_rifleman", 9, 25},
   assault  = { "rep_inf_ep3_rocketeer",1, 4},
   engineer = { "rep_inf_ep3_engineer",1, 4},
   sniper   = { "rep_inf_ep3_sniper",1, 4},
   officer  = { "rep_inf_ep3_cody",1, 4},
   special  = { "rep_inf_ep3_jettrooper",1, 4},
Back to top Go down
View user profile
Cdt Fox
Clone Trooper Lieutenant Major
Clone Trooper Lieutenant Major
avatar

Messages : 179
Registration Date : 2014-11-30
Age : 17
Location : France

PostSubject: Re: [solved] Add a custom class (for swbf 2)   11/20/2015, 3:57 pm

I don't know what happening but it still dosen't work....I have the same problems Crying or Very sad
Can you show me how it looks like in the lua? Please
Thanks for your help Cool

PS: I already tried the 2nd method and it works fine: (but I don't want to replace pre-existent class...)
Icemember wrote:
 
Or simply replace one of the units

SetupTeams{
       rep = {
   team = REP,
   units = 32,
   reinforcements = 150,
   soldier  = { "rep_inf_ep3_rifleman", 9, 25},
   assault  = { "rep_inf_ep3_rocketeer",1, 4},
   engineer = { "rep_inf_ep3_engineer",1, 4},
   sniper   = { "rep_inf_ep3_sniper",1, 4},
   officer  = { "rep_inf_ep3_cody",1, 4},
   special  = { "rep_inf_ep3_jettrooper",1, 4},
Back to top Go down
View user profile
Icemember
Dark Trooper Phase 1 Class
Dark Trooper Phase 1 Class
avatar

Messages : 1233
Registration Date : 2010-07-29
Age : 36
Location : Bespin: Cloud City

PostSubject: Re: [solved] Add a custom class (for swbf 2)   11/20/2015, 7:01 pm

Post your whole lua file
Back to top Go down
View user profile
Cdt Fox
Clone Trooper Lieutenant Major
Clone Trooper Lieutenant Major
avatar

Messages : 179
Registration Date : 2014-11-30
Age : 17
Location : France

PostSubject: Re: [solved] Add a custom class (for swbf 2)   11/21/2015, 4:20 pm

So I think it will be easier if I give you my lua via a DL link in order to correct my mistakes....if you want..(what are the correct codes I have to put?)
it's the first lua I tried:

http://www.mediafire.com/download/ek8858bqjt3were/JUKc_con.rar


Thanks a lot for your help! Smile and big sory for bothering you Embarassed

So I fix the problem and I'm gonna to tell you how to make it working:

Make the odfs, req, mshs, and tgas files of your unit and put them in "3 leters side name"/msh,odf,req/
Open your LUA, in the exemple it will be for the republic so it will be JUKc_con, and add this lines:
Spoiler:
 
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: [solved] Add a custom class (for swbf 2)   

Back to top Go down
 

[solved] Add a custom class (for swbf 2)

View previous topic View next topic Back to top 
Page 1 of 1

 Similar topics

-
» Forza 3 F-Class Tourney - Track List & Results
» Dragon Rider a Stikfas Custom
» S7 Forza 3 F-Class Tourney
» Thumper - a stikfas custom
» S7 Forza 3 F-Class Tourney - Season 3

Permissions in this forum:You cannot reply to topics in this forum
SWBF CUSTOM :: Star Wars Battlefront Games :: Modding-