BF2 log fixes

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
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

BF2 log fixes

Post by Anakin »

Hi,

i think you all know this Memory Pool Message in the BF2 log. For me it says:

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "ParticleTransformer::ColorTrans" is full; raise count to at least 2352

but in my lua i have this:
SetMemoryPoolSize("ParticleTransformer::ColorTrans", 3000)

So why did this stupid log say raise up to 2352 while it even is at 3000?? :cpu:

==EDIT==

ok i got it. just moved the setMemoryPoolSize line somewhere else in the lua :D

But now there are things like that:

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\FLEffect.cpp(214)
FLEffect::Read: duplicate effect class name (9e59f92b)!

And

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\VOHelper.cpp(183)
VOSound (cis1_inf_pc_com_transport_inVehicle): unknown modifier "InVehicle"

how to fix them??
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: BF2 log fixes

Post by Marth8880 »

Regarding last two messages, they're completely harmless and there's no need to fix them.
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

Re: BF2 log fixes

Post by Anakin »

Yes i know, but it's really annoying to fix real problems (there are also MS 3 errors not crashing the game) when you have to scroll throug an error with 1000 messages. So i would like to fix them to shorten the log.
Bob
Brigadier General
Brigadier General
Posts: 633
Joined: Thu May 27, 2010 4:28 am
Location: at home

Re: BF2 log fixes

Post by Bob »

Notepad has a build-in function that lets you search for specific lines.
For you, click on Bearbeiten -> Suchen, type in

Code: Select all

Message Severity: 3
and the program will move you right to the next Message Severity: 3 error.
if you wan't to continue your search for evil errors, click on
Bearbeiten -> Weitersuchen.

Happy purging.
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: BF2 log fixes

Post by Teancum »

Anakin wrote:Hi,

i think you all know this Memory Pool Message in the BF2 log. For me it says:

Message Severity: 2
C:\Battlefront2\main\RedEngineFL\Memory\RedMemoryPool.cpp(170)
Memory pool "ParticleTransformer::ColorTrans" is full; raise count to at least 2352

but in my lua i have this:
SetMemoryPoolSize("ParticleTransformer::ColorTrans", 3000)

So why did this stupid log say raise up to 2352 while it even is at 3000??
Interesting. Can you post your lua? I'd like to see where you moved them to.
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

Re: BF2 log fixes

Post by Anakin »

Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script
Conquest = ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")

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

-- Empire Attacking (attacker is always #1)
CIS = ATT
REP = DEF

---------------------------------------------------------------------------
-- 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 ScriptPostLoad()

AddDeathRegion("death")
AddDeathRegion("death1")
AddDeathRegion("death2")
AddDeathRegion("death3")
AddDeathRegion("death4")




SetProperty ("LibCase1","MaxHealth",1000)
SetProperty ("LibCase2","MaxHealth",1000)
SetProperty ("LibCase3","MaxHealth",1000)
SetProperty ("LibCase4","MaxHealth",1000)
SetProperty ("LibCase5","MaxHealth",1000)
SetProperty ("LibCase6","MaxHealth",1000)
SetProperty ("LibCase7","MaxHealth",1000)
SetProperty ("LibCase8","MaxHealth",1000)
SetProperty ("LibCase9","MaxHealth",1000)
SetProperty ("LibCase10","MaxHealth",1000)
SetProperty ("LibCase11","MaxHealth",1000)
SetProperty ("LibCase12","MaxHealth",1000)
SetProperty ("LibCase13","MaxHealth",1000)
SetProperty ("LibCase14","MaxHealth",1000)


SetProperty ("LibCase1","CurHealth",1000)
SetProperty ("LibCase2","CurHealth",1000)
SetProperty ("LibCase3","CurHealth",1000)
SetProperty ("LibCase4","CurHealth",1000)
SetProperty ("LibCase5","CurHealth",1000)
SetProperty ("LibCase6","CurHealth",1000)
SetProperty ("LibCase7","CurHealth",1000)
SetProperty ("LibCase8","CurHealth",1000)
SetProperty ("LibCase9","CurHealth",1000)
SetProperty ("LibCase10","CurHealth",1000)
SetProperty ("LibCase11","CurHealth",1000)
SetProperty ("LibCase12","CurHealth",1000)
SetProperty ("LibCase13","CurHealth",1000)
SetProperty ("LibCase14","CurHealth",1000)



EnableSPHeroRules()

DisableBarriers("SideDoor1")
DisableBarriers("MainLibraryDoors")
DisableBarriers("SideDoor2")
DisableBarriers("SIdeDoor3")
DisableBarriers("ComputerRoomDoor1")
DisableBarriers("StarChamberDoor1")
DisableBarriers("StarChamberDoor2")
DisableBarriers("WarRoomDoor1")
DisableBarriers("WarRoomDoor2")
DisableBarriers("WarRoomDoor3")
PlayAnimation("DoorOpen01")
PlayAnimation("DoorOpen02")


--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"}
cp5 = CommandPost:New{name = "cp5"}
cp6 = CommandPost:New{name = "cp6"}

--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:AddCommandPost(cp5)
conquest:AddCommandPost(cp6)

conquest:Start()
SetUberMode(1)



end

function ScriptInit()
-- Designers, these two lines *MUST* be first.

SetPS2ModelMemory(4056000)

SetMapNorthAngle(180, 1)
SetMaxFlyHeight(25)
SetMaxPlayerFlyHeight (25)
AISnipeSuitabilityDist(30)

SetMemoryPoolSize("ParticleTransformer::ColorTrans", 3000)
SetMemoryPoolSize("ParticleTransformer::PositionTr", 2500)
SetMemoryPoolSize("ParticleTransformer::SizeTransf", 2500)

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




SetMemoryPoolSize("Music", 33)

ReadDataFile("ingame.lvl")
ReadDataFile("dc:ingame.lvl")

ReadDataFile("dc:sound\\rcm.lvl;RCMr")
ReadDataFile("sound\\cor.lvl;cor1cw")


--ReadDataFile("dc:SIDE\\rrl.lvl",
--"rrl_inf_ep2_rifleman",
--"rrl_inf_ep2_commander",
--"rrl_inf_ep2_jettrooper")
ReadDataFile("dc:SIDE\\rep.lvl",
"rep_inf_commando_01_rifleman",
"rep_inf_commando_02_roketeer",
"rep_inf_commando_03_sniper",
"rep_inf_commando_04_engineer",
"rep_inf_commando_05_electronic",
"rep_inf_commando_06_sergeant",
"rep_inf_commando_07_havoc",
"rep_inf_commando_08_elite")
ReadDataFile("dc:SIDE\\kit.lvl",
"rep_hero_fisto")
ReadDataFile("dc:SIDE\\cis.lvl",
"cis_inf_b1_1",
"cis_inf_b1_2",
"cis_inf_b1_3",
"cis_inf_trando_merc",
"cis_inf_sbd",
"cis_inf_trando",
"cis_inf_magnaguard",
"cis_inf_droideka")

ReadDataFile("dc:SIDE\\mdo.lvl",
"mdo_inf_assassin",
"mdo_inf_officer")

ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_laser")


SetupTeams{
rep = {
team = REP,
units = 32,
reinforcements = 150,
soldier = { "rep_inf_commando_01_rifleman",9, 25},
assault = { "rep_inf_commando_02_roketeer",1,4},
sniper = { "rep_inf_commando_03_sniper",1,4},
engineer= { "rep_inf_commando_04_engineer",1,4},
officer = { "rep_inf_commando_05_electronic",1,4},
special = { "rep_inf_commando_06_sergeant",1,4},
commander={ "rep_inf_commando_07_havoc", 1, 4},
general = { "rep_inf_commando_08_elite", 1, 2}
},
cis = {
team = CIS,
units = 32,
reinforcements = 300,
soldier = {"cis_inf_b1_1",10, 30},
assault = {"cis_inf_b1_2",1, 4},
sniper = {"cis_inf_b1_3",1, 4},
engineer= {"mdo_inf_assassin",1, 3},
officer = {"cis_inf_droideka",1, 2},
special = {"mdo_inf_officer",1, 2},
commander={"cis_inf_sbd", 1, 2},
general = {"cis_inf_magnaguard", 1, 2}
}
}

SetHeroClass (REP, "rep_hero_fisto")




-- Level Stats
ClearWalkers()
AddWalkerType(0, 3) -- 8 droidekas (special case: 0 leg pairs)
AddWalkerType(1, 0) --
AddWalkerType(2, 0) -- 2 spider walkers with 2 leg pairs each
AddWalkerType(3, 0) -- 2 attes with 3 leg pairs each
local weaponCnt = 450
SetMemoryPoolSize("Aimer", 22)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 250)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 50)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize("EntitySoundStream", 10)
SetMemoryPoolSize("EntitySoundStatic", 0)
SetMemoryPoolSize("MountedTurret",100)
SetMemoryPoolSize("PathFollower", 100)
SetMemoryPoolSize("Navigator", 100)
SetMemoryPoolSize("Obstacle", 375)
SetMemoryPoolSize("SoundSpaceRegion", 38)
SetMemoryPoolSize("TentacleSimulator", 0)
SetMemoryPoolSize("TreeGridStack", 140)
SetMemoryPoolSize("UnitAgent", 150)
SetMemoryPoolSize("UnitController", 100)
SetMemoryPoolSize("Weapon", weaponCnt)
SetMemoryPoolSize("EntityFlyer", 4)
SetMemoryPoolSize("SoldierAnimation", 580)
SetMemoryPoolSize("ParticleTransformer::ColorTrans", 3000)
SetMemoryPoolSize("ParticleTransformer::PositionTr", 2500)
SetMemoryPoolSize("ParticleTransformer::SizeTransf", 2500)



SetSpawnDelay(10.0, 0.25)
ReadDataFile("cor\\cor1.lvl","cor1_Conquest")
SetDenseEnvironment("True")
-- SetMaxFlyHeight(25)
--SetMaxPlayerFlyHeight (25)
AddDeathRegion("DeathRegion1")

-- Sound Stats

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\\cor.lvl", "cor1")
OpenAudioStream("sound\\cor.lvl", "cor1")
-- OpenAudioStream("sound\\cor.lvl", "cor1_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)

SetLowReinforcementsVoiceOver(REP, REP, "rep_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(REP, CIS, "rep_off_victory_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, CIS, "cis_off_defeat_im", .1, 1)
SetLowReinforcementsVoiceOver(CIS, REP, "cis_off_victory_im", .1, 1)

SetOutOfBoundsVoiceOver(2, "Repleaving")
SetOutOfBoundsVoiceOver(1, "Cisleaving")

SetAmbientMusic(REP, 1.0, "rep_cor_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_cor_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_cor_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_cor_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_cor_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_cor_amb_end", 2,1)

SetVictoryMusic(REP, "rep_cor_amb_victory")
SetDefeatMusic (REP, "rep_cor_amb_defeat")
SetVictoryMusic(CIS, "cis_cor_amb_victory")
SetDefeatMusic (CIS, "cis_cor_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")


-- Camera Stats
--Tat 1 - Dune Sea
AddCameraShot(0.419938, 0.002235, -0.907537, 0.004830, -15.639358, 5.499980, -176.911179);
AddCameraShot(0.994506, 0.104463, -0.006739, 0.000708, 1.745251, 5.499980, -118.700668);
AddCameraShot(0.008929, -0.001103, -0.992423, -0.122538, 1.366768, 16.818106, -114.422173);
AddCameraShot(0.761751, -0.117873, -0.629565, -0.097419, 59.861904, 16.818106, -81.607773);
AddCameraShot(0.717110, -0.013583, 0.696703, 0.013197, 98.053314, 11.354497, -85.857857);
AddCameraShot(0.360958, -0.001053, -0.932577, -0.002721, 69.017578, 18.145807, -56.992413);
AddCameraShot(-0.385976, 0.014031, -0.921793, -0.033508, 93.111061, 18.145807, -20.164375);
AddCameraShot(0.695468, -0.129569, -0.694823, -0.129448, 27.284357, 18.145807, -12.377695);
AddCameraShot(0.009002, -0.000795, -0.996084, -0.087945, 1.931320, 13.356332, -16.410583);
AddCameraShot(0.947720, -0.145318, 0.280814, 0.043058, 11.650738, 16.955814, 28.359180);
AddCameraShot(0.686380, -0.127550, 0.703919, 0.130810, -30.096384, 11.152356, -63.235146);
AddCameraShot(0.937945, -0.108408, 0.327224, 0.037821, -43.701199, 8.756138, -49.974789);
AddCameraShot(0.531236, -0.079466, -0.834207, -0.124787, -62.491230, 10.305247, -120.102989);
AddCameraShot(0.452286, -0.179031, -0.812390, -0.321572, -50.015198, 15.394646, -114.879379);
AddCameraShot(0.927563, -0.243751, 0.273918, 0.071982, 26.149965, 26.947924, -46.834148);

end
First i had the red one. than i deleted it and now it's the green position. And there it works
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: BF2 log fixes

Post by Teancum »

Interesting. Thanks :thumbs:
THEWULFMAN
Space Ranger
Posts: 5557
Joined: Tue Aug 17, 2010 3:30 pm
Projects :: Evolved 2
Location: Columbus, Ohio
Contact:

Re: BF2 log fixes

Post by THEWULFMAN »

I'm pretty sure it dynamically raises the memory pools for particle related things, at least until it completely breaks like it loves to do.

In other words, adding the memory pool line does nothing and you don't need to worry about it.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: BF2 log fixes

Post by Marth8880 »

THEWULFMAN wrote:I'm pretty sure it dynamically raises the memory pools for particle related things
Remember which engine we're dealing with; chances are, the outcome will be polar opposite to its intended design, knowing Zero.
Bob
Brigadier General
Brigadier General
Posts: 633
Joined: Thu May 27, 2010 4:28 am
Location: at home

Re: BF2 log fixes

Post by Bob »

From personal experience, raising these pools to something high via LUA instead of letting the game raise them while running will increase stability by ~5% on maps that are in danger of crashing because of matrix overload.

The effect is marginal and not needed on most maps
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: BF2 log fixes

Post by Teancum »

Bob wrote:From personal experience, raising these pools to something high via LUA instead of letting the game raise them while running will increase stability by ~5% on maps that are in danger of crashing because of matrix overload.
Yep. One should always try to eliminate all memory pool errors. There's hard evidence that supports this increasing stability. From what I've been told the game only updates memory pools shortly after runtime, so if those pools increase later on it doesn't compensate the second, third, etc time around. That's why things become more unstable when adding units dynamically via the fake console and also (partially) why a map can be fine in single player but have problems online.
Deviss
Master of the Force
Master of the Force
Posts: 3772
Joined: Tue Aug 12, 2008 7:59 pm
Projects :: Clone Wars Extended
Games I'm Playing :: BF2

Re: BF2 log fixes

Post by Deviss »

about "ParticleTransformer::SizeTransf" always put it on this section from lua:

Code: Select all

script must contain a version of this function, as
--              it is called from C to start the mission.
---------------------------------------------------------------------------
function ScriptInit()
    SetMemoryPoolSize("ParticleTransformer::SizeTransf", 2000)
    SetMemoryPoolSize("ParticleTransformer::ColorTrans", 3000)
    SetMemoryPoolSize("ParticleTransformer::PositionTr", 2000)
    
    SetUberMode(1);
    ReadDataFile("ingame.lvl")
    
   
    SetMaxFlyHeight(200)
    SetMaxPlayerFlyHeight (200)
   
only on that place it will work fine , give it a try and tell me :wink:
Post Reply