Adding More Classes

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

Post Reply
nmycon

Adding More Classes

Post by nmycon »

I am trying to add more than 6 classes to my mod, 3 more for the rebels and 2 more for the Empire

i insert this in the DS4g_con:
Hidden/Spoiler:
ReadDataFile("SIDE\\all.lvl",
"all_inf_rifleman_fleet",
"all_inf_rocketeer_fleet",
"all_inf_sniper_fleet",
"all_inf_officer",
"all_hero_chewbacca",
"all_hero_hansolo_tat",
"all_hero_leia")
ReadDataFile("dc:SIDE\\all.lvl",
"all_inf_engineer_fleet")
ReadDataFile("dc:SIDE\\JDI.lvl",
"jdi_demojedi")
ReadDataFile("dc:SIDE\\rep.lvl",
"rep_hero_obiwan")
ReadDataFile("SIDE\\imp.lvl",
"imp_inf_rifleman",
"imp_inf_rocketeer",
"imp_inf_engineer",
"imp_inf_sniper",
"imp_inf_officer",
"imp_inf_dark_trooper",
"imp_hero_darthvader")

ReadDataFile("SIDE\\imp.lvl",
"imp_hero_emperor")

SetupTeams{

all={
team = ALL,
units = 32,
reinforcements = 150,
soldier = {"all_inf_rifleman_fleet",7, 25},
assault = {"all_inf_rocketeer_fleet",1, 4},
engineer = {"all_inf_engineer_fleet",1, 4},
sniper = {"all_inf_sniper_fleet",1, 4},
officer = {"all_hero_hansolo_tat",1, 2},
special = {"all_hero_chewbacca",1, 2},

},

AddUnitClass(ALL,"all_hero_leia", 1,2)
AddUnitClass(ALL,"rep_hero_obiwan", 1,2)
AddUnitClass(ALL,"jdi_demojedi", 1,2)

imp={
team = IMP,
units = 32,
reinforcements = 150,
soldier = {"imp_inf_rifleman",7, 25},
assault = {"imp_inf_rocketeer",1, 4},
engineer = {"imp_inf_engineer",1, 4},
sniper = {"imp_inf_sniper",1, 4},
officer = {"imp_inf_officer",1, 4},
special = {"imp_inf_dark_trooper",1, 4},


}
}

