SWBF CUSTOM The best way to custom your games. |
|
| [solved] Add a custom class (for swbf 2) | |
| Author | Message |
---|
Cdt Fox Clone Trooper Lieutenant Major
Messages : 179 Registration Date : 2014-11-30 Age : 25 Location : France
| Subject: [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 Thanks
Last edited by Cdt Fox on 11/30/2015, 11:22 am; edited 2 times in total |
| | | razac920 PFC
Messages : 22 Registration Date : 2013-08-05 Age : 32 Location : Philadelphia, Pennsylvania, USA
| Subject: 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. |
| | | Zoyarox Craszen Sergeant
Messages : 41 Registration Date : 2015-07-14
| Subject: 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:
[GameObjectClass] ClassParent = "imp_inf_default_officer"
[Properties] PointsToUnlock = 8
MaxShield = 100 AddShield = 15
AnimationName = "impofficer"
MaxHealth = 700.0
MaxSpeed = 6.8 // base forward speed MaxStrafeSpeed = 4.8 // base right/left speed
ScanningRange = 30.0 TransmitRange = 300.0
WEAPONSECTION = 1 WeaponName = "imp_weap_inf_sniper_rifle"" WeaponAmmo = 3
WEAPONSECTION = 2 WeaponName = "imp_weap_inf_rifle" WeaponAmmo = 4
WEAPONSECTION = 3 WeaponName = "imp_weap_inf_shotgun" WeaponAmmo = 3
WEAPONSECTION = 4 WeaponName = "imp_weap_inf_thermaldetonator" WeaponAmmo = 3 WeaponChannel = 1
VOUnitType = 43
GeometryName = "imp_inf_atatcommander" GeometryLowRes = "imp_inf_atatcommander_low1" //FirstPerson = "IMP\impoff;imp_1st_officer" FirstPerson = "IMP\imppilot;imp_1st_pilot"
|
| | | razac920 PFC
Messages : 22 Registration Date : 2013-08-05 Age : 32 Location : Philadelphia, Pennsylvania, USA
| Subject: 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]) |
| | | Zoyarox Craszen Sergeant
Messages : 41 Registration Date : 2015-07-14
| Subject: 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 |
| | | razac920 PFC
Messages : 22 Registration Date : 2013-08-05 Age : 32 Location : Philadelphia, Pennsylvania, USA
| Subject: 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). |
| | | Zoyarox Craszen Sergeant
Messages : 41 Registration Date : 2015-07-14
| Subject: 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 |
| | | razac920 PFC
Messages : 22 Registration Date : 2013-08-05 Age : 32 Location : Philadelphia, Pennsylvania, USA
| Subject: 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. |
| | | razac920 PFC
Messages : 22 Registration Date : 2013-08-05 Age : 32 Location : Philadelphia, Pennsylvania, USA
| Subject: 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. |
| | | Zoyarox Craszen Sergeant
Messages : 41 Registration Date : 2015-07-14
| Subject: 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 |
| | | Zoyarox Craszen Sergeant
Messages : 41 Registration Date : 2015-07-14
| Subject: 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:
fmo.req: - Spoiler:
ucft { REQN { "lvl" "imp_inf_officer_female"
} }
\odf\imp_inf_officer_female.odf - Spoiler:
[GameObjectClass] ClassParent = "imp_inf_default_officer"
[Properties] PointsToUnlock = 8
MaxShield = 100 AddShield = 15
AnimationName = "impofficer"
MaxHealth = 700.0
MaxSpeed = 6.8 // base forward speed MaxStrafeSpeed = 4.8 // base right/left speed
ScanningRange = 30.0 TransmitRange = 300.0
WEAPONSECTION = 1 WeaponName = "imp_weap_inf_sniper_rifle"" WeaponAmmo = 3
WEAPONSECTION = 2 WeaponName = "imp_weap_inf_rifle" WeaponAmmo = 4
WEAPONSECTION = 3 WeaponName = "imp_weap_inf_shotgun" WeaponAmmo = 3
WEAPONSECTION = 4 WeaponName = "imp_weap_inf_thermaldetonator" WeaponAmmo = 3 WeaponChannel = 1
VOUnitType = 43
GeometryName = "imp_inf_atatcommander" GeometryLowRes = "imp_inf_atatcommander_low1" //FirstPerson = "IMP\impoff;imp_1st_officer" FirstPerson = "IMP\imppilot;imp_1st_pilot"
\req\imp_inf_officer_female.req - Spoiler:
ucft { REQN { "class" "imp_inf_officer_female" } }
|
| | | Cdt Fox Clone Trooper Lieutenant Major
Messages : 179 Registration Date : 2014-11-30 Age : 25 Location : France
| Subject: 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 |
| | | Icemember Dark Trooper Phase 1 Class
Messages : 1241 Registration Date : 2010-07-29 Age : 44 Location : Bespin: Cloud City
| Subject: 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}, |
| | | Cdt Fox Clone Trooper Lieutenant Major
Messages : 179 Registration Date : 2014-11-30 Age : 25 Location : France
| Subject: 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 Can you show me how it looks like in the lua? Please Thanks for your help 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}, |
| | | Icemember Dark Trooper Phase 1 Class
Messages : 1241 Registration Date : 2010-07-29 Age : 44 Location : Bespin: Cloud City
| Subject: Re: [solved] Add a custom class (for swbf 2) 11/20/2015, 7:01 pm | |
| |
| | | Cdt Fox Clone Trooper Lieutenant Major
Messages : 179 Registration Date : 2014-11-30 Age : 25 Location : France
| Subject: 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.rarThanks a lot for your help! and big sory for bothering you 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:
Here is my lua with working custom sides. My 2 new soldiers are: qwe_inf_ep3_rifleman
and
rep_inf_ahsoka (model from the clone wars)
I put them before the hero lines and it worked.Check this part of my lua and do the same: ------------------------------------------------------------------------------------------------------
ReadDataFile("sound\\yav.lvl;yav1cw") ReadDataFile("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_hover_fightertank", "rep_hero_anakin", "rep_hover_barcspeeder")
ReadDataFile("DC:SIDE\\qwe.lvl", "qwe_inf_ahsoka", "qwe_inf_ep3_rifleman")
ReadDataFile("SIDE\\cis.lvl", "cis_inf_rifleman", "cis_inf_rocketeer", "cis_inf_engineer", "cis_inf_sniper", "cis_inf_officer", "cis_inf_droideka", "cis_hero_darthmaul", "cis_hover_aat") ReadDataFile("SIDE\\tur.lvl", "tur_bldg_laser", "qwe_bldg_moncal_roundturret", "tur_bldg_tower") SetupTeams{ rep = { team = REP, units = 20, 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}, }, cis = { team = CIS, units = 20, reinforcements = 150, soldier = { "cis_inf_rifleman",9, 25}, assault = { "cis_inf_rocketeer",1, 4}, engineer = { "cis_inf_engineer",1, 4}, sniper = { "cis_inf_sniper",1, 4}, officer = {"cis_inf_officer",1, 4}, special = { "cis_inf_droideka",1, 4}, } } AddUnitClass(REP,"qwe_inf_ep3_rifleman",1,2) AddUnitClass(REP,"qwe_inf_ahsoka",1,2)
SetHeroClass(CIS, "cis_hero_darthmaul") SetHeroClass(REP, "rep_hero_anakin")
|
| | | Sponsored content
| Subject: Re: [solved] Add a custom class (for swbf 2) | |
| |
| | | | [solved] Add a custom class (for swbf 2) | |
|
Similar topics | |
|
| Permissions in this forum: | You cannot reply to topics in this forum
| |
| |
| |
|