Adding a New unit in swbf2 [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

Recruit Womprat Killer
Posts: 6
Joined: Wed Feb 07, 2018 6:12 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set

Adding a New unit in swbf2 [Solved]

Postby Lovemuckin » Wed Feb 07, 2018 8:46 pm

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!

Command Sergeant Major
User avatar
Posts: 260
Joined: Mon Apr 18, 2011 2:53 pm
Location: The Milky Way/The Solar System/Earth/Hungary
Projects :: Underground City The Complex [WIP]
Games I'm Playing :: SWBF2

Re: Adding a New unit in swbf2

Postby hunpeter12 » Thu Feb 08, 2018 1:34 am

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.

Recruit Womprat Killer
Posts: 6
Joined: Wed Feb 07, 2018 6:12 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set

Re: Adding a New unit in swbf2

Postby Lovemuckin » Thu Feb 08, 2018 10:00 am

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: Select all
    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")

Command Sergeant Major
User avatar
Posts: 260
Joined: Mon Apr 18, 2011 2:53 pm
Location: The Milky Way/The Solar System/Earth/Hungary
Projects :: Underground City The Complex [WIP]
Games I'm Playing :: SWBF2

Re: Adding a New unit in swbf2

Postby hunpeter12 » Thu Feb 08, 2018 7:06 pm

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.

Recruit Womprat Killer
Posts: 6
Joined: Wed Feb 07, 2018 6:12 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set

Re: Adding a New unit in swbf2

Postby Lovemuckin » Fri Feb 09, 2018 2:10 am

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! :).

Return to SWBF2 Modding

Who is online

Users browsing this forum: No registered users and 2 guests