Combo Data

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
User avatar
Bonecrusher16O
Private Second Class
Posts: 66
Joined: Mon Apr 25, 2011 5:57 pm
Projects :: Snipers Galore and SAM
Games I'm Playing :: SWBF2 and MC
xbox live or psn: PS3 :)

Combo Data

Post by Bonecrusher16O »

Alright, so on the map I am working on I have run out of Combo Data. I saw a post like this not too long ago, and it is NO help AT ALL.
Here is my script:
Hidden/Spoiler:
[code]
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--
-- Mos Eisley Hero Deathmatch (uses Space Assault rules)
-- First team to reach 100 kills wins
--

ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveTDM")

---------------------------------------------------------------------------
-- ScriptPostLoad
---------------------------------------------------------------------------
function ScriptPostLoad()
EnableSPHeroRules()
-- This is the actual objective setup
TDM = ObjectiveTDM:New{teamATT = 1, teamDEF = 2, teamwampa = 3,
multiplayerScoreLimit = 100,
textATT = "game.modes.tdm",
textDEF = "game.modes.tdm2", multiplayerRules = true, isCelebrityDeathmatch = true}
TDM:Start()

AddAIGoal(1, "Deathmatch", 100)
AddAIGoal(2, "Deathmatch", 100)

end


---------------------------------------------------------------------------
-- ScriptInit
---------------------------------------------------------------------------
function ScriptInit()

animateobja = OnObjectKill(
function(object, killer)
if GetEntityName(object) == "panel1" then
PlayAnimation("wdown")
end
end
)

killobjc = OnObjectKill(
function(object, killer)
if killer and IsCharacterHuman(killer) and GetEntityName(object) == "panel1" then
AddAssaultDestroyPoints(killer)
end
end
)

ReadDataFile("dc:Load\\common.lvl")

StealArtistHeap(1536*1024)
-- Designers, these two lines *MUST* be first!
SetPS2ModelMemory(2097152 + 65536 * 8)

SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",30) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",500) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",500) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",500) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",400) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",4000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",88) -- should be ~1x #combo

ReadDataFile("ingame.lvl")

ALL = 1
IMP = 2
-- These variables do not change
ATT = 1
DEF = 2

SetMaxFlyHeight(40)
SetMaxPlayerFlyHeight(95)

ReadDataFile("sound\\tat.lvl;tat2gcw")
ReadDataFile("SIDE\\all.lvl",
"all_hero_luke_jedi",
"all_hero_hansolo_tat",
"all_hero_leia",
"all_hero_chewbacca")



ReadDataFile("dc:SIDE\\sit.lvl",
"cis_hero_darthmaul",
"cis_hero_countdooku",
"imp_hero_darthvader",
"imp_hero_emperor",
"rep_hero_cloakedanakin",
"sit_inf_sith",
"sit_inf_master",
"sit_inf_basic",
"sit_inf_guard_saber")


ReadDataFile("SIDE\\rep.lvl",
"rep_hero_macewindu",
"rep_hero_aalya",
"rep_hero_yoda",
"rep_hero_kiyadimundi",
"rep_hero_obiwan")

ReadDataFile("dc:SIDE\\jed.lvl",
"jed_knight_01",
"jed_knight_02",
"jed_knight_03",
"jed_knight_04",
"jed_master_01",
"jed_master_02",
"jed_master_03",
"jed_sith_01",
"jed_runner")

ReadDataFile("SIDE\\snw.lvl",
"snw_inf_wampa")


--[[ Turrets disabled
ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_chaingun_roof",
"tur_weap_built_gunturret")
SetMemoryPoolSize("MountedTurret", 15)
--]]

--ReadDataFile("SIDE\\snw.lvl", "snw_inf_wampa")

SetupTeams{
hero = {
team = ALL,
units = 32,
reinforcements = -1,
soldier = { "rep_hero_obiwan",1,2},
assault = { "jed_knight_02", 1,2},
engineer= { "all_hero_luke_jedi", 1,2},
sniper = { "rep_hero_yoda", 1,2},
officer = { "jed_master_02", 1,2},
special = { "rep_hero_macewindu", 1,2},
},
}
AddUnitClass(ALL, "rep_hero_aalya",1,2)
AddUnitClass(ALL, "jed_runner",1,2)
AddUnitClass(ALL, "rep_hero_kiyadimundi",1,2)

SetupTeams{
villain = {
team = IMP,
units = 32,
reinforcements = -1,
soldier = { "sit_inf_master", 1,2},
assault = { "imp_hero_darthvader",1,2},
engineer= { "imp_hero_emperor", 1,2},
sniper = { "cis_hero_darthmaul", 1,2},
officer = { "sit_inf_basic", 1,2},
special = { "sit_inf_guard_saber", 1,2},

},
}
AddUnitClass(IMP, "rep_hero_cloakedanakin",1,2)
AddUnitClass(IMP, "cis_hero_countdooku",1,2)
AddUnitClass(IMP, "sit_inf_sith",1,2)

