How do I add a episode 2-commander?
Moderator: Moderators
-
ML_916
How do I add a episode 2-commander?
Hello there! I´ve got some trouble with adding the episode 2 commander..I´ve added him in my lua and changed some odfs but he still don´t appear in the spawn-menu..what should I do to get him in there?
sorry if this is a n00bish question or if it´s been answered before, I just want to know.
sorry if this is a n00bish question or if it´s been answered before, I just want to know.
-
Darth_Z13
- Jedi High Council

- Posts: 2275
- Joined: Sat Jun 17, 2006 9:51 am
- xbox live or psn: Xanthius Wylon
- Location: Canada
RE: How do I add a episode 2-commander?
Alright, post your LUA and BFront2 log okay?
-
ML_916
here´s my lua:
Edit: is this the BFront2.log?:
I don´t even know what the BFront2.log is..if you could tell me what it is I can show it...--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")
-- REP Attacking (attacker is always #1)
REP = 1;
CIS = 2;
-- These variables do not change
ATT = REP;
DEF = CIS;
function ScriptPostLoad()
--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "cp1"}
cp2 = CommandPost:New{name = "cp2"}
cp3 = CommandPost:New{name = "cp3"}
cp4 = CommandPost:New{name = "cp4"}
--This sets up the actual objective. This needs to happen after cp's are defined
conquest = ObjectiveConquest:New{teamATT = ATT, teamDEF = DEF,
textATT = "game.modes.con",
textDEF = "game.modes.con2",
multiplayerRules = true}
--This adds the CPs to the objective. This needs to happen after the objective is set up
conquest:AddCommandPost(cp1)
conquest:AddCommandPost(cp2)
conquest:AddCommandPost(cp3)
conquest:AddCommandPost(cp4)
conquest:Start()
EnableSPHeroRules()
end
---------------------------------------------------------------------------
-- FUNCTION: ScriptInit
-- PURPOSE: This function is only run once
-- INPUT:
-- OUTPUT:
-- NOTES: The name, 'ScriptInit' is a chosen convention, and each
-- mission script must contain a version of this function, as
-- it is called from C to start the mission.
---------------------------------------------------------------------------
function ScriptInit()
ReadDataFile("ingame.lvl")
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("SIDE\\rep.lvl",
"rep_inf_ep2_rifleman",
"rep_inf_ep2_rocketeer",
"rep_inf_ep2_engineer",
"rep_inf_ep2_sniper",
"rep_inf_ep2_officer",
"rep_inf_ep2_jettrooper",
"rep_hover_fightertank",
"rep_hero_aalya",
"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_grievous",
"cis_hover_aat")
ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_laser",
"tur_bldg_tower")
SetupTeams{
rep = {
team = REP,
units = 20,
reinforcements = 150,
soldier = { "rep_inf_ep2_rifleman",9, 25},
assault = { "rep_inf_ep2_rocketeer",1, 4},
engineer = { "rep_inf_ep2_engineer",1, 4},
sniper = { "rep_inf_ep2_sniper",1, 4},
officer = {"rep_inf_ep2_officer",1, 4},
special = { "rep_inf_ep2_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_grievous")
SetHeroClass(REP, "rep_hero_aalya")
-- Level Stats
-- ClearWalkers()
AddWalkerType(0, 4) -- special -> droidekas
AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
AddWalkerType(2, 0) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 0) -- 3x2 (3 pairs of legs)
local weaponCnt = 1024
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 32)
SetMemoryPoolSize("EntityFlyer", 32)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntityLight", 200)
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 32)
SetMemoryPoolSize("MountedTurret", 32)
SetMemoryPoolSize("Navigator", 128)
SetMemoryPoolSize("Obstacle", 1024)
SetMemoryPoolSize("PathNode", 1024)
SetMemoryPoolSize("SoundSpaceRegion", 64)
SetMemoryPoolSize("TreeGridStack", 1024)
SetMemoryPoolSize("UnitAgent", 128)
SetMemoryPoolSize("UnitController", 128)
SetMemoryPoolSize("Weapon", weaponCnt)
SetSpawnDelay(10.0, 0.25)
--ReadDataFile("dc:CHC\\CHC.lvl", "CHC_conquest")
ReadDataFile("dc:CHC\\CHC.lvl", "CHC_conquest")
SetDenseEnvironment("false")
-- Sound
SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
voiceSlow = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)
voiceQuick = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_quick", voiceQuick)
OpenAudioStream("sound\\global.lvl", "cw_music")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\yav.lvl", "yav1")
OpenAudioStream("sound\\yav.lvl", "yav1")
OpenAudioStream("sound\\yav.lvl", "yav1_emt")
SetBleedingVoiceOver(REP, REP, "rep_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(REP, CIS, "rep_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, REP, "cis_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed", 1)
SetOutOfBoundsVoiceOver(2, "cisleaving")
SetOutOfBoundsVoiceOver(1, "repleaving")
SetAmbientMusic(REP, 1.0, "rep_yav_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_yav_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_yav_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_yav_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_yav_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_yav_amb_end", 2,1)
SetVictoryMusic(REP, "rep_yav_amb_victory")
SetDefeatMusic (REP, "rep_yav_amb_defeat")
SetVictoryMusic(CIS, "cis_yav_amb_victory")
SetDefeatMusic (CIS, "cis_yav_amb_defeat")
SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("BirdScatter", "birdsFlySeq1")
--SetSoundEffect("WeaponUnableSelect", "com_weap_inf_weaponchange_null")
--SetSoundEffect("WeaponModeUnableSelect", "com_weap_inf_modechange_null")
SetSoundEffect("SpawnDisplayUnitChange", "shell_select_unit")
SetSoundEffect("SpawnDisplayUnitAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplaySpawnPointChange", "shell_select_change")
SetSoundEffect("SpawnDisplaySpawnPointAccept", "shell_menu_enter")
SetSoundEffect("SpawnDisplayBack", "shell_menu_exit")
--OpeningSateliteShot
AddCameraShot(0.908386, -0.209095, -0.352873, -0.081226, -45.922508, -19.114113, 77.022636);
AddCameraShot(-0.481173, 0.024248, -0.875181, -0.044103, 14.767292, -30.602322, -144.506851);
AddCameraShot(0.999914, -0.012495, -0.004416, -0.000055, 1.143253, -33.602314, -76.884430);
AddCameraShot(0.839161, 0.012048, -0.543698, 0.007806, 19.152437, -49.802273, 24.337317);
AddCameraShot(0.467324, 0.006709, -0.883972, 0.012691, 11.825212, -49.802273, -7.000720);
AddCameraShot(0.861797, 0.001786, -0.507253, 0.001051, -11.986043, -59.702248, 23.263165);
AddCameraShot(0.628546, -0.042609, -0.774831, -0.052525, 20.429928, -48.302277, 9.771714);
AddCameraShot(0.765213, -0.051873, 0.640215, 0.043400, 57.692474, -48.302277, 16.540724);
AddCameraShot(0.264032, -0.015285, -0.962782, -0.055734, -16.681797, -42.902290, 129.553268);
AddCameraShot(-0.382320, 0.022132, -0.922222, -0.053386, 20.670977, -42.902290, 135.513001);
end
Edit: is this the BFront2.log?:
if not where can I find it...Common\munge PC
Copying premunged files from MUNGED...
0 fil(er) kopierades
Copying premunged files from MUNGED\PC...
Done
Munging bump_shader.xml
Munging decal_shader.xml
Munging detail_shader.xml
Munging filtercopy_shader.xml
Munging flare_shader.xml
Munging foliage_shader.xml
Munging hdr_shader.xml
Munging interface_shader.xml
Munging lightbeam_shader.xml
Munging normalmapadder_shader.xml
Munging normal_shader.xml
Munging normal_terrain_shader.xml
Munging ocean_shader.xml
Munging particle_shader.xml
Munging perpixeldiffuselighting_shader.xml
Munging pervertexdiffuselighting_shader.xml
Munging prereflection_shader.xml
Munging rain_shader.xml
Munging refraction_shader.xml
Munging sample_shader.xml
Munging scroll_shader.xml
Munging shadowquad_shader.xml
Munging shield_shader.xml
Munging skyfog_shader.xml
Munging specularlighting_shader.xml
Munging specular_shader.xml
Munging sprite_shader.xml
Munging stencilshadow_shader.xml
Munging terrain_shader.xml
Munging terrain_shader2.xml
Munging water_shader.xml
Munging zprepass_shader.xml
Merging ..\..\Common\Localize\PC\English.cfg...
Merging ..\..\Common\Localize\PC\French.cfg...
Merging ..\..\Common\Localize\PC\german.cfg...
Merging ..\..\Common\Localize\PC\Italian.cfg...
Merging ..\..\Common\Localize\PC\japanese.cfg...
Merging ..\..\Common\Localize\PC\spanish.cfg...
Merging ..\..\Common\Localize\PC\uk_english.cfg...
Merging ..\..\Common\Localize\Comments.cfg...
Merging ..\..\Common\Localize\english.cfg...
Merging ..\..\Common\Localize\french.cfg...
Merging ..\..\Common\Localize\german.cfg...
Merging ..\..\Common\Localize\italian.cfg...
Merging ..\..\Common\Localize\japanese.cfg...
Merging ..\..\Common\Localize\spanish.cfg...
Merging ..\..\Common\Localize\uk_english.cfg...
Munging Comments.cfg
Munging English.cfg
Munging French.cfg
Munging german.cfg
Munging Italian.cfg
Munging japanese.cfg
Munging spanish.cfg
Munging uk_english.cfg
C:\BF2_ModTools\data_CHC\_BUILD\Common>levelpack -inputfile core.req -writefiles MUNGED\PC\core.files -checkdate -continue -platform PC -sourcedir ..\..\Common -inputdir MUNGED\PC -outputdir ..\..\_LVL_PC 2>>"C:\BF2_ModTools\data_CHC\_BUILD\PC_MungeLog.txt"
Munging core.req
C:\BF2_ModTools\data_CHC\_BUILD\Common>levelpack -inputfile common.req -writefiles MUNGED\PC\common.files -common MUNGED\PC\core.files -checkdate -continue -platform PC -sourcedir ..\..\Common -inputdir MUNGED\PC -outputdir ..\..\_LVL_PC 2>>"C:\BF2_ModTools\data_CHC\_BUILD\PC_MungeLog.txt"
C:\BF2_ModTools\data_CHC\_BUILD\Common>levelpack -inputfile ingame.req -writefiles MUNGED\PC\ingame.files -common MUNGED\PC\core.files MUNGED\PC\common.files -checkdate -continue -platform PC -sourcedir ..\..\Common -inputdir MUNGED\PC -outputdir ..\..\_LVL_PC 2>>"C:\BF2_ModTools\data_CHC\_BUILD\PC_MungeLog.txt"
C:\BF2_ModTools\data_CHC\_BUILD\Common>levelpack -inputfile inshell.req -writefiles MUNGED\PC\inshell.files -common MUNGED\PC\core.files MUNGED\PC\common.files -checkdate -continue -platform PC -sourcedir ..\..\Common -inputdir MUNGED\PC -outputdir ..\..\_LVL_PC 2>>"C:\BF2_ModTools\data_CHC\_BUILD\PC_MungeLog.txt"
C:\BF2_ModTools\data_CHC\_BUILD\Common>levelpack -inputfile MISSION\*.req -common MUNGED\PC\core.files MUNGED\PC\common.files MUNGED\PC\ingame.files -checkdate -continue -platform PC -sourcedir ..\..\Common -inputdir MUNGED\PC -outputdir MUNGED\PC 2>>"C:\BF2_ModTools\data_CHC\_BUILD\PC_MungeLog.txt"
C:\BF2_ModTools\data_CHC\_BUILD\Common>levelpack -inputfile MISSION.req -checkdate -continue -platform PC -sourcedir ..\..\Common -inputdir MUNGED\PC -outputdir ..\..\_LVL_PC 2>>"C:\BF2_ModTools\data_CHC\_BUILD\PC_MungeLog.txt"
Worlds\munge PC
munge_world Common PC
Done
Done
Done
munge_world CHC PC
Done
Done
Done
Munging CHC.PTH
Munging CHC_conquest.PTH
Munging CHC_eli.PTH
Munging CHC.req
Det g†r inte att hitta s”kv„gen.
Munging CHC.req
Det g†r inte att hitta s”kv„gen.
Munging addme.lua...done.
Copying files to Battlefront II directory:
"C:\Program\LucasArts\Star Wars Battlefront II\GameData"
Addon dir exists, continuing...
Mod dir "CHC"exists, continuing...
Copying addme.script to mod dir...done
Copying "mission.lvl" to modDir\data\_LVL_PC\...done
Copying "core.lvl" to modDir\data\_LVL_PC\...done
Copying "CHC" to modDir\data\_LVL_PC\...done
Copying "SIDE" to modDir\data\_LVL_PC\...done
Munge process finished
-
Darth_Z13
- Jedi High Council

