Page 1 of 1

Adding a New unit in swbf2 [Solved]

Posted: Wed Feb 07, 2018 8:46 pm
by Lovemuckin
Hi everyone, I'm still very new to modding but trying to get the hang of it. I am trying to add asaj ventriss as a new unit. I have all the mesh files and combo files already. So I replaced the files in darthmauls odf file. Created a folder in common so I could munge my new file. Also changed the republic counquest lua. I get no errors on my log but when I open the level, as soon as you move your mouse the game crashes. Any ideas why its doing this? Help would be greatly appreciated! Big thanks in advance!

Re: Adding a New unit in swbf2

Posted: Thu Feb 08, 2018 1:34 am
by hunpeter12
Are you using the BF2_ModTools.exe to test the map? If not, you should do that, and check the BFront2.log file in the GameData folder of your game for any errors that say "Message Severity: 3" after the map crashed. (The BF2_Modtools.exe should be in the GameData folder as well.) Just to be sure, you can post the units section of your LUA, and maybe the odf of the unit, but the error log I mentioned is the easiest way to find out what the problem is.

Re: Adding a New unit in swbf2

Posted: Thu Feb 08, 2018 10:00 am
by Lovemuckin
Hey thx for reply. I accidentally edited one of the stock files. Had to delete everything and start over lol. But yes I am using that to test the map and my log file gave me warnings but no errors. I'll be sure to post lua next time... For some reason after I redownloaded the mod tools. When in the republic con lua. I moved the republic assests folder into my new map sides folder. When I add dc:side.. etc to the rep data file. The game just crashes. Even though I haven't edited anything in the rep file. Will send lua. Any idea why its doing that? Am I munging it wrong?

Hidden/Spoiler:
[code] SetMaxFlyHeight(30)
SetMaxPlayerFlyHeight (30)

SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",50) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",650) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",550) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",6000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",100) -- should be ~1x #combo

ReadDataFile("sound\\yav.lvl;yav1cw")
ReadDataFile("DC:SIDE\\rep.lvl",
"rep_inf_ep2_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("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",
"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},
}
}

SetHeroClass(CIS, "cis_hero_darthmaul")
SetHeroClass(REP, "rep_hero_anakin")[/code]

Re: Adding a New unit in swbf2

Posted: Thu Feb 08, 2018 7:06 pm
by hunpeter12
The Lua looks ok. Do you have the Common folder from assets/sides in your data_.../Sides folder? If not, put it there and munge with "Everything" selected under sides. Probably a good idea to do a manual clean first, just on case it's a munging error.

Re: Adding a New unit in swbf2

Posted: Fri Feb 09, 2018 2:10 am
by Lovemuckin
Got it fixed. I copied the wrong common folder. Did a clean just in case. Working good now. I'm sure ill have more problems and questions within the next couple days but for now. Thank you so much! :).