SetTeamName(3, "wampa")
SetTeamIcon(3, "rep_icon")
AddUnitClass(3, "snw_inf_wampa",2)
AddUnitClass(3, "snw_inf_none",2)
AddUnitClass(3, "snw_inf_wampa",1)


SetUnitCount(3, 5)
AddAIGoal(wampa, "Deathmatch", 100)
SetTeamAsEnemy(DEF,3)
SetTeamAsEnemy(3,DEF)
SetTeamAsEnemy(ATT,3)
SetTeamAsEnemy(3,ATT)


-- Level Stats
ClearWalkers()
AddWalkerType(0, 0) -- 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 = 96
SetMemoryPoolSize("Aimer", 1)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 320)
SetMemoryPoolSize("ConnectivityGraphFollower", 23)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth",118)
SetMemoryPoolSize("EntityDefenseGridTurret", 0)
SetMemoryPoolSize("EntityDroid", 5)
SetClassProperty("rep_hero_yoda","MaxHealth","1600")
SetClassProperty("rep_hero_yoda","EnergyBar","140")
SetClassProperty("rep_hero_yoda","AddHealth","6")
SetClassProperty("rep_hero_yoda","NoEnterVehicles","0")
SetMemoryPoolSize("EntityFlyer", 5) -- to account for 5 chewbaccas
SetMemoryPoolSize("EntityLight", 80, 80) -- stupid trickery to actually set lights to 80
SetMemoryPoolSize("EntityPortableTurret", 0) -- nobody has autoturrets AFAIK - MZ
SetMemoryPoolSize("EntitySoundStream", 4)
SetMemoryPoolSize("EntitySoundStatic", 45)
SetMemoryPoolSize("FLEffectObject::OffsetMatrix", 120)
SetMemoryPoolSize("MountedTurret", 0)
SetMemoryPoolSize("Navigator", 23)
SetMemoryPoolSize("Obstacle", 667)
SetMemoryPoolSize("Ordnance", 500) -- not much ordnance going on in the level
SetMemoryPoolSize("ParticleEmitter", 512)
SetMemoryPoolSize("ParticleEmitterInfoData", 512)
SetMemoryPoolSize("PathFollower", 23)
SetMemoryPoolSize("PathNode", 128)
SetMemoryPoolSize("ShieldEffect", 1000)
SetMemoryPoolSize("TentacleSimulator", 24)
SetMemoryPoolSize("TreeGridStack", 290)
SetMemoryPoolSize("UnitAgent", 43)
SetMemoryPoolSize("UnitController", 43)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:SAM\\SAM.lvl", "SAM_eli")
SetDenseEnvironment("false")

-- Sound Stats

ScriptCB_EnableHeroMusic(0)
ScriptCB_EnableHeroVO(0)

