problem with adding creatures

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

odi-wan

problem with adding creatures

Post by odi-wan »

well i'm working on a mapon what jedis are fighting against wampas and perhaps other creatures but when i want to test the map there's always an errors "Could not open CVB_eli.lvl". I made a "normal" Hero Assault map and changed in the lua one side to wampas but it doesn't work... :( :( :( :( :(
^Destroyer^

Post by ^Destroyer^ »

Wrong topic, i'd sugest you post this in SWBF 2 modding section. I don't know whats wrong, it might be something wrong in your lua. I haven't done anything with creatures yet so i don't know.

^Destroyer^
Last edited by ^Destroyer^ on Mon Apr 24, 2006 2:50 pm, edited 1 time in total.
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: problem with adding creatures

Post by Teancum »

moved to SWBF2 Modding. Please pay attention to where you post.
odi-wan

RE: problem with adding creatures

Post by odi-wan »

well here is the lua if you find any mistake please post it


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


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

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_yoda",
"rep_hero_macewindu",
"rep_hero_anakin",
"rep_hero_aalya",
"rep_hero_kiyadimundi",
"rep_hero_obiwan")

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

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


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

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

SetupTeams{
hero = {
team = ALL,
units = 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_yoda", 1,2},
special = { "rep_hero_macewindu", 1,2},
},
}

AddUnitClass(ALL,"all_hero_leia", 1,2)
AddUnitClass(ALL,"rep_hero_aalya", 1,2)
AddUnitClass(ALL,"rep_hero_kiyadimundi",1,2)

SetupTeams{
villain = {
team = IMP,
units = 15,
reinforcements = -1,
soldier = { "snw_inf_wampa", 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:CVB\\CVB.lvl", "CVB_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")
-- 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
Murdocr

RE: problem with adding creatures

Post by Murdocr »

i'm not sure because i havn't messed with hero assault much, but try adding snw_inf_wampa using the addunitclass command. btw what are those two little line next to readdatafile(snw.lvl. try taking those out
odi-wan

RE: problem with adding creatures

Post by odi-wan »

ok i'll try it
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: problem with adding creatures

Post by Teancum »

The error you get means it can't actually find the LUA. Check addme.lua, mission.req and [mapname]g_eli.req.
odi-wan

RE: problem with adding creatures

Post by odi-wan »

where is "[mapname]g_eli.req."?????
Penguin
Jedi Admin
Jedi Admin
Posts: 2541
Joined: Sun Mar 05, 2006 12:00 am
Location: Australia

RE: problem with adding creatures

Post by Penguin »

data_ABC/common/mission
odi-wan

RE: problem with adding creatures

Post by odi-wan »

well here's the CVBg_eli.req... don't knwo if there's anything wrong
ucft
{
REQN
{

"config"
"cor_movies"

}

REQN
{
"script"
"CVBg_eli"
}
}
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: problem with adding creatures

Post by Teancum »

That looks fine. Before you do anything else, open VisualMunge, hit 'select all' then 'clean'. Then once that's done hit 'deselect all' then check the 'common' checkbox, then munge.
odi-wan

RE: problem with adding creatures

Post by odi-wan »

it doesn't work...
odi-wan

RE: problem with adding creatures

Post by odi-wan »

do you have any other idea to fix the problem???
darth-jedi

RE: problem with adding creatures

Post by darth-jedi »

Okay, do what I do,

For wampas, type this, DO NOT copy and paste, retype it. Put the cursor directly after the ) at the end of the REP ReadDataFile part. Press Enter. Then put as many spaces as needed to line up the cursor with the next ReadDataFile, Like so:

"rep_hero_anakin")
ReadDataFile("SIDE\\snw.lvl",
ReadDataFile("SIDE\\cis.lvl",

Then put the file name of the wampa like so:

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

Notice that every thing is lined up, this, and every last character, is very important, or it will not work.

That is all to do there. To make it a character to play, put the file name anywhere in the setup teams part of the lua. Any further questions, post them in this forum for me to read later.

Darth-Jedi
darth-jedi

RE: problem with adding creatures

Post by darth-jedi »

Extra character list:

(note: some may not work as they were not finished for the game)

des.lvl:
"tat_inf_jawa"
"tat_inf_tuskenhunter"
"tat_inf_tuskenraider"
ewk.lvl:
"ewk_inf_basic"
gam.lvl:
"gam_inf_gamorreanguard"
gar.lvl:
"gar_inf_soldier"
"gar_inf_vanguard"
"gar_inf_temple_soldier"
"gar_inf_temple_vanguard"
"gar_inf_naboo_queen"
geo.lvl:
"gen_inf_geonosian" (YES THERE IS AN N INSTEAD OF AN O AT THE BEGINNING)
"geo_inf_agro_geonosian"
"geo_inf_acklay"
gun.lvl:
"gun_inf_soldier"
"gun_inf_defender"
"gun_inf_rider"
jed.lvl:
"jed_knight_01"
"jed_knight_02"
"jed_knight_03"
"jed_knight_04"
"jed_master_01"
"jed_master_02"
"jed_master_03"
"jed_sith_01"
"jed_runner"
snw.lvl:
"snw_inf_wampa"
wok.lvl:
"wok_inf_basic"
odi-wan

Re: RE: problem with adding creatures

Post by odi-wan »

ok
Last edited by odi-wan on Fri Apr 28, 2006 8:19 am, edited 1 time in total.
odi-wan

Re: RE: problem with adding creatures

Post by odi-wan »

darth-jedi wrote:Extra character list:

(note: some may not work as they were not finished for the game)

des.lvl:
"tat_inf_jawa"
"tat_inf_tuskenhunter"
"tat_inf_tuskenraider"
ewk.lvl:
"ewk_inf_basic"
gam.lvl:
"gam_inf_gamorreanguard"
gar.lvl:
"gar_inf_soldier"
"gar_inf_vanguard"
"gar_inf_temple_soldier"
"gar_inf_temple_vanguard"
"gar_inf_naboo_queen"
geo.lvl:
"gen_inf_geonosian" (YES THERE IS AN N INSTEAD OF AN O AT THE BEGINNING)
"geo_inf_agro_geonosian"
"geo_inf_acklay"
gun.lvl:
"gun_inf_soldier"
"gun_inf_defender"
"gun_inf_rider"
jed.lvl:
"jed_knight_01"
"jed_knight_02"
"jed_knight_03"
"jed_knight_04"
"jed_master_01"
"jed_master_02"
"jed_master_03"
"jed_sith_01"
"jed_runner"
snw.lvl:
"snw_inf_wampa"
wok.lvl:
"wok_inf_basic"
shall i put this into a normal map or in a hero assault map??
darth-jedi

RE: Re: RE: problem with adding creatures

Post by darth-jedi »

Use which ever units, and I would suggest, using an assault map, because then you don't have to deal with the addunitclass in the conquest luas.
odi-wan

Post by odi-wan »

well in an assault map it didn't work so i made an conquest map and changing the IMP to wampas was no problem but when i want to change ALL to heros it doesn't work i changed all unit classes to heros but in game there are still the normal units...
odi-wan

Post by odi-wan »

so here's the lua
Post Reply