Space map--no units [Solved]

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
fiddler_on_the_roof
1st Lieutenant
1st Lieutenant
Posts: 460
Joined: Wed Nov 12, 2008 5:28 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Space map--no units [Solved]

Post by fiddler_on_the_roof »

my space map works, but there are no units. i think when they stopped spawning was after i added a custom ship. here is the bf2log
Hidden/Spoiler:
[code]Message Severity: 2
.\Source\HUDElementBitmap.cpp(380)
HUD BitmapElement unable to find texture hud_target_hint_offscreen

Message Severity: 2
.\Source\HUDElementBitmap.cpp(380)
HUD BitmapElement unable to find texture hud_target_hint_offscreen

Message Severity: 2
.\Source\HUDElementBitmap.cpp(380)
HUD BitmapElement unable to find texture btn_directional_pad_LR
game_interface: Entered
utility_functions2: Listening on AddUnitClass() calls
utility_functions2: Listening on SetHeroClass() calls
utility_functions2: Listening on ReadDataFile() calls
game_interface: Reading in custom strings
game_interface: No user_script_0.lvl
game_interface: No user_script_1.lvl
game_interface: No user_script_2.lvl
game_interface: No user_script_3.lvl
game_interface: No user_script_4.lvl
game_interface: No user_script_5.lvl
game_interface: No user_script_6.lvl
game_interface: No user_script_7.lvl
game_interface: No user_script_8.lvl
game_interface: No user_script_9.lvl
game_interface: No user_script_10.lvl
ifs_sideselect_fnBuildScreen()
game_interface: Exited

Message Severity: 2
.\Source\EntitySoldier.cpp(10471)
Soldier rep_inf_marine has geometry collision

Message Severity: 2
.\Source\EntityGeometry.cpp(1058)
Entity "com_weap_veh_fly_guided_rocket_" unknown terrain collision "p_front_sphere"

Message Severity: 2
.\Source\EntityGeometry.cpp(1073)
Entity "com_weap_veh_fly_guided_rocket_" unknown vehicle collision "p_front_sphere"

Message Severity: 2
.\Source\EntityGeometry.cpp(1065)
Entity "com_weap_veh_fly_guided_rocket_" unknown building collision "p_front_sphere"

Message Severity: 2
.\Source\EntityGeometry.cpp(1051)
Entity "com_weap_veh_fly_guided_rocket_" unknown targetable collision "CollisionMesh"

Message Severity: 2
.\Source\FLEffect.cpp(214)
FLEffect::Read: duplicate effect class name (787b2928)!

Message Severity: 3
.\Source\Aimer.cpp(711)
Aimer "sps_fly_ywing TURRET1 WEAPON1" barrel node "cannon_R" not found

Message Severity: 3
.\Source\Aimer.cpp(711)
Aimer "sps_fly_ywing TURRET1 WEAPON1" barrel node "cannon_L" not found

Message Severity: 2
.\Source\FLEffect.cpp(214)
FLEffect::Read: duplicate effect class name (787b2928)!

Message Severity: 2
.\Source\FLEffect.cpp(214)
FLEffect::Read: duplicate effect class name (787b2928)!

Message Severity: 2
.\Source\FLEffect.cpp(214)
FLEffect::Read: duplicate effect class name (5f518933)!

Message Severity: 3
.\Source\Explosion.cpp(323)
Explosion "cis_bldg_boxturret_exp" missing effect "spa_sfx_turret_exp"

Message Severity: 3
.\Source\Explosion.cpp(323)
Explosion "rep_bldg_boxturret_exp" missing effect "spa_sfx_turret_exp"
uf_updateClassIndex(): Added class: rep_inf_ep3_pilot
uf_updateClassIndex(): Added class: rep_inf_ep3_marine
uf_updateClassIndex(): Added class: cis_inf_pilot
uf_updateClassIndex(): Added class: cis_inf_marine

Message Severity: 2
.\Memory\RedMemoryPool.cpp(317)
Memory pool "ParticleTransformer::SizeTransf" set item count after being allocated