voiceSlow = OpenAudioStream("sound\\global.lvl", "all_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)

voiceQuick = OpenAudioStream("sound\\global.lvl", "all_unit_vo_quick")
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_quick", voiceQuick)
OpenAudioStream("sound\\global.lvl", "cw_music")
OpenAudioStream("sound\\global.lvl", "gcw_music")
OpenAudioStream("sound\\tat.lvl", "tat2")
OpenAudioStream("sound\\tat.lvl", "tat2")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")

SetBleedingVoiceOver(ALL, ALL, "all_off_com_report_us_overwhelmed", 1)
SetBleedingVoiceOver(ALL, IMP, "all_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(IMP, ALL, "imp_off_com_report_enemy_losing", 1)
SetBleedingVoiceOver(IMP, IMP, "imp_off_com_report_us_overwhelmed", 1)

SetLowReinforcementsVoiceOver(ALL, ALL, "all_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(ALL, IMP, "all_off_victory_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, IMP, "imp_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(IMP, ALL, "imp_off_victory_im", .1, 1)

SetOutOfBoundsVoiceOver(1, "Allleaving")
SetOutOfBoundsVoiceOver(2, "Impleaving")

SetAmbientMusic(ALL, 0.3, "all_hero_Luke_lp", 0,1)
SetAmbientMusic(ALL, 0.3, "imp_hero_Palpatine_lp", 1,1)
SetAmbientMusic(ALL, 0.4, "all_hero_Luke_lp", 2,1)
SetAmbientMusic(IMP, 0.3, "imp_hero_Vader_lp", 0,1)
SetAmbientMusic(IMP, 0.3, "imp_hero_Palpatine_lp", 1,1)
SetAmbientMusic(IMP, 0.4, "imp_hero_Vader_lp", 2,1)

SetVictoryMusic(ALL, "all_tat_amb_victory")
SetDefeatMusic (ALL, "all_tat_amb_defeat")
SetVictoryMusic(IMP, "imp_tat_amb_victory")
SetDefeatMusic (IMP, "imp_tat_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--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")

SetAttackingTeam(ATT)

-- Camera Stats
--Tat2 Mos Eisley
AddCameraShot(0.974338, -0.222180, 0.035172, 0.008020, -82.664650, 23.668301, 43.955681);
AddCameraShot(0.390197, -0.089729, -0.893040, -0.205362, 23.563562, 12.914885, -101.465561);
AddCameraShot(0.169759, 0.002225, -0.985398, 0.012916, 126.972809, 4.039628, -22.020613);
AddCameraShot(0.677453, -0.041535, 0.733016, 0.044942, 97.517807, 4.039628, 36.853477);
AddCameraShot(0.866029, -0.156506, 0.467299, 0.084449, 7.685640, 7.130688, -10.895234);
end[/code]
Can someone help? I have raised the Memory Pool size to the correct amount but it is still not working.
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: Combo Data

Post by Fiodis »

Can you post your error log? And how exactly is it not working? Are the jedis acting strangely, or is the map just flat-out crashing? Sometimes as you're just about to hit the limit set by your memory pools the combos start malfunctioning. On one of my test maps I needed to raise the memory pool some more but didn't, and whenever I jump-attacked my unit never stopped jumping and just bounced around the map like a ping-pong ball, a result of the landing state not working.
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: Combo Data

Post by Teancum »

Run out? The only error I know of that does that is having too many unique combos. I can't remember the max, but there's a hard limit of the number of unique combos you can load at once, and there's no way around that.
User avatar
Bonecrusher16O
Private Second Class
Posts: 66
Joined: Mon Apr 25, 2011 5:57 pm
Projects :: Snipers Galore and SAM
Games I'm Playing :: SWBF2 and MC
xbox live or psn: PS3 :)

Re: Combo Data

Post by Bonecrusher16O »

Fiodis wrote:Can you post your error log? And how exactly is it not working? Are the jedis acting strangely, or is the map just flat-out crashing? Sometimes as you're just about to hit the limit set by your memory pools the combos start malfunctioning. On one of my test maps I needed to raise the memory pool some more but didn't, and whenever I jump-attacked my unit never stopped jumping and just bounced around the map like a ping-pong ball, a result of the landing state not working.
The map loads then crashes. And there acctualy is no Error Log.
Loopy53
1st Lieutenant
1st Lieutenant
Posts: 456
Joined: Thu Nov 01, 2012 2:27 am
Projects :: Earth Apocalypse
Games I'm Playing :: swbf2 bf3 cod
xbox live or psn: Dont have one
Location: On earth, I guess.

Re: Combo Data

Post by Loopy53 »

there is ALWAYS an error log. starting the game generates one. Post it please. a quick looky over the faq/modding section tells you how to get the log.
User avatar
GAB
1st Lieutenant
1st Lieutenant
Posts: 431
Joined: Sun Jul 03, 2011 8:56 pm
Location: Somewhere around the world
Contact:

Re: Combo Data

Post by GAB »

The error log we're talking about is the one generated when you run your map in the debug exe, BF2_ModTools, not the normal exe. The log generally is located in Battlefront 2's GameData folder.
User avatar
Bonecrusher16O
Private Second Class
Posts: 66
Joined: Mon Apr 25, 2011 5:57 pm
Projects :: Snipers Galore and SAM
Games I'm Playing :: SWBF2 and MC
xbox live or psn: PS3 :)

Re: Combo Data

Post by Bonecrusher16O »

Like I said, it did not generate one.

EDIT: Nvm, I think I know what your talking about now. I don't have the DVD for that program. It just says Insert DVD1.
User avatar
GAB
1st Lieutenant
1st Lieutenant
Posts: 431
Joined: Sun Jul 03, 2011 8:56 pm
Location: Somewhere around the world
Contact:

Re: Combo Data

Post by GAB »

In the answer of the FAQ Question #4 there's a link to a No-CD version of it.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Combo Data

Post by Maveritchell »

Teancum wrote:Run out? The only error I know of that does that is having too many unique combos. I can't remember the max, but there's a hard limit of the number of unique combos you can load at once, and there's no way around that.
OP: Having an error log is fine, but in this case it's almost certainly what Tean and Fiodis said above. You're loading a ton of melee(/combo) units in your script. Just comment out about half of them and you can determine in about 30 seconds that you have too many melee combos loaded.
User avatar
Bonecrusher16O
Private Second Class
Posts: 66
Joined: Mon Apr 25, 2011 5:57 pm
Projects :: Snipers Galore and SAM
Games I'm Playing :: SWBF2 and MC
xbox live or psn: PS3 :)

Re: Combo Data

Post by Bonecrusher16O »

Alright, thanks
Post Reply