- Posts: 2275
- Joined: Sat Jun 17, 2006 9:51 am
- xbox live or psn: Xanthius Wylon
- Location: Canada
-
Rekubot
- Jedi

- Posts: 1080
- Joined: Wed Apr 05, 2006 12:34 pm
- Projects :: No Mod project currently.
- xbox live or psn: Rekubot
- Location: UK
To be honest, I think that the REQ file is buggered. See here:
Try changing it to this:
Code: Select all
ucft
{
REQN
{
"class"
"rep_inf_officer"
}
REQN
{
"texture"
"hud_rep_weap_defense_buff_icon"
}
REQN
{
"model"
"hud_rep_defense_buff"
}
}Code: Select all
ucft
{
REQN
{
"class"
"rep_inf_ep2_officer"
}
REQN
{
"texture"
"hud_rep_weap_defense_buff_icon"
}
REQN
{
"model"
"hud_rep_defense_buff"
}
}
-
PvtParts
- Jedi

- Posts: 1001
- Joined: Mon Apr 03, 2006 9:12 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: plundering yer booty
There is no episode 2 officer, this is why.
The episode 2 officers use the same model as the standard clones, just bearing a yellow coloration.
If you want, I can give you an episode 2 commander skin, but it will be wayyy sharper, and will have a black visor, as opposed to the washed out visor and blurry skins that you get with the base game, so it may look out of place
The episode 2 officers use the same model as the standard clones, just bearing a yellow coloration.
If you want, I can give you an episode 2 commander skin, but it will be wayyy sharper, and will have a black visor, as opposed to the washed out visor and blurry skins that you get with the base game, so it may look out of place
-
PvtParts
- Jedi