Message Severity: 2
.\Memory\RedMemoryPool.cpp(317)
Memory pool "ParticleTransformer::ColorTrans" set item count after being allocated

Message Severity: 2
.\Memory\RedMemoryPool.cpp(317)
Memory pool "ParticleTransformer::PositionTr" set item count after being allocated
utility_functions2: ReadDataFile(): This map's code, mode: sua sua_cw-assault

Message Severity: 2
.\Source\StringDB.cpp(48)
ID=90889408: trying to replace "spa2_prop_minifedcruiser" with "spa2_prop_minifedcruiser1"

Message Severity: 2
.\Source\Weapon.cpp(82)
Weapon 'sps_weap_droidfighter_rocket' is not localized for stats page

Message Severity: 2
.\Source\Weapon.cpp(82)
Weapon 'sps_nu_shuttle_cannon' is not localized for stats page

Message Severity: 2
.\Source\Weapon.cpp(82)
Weapon 'sps_weap_v19_cannon' is not localized for stats page

Message Severity: 2
.\Source\Weapon.cpp(82)
Weapon 'sps_weap_v19_rocket' is not localized for stats page

Message Severity: 3
.\Source\LuaHelper.cpp(312)
CallProc failed: (none):0: attempt to call global `SetupObjectives' (a nil value)
stack traceback:
(none): in function `ScriptPostLoad'

ifs_sideselect_fnEnter(): Map does not support custom era teams
ifs_sideselect_fnEnter(): The award settings file does not exist

Message Severity: 2
.\Source\CommandFlyer.cpp(210)
Could not build CommandFlyer

Message Severity: 2
.\Source\FirstPerson.cpp(1762)
No FirstPerson model specified for this soldier class[/code]
thanks
Last edited by fiddler_on_the_roof on Wed Nov 04, 2009 4:50 pm, edited 1 time in total.
genaral_mitch
Jedi
Jedi
Posts: 1056
Joined: Fri Aug 14, 2009 12:32 am

Re: space map--no units

Post by genaral_mitch »

You might not have your cps in your .lua. Post your .lua!
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Space map--no units

Post by [RDH]Zerted »

We are never required to have our CPs in the lua. They work fine without being in there. We only add them for the Conquest objective and most space maps don't have Conquest.

You are missing the SetupObjectives function, or at least the game can't find it when you call it from ScriptPostLoad. Post your lua.
User avatar
asleeponduty
Private First Class
Posts: 77
Joined: Tue Jul 22, 2008 3:05 pm
Games I'm Playing :: AaaaaAAaaaAAAaaAAAA
xbox live or psn: No gamertag set
Location: Illinois

Re: Space map--no units

Post by asleeponduty »

The same thing hapened to me. It is in your LUA, esp. when you are loading stuff
check this part:
ReadDataFile("dc:SIDE\\HAHAHA.lvl",
"beastly_speeder",
"flaming_snowman")

make sure you dont add an extra comma if its just one thing
ReadDataFile("dc:SIDE\\uhoh.lvl",
"2_many_commas",)

or if you forgot the ")" at the end
fiddler_on_the_roof
1st Lieutenant
1st Lieutenant
Posts: 460
Joined: Wed Nov 12, 2008 5:28 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: Space map--no units

Post by fiddler_on_the_roof »

ok. here is the c_cmn.lua
Hidden/Spoiler:
[code]--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
-- SPAX - Clone Wars Template Common File
-- Common script that shares all setup information
--

ScriptCB_DoFile("setup_teams")