AddUnitClass(ALL,"imp_hero_darthvader", 1,2)
AddUnitClass(ALL,"imp_hero_emperor", 1,2)
however i get these errors after completing a munge
Hidden/Spoiler:
C:\BF2_ModTools\ToolsFL\Bin\luac.exe: ..\..\common\scripts\DS4\DS4g_con.lua:186: unfinished string near `"all_hero_hansolo_tat,'
ERROR[scriptmunge scripts\DS4\DS4g_con.lua]:Could not read input file.ERROR[scriptmunge scripts\DS4\DS4g_con.lua]:Could not read input file. [continuing]
2 Errors 0 Warnings

ERROR[levelpack mission\DS4g_con.req]:Expecting bracket, but none was found.
File : munged\pc\ds4g_con.script.req(1)...

ucft <--
ERROR[levelpack mission\DS4g_con.req]:Expecting bracket, but none was found.
File : munged\pc\ds4g_con.script.req(1)...

ucft <--

2 Errors 0 Warnings
can anyone help?
Grev
Hoth Battle Chief
Hoth Battle Chief
Posts: 3132
Joined: Sun Dec 09, 2007 11:45 pm
Projects :: No Mod project currently.
Games I'm Playing :: Minecraft
Location: A Certain Box Canyon

Re: Adding More Classes

Post by Grev »

That first one may be because you have two ALL's in the part before team setup. You just need one ALL.
nmycon

Re: Adding More Classes

Post by nmycon »

but one of the ALLs is a custom side, also by default, the IMP also has 2 (one for emperor, one for soldiers) and that doesn't cause any problems
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Adding More Classes

Post by Teancum »

Change this
Hidden/Spoiler:
SetupTeams{

all={
team = ALL,
units = 32,
reinforcements = 150,
soldier = {"all_inf_rifleman_fleet",7, 25},
assault = {"all_inf_rocketeer_fleet",1, 4},
engineer = {"all_inf_engineer_fleet",1, 4},
sniper = {"all_inf_sniper_fleet",1, 4},
officer = {"all_hero_hansolo_tat",1, 2},
special = {"all_hero_chewbacca",1, 2},

},

AddUnitClass(ALL,"all_hero_leia", 1,2)
AddUnitClass(ALL,"rep_hero_obiwan", 1,2)
AddUnitClass(ALL,"jdi_demojedi", 1,2)

imp={
team = IMP,
units = 32,
reinforcements = 150,
soldier = {"imp_inf_rifleman",7, 25},
assault = {"imp_inf_rocketeer",1, 4},
engineer = {"imp_inf_engineer",1, 4},
sniper = {"imp_inf_sniper",1, 4},
officer = {"imp_inf_officer",1, 4},
special = {"imp_inf_dark_trooper",1, 4},


}
}

AddUnitClass(ALL,"imp_hero_darthvader", 1,2)
AddUnitClass(ALL,"imp_hero_emperor", 1,2)
To this
Hidden/Spoiler:
SetupTeams{
all={
team = ALL,
units = 32,
reinforcements = 150,
soldier = {"all_inf_rifleman_fleet",7, 25},
assault = {"all_inf_rocketeer_fleet",1, 4},
engineer = {"all_inf_engineer_fleet",1, 4},
sniper = {"all_inf_sniper_fleet",1, 4},
officer = {"all_hero_hansolo_tat",1, 2},
special = {"all_hero_chewbacca",1, 2},

},
imp={
team = IMP,
units = 32,
reinforcements = 150,
soldier = {"imp_inf_rifleman",7, 25},
assault = {"imp_inf_rocketeer",1, 4},
engineer = {"imp_inf_engineer",1, 4},
sniper = {"imp_inf_sniper",1, 4},
officer = {"imp_inf_officer",1, 4},
special = {"imp_inf_dark_trooper",1, 4},
}
}

AddUnitClass(ALL,"all_hero_leia", 1,2)
AddUnitClass(ALL,"rep_hero_obiwan", 1,2)
AddUnitClass(ALL,"jdi_demojedi", 1,2)
AddUnitClass(IMP,"imp_hero_darthvader", 1,2)
AddUnitClass(IMP,"imp_hero_emperor", 1,2)
nmycon

Re: Adding More Classes

Post by nmycon »

i did this and now when i load the map it crashes

all i did was change that one thing...

will try a manual clean and then report


EDIT
wouldnt work, i tried using "extra1, 2, 3..." after the "special" class that was mentioned in another tut but that also didnt work


EDIT2
uhh... something is terribly wrong!

finally i got ben, leia and vader in, but vader cant use primary attack or block and ben cant attack and if you press attack wneh hes running his animations get all screwy

leia is fine and the game crashes when you try to play as ALL hero Tatooine Luke

EDIT3

I found why the animations are screwed up, the game is having trouble transitioning animations, i get these errors in my log:
Hidden/Spoiler:
Message Severity: 2
.\Source\Combo.cpp(2290)
Combo[a11a0085]::State[RECOVER2_ATTACK]::Animation: failed to add 'stand_obiwan1b_end' [c6cb42db]

Message Severity: 2
.\Source\Combo.cpp(2635)
Combo[a11a0085]::State[RECOVER2_ATTACK]::Transition: failed to add Combo::Transition to state 'ATTACK3' [58b1ec4a] (132 needed)

Message Severity: 2
.\Source\Combo.cpp(2290)
Combo[a11a0085]::State[ATTACK3]::Animation: failed to add 'stand_gam_guard' [c351bd35]

Message Severity: 2
.\Source\Combo.cpp(2635)
Combo[a11a0085]::State[ATTACK3]::Transition: failed to add Combo::Transition to state 'IDLE' [c301cf93] (133 needed)

Message Severity: 2
.\Source\Combo.cpp(2635)
Combo[a11a0085]::State[JUMPATTACK_FALL]::Transition: failed to add Combo::Transition to state 'JUMPATTACK_LAND' [7d5471df] (134 needed)

Message Severity: 2
.\Source\Combo.cpp(2635)
Combo[a11a0085]::State[JUMPATTACK_FALL]::Transition: failed to add Combo::Transition to state 'IDLE' [c301cf93] (135 needed)
it is something wrong with the combo file? i will try a manual clean (yet again) maybe its the Animation Pool, how do I add memory to that?
Post Reply