- Posts: 1001
- Joined: Mon Apr 03, 2006 9:12 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: plundering yer booty
..damned if i know?
I mean, if he wants it to be..
I assumed he wanted the real episode 2 commander
Oh, and ML_916, the BFront2 log is a log that you get when you run BF2_modtools.exe.
To get this log, go into your BF2_ModTools folder, and copy BF2_modtools.exe into your Star Wars Battlefront 2\Gamedata directory. Once its copied run it (make sure to run it from Gamedata!!). Play your map, and once you finish find a file in the Gamedata folder called BFront2.log. Open it with a text editor like notepad, and paste it here for us to look at.
I mean, if he wants it to be..
I assumed he wanted the real episode 2 commander
Oh, and ML_916, the BFront2 log is a log that you get when you run BF2_modtools.exe.
To get this log, go into your BF2_ModTools folder, and copy BF2_modtools.exe into your Star Wars Battlefront 2\Gamedata directory. Once its copied run it (make sure to run it from Gamedata!!). Play your map, and once you finish find a file in the Gamedata folder called BFront2.log. Open it with a text editor like notepad, and paste it here for us to look at.
-
ML_916
the episode 2-commander I was talking about was the red ARC-trooper from the early version of Teans cloud city...
I´m trying to find the BFront2 log now..
EDIT: I´ve found the Bf2mod tools exe and I´m trying to run it from gamedata, but it just says "please insert CD1" when I try to run it..and I have the DVD in the computer...
I´ve heard it´s impossible for people with the european dvd-version to get a BFront 2 log..is that true or did I screw something up?
I´m trying to find the BFront2 log now..
EDIT: I´ve found the Bf2mod tools exe and I´m trying to run it from gamedata, but it just says "please insert CD1" when I try to run it..and I have the DVD in the computer...
I´ve heard it´s impossible for people with the european dvd-version to get a BFront 2 log..is that true or did I screw something up?
- Broadus
- Second Lance Corporal