-- Republic Attacking (attacker is always #1)
REP = 1
CIS = 2
-- These variables do not change
ATT = 1
DEF = 2

function SetupUnits()
ReadDataFile("SIDE\\rep.lvl",
"rep_inf_ep3_pilot",
"rep_inf_ep3_marine",
"rep_fly_anakinstarfighter_sc",
"rep_fly_arc170fighter_sc",
"rep_veh_remote_terminal")

ReadDataFile("dc:SIDE\\sps.lvl",
"sps_fly_droidfighter_sc",
"sps_fly_nu_shuttle_sc",
"sps_fly_ywing",
"rep_fly_v19_sc")

ReadDataFile("SIDE\\cis.lvl",
"cis_inf_pilot",
"cis_inf_marine",
"cis_fly_droidgunship",
"cis_fly_greviousfighter",
"cis_fly_tridroidfighter")

ReadDataFile("SIDE\\tur.lvl",
"tur_bldg_spa_cis_beam",
"tur_bldg_spa_cis_chaingun",
"tur_bldg_spa_rep_beam",
"tur_bldg_spa_rep_chaingun",
"tur_bldg_chaingun_roof")
end

myTeamConfig = {
rep = {
team = REP,
units = 32,
reinforcements = -1,
pilot = { "rep_inf_ep3_pilot",26},
marine = { "rep_inf_ep3_marine",6},
},
cis = {
team = CIS,
units = 32,
reinforcements = -1,
pilot = { "cis_inf_pilot",26},
marine = { "cis_inf_marine",6},
}
}

ScriptCB_DoFile("LinkedTurrets")
function SetupTurrets()
--CIS turrets
turretLinkageCIS = LinkedTurrets:New{ team = CIS, mainframe = "cis-defense",
turrets = {"cis_turr_1", "cis_turr_2", "cis_turr_3", "cis_turr_4", "cis_turr_5", "cis_turr_6"} }
turretLinkageCIS:Init()

function turretLinkageCIS:OnDisableMainframe()
ShowMessageText("level.spa.hangar.mainframe.atk.down", REP)
ShowMessageText("level.spa.hangar.mainframe.def.down", CIS)

BroadcastVoiceOver( "ROSMP_obj_20", REP )
BroadcastVoiceOver( "COSMP_obj_21", CIS )
end
function turretLinkageCIS:OnEnableMainframe()
ShowMessageText("level.spa.hangar.mainframe.atk.up", REP)
ShowMessageText("level.spa.hangar.mainframe.def.up", CIS)

BroadcastVoiceOver( "ROSMP_obj_22", REP )
BroadcastVoiceOver( "COSMP_obj_23", CIS )
end

--REP turrets
turretLinkageREP = LinkedTurrets:New{ team = REP, mainframe = "rep-defense",
turrets = {"rep_turr_1", "rep_turr_2", "rep_turr_3", "rep_turr_4", "rep_turr_5", "rep_turr_6"} }
turretLinkageREP:Init()

function turretLinkageREP:OnDisableMainframe()
ShowMessageText("level.spa.hangar.mainframe.atk.down", CIS)
ShowMessageText("level.spa.hangar.mainframe.def.down", REP)

BroadcastVoiceOver( "ROSMP_obj_21", REP )
BroadcastVoiceOver( "COSMP_obj_20", CIS )
end
function turretLinkageREP:OnEnableMainframe()
ShowMessageText("level.spa.hangar.mainframe.atk.up", CIS)
ShowMessageText("level.spa.hangar.mainframe.def.up", REP)

BroadcastVoiceOver( "ROSMP_obj_23", REP )
BroadcastVoiceOver( "COSMP_obj_22", CIS )
end
end

function ScriptPreInit()
SetWorldExtents(2500)
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()
-- Designers, this line *MUST* be first!
ReadDataFile("ingame.lvl")

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


SetMinFlyHeight(-1800)
SetMaxFlyHeight(1800)
SetMinPlayerFlyHeight(-1800)
SetMaxPlayerFlyHeight(1800)
SetAIVehicleNotifyRadius(100)

ReadDataFile("sound\\spa.lvl;spa2cw")
ScriptCB_SetDopplerFactor(0.4)
ScaleSoundParameter("tur_weapons", "MinDistance", 3.0);
ScaleSoundParameter("tur_weapons", "MaxDistance", 3.0);
ScaleSoundParameter("tur_weapons", "MuteDistance", 3.0);
ScaleSoundParameter("Ordnance_Large", "MinDistance", 3.0);
ScaleSoundParameter("Ordnance_Large", "MaxDistance", 3.0);
ScaleSoundParameter("Ordnance_Large", "MuteDistance", 3.0);
ScaleSoundParameter("explosion", "MaxDistance", 5.0);
ScaleSoundParameter("explosion", "MuteDistance", 5.0);

SetupUnits()
SetupTeams(myTeamConfig)

-- Level Stats
ClearWalkers()
local weaponCnt = 250
local guyCnt = 32
local units = 72
SetMemoryPoolSize("Aimer", 200)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 73)
SetMemoryPoolSize("EnergyBar", weaponCnt)
SetMemoryPoolSize("EntityCloth", 0)
SetMemoryPoolSize("EntityDroideka",0)
SetMemoryPoolSize("EntityDroid",0)
SetMemoryPoolSize("EntityHover", 0)
SetMemoryPoolSize("EntityFlyer", 36)
SetMemoryPoolSize("ParticleTransformer::SizeTransf", 1500)
SetMemoryPoolSize("ParticleTransformer::ColorTrans" , 1784)
SetMemoryPoolSize("ParticleTransformer::PositionTr", 1500)
SetMemoryPoolSize("EntityLight", 100)
SetMemoryPoolSize("EntityRemoteTerminal", 12)
SetMemoryPoolSize("EntitySoldier",guyCnt)
SetMemoryPoolSize("SoldierAnimation", 200)
SetMemoryPoolSize("FLEffectObject::OffsetMatrix", 120)
SetMemoryPoolSize("MountedTurret", 70)
SetMemoryPoolSize("Navigator", guyCnt)
SetMemoryPoolSize("Obstacle", 150)
SetMemoryPoolSize("PassengerSlot", 0)
SetMemoryPoolSize("PathNode", 92)
SetMemoryPoolSize("UnitAgent", units)
SetMemoryPoolSize("UnitController", units)
SetMemoryPoolSize("Weapon", weaponCnt)
SetMemoryPoolSize("TentacleSimulator", 0)
SetMemoryPoolSize("Combo::DamageSample", 0)

