CIS Auto Turret does not spawn and some units are white....

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
Droideka88

CIS Auto Turret does not spawn and some units are white....

Post by Droideka88 »

NEW Errors: Check my last post.


Hi guys. I am making a Sniper map in Assualt mode but for some reasons my Auto Turrets won't be spawned, meaning they are not released into the field.

I talked to some people and they were suggesting I use ClassLabel "armedbulding"

What I don't know is where do I apply this class to. The common odfs with exp in it or the units themselves. Here's an example. If somebody can tell what I did wrong and help to fix it through here, then I'd appreciate that. If I can't solve it because of inexperience in modding, then I might have to remove auto turrets....
[GameObjectClass]
ClassParent = "com_bldg_inf_autoturret"
GeometryName = "com_weap_inf_dropturret.msh"
ClassLabel = "armedbuilding"

[Properties]
// NOBODY has override textures for this!
//OverrideTexture = "com_prop_dropturret_imp"

BUILDINGSECTION = "BODY"
GeometryName = "com_weap_inf_dropturret"
ExplosionName = "imp_bldg_inf_autoturret_exp"

BUILDINGSECTION = "TURRET1"

TurretNodeName = "aimer_y"

TURRETSECTION = "TURRET1"

WeaponName = "imp_weap_inf_autoturret"
WeaponAmmo = "0"

AimerNodeName = "aimer_x"
FirePointName = "hp_fire"


[ExplosionClass]
ClassLabel = "explosion"

[Properties]
LifeSpan = "1.0"
Damage = "50.0"
DamageRadius = "4.0"
Shake = "4.0"
ShakeRadius = "4.0"
Effect = "com_sfx_landmine"

ArmorScale = "1.0"
HealthScale = "1.0"
ShieldScale = "0.5"

SoundProperty = "com_weap_obj_small_exp_frequent"
Last edited by Droideka88 on Sat Mar 17, 2007 11:19 am, edited 5 times in total.
LastJedi

RE: Auto Turret does not spawn....

Post by LastJedi »

It would not be an explosion to do that.

1. An explosion is not a building.
2. The explosion is not the actual object. It's simply attached to it.
3. An explosion can't be armed. (other than itself)

-LastJedi
MercuryNoodles
Jedi
Jedi
Posts: 1003
Joined: Sun Mar 12, 2006 7:16 pm
Projects :: Space - Boarding Action
xbox live or psn: No gamertag set

Post by MercuryNoodles »

From what I see, you don't need to screw with the classlabel, because it's already labelled a "portableturret" in the parent com_bldg_inf_autoturret. So, what are you doing with your files? Details! :P
Droideka88

Post by Droideka88 »

Hold on so you're saying that files like cis_bldg_inf_autoturret need the code "portableturret" in the ClassLabel line? Would that make my turrets appear in the field??

Also, I haven't modified my turret files except add "armedbuilding" as Majin thought I should do.\

UPDATE: Ok I think I have may found the problem to the turrets because it is LUA-related.

Also, I was adding another unit, the Imperial Marine (imp_inf_marine). However, I got these errors.
C:\BF2_ModTools\ToolsFL\Bin\luac.exe: ..\..\common\scripts\SN1\SN1g_eli.lua:66: `)' expected (to close `(' at line 62) near `"imp_inf_marine"'
ERROR[scriptmunge scripts\SN1\SN1g_eli.lua]:Could not read input file.ERROR[scriptmunge scripts\SN1\SN1g_eli.lua]:Could not read input file. [continuing]
2 Errors 0 Warnings

ERROR[levelpack mission\SN1g_eli.req]:Expecting bracket, but none was found.
File : munged\pc\sn1g_eli.script.req(1)...

ucft <--
ERROR[levelpack mission\SN1g_eli.req]:Expecting bracket, but none was found.
File : munged\pc\sn1g_eli.script.req(1)...

ucft <--
[continuing]
2 Errors 0 Warnings
Here is my LUA. I do not understand why line 96 is having an error. I thought I put a bracket. Can somebody identify my problem and tell what I need to change?

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

ReadDataFile("sound\\tat.lvl;tat2gcw")
ReadDataFile("dc:SIDE\\all.lvl",
"all_inf_sniper",
"all_inf_sniper_fleet",
"all_inf_rifleman",
"all_inf_wookiee")

ReadDataFile("dc:SIDE\\imp.lvl",
"imp_inf_rifleman",
"imp_inf_rocketeer",
"imp_inf_sniper",
"imp_inf_marine")

ReadDataFile("dc:SIDE\\rep.lvl",
"rep_inf_ep2_sniper",
"rep_inf_ep2_rocketeer",
"rep_inf_ep3_sniper",
"rep_inf_ep3_sniper_felucia",
"rep_inf_ep2_pilot",
"rep_inf_ep3_rifleman")

ReadDataFile("dc:SIDE\\cis.lvl",
"cis_inf_marine",
"cis_inf_rocketeer",
"cis_inf_sniper",
"cis_inf_officer")

--[[ 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 = 40,
reinforcements = -1,
soldier = { "all_inf_sniper",1,3},
assault = { "all_inf_sniper_fleet", 1,3},
engineer= { "all_inf_rifleman", 1,3},
sniper = { "rep_inf_ep2_sniper", 1,3},
officer = { "rep_inf_ep3_sniper_felucia", 1,3},
special = { "rep_inf_ep2_pilot", 1,3},
},
}

AddUnitClass(ALL,"all_inf_wookiee", 1,3)
AddUnitClass(ALL,"rep_inf_ep2_rocketeer", 1,3)
AddUnitClass(ALL,"rep_inf_ep3_sniper",1,3)

SetupTeams{
villain = {
team = IMP,
units = 40,
reinforcements = -1,
soldier = { "imp_inf_sniper", 1,3},
assault = { "imp_inf_rifleman",1,3},
engineer= { "cis_inf_sniper", 1,3},
sniper = { "cis_inf_rocketeer", 1,3},
officer = { "cis_inf_marine", 1,3},
special = { "cis_inf_officer", 1,3},

},
}
AddUnitClass(IMP,"rep_inf_ep3_rifleman",1,3)
AddUnitClass(IMP,"imp_inf_rocketeer",1,3)
AddUnitClass(IMP,"imp_inf_marine",1,3)

-- 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", 1) -- 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:SN1\\tat2.lvl", "tat2_tdm")
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")
-- 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, 1.0, "gen_amb_celebDeathmatch", 0,1)
-- SetAmbientMusic(ALL, 0.9, "all_tat_amb_middle", 1,1)
-- SetAmbientMusic(ALL, 0.1, "all_tat_amb_end", 2,1)
SetAmbientMusic(IMP, 1.0, "gen_amb_celebDeathmatch", 0,1)
-- SetAmbientMusic(IMP, 0.9, "imp_tat_amb_middle", 1,1)
-- SetAmbientMusic(IMP, 0.1, "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")

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
Droideka88

Post by Droideka88 »

I aplogize for the bump but lately I decided not to add any more units and stick with the default numbers. What counts (for me) now is modifying the units and assing some new skins. Recently, some units in the game have become white (meaning no texture) when I was trying to modifying the imp_inf_rifleman with a new skin but it's making my Scout trooper white and my Heavy Trooper not appearing in the field.
ERROR[levelpack req\imp_inf_rifleman.req]:Expecting bracket, but none was found.
File : munged\pc\imp_inf_stormtroope1_low1.model.req(1)...

ucft <--
ERROR[levelpack req\imp_inf_rifleman.req]:Expecting bracket, but none was found.
File : munged\pc\imp_inf_stormtroope1_low1.model.req(1)...

ucft <--
[continuing]
2 Errors 0 Warnings
Note: I used Adobe Photoshop and saved the skin in tga.

Image

Image
User avatar
Hero_Unit
Private First Class
Posts: 78
Joined: Tue Mar 13, 2007 3:15 pm

Post by Hero_Unit »

I had a problem similar to that(Never solved it though, lost interest in the project before I could fix it. :P ), perhaps you should try creating a new world and copy the data necessary over to it.
EDIT: Did you hex edit imp_inf_stormtroope1 and it's lowrez version to referance the imp_inf_troope1? That may be the issue with the troper being white.
Post Reply