- Posts: 110
- Joined: Thu Sep 21, 2006 1:23 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
If someone has a red ARC trooper, I'm pretty sure they would have to add it into the game themselves. You can just look in the .lvl containing the red ARC trooper to find the name of it.
I don't think there's an actual guy called "rep_inf_ep2_officer", is there? Or are you adding it in yourself?
I know there's a rep_inf_ep3_commander, but there's no ep2 counterpart, and the blue ARC trooper with a chaingun is named rep_inf_ep2_rocketeer_chaingun.
Seems to me like the SWBF2 creators could have made an "ep2_commander" that was just a purple ARC trooper, since purple is the color of the ep3 commander, and the primary colors are taken by other classes (red sniper, yellow engineer, blue rocketeer, green jet trooper).
I don't think there's an actual guy called "rep_inf_ep2_officer", is there? Or are you adding it in yourself?
I know there's a rep_inf_ep3_commander, but there's no ep2 counterpart, and the blue ARC trooper with a chaingun is named rep_inf_ep2_rocketeer_chaingun.
Seems to me like the SWBF2 creators could have made an "ep2_commander" that was just a purple ARC trooper, since purple is the color of the ep3 commander, and the primary colors are taken by other classes (red sniper, yellow engineer, blue rocketeer, green jet trooper).
- Broadus
- Second Lance Corporal

- Posts: 110
- Joined: Thu Sep 21, 2006 1:23 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
-
Darth_Z13
- Jedi High Council

- Posts: 2275
- Joined: Sat Jun 17, 2006 9:51 am
- xbox live or psn: Xanthius Wylon
- Location: Canada
- Teancum
- Jedi Admin

- Posts: 11080
- Joined: Wed Sep 07, 2005 11:42 pm
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: Indiana
Though I can't really go over how to do a new side, I can provide you with my Ep2 Commander fix side. If you need help I'm sure the other folks in the thread can help you get this going.
(anyone is welcome to use this, but it is integrated into the BF1 pack so you know)
http://www.gametoast.com/~teancum/publi ... arcfix.zip
(anyone is welcome to use this, but it is integrated into the BF1 pack so you know)
http://www.gametoast.com/~teancum/publi ... arcfix.zip
- Broadus
- Second Lance Corporal

- Posts: 110
- Joined: Thu Sep 21, 2006 1:23 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