SetSpawnDelay(10.0, 0.25)

-- do any pool allocations, custom loading here
if myScriptInit then
myScriptInit()
myScriptInit = nil
end

ReadDataFile("dc:SUA\\spa_sky.lvl", "tat")

ReadDataFile("dc:SUA\\SUA.lvl", myGameMode)

SetDenseEnvironment("false")

SetParticleLODBias(15000)

-- Sound Stats
local voiceSlow = OpenAudioStream("sound\\global.lvl", "spa1_objective_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "rep_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)

local 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\\spa.lvl", "spa")
OpenAudioStream("sound\\spa.lvl", "spa")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
-- OpenAudioStream("sound\\tat.lvl", "tat1_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(REP, "Repleaving")
SetOutOfBoundsVoiceOver(CIS, "Cisleaving")

SetAmbientMusic(REP, 1.0, "rep_spa_amb_start", 0,1)
SetAmbientMusic(REP, 0.99, "rep_spa_amb_middle", 1,1)
SetAmbientMusic(REP, 0.1,"rep_spa_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_spa_amb_start", 0,1)
SetAmbientMusic(CIS, 0.99, "cis_spa_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.1,"cis_spa_amb_end", 2,1)

SetVictoryMusic(REP, "rep_spa_amb_victory")
SetDefeatMusic (REP, "rep_spa_amb_defeat")
SetVictoryMusic(CIS, "cis_spa_amb_victory")
SetDefeatMusic (CIS, "cis_spa_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 Battle over Felucia
-- Rep ship from behind
AddCameraShot(0.998795, -0.041143, -0.026739, -0.001101, -720.435303, 809.024963, 2779.057129);
-- CIS ship from behind
AddCameraShot(0.028389, -0.001117, -0.998823, -0.039312, -629.853760, 809.024963, -2050.946289);
-- Overall from right side of map
AddCameraShot(-0.335210, 0.057062, -0.927078, -0.157814, 1372.964233, 1940.014038, -2266.423828);
-- Overall from left side of map
AddCameraShot(0.911880, -0.246677, -0.316680, -0.085667, -2183.282471, 1940.014038, 2760.666748);


AddDeathRegion("deathregion3")
AddLandingRegion("rep-CP1Con")
AddLandingRegion("cis-CP1Con")

end




[/code]
here is the c_Diet Dr. Pepper.lua
Hidden/Spoiler:
[code]--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
-- SPAX - Clone Wars Template Assault File
--
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("SUAc_cmn")

ScriptCB_DoFile("ObjectiveSpaceAssault")
ScriptCB_DoFile("LinkedShields")
ScriptCB_DoFile("LinkedDestroyables")

myGameMode = "SUA_CW-Assault"

function myScriptInit()
SetMemoryPoolSize("CommandFlyer", 2)
end


function ScriptPostLoad()
SetupObjectives()

SetupShields()
SetupDestroyables()
SetupTurrets()

AddAIGoal(REP, "Deathmatch", 100)
AddAIGoal(CIS, "Deathmatch", 100)

end

function SetupShields()
-- CIS Shielded objects
local linkedShieldObjectsCIS = { cis_fedcoreship_space}
shieldStuffCIS = LinkedShields:New{objs = linkedShieldObjectsCIS, controllerObject = "cis-shield"}
shieldStuffCIS:Init()

function shieldStuffCIS:OnAllShieldsDown()
ShowMessageText("level.spa.hangar.shields.atk.down", REP)
ShowMessageText("level.spa.hangar.shields.def.down", CIS)

BroadcastVoiceOver( "ROSMP_obj_16", REP )
BroadcastVoiceOver( "COSMP_obj_17", CIS )
end
function shieldStuffCIS:OnAllShieldsUp()
ShowMessageText("level.spa.hangar.shields.atk.up", REP)
ShowMessageText("level.spa.hangar.shields.def.up", CIS)

BroadcastVoiceOver( "ROSMP_obj_18", REP )
BroadcastVoiceOver( "COSMP_obj_19", CIS )
end

-- REP Shielded objects
local linkedShieldObjectsREP = { "rep_venator_engine_left", "rep_venator_engine_right", "rep_venator_window1",
"rep_venator_window", "rep_venator_bridge_right", "rep_venator_bridge_left", "rep_venator_right", "rep_venator_left", }
shieldStuffREP = LinkedShields:New{objs = linkedShieldObjectsREP, controllerObject = "rep-shield"}
shieldStuffREP:Init()

function shieldStuffREP:OnAllShieldsDown()
ShowMessageText("level.spa.hangar.shields.atk.down", CIS)
ShowMessageText("level.spa.hangar.shields.def.down", REP)

BroadcastVoiceOver( "ROSMP_obj_17", REP )
BroadcastVoiceOver( "COSMP_obj_16", CIS )
end
function shieldStuffREP:OnAllShieldsUp()
ShowMessageText("level.spa.hangar.shields.atk.up", CIS)
ShowMessageText("level.spa.hangar.shields.def.up", REP)

BroadcastVoiceOver( "ROSMP_obj_19", REP )
BroadcastVoiceOver( "COSMP_obj_18", CIS )
end
end

[/code]
genaral_mitch
Jedi
Jedi
Posts: 1056
Joined: Fri Aug 14, 2009 12:32 am

Re: Space map--no units

Post by genaral_mitch »

You don't seem to have your cps in your .LUA!http://www.gametoast.com/forums/viewtop ... 27&t=20258
From when I just started modding...
fiddler_on_the_roof
1st Lieutenant
1st Lieutenant
Posts: 460
Joined: Wed Nov 12, 2008 5:28 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: Space map--no units

Post by fiddler_on_the_roof »

[RDH]Zerted wrote:We are never required to have our CPs in the lua. They work fine without being in there. We only add them for the Conquest objective and most space maps don't have Conquest.

You are missing the SetupObjectives function, or at least the game can't find it when you call it from ScriptPostLoad. Post your lua.
cps aren't always necesary! you only need them for conqust.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Space map--no units

Post by [RDH]Zerted »

Currently, your map has no Assault objective (the AI just does Deathmatch). If you wanted one, look at the SetupObjectives() function of a different space map. If you don't want that objective, then delete the SetupObjectives() line.
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Re: Space map--no units

Post by MercuryNoodles »

Those are the default space assault AI goals, Zerted. I have a suspicion the error may be related to SetupObjectives() being in such close proximity to function ScriptPostLoad(). I'm looking at Boarding Action's assault lua, and mine has a carriage return separating the two. Otherwise, that portion of the assault lua posted here looks virtually identical, aside from a few extras I threw into mine and the DisableSmallMapMiniMap() command that was deleted from this one. To me, it's the only thing that makes sense, considering the error.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Space map--no units

Post by [RDH]Zerted »

The game is trying to call the a function named SetupObjectives but can't find it. It doesn't exist in any of fiddler_on_the_roof's posted code. I haven't looked at a working script to see where that function normally is. It should exist in one of the map's main scripts or in a script read in by the ScriptCB_DoFile calls. Check a working assault mission to see if you're missing a DoFile or the SetupObjectives funciton itself.
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Re: Space map--no units

Post by MercuryNoodles »

Edit: Oh, I see it now. function SetupObjectives is supposed to be the next function after function ScriptPostLoad. This is starting to get a little beyond my depth, and..well, here's what's missing.
space assault lua template wrote:function SetupObjectives()
assault = ObjectiveSpaceAssault:New{
teamATT = REP, teamDEF = CIS,
multiplayerRules = true
}

local repTargets = {
engines = { "cis_drive_1", "cis_drive_2" },
lifesupport = "cis-life-ext",
bridge = "cis-bridge",
comm = "cis-comms",
sensors = "cis-sensors",
frigates = "cis-frigate",
internalSys = { "cis-life-int", "cis-engines" },
}

local cisTargets = {
engines = "rep_drive_1",
lifesupport = "rep-life-ext",
bridge = "rep-bridge",
comm = "rep-comms",
sensors = "rep-sensors",
frigates = "rep-frigate",
internalSys = { "rep-life-int", "rep-engines" },
}

assault:SetupAllCriticalSystems( "rep", repTargets, true )
assault:SetupAllCriticalSystems( "cis", cisTargets, false )

assault:Start()
end
It's not simply missing, though, since this is part of the template lua. function SetupDestroyables() has suffered the same fate.
I think it was foul play. I'm pretty sure fiddler_on_the_roof got rid of the function, in the bedroom with the candlestick.
fiddler_on_the_roof
1st Lieutenant
1st Lieutenant
Posts: 460
Joined: Wed Nov 12, 2008 5:28 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: Space map--no units

Post by fiddler_on_the_roof »

yeah, i got rid of those parts because i'm using custom models.
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Re: Space map--no units

Post by MercuryNoodles »

Do you know for sure what that part of the script does? I don't know much myself, but I'll tell you what I see. That portion of script defines the teams, sets multiplayerRules to true, and associates the objects given those names in ZE with the space assault mode. In fact, the mode is started from this code. The other missing chunk of code sets the linkages between the destroyable objects, like the internal and external life support systems, again using names associated with objects renamed as such in ZE.

With that said, instead of, say, giving your new models these names in ZE, or changing the script's names and renaming the objects in ZE, or even cutting individual lines that wouldn't be needed, you just cut out whole sections of code without worrying about what exactly they do? How does the use of custom models necessitate this? *waves trout threateningly*

I think the AI issue lay in the missing objectives code, since that's where the instruction is given to start the mode. If the mode hasn't started, how does the game know when the AI can spawn?
fiddler_on_the_roof
1st Lieutenant
1st Lieutenant
Posts: 460
Joined: Wed Nov 12, 2008 5:28 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: Space map--no units

Post by fiddler_on_the_roof »

yeah. i got it to work. thanks guys.

---------solved----------
Post Reply