ODF files

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
ninjor1
Recruit Womprat Killer
Posts: 13
Joined: Sat Oct 18, 2008 5:03 am

ODF files

Post by ninjor1 »

So I copied the ODF files from the Assets; the ones that are located in the Common folder. I then copied them into ABC\Sides\Common1. I then modified the com_rocket_launcher.odf file so that I had more ammo and the reload time only be 1 sec. I then munged the the map, and had the Sides be "Common1". But when I run the map, nothing is different. I still only have 7 rounds and the reload time is still 4 secs. What's wrong? How do I make my map use the ODF files that I want?
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: ODF files

Post by [RDH]Zerted »

Most likely something is wrong with how you are loading your custom side. Please post your Lua script. You did change that to load your side right? The Jedi Creation documentation talks about adding custom sides to your map.
ninjor1
Recruit Womprat Killer
Posts: 13
Joined: Sat Oct 18, 2008 5:03 am

Re: ODF files

Post by ninjor1 »

no i didn't modify my lua. here it is:
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

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

function ScriptPostLoad()
--This defines the CPs. These need to happen first
SetProperty("FDL-2", "IsLocked", 1)
cp1 = CommandPost:New{name = "cp1"}
cp2 = CommandPost:New{name = "cp2"}
cp3 = CommandPost:New{name = "cp3"}
cp6 = CommandPost:New{name = "cp6"}
cp7 = CommandPost:New{name = "cp7"}
cp8 = CommandPost:New{name = "cp8"}


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


conquest:Start()
AddAIGoal(1, "conquest", 1000)
AddAIGoal(2, "conquest", 1000)
AddAIGoal(3, "conquest", 1000)
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()
-- Designers, these two lines *MUST* be first!
StealArtistHeap(1024 * 1024)
SetPS2ModelMemory(2097152 + 65536 * 10)
ReadDataFile("ingame.lvl")

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

AddMissionObjective(IMP, "red", "level.tat2.objectives.1")
-- AddMissionObjective(IMP, "orange", "level.tat2.objectives.2")
AddMissionObjective(ALL, "green", "level.tat2.objectives.1b")
-- AddMissionObjective(ALL, "orange", "level.tat2.objectives.3")


SetMaxFlyHeight(40)
SetMaxPlayerFlyHeight(40)

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

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",
"imp_fly_destroyer_dome" )

ReadDataFile("SIDE\\des.lvl",
"tat_inf_jawa")

-- Jawas --------------------------
SetTeamName (3, "locals")
AddUnitClass (3, "tat_inf_jawa", 7)
SetUnitCount (3, 7)
SetTeamAsFriend(3,ATT)
SetTeamAsFriend(3,DEF)
SetTeamAsFriend(ATT,3)
SetTeamAsFriend(DEF,3)
-----------------------------------

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

SetupTeams{
all = {
team = ALL,
units = 28,
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 = 28,
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_hansolo_tat")
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)
SetMemoryPoolSize("Aimer", 14)
SetMemoryPoolSize("EntityCloth", 25)
SetMemoryPoolSize("EntityFlyer", 6) -- to account for rocket upgrade
SetMemoryPoolSize("MountedTurret", 14)
SetMemoryPoolSize("Obstacle", 664)
SetMemoryPoolSize("PathNode", 384)
SetMemoryPoolSize("TreeGridStack", 500)

SetSpawnDelay(10.0, 0.25)
ReadDataFile("dc:MEM\\tat2.lvl", "tat2_con")
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")



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
YaNkFaN
Field Commander
Field Commander
Posts: 943
Joined: Sat Dec 13, 2008 8:17 am

Re: ODF files

Post by YaNkFaN »

do not copy the files into a different folder other than common.

copy the folder assets/sides/common to data_abc/sides/common then go to data_abc/build/sides/all and copy a clean.bat and munge.bat from there and paste it into data_abc/sides/common now you can edit any common file you want to and it will show up in game.
ninjor1
Recruit Womprat Killer
Posts: 13
Joined: Sat Oct 18, 2008 5:03 am

Re: ODF files

Post by ninjor1 »

it's not working. I copied the files just as you said and it still doesn't work.
MileHighGuy
Jedi
Jedi
Posts: 1194
Joined: Fri Dec 19, 2008 7:58 pm

Re: ODF files

Post by MileHighGuy »

you didnt put in a dc: here> ReadDataFile("SIDE\\whateveryoursideis.lvl", make it this ("dc:SIDE\\whateveryoursideis.lvl", :wink:
ninjor1
Recruit Womprat Killer
Posts: 13
Joined: Sat Oct 18, 2008 5:03 am

Re: ODF files

Post by ninjor1 »

ok. i'll try that.

so if the side I modified is called "Common1" then I would do "dc:SIDE\\Common1.lvl"?
ryukaji
Major
Major
Posts: 513
Joined: Mon Sep 17, 2007 7:46 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

Re: ODF files

Post by ryukaji »

ninjor1 wrote:ok. i'll try that.

so if the side I modified is called "Common1" then I would do "dc:SIDE\\Common1.lvl"?
yes.
ninjor1
Recruit Womprat Killer
Posts: 13
Joined: Sat Oct 18, 2008 5:03 am

Re: ODF files

Post by ninjor1 »

now when the game loads, it just crashes. Sigh, this is so annoying. I appreciate your help though. Without it, I'd be completely lost.

P.S if it helps any, I'm moddifying the com_weap_inf_rocket_launcher ODF. I'm just trying to make the reload time less (until I figure out how to get this to work).
User avatar
trainmaster611
Sith Lord
Sith Lord
Posts: 1779
Joined: Thu Aug 24, 2006 5:22 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Building a railway to Coruscant
Contact:

Re: ODF files

Post by trainmaster611 »

Don't place the dc: in front of Common1.lvl. I'm not even sure where you came up with Common1. Common is the name of the folder that holds parent ODFs with properties consistent with all sides of the game.

Whatever reference you made to Common1, change it back to what it was before. Place the dc: in front of SIDE\\all.lvl and SIDE\\imp.lvl.

So its

dc:SIDE\\all.lvl

and

dc:SIDE\\imp.lvl

That enables the game to recognize any changes that were made to that side (including changes that applied to them from parent ODFs in the Common side). The Common side doesn't need to be modified in the LUA or even the Common.lvl mentioned.
ninjor1
Recruit Womprat Killer
Posts: 13
Joined: Sat Oct 18, 2008 5:03 am

Re: ODF files

Post by ninjor1 »

thanks a whole lot! It works! Thanks to everyone for their help. It was very much appreciated. :thumbs:
Post Reply