Message Severity: 3

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

ZZ09
Private Recruit
Posts: 17
Joined: Sun Mar 29, 2020 7:04 pm
Games I'm Playing :: SWBF2 2005
xbox live or psn: Steam: LA Z
Location: Argentina

Message Severity: 3

Post by ZZ09 »

I have the following problem when adding a hero
Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LuaHelper.cpp(312)
CallProc failed: assertion failed!
stack traceback:
[C]: in function `assert'
(none): in function `ifs_saveop_DoOps'
(none): in function `ifs_saveop_PreOpDone'
the funny thing is that in assault with heroes it does not happen, but in conquest or ctf the game is crashed with that message
how can I solve it?
Last edited by ZZ09 on Fri May 08, 2020 5:47 pm, edited 1 time in total.
Sporadia
Corporal
Corporal
Posts: 151
Joined: Thu Jan 24, 2019 11:02 pm
Projects :: No Mod project currently
Games I'm Playing :: None
xbox live or psn: No gamertag set

Re: Message Severity: 3

Post by Sporadia »

I don't understand nearly enough about the interface to solve this but I can help a little. In your mod, you can go to data_ABC/Common/scripts and find a copy of the lua ifs_saveops.lua. According to the error message, this is what's crashing and it looks to all be code relating to loading and saving the game. In particular, the function ifs_saveop_DoOps() is failing on one of these lines:

Code: Select all

assert( not this.bDoPreLoadOps )
assert( not this.bDoPreDeleteOps )
assert( not this.bDoPreSaveOps )
Just intuitively, that makes me think something isn't loading correctly but this looks like a job for the veteran modders tbh. I also see 'memcard' mentioned a lot in this lua; are you doing a PS2 mod? Just a guess, I don't really know what this code does.
ZZ09
Private Recruit
Posts: 17
Joined: Sun Mar 29, 2020 7:04 pm
Games I'm Playing :: SWBF2 2005
xbox live or psn: Steam: LA Z
Location: Argentina

Re: Message Severity: 3

Post by ZZ09 »

Sporadia wrote:
Thu May 07, 2020 11:33 am
I don't understand nearly enough about the interface to solve this but I can help a little. In your mod, you can go to data_ABC/Common/scripts and find a copy of the lua ifs_saveops.lua. According to the error message, this is what's crashing and it looks to all be code relating to loading and saving the game. In particular, the function ifs_saveop_DoOps() is failing on one of these lines:

Code: Select all

assert( not this.bDoPreLoadOps )
assert( not this.bDoPreDeleteOps )
assert( not this.bDoPreSaveOps )
Just intuitively, that makes me think something isn't loading correctly but this looks like a job for the veteran modders tbh. I also see 'memcard' mentioned a lot in this lua; are you doing a PS2 mod? Just a guess, I don't really know what this code does.
No, I'm just putting a hero on the saleucami map of teancum, and the model is admiral ackbar also of teancum.

"PS": What happened that the comment of another user disappeared?

"PS"2: If it serves as data, before I had this error:

Message severity: 2
C: \ Battlefront2 \ main \ Battlefront2 \ Source \ Weapon.cpp (82)
Weapon 'all_weap_hero_ackbar' is not localized for stats page

I edited it with the localize and that error was solved, but now this new one appeared. I don't know if it has anything to do with it, but it's really hateful.
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: Message Severity: 3

Post by Anakin »

Hey there, let's do another try
ZZ09 wrote:
Thu May 07, 2020 9:00 pm
[...]
"PS": What happened that the comment of another user disappeared?
[...]

Well we got this brand new and cute server update and i posted in the time after the last backup and before the new version was activated.
ZZ09 wrote:
Thu May 07, 2020 9:00 pm
"PS"2: If it serves as data, before I had this error:

Message severity: 2
C: \ Battlefront2 \ main \ Battlefront2 \ Source \ Weapon.cpp (82)
Weapon 'all_weap_hero_ackbar' is not localized for stats page

I edited it with the localize and that error was solved, but now this new one appeared. I don't know if it has anything to do with it, but it's really hateful.
Well those errors do not belong to each other.


So let's conclude this error:

Code: Select all

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\LuaHelper.cpp(312)
CallProc failed: assertion failed!
stack traceback:
[C]: in function `assert'
(none): in function `ifs_saveop_DoOps'
(none): in function `ifs_saveop_PreOpDone'
won't crash the game. Yeah it's a severity 3 message, but anyway it does not crash. I think it's because the load callback is executed in a different thread and so the game still stays alive when this crash. Not sure if this is correct or makes any sense. Anyway, this does not crash your game.

But by adding only a hero to a common mission, this message won't pop up. So are there any other mods installed (ZZZ, Rayman's ai hero script, Remaster,...)?
Can you post your mission script please
ZZ09
Private Recruit
Posts: 17
Joined: Sun Mar 29, 2020 7:04 pm
Games I'm Playing :: SWBF2 2005
xbox live or psn: Steam: LA Z
Location: Argentina

Re: Message Severity: 3

Post by ZZ09 »

Yes of course, here is the mission script:

Code: Select all

ucft
{
    REQN
    {
        "config"
        "ingame_movies"	
    }

    REQN
    {
        "script"
        "setup_teams"
        "gametype_conquest"
        "gametype_capture"
        "Objective"
        "MultiObjectiveContainer"
        "ObjectiveCTF"
        "ObjectiveAssault"
        "ObjectiveSpaceAssault"
        "ObjectiveConquest" 
        "ObjectiveTDM"
        "ObjectiveOneFlagCTF"
	"SoundEvent_ctf"
        "ObjectiveGoto"        
        "LinkedShields"
        "LinkedDestroyables"
        "LinkedTurrets"
        "Ambush"
        "PlayMovieWithTransition"
    }

    REQN
    {
        "lvl"
        "SALg_con"
        "SALc_con"
        "SALg_ctf"
        "SALc_ctf"
        "SALg_eli"
    }
}
And regarding mods I use the Star Wars Battlefront 2 Remaster Project (https://www.moddb.com/mods/hd-graphics- ... staller-10)
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: Message Severity: 3

Post by Anakin »

Well this is the mission req file. All elements listed here are put into the mission.lvl.
When we are talking about the mission script, we mean the lua files. You have 5 mission lua files SALg_con, SALc_con, SALg_ctf, SALc_ctf and SALg_eli. Maybe a bit confusion XD.

You said that conquest and ctf crash, so SALg_con (or SALc_con if clone wars crashes) is of interest.
ZZ09
Private Recruit
Posts: 17
Joined: Sun Mar 29, 2020 7:04 pm
Games I'm Playing :: SWBF2 2005
xbox live or psn: Steam: LA Z
Location: Argentina

Re: Message Severity: 3

Post by ZZ09 »

That is, the Clone Wars mode, both in conquest or in ctf, nothing happens because you do not modify anything there (SALc_con, SALc_ctf), the game does not crash.
The added hero is for the Galactic Civil War (SALg_eli, SALg_con, SALg_ctf). In hero assault game mode the added character is perfect, but in conquest and ctf spawning the hero in AI immediately crashes.
Sporadia
Corporal
Corporal
Posts: 151
Joined: Thu Jan 24, 2019 11:02 pm
Projects :: No Mod project currently
Games I'm Playing :: None
xbox live or psn: No gamertag set

Re: Message Severity: 3

Post by Sporadia »

ZZ09 wrote:
Fri May 08, 2020 2:07 pm
In hero assault game mode the added character is perfect, but in conquest and ctf spawning the hero in AI immediately crashes.
'Spawning the hero in AI?' Are you trying to add a hero that works normally or something more complicated? Also could you post the code in the .lua file where you add the hero? (What you've posted so far is a .req file). Even if you don't want to share the whole lua file, can you start by posting the ReadDataFile() command which loads the hero, the SetupTeam commands, any AddUnitClass commands and any SetHeroClass commands. Along with any other lua which might reference the hero's name.

For example, if I wanted to put Jango Fett in one of my test mods:

The ReadDataFile() commands:
Hidden/Spoiler:
[code]
ReadDataFile("dc:SIDE\\add.lvl",
"add_inf_rifleman_clone_bluetrainee",
"add_inf_rocketeer_clone_bluetrainee",
"add_inf_sniper_clone_bluetrainee",
"add_inf_rifleman_clone_redtrainee",
"add_inf_rocketeer_clone_redtrainee")

ReadDataFile("SIDE\\rep.lvl",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper",
"rep_inf_ep3_jettrooper",
"rep_hero_obiwan",
"rep_inf_ep3_officer")

ReadDataFile("SIDE\\cis.lvl",
"cis_fly_fedlander_dome",
"cis_inf_engineer",
"cis_inf_sniper",
"cis_hero_jangofett",
"cis_inf_droideka",
"cis_inf_officer")[/code]

The SetupTeams commands (these don't affect Jango but might still be worth seeing):
Hidden/Spoiler:
[code]SetupTeams{
REP = {
team = REP,
units = 32,
reinforcements = -1,
soldier = { "add_inf_rifleman_clone_bluetrainee", 9, 25},
assault = { "add_inf_rocketeer_clone_bluetrainee", 1, 4},
engineer = { "rep_inf_ep3_engineer", 1, 4},
sniper = { "add_inf_sniper_clone_bluetrainee", 1, 4},
officer = { "rep_inf_ep3_officer", 1, 4},
special = { "rep_inf_ep3_jettrooper", 1, 4},
},
}
SetupTeams{
CIS = {
team = CIS,
units = 32,
reinforcements = -1,
soldier = { "add_inf_rifleman_clone_redtrainee", 9, 25},
assault = { "add_inf_rocketeer_clone_redtrainee", 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},
},
}[/code]

The line that adds Jango Fett:
Hidden/Spoiler:
[code]SetHeroClass(CIS, "cis_hero_jangofett")[/code]

Edit: I've added more examples to the ReadDataFile.
ZZ09
Private Recruit
Posts: 17
Joined: Sun Mar 29, 2020 7:04 pm
Games I'm Playing :: SWBF2 2005
xbox live or psn: Steam: LA Z
Location: Argentina

Re: Message Severity: 3

Post by ZZ09 »

I'm just adding a normal hero, I mean I'm not doing anything new, just that. And with regard to .lua there is no problem.

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

ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveConquest")

-- Empire Attacking (attacker is always #1)
local ALL = 2
local IMP = 1
-- These variables do not change
local ATT = 1
local DEF = 2

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("dc:Load\\common.lvl")

ReadDataFile("dc:Load\\common.lvl")
--Tell game to load our loading image
ReadDataFile("dc:Load\\common.lvl")

ReadDataFile("ingame.lvl")

SetMaxFlyHeight(20)
SetMaxPlayerFlyHeight (20)

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\\tat.lvl;tat2gcw")
ReadDataFile("SIDE\\all.lvl",
"all_inf_rifleman",
"all_inf_rocketeer",
"all_inf_sniper",
"all_inf_engineer",
"all_inf_officer",
"all_inf_wookiee",
"all_hero_leia")

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_bobafett")

ReadDataFile("DC:SIDE\\heroes.lvl",
"all_hero_ackbar")

SetupTeams{
all = {
team = ALL,
units = 20,
reinforcements = 150,
soldier = { "all_inf_rifleman",9, 25},
assault = { "all_inf_rocketeer",1,4},
engineer = { "all_inf_engineer",1,4},
sniper = { "all_inf_sniper",1,4},
officer = { "all_inf_officer",1,4},
special = { "all_inf_wookiee",1,4},

},
imp = {
team = IMP,
units = 20,
reinforcements = 150,
soldier = { "imp_inf_rifleman",9, 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},
},
}

SetHeroClass(ALL, "all_hero_ackbar")
SetHeroClass(IMP, "imp_hero_bobafett")

-- 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 = 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:SAL\\SAL.lvl", "SAL_conquest")
SetDenseEnvironment("false")


-- Sound Stats

voiceSlow = OpenAudioStream("sound\\global.lvl", "all_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "des_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", "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(2, "Allleaving")
SetOutOfBoundsVoiceOver(1, "Impleaving")

SetAmbientMusic(ALL, 1.0, "all_tat_amb_start", 0,1)
SetAmbientMusic(ALL, 0.8, "all_tat_amb_middle", 1,1)
SetAmbientMusic(ALL, 0.2, "all_tat_amb_end", 2,1)
SetAmbientMusic(IMP, 1.0, "imp_tat_amb_start", 0,1)
SetAmbientMusic(IMP, 0.8, "imp_tat_amb_middle", 1,1)
SetAmbientMusic(IMP, 0.2, "imp_tat_amb_end", 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")

-- Camera Stats
AddCameraShot(0.901391, -0.061852, -0.427560, -0.029339, -61.664173, 17.944555, 8.238253);
AddCameraShot(0.148669, -0.006079, -0.988043, -0.040397, -13.304453, 15.213711, -38.896919);
AddCameraShot(-0.204501, -0.001639, -0.978833, 0.007845, 77.053955, 15.213711, -18.844965);
AddCameraShot(0.872585, 0.017622, -0.488045, 0.009856, -6.536069, 2.943680, -96.764313);
AddCameraShot(-0.194349, 0.009613, -0.979688, -0.048457, 27.295074, 16.449509, -0.125231);

end
The .lua from ctf:
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveCTF")

-- Empire Attacking (attacker is always #1)
ALL = 1
IMP = 2
-- These variables do not change
ATT = 1
DEF = 2

function ScriptPostLoad()

SoundEvent_SetupTeams( IMP, 'imp', ALL, 'all' )


--This is all the flag capture objective stuff
SetProperty("flag1", "GeometryName", "com_icon_alliance_flag")
SetProperty("flag1", "CarriedGeometryName", "com_icon_alliance_flag_carried")
SetProperty("flag2", "GeometryName", "com_icon_imperial_flag")
SetProperty("flag2", "CarriedGeometryName", "com_icon_imperial_flag_carried")

SetClassProperty("com_item_flag", "DroppedColorize", 1)

--This is all the actual ctf objective setup
ctf = ObjectiveCTF:New{teamATT = REP, teamDEF = CIS, captureLimit = 5, textATT = "game.modes.ctf", textDEF = "game.modes.ctf2", hideCPs = true, multiplayerRules = true}
ctf:AddFlag{name = "flag1", homeRegion = "team1_capture", captureRegion = "team2_capture",
capRegionMarker = "hud_objective_icon_circle", capRegionMarkerScale = 3.0,
icon = "", mapIcon = "flag_icon", mapIconScale = 3.0}
ctf:AddFlag{name = "flag2", homeRegion = "team2_capture", captureRegion = "team1_capture",
capRegionMarker = "hud_objective_icon_circle", capRegionMarkerScale = 3.0,
icon = "", mapIcon = "flag_icon", mapIconScale = 3.0}

ctf: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("dc:Load\\common.lvl")

ReadDataFile("dc:Load\\common.lvl")
--Tell game to load our loading image
ReadDataFile("dc:Load\\common.lvl")

ReadDataFile("ingame.lvl")

SetMaxFlyHeight(20)
SetMaxPlayerFlyHeight (20)

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\\tat.lvl;tat2gcw")
ReadDataFile("SIDE\\all.lvl",
"all_inf_rifleman",
"all_inf_rocketeer",
"all_inf_sniper",
"all_inf_engineer",
"all_inf_officer",
"all_inf_wookiee",
"all_hero_leia")

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_bobafett")

ReadDataFile("DC:SIDE\\heroes.lvl",
"all_hero_ackbar")

SetupTeams{
all = {
team = ALL,
units = 20,
reinforcements = 150,
soldier = { "all_inf_rifleman",9, 25},
assault = { "all_inf_rocketeer",1,4},
engineer = { "all_inf_engineer",1,4},
sniper = { "all_inf_sniper",1,4},
officer = { "all_inf_officer",1,4},
special = { "all_inf_wookiee",1,4},

},
imp = {
team = IMP,
units = 20,
reinforcements = 150,
soldier = { "imp_inf_rifleman",9, 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},
},
}

SetHeroClass(ALL, "all_hero_ackbar")
SetHeroClass(IMP, "imp_hero_bobafett")

-- 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 = 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)
SetMemoryPoolSize("FlagItem", 2)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:SAL\\SAL.lvl", "SAL_ctf")
SetDenseEnvironment("false")


-- Sound Stats

voiceSlow = OpenAudioStream("sound\\global.lvl", "all_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "des_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", "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(2, "Allleaving")
SetOutOfBoundsVoiceOver(1, "Impleaving")

SetAmbientMusic(ALL, 1.0, "all_tat_amb_start", 0,1)
SetAmbientMusic(ALL, 0.8, "all_tat_amb_middle", 1,1)
SetAmbientMusic(ALL, 0.2, "all_tat_amb_end", 2,1)
SetAmbientMusic(IMP, 1.0, "imp_tat_amb_start", 0,1)
SetAmbientMusic(IMP, 0.8, "imp_tat_amb_middle", 1,1)
SetAmbientMusic(IMP, 0.2, "imp_tat_amb_end", 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")

-- Camera Stats
AddCameraShot(0.901391, -0.061852, -0.427560, -0.029339, -61.664173, 17.944555, 8.238253);
AddCameraShot(0.148669, -0.006079, -0.988043, -0.040397, -13.304453, 15.213711, -38.896919);
AddCameraShot(-0.204501, -0.001639, -0.978833, 0.007845, 77.053955, 15.213711, -18.844965);
AddCameraShot(0.872585, 0.017622, -0.488045, 0.009856, -6.536069, 2.943680, -96.764313);
AddCameraShot(-0.194349, 0.009613, -0.979688, -0.048457, 27.295074, 16.449509, -0.125231);
end
And finally the one of assault with heroes, which is the one that does not crash:
Hidden/Spoiler:
--
-- 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,
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()

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

ReadDataFile("dc:Load\\common.lvl")
--Tell game to load our loading image
ReadDataFile("dc:Load\\common.lvl")


SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",70) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",850) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",850) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",850) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",750) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",8000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",140) -- should be ~1x #combo -- should be ~1x #combo

ReadDataFile("ingame.lvl")

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

SetMaxFlyHeight(20)
SetMaxPlayerFlyHeight(20)

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

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

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

ReadDataFile("SIDE\\cis.lvl",
"cis_hero_grievous",
"cis_hero_darthmaul",
"cis_hero_countdooku",
"cis_hero_jangofett")

ReadDataFile("dc:SIDE\\heroes.lvl",
"all_hero_ackbar")

SetupTeams{
hero = {
team = ALL,
units = 12,
reinforcements = -1,
soldier = { "all_hero_hansolo_tat",1,2},
assault = { "all_hero_chewbacca", 1,2},
engineer= { "all_hero_luke_jedi", 1,2},
sniper = { "rep_hero_obiwan", 1,2},
officer = { "rep_hero_kiyadimundi", 1,2},
special = { "rep_hero_macewindu", 1,2},
},
}

AddUnitClass(ALL,"all_hero_ackbar", 1,2)
AddUnitClass(ALL,"rep_hero_aalya", 1,2)
AddUnitClass(ALL,"rep_hero_kiyadimundi",1,2)
AddUnitClass(ALL,"rep_hero_yoda",1,2)

SetupTeams{
villain = {
team = IMP,
units = 12,
reinforcements = -1,
soldier = { "imp_hero_bobafett", 1,2},
assault = { "imp_hero_darthvader",1,2},
engineer= { "cis_hero_darthmaul", 1,2},
sniper = { "cis_hero_jangofett", 1,2},
officer = { "cis_hero_grievous", 1,2},
special = { "imp_hero_emperor", 1,2},

},
}
AddUnitClass(IMP, "rep_hero_anakin",1,2)
AddUnitClass(IMP, "cis_hero_countdooku",1,2)

-- 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",41)
SetMemoryPoolSize("EntityDefenseGridTurret", 0)
SetMemoryPoolSize("EntityDroid", 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", 2)
SetMemoryPoolSize("EntitySoundStatic", 45)
SetMemoryPoolSize("FLEffectObject::OffsetMatrix", 120)
SetMemoryPoolSize("MountedTurret", 0)
SetMemoryPoolSize("Navigator", 23)
SetMemoryPoolSize("Obstacle", 667)
SetMemoryPoolSize("Ordnance", 80) -- not much ordnance going on in the level
SetMemoryPoolSize("ParticleEmitter", 512)
SetMemoryPoolSize("ParticleEmitterInfoData", 512)
SetMemoryPoolSize("PathFollower", 23)
SetMemoryPoolSize("PathNode", 128)
SetMemoryPoolSize("ShieldEffect", 0)
SetMemoryPoolSize("TentacleSimulator", 24)
SetMemoryPoolSize("TreeGridStack", 290)
SetMemoryPoolSize("UnitAgent", 23)
SetMemoryPoolSize("UnitController", 23)
SetMemoryPoolSize("Weapon", weaponCnt)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:SAL\\SAL.lvl", "SAL_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", "gcw_music")
OpenAudioStream("sound\\tat.lvl", "tat2")
OpenAudioStream("sound\\tat.lvl", "tat2")

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, 1.0, "gen_amb_celebDeathmatch", 0,1)
SetAmbientMusic(IMP, 1.0, "gen_amb_celebDeathmatch", 0,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("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)

--OpeningSateliteShot
AddCameraShot(0.901391, -0.061852, -0.427560, -0.029339, -61.664173, 17.944555, 8.238253);
AddCameraShot(0.148669, -0.006079, -0.988043, -0.040397, -13.304453, 15.213711, -38.896919);
AddCameraShot(-0.204501, -0.001639, -0.978833, 0.007845, 77.053955, 15.213711, -18.844965);
AddCameraShot(0.872585, 0.017622, -0.488045, 0.009856, -6.536069, 2.943680, -96.764313);
AddCameraShot(-0.194349, 0.009613, -0.979688, -0.048457, 27.295074, 16.449509, -0.125231);

end
Sporadia
Corporal
Corporal
Posts: 151
Joined: Thu Jan 24, 2019 11:02 pm
Projects :: No Mod project currently
Games I'm Playing :: None
xbox live or psn: No gamertag set

Re: Message Severity: 3

Post by Sporadia »

I've already ruled out anything I'd know how to fix but just to pin down the problem: If you change AddUnitClass(ALL,"all_hero_ackbar", 1,2) to SetHeroClass(ALL, "all_hero_ackbar") in the hero assault lua, does that crash too? And if you do the same for "rep_hero_aalya" instead, does that not crash?
ZZ09
Private Recruit
Posts: 17
Joined: Sun Mar 29, 2020 7:04 pm
Games I'm Playing :: SWBF2 2005
xbox live or psn: Steam: LA Z
Location: Argentina

Re: Message Severity: 3

Post by ZZ09 »

I just tried what you told me in hero assault mode:

Code: Select all

AddUnitClass(ALL, "all_hero_ackbar")
And it only takes ackbar with a normal hero, I mean as if we were playing conquest with the lightsaber of life.

Also try the same in conquest, add it as a class, but the game crashes.
Sporadia
Corporal
Corporal
Posts: 151
Joined: Thu Jan 24, 2019 11:02 pm
Projects :: No Mod project currently
Games I'm Playing :: None
xbox live or psn: No gamertag set

Re: Message Severity: 3

Post by Sporadia »

Oh that's a much better sign than I was expecting. Since you now know Ackbar works completely in the hero assault but doesn't work at all in conquest. It suggests the problem's probably somewhere in the mission lua then. Either there's something in your conquest lua that's breaking him, or there's something extra in your hero assualt lua that's making him work.
Last edited by Sporadia on Sat May 09, 2020 5:36 am, edited 2 times in total.
ZZ09
Private Recruit
Posts: 17
Joined: Sun Mar 29, 2020 7:04 pm
Games I'm Playing :: SWBF2 2005
xbox live or psn: Steam: LA Z
Location: Argentina

Re: Message Severity: 3

Post by ZZ09 »

Ok, I'm glad that's a good sign :D , but now. What can the game cause within the game? Since the only thing I do is modify the sides and nothing else, I do not modify another script

PS: Sorry I asked so much, is that I do not understand much, I just base it
Sporadia
Corporal
Corporal
Posts: 151
Joined: Thu Jan 24, 2019 11:02 pm
Projects :: No Mod project currently
Games I'm Playing :: None
xbox live or psn: No gamertag set

Re: Message Severity: 3

Post by Sporadia »

First difference I've noticed, is it possible that your Combo memory pools are too small? Ignore this if Ackbar doesn't use custom animations. And actually, what about making the memory pool for "EntityCloth" a bit bigger? Or adding the ones for for "ParticleEmitter" and "ParticleEmitterInfoData". Or if Ackbar has tentacles in his odf, adding the memory pool for "TentacleSimulator". These are all shots in the dark but I'm just looking at things your hero assault does that your other 2 missions don't do.
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: Message Severity: 3

Post by Anakin »

Can you show us the complete error log please?
And a screenshot of your GameData/addon/ folder as well as one of your GameData/data/_lvl_PC/ folder
ZZ09
Private Recruit
Posts: 17
Joined: Sun Mar 29, 2020 7:04 pm
Games I'm Playing :: SWBF2 2005
xbox live or psn: Steam: LA Z
Location: Argentina

Re: Message Severity: 3

Post by ZZ09 »

Yes of course:
The complete BFront2 and the captures:

http://www.mediafire.com/file/0x2ak1o4b ... r.rar/file


PS: I have no other way to publish it, sorry :(
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: Message Severity: 3

Post by Anakin »

Well i mean this folder: C:\Program Files (x86)\Steam\steamapps\common\Star Wars Battlefront II\GameData\data\_lvl_pc
not the data_XXX\_lvl_PC folder. But no need for this, i already know what i need to know from the error log.

Code: Select all

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\Weapon.cpp(2044)
Weapon "imp_weap_hero_flamethrower" missing geometry "imp_1st_weap_inf_null"

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\Weapon.cpp(2076)
Weapon "imp_weap_hero_flamethrower" missing high res geometry "imp_1st_weap_inf_null"

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\EntitySoldier.cpp(10793)
Soldier "all_hero_ackbar" weapon 4 "all_weap_inf_buff_defense" not found
Pretty sure that the last of the messages crashes the game. The MS3 messages are from remaster. Not my best work i released. Please update to v1.3 r6 to fix this: https://www.moddb.com/mods/star-wars-ba ... ster-13-r6
Or better update direct to 1.4 this will be properly released till next weekend
ZZ09
Private Recruit
Posts: 17
Joined: Sun Mar 29, 2020 7:04 pm
Games I'm Playing :: SWBF2 2005
xbox live or psn: Steam: LA Z
Location: Argentina

Re: Message Severity: 3

Post by ZZ09 »

Well, there I installed the version of the remaster that you gave me. Now the problem stopped being and is this new:

Code: Select all

Message Severity: 2
C:\Battlefront2\main\Battlefront2\Source\LuaCallbacks_Mission.cpp(668)
EntityClass "wok_inf_warrior" not found
ifs_sideselect_fnEnter(): Map does not support custom era teams
ifs_sideselect_fnEnter(): The award settings file does not exist
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Message Severity: 3

Post by AQT »

Did you fix this?

Code: Select all

Message Severity: 3
C:\Battlefront2\main\Battlefront2\Source\EntitySoldier.cpp(10793)
Soldier "all_hero_ackbar" weapon 4 "all_weap_inf_buff_defense" not found
Your Ackbar is missing that buff weapon.
ZZ09
Private Recruit
Posts: 17
Joined: Sun Mar 29, 2020 7:04 pm
Games I'm Playing :: SWBF2 2005
xbox live or psn: Steam: LA Z
Location: Argentina

Re: Message Severity: 3

Post by ZZ09 »

:D :D :D YES YES YES, finally, that was what crashed the game. Thank you all very much for answering questions! :D :D :D
Post Reply