How to add "Rising Son" to your mod

Discussion, progress updates, and downloads for the Dark Times and Rising Son mods.

Moderator: Moderators

Rebel Sergeant
Posts: 200
Joined: Fri Jul 09, 2010 3:49 pm
Location: Connecticut, USA
Projects :: None
Games I'm Playing :: BF4 SWBF2 Skyrim
xbox live or psn: UBERMEISTER32

Re: How to add "Rising Son" to your mod

Postby CommanderFixer » Fri Aug 06, 2010 8:10 pm

Um, I did what you said, Mav, but when I went to data_***/Common/Scripts/GJP and I didn't find the ***1_con. Am I supposed to make the REQ file, or is it supposed to be there? And how DO I make a file? :?

Master Bounty Hunter
User avatar
Posts: 1471
Joined: Tue Feb 24, 2009 5:32 am
Location: Australia

Re: How to add "Rising Son" to your mod

Postby lucasfart » Fri Aug 06, 2010 8:43 pm

Just copy an already existing req file into your req folder, i normally use the conquest mode of the same map (GJPc_con.req), and change the c to 1, then open the file and change the c to 1 in there as well. For your lua, just copy the GJPg_con.lua and rename it to GJP1_con.lua.

I think i should say this though, if you're struggling to create a req and lua, I highly doubt you'll be able to add Rising Son without a LOT of help.

Rebel Sergeant
Posts: 200
Joined: Fri Jul 09, 2010 3:49 pm
Location: Connecticut, USA
Projects :: None
Games I'm Playing :: BF4 SWBF2 Skyrim
xbox live or psn: UBERMEISTER32

Re: How to add "Rising Son" to your mod

Postby CommanderFixer » Sat Aug 07, 2010 11:00 am

Well, I know a lot about changing, but making the actual file can be tough since notepad does not like to save where it is supposed to. thanks anyways, because I'm getting rid of the Clone Wars era, since my map takes place during the Dark Times/ Great Jedi Purge. :maulsaber: Thanks.

Jedi Admin
User avatar
Posts: 2186
Joined: Mon May 30, 2005 5:22 pm
Location: North Texas

Re: How to add "Rising Son" to your mod

Postby EraOfDesann » Sun Aug 22, 2010 6:36 pm

I've added Rising Son to a mod map that I've been working on and DT Conquest crashes as soon as it starts to load. Here's my...

BF2Log:
Hidden/Spoiler:
Opened logfile BFront2.log 2010-08-22 1716
shell_interface: Entered
shell_interface: gPlatformStr, gOnlineServiceStr, gLangStr, gLangEnum: PC GameSpy english 0
ifs_era_handler - Entered
ifs_era_handler - Exited
shell_interface: No custom_gc_0.lvl
shell_interface: No custom_gc_1.lvl
shell_interface: No custom_gc_2.lvl
shell_interface: No custom_gc_3.lvl
shell_interface: No custom_gc_4.lvl
shell_interface: No custom_gc_5.lvl
shell_interface: No custom_gc_6.lvl
shell_interface: No custom_gc_7.lvl
shell_interface: No custom_gc_8.lvl
shell_interface: No custom_gc_9.lvl
shell_interface: Found custom_gc_10.lvl
custom_gc_10: Entered
custom_gc_10: Found custom_gc_11.lvl
custom_gc_11: Entered
ifs_freeform_init_dt.lua
ifs_freeform_start_dt.lua
custom_gc_11: Taking control of custom_GetGCButtonList()...
custom_gc_11: Taking control of custom_PressedGCButton()...
custom_gc_11: Exited
custom_gc_10: No custom_gc_12.lvl. Will stop searching for any more cGC scripts.
custom_gc_10: Exited
custom_EraButtonList(): Finished building era button table Known eras buttons: 28
custom_GetGMapEras(): Finished building era table Known eras: 28
custom_GetGMapModes(): Finished building game mode table Known Modes: 39
custom_GetMPGameModeList(): Finished building game mode list table List Length: 40
custom_SetMovieLocation()
custom_gc_11: custom_GetGCButtonList(): Entered
custom_GetGCButtonList()
custom_gc_11: custom_GetGCButtonList(): Exited
custom_SetMovieLocation()
custom_GetFreeformBattleModeList(): Finished building freeform battle mode list Known Modes: 39
ingame stream movies\crawl.mvs
shell_interface: Opening movie: movies\shell.mvs
shell_interface: Leaving
Mission Checker: Entered addme
Mission Checker: addme: Now listening in on AddDownloadableContent() calls
Mission Checker: Exited addme
Cannot find ..\..\addon\BFX\data\_LVL_PC\mission.lvl. Skipping BFX's extra missions
Cannot find ..\..\addon\BFX\data\_LVL_PC\mission.lvl. Skipping BFX's extra missions
Found ..\..\addon\BDT\data\_LVL_PC\SIDE\dark.lvl. Adding DT's missions
prev = none iLastPage = nil
prev = texture iLastPage = 1
prev = texture iLastPage = 2
prev = texture iLastPage = 3
ifs_legal.Exit

Message Severity: 2
.\Source\GameMovie.cpp(399)
Unable to find open movie segment shell_main

ifs_saveop_DoOps LoadFileList
ifs_saveop_DoOps LoadFileList
ifs_saveop_DoOps LoadProfile
ifs_saveop_DoOps LoadProfile
ifs_sp_campaign: Input_Accept(): Entered: _tab_instant
missionlist_ExpandMapList()
ifs_missionselect_pcMulti_fnSetMapPreview(): Defaulting index to 1
Checkbox for check_era27 clicked
this.CurButton = check_era27
cur_button = nil
this.CurButton = check_mode1
cur_button = nil
custom_AddMapNew()
custom_printTable(): table: 04F1120C
The key, value is: change table: 04F1122C
The key, value is: era_g 1
The key is mapluafile, the formated value is: HUT<A>_<B>
The key, value is: bSelected 1
The key, value is: mode_con_1 1
The key, value is: era_1 1
The key, value is: mode_con_g 1
The key, value is: isModLevel 1
custom_printTable(): Returning
custom_printTable(): table: 04F16B4C
The key, value is: key mode_con
The key, value is: subst con
The key, value is: showstr modename.name.con
The key, value is: descstr modename.description.con
The key, value is: icon mode_icon_con
custom_printTable(): Returning
gMapEras[i].key = era_1 Era = era_1 subst = 1
Adding map: HUT1_con idx: 1
this.CurButton = _map_add
cur_button = nil
this.CurButton = Launch
cur_button = nil

Message Severity: 2
.\Source\LuaCallbacks_Mission.cpp(3776)
Command Post "cp1" not found
(none):0: attempt to perform arithmetic on a nil value


LUA:
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("TFURandom")
ScriptCB_DoFile("AIHeroSupport")

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

ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\core.lvl")

function ScriptPostLoad()end


--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"}
cp5 = CommandPost:New{name = "cp5"}
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(cp4)
conquest:AddCommandPost(cp5)
conquest:AddCommandPost(cp6)
conquest:AddCommandPost(cp7)
conquest:AddCommandPost(cp8)


conquest:Start()

EnableSPHeroRules()
if not ScriptCB_InMultiplayer() then
herosupport = AIHeroSupport:New{AIATTHeroHealth = 4000, AIDEFHeroHealth = 4000, gameMode = "NonConquest",}
herosupport:SetHeroClass(ALL, herostrAll)
herosupport:SetHeroClass(IMP, herostrEmp)
herosupport:AddSpawnCP("CP1","CP1SpawnPath")
herosupport:AddSpawnCP("CP2","CP2SpawnPath")
herosupport:AddSpawnCP("CP3","CP3SpawnPath")
herosupport:AddSpawnCP("CP4","CP4SpawnPath")
herosupport:AddSpawnCP("CP5","CP5SpawnPath")
herosupport:AddSpawnCP("CP6","CP6SpawnPath")
herosupport:AddSpawnCP("CP7","CP7SpawnPath")
herosupport:AddSpawnCP("CP8","CP8SpawnPath")
herosupport:Start()
else

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.
---------------------------------------------------------------------------

gcwera = math.random(1,4)

if not ScriptCB_InMultiplayer() then
bothan = "all_inf_bothan_offline"
if gcwera < 3 then
DecideUnitsANH(1, 0, 1, 2, 2, 2, 2, 1, 1, 2, 2, 1, 0, 2)
allsoldier = "all_inf_soldier_anh"
allheavy = "all_inf_heavy_anh"
allmarksman = "all_inf_marksman_anh"
impsoldier = "imp_inf_soldier_anh"
impheavy = "imp_inf_heavy_anh"
impmarksman = "imp_inf_marksman_anh"
allsupport = "all_inf_honorguard"
impsupport = "imp_inf_darktrooper_p1"
elseif gcwera > 2 then
DecideUnits(1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1)
allsoldier = "all_inf_soldier"
allheavy = "all_inf_heavy"
allmarksman = "all_inf_marksman"
impsoldier = "imp_inf_soldier"
impheavy = "imp_inf_heavy"
impmarksman = "imp_inf_marksman"
allsupport = "all_inf_durosmerc"
impsupport = "imp_inf_heavymelee"
end
elseif ScriptCB_InMultiplayer() then
allsoldier = "all_inf_soldier"
allheavy = "all_inf_heavy"
allmarksman = "all_inf_marksman"
impsoldier = "imp_inf_soldier"
impheavy = "imp_inf_heavy"
impmarksman = "imp_inf_marksman"
allsupport = "all_inf_durosmerc"
impsupport = "imp_inf_heavymelee"
bothan = "all_inf_bothan"
herostrAll = "all_hero_solo"
supportstrAll = "all_inf_renegade"
herostrEmp = "imp_hero_bossk"
supportstrEmp = "imp_inf_radtrooper"
end

function ScriptInit()
ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\ingame.lvl")
ReadDataFile("ingame.lvl")




SetMaxFlyHeight(40)
SetMaxPlayerFlyHeight(40)


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("sound\\yav.lvl;yav1gcw")
ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\sound\\tes.lvl;tescw")
ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\sound\\bgl.lvl;bglgcw")
ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\SIDE\\dark.lvl",
"all_hero_bail",
allsoldier,
allheavy,
allmarksman,
"all_inf_moncaleng",
allsupport,
bothan,
impsoldier,
impmarksman,
impheavy,
"imp_inf_gunner",
impsupport,
"imp_inf_commando",
"imp_inf_jumptrooper",
supportstrAll,
supportstrEmp)

ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\SIDE\\lead.lvl",
herostrAll,
herostrEmp)



---[[ Gamorrean Guards
ReadDataFile("SIDE\\gam.lvl",
"gam_inf_gamorreanguard")
SetTeamName(3, "locals")
AddUnitClass(3, "gam_inf_gamorreanguard", 5,8)
SetUnitCount(3, 8)
SetTeamAsEnemy(3, ATT)
SetTeamAsEnemy(3, DEF)
SetTeamAsEnemy(ATT, 3)
SetTeamAsEnemy(DEF, 3)
AddAIGoal(3,"Deathmatch",100)
--]]



SetupTeams{
all = {
team = ALL,
units = 20,
reinforcements = 150,
soldier = { allsoldier,9, 25},
assault = { allheavy,1,4},
engineer = { "all_inf_moncaleng",1,4},
sniper = { allmarksman,1,4},
officer = { allsupport,1,4},
special = { bothan,1,4},

},
imp = {
team = IMP,
units = 20,
reinforcements = 150,
soldier = { impsoldier,9, 25},
assault = { impheavy,1,4},
engineer = { "imp_inf_gunner",1,4},
sniper = { impmarksman,1,4},
officer = { impsupport,1,4},
special = { "imp_inf_jumptrooper",1,4},
},

}




AddUnitClass(IMP, supportstrEmp, 1, 4)
AddUnitClass(ALL, supportstrAll, 1, 4)

if ScriptCB_InMultiplayer() then
SetHeroClass(ALL, herostrAll)
SetHeroClass(IMP, herostrEmp)

else
end

-- 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:HUT\\HUT.lvl", "HUT_conquest")
SetDenseEnvironment("false")

-- Birdies
SetNumBirdTypes(1)
SetBirdType(0,1.0,"bird")



-- Sound Stats

voiceSlow = OpenAudioStream("sound\\global.lvl", "all_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "gam_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\\yav.lvl", "yav1")
OpenAudioStream("sound\\yav.lvl", "yav1")
OpenAudioStream("sound\\yav.lvl", "yav1_emt")
-- 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_yav_amb_start", 0,1)
SetAmbientMusic(ALL, 0.8, "all_yav_amb_middle", 1,1)
SetAmbientMusic(ALL, 0.2, "all_yav_amb_end", 2,1)
SetAmbientMusic(IMP, 1.0, "imp_yav_amb_start", 0,1)
SetAmbientMusic(IMP, 0.8, "imp_yav_amb_middle", 1,1)
SetAmbientMusic(IMP, 0.2, "imp_yav_amb_end", 2,1)

SetVictoryMusic(ALL, "all_yav_amb_victory")
SetDefeatMusic (ALL, "all_yav_amb_defeat")
SetVictoryMusic(IMP, "imp_yav_amb_victory")
SetDefeatMusic (IMP, "imp_yav_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
--OpeningSateliteShot
AddCameraShot(0.848782, 0.066194, 0.522995, -0.040787, 176.365219, 6.009165, 81.628265);
AddCameraShot(-0.312871, 0.034323, -0.943515, -0.103508, 263.294067, 16.757160, -60.383335);
AddCameraShot(0.794501, 0.100186, 0.594236, -0.074933, 120.151840, 2.220867, -67.272118);
AddCameraShot(-0.106692, 0.001804, -0.994148, -0.016812, 138.863220, 3.762535, -17.066034);
AddCameraShot(0.888544, 0.065466, -0.452870, 0.033366, 67.615456, 3.762535, 61.796051);

end


AddMe:
Hidden/Spoiler:
--Search through the missionlist to find a map that matches mapName,
--then insert the new flags into said entry.
--Use this when you know the map already exists, but this content patch is just
--adding new gamemodes (otherwise you should just add whole new entries to the missionlist)
function AddNewGameModes(missionList, mapName, newFlags)
for i, mission in missionList do
if mission.mapluafile == mapName then
for flag, value in pairs(newFlags) do
mission[flag] = value
end
end
end
end

ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\dtshell.lvl")


--insert totally new maps here:
local sp_n = 0
local mp_n = 0
sp_n = table.getn(sp_missionselect_listbox_contents)

sp_missionselect_listbox_contents[sp_n+1] = { isModLevel = 1, mapluafile = "HUT%s_%s", era_g = 1, mode_con_g = 1, era_1 = 1, mode_con_1 = 1, change = {
era_1 = { name="Dark Times", icon2="darktimes_icon" },
},}
mp_n = table.getn(mp_missionselect_listbox_contents)
mp_missionselect_listbox_contents[mp_n+1] = sp_missionselect_listbox_contents[sp_n+1]

-- associate this mission name with the current downloadable content directory
-- (this tells the engine which maps are downloaded, so you need to include all new mission lua's here)
-- first arg: mapluafile from above
-- second arg: mission script name
-- third arg: level memory modifier. the arg to LuaScript.cpp: DEFAULT_MODEL_MEMORY_PLUS(x)

AddDownloadableContent("HUT","HUTg_con",4)
AddDownloadableContent("HUT","HUT1_con",4)


-- all done
newEntry = nil
n = nil

-- Now load our core.lvl into the shell to add our localize keys
ReadDataFile("..\\..\\addon\\HUT\\data\\_LVL_PC\\core.lvl")


Mission REQ:
Hidden/Spoiler:
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"
"TFURandom"
"AIHeroSupport"
}

REQN
{
"lvl"
"HUTg_con"
"HUT1_con"
}
}


I followed the instructions pretty carefully and I didn't really struggle with anything so I'm not sure what the problem is. The BF2Log didn't help me much since I couldn't find any issues with CP1 in the lua or ZE.

Jedi Admin
User avatar
Posts: 7391
Joined: Mon Aug 21, 2006 11:03 pm

Re: How to add "Rising Son" to your mod

Postby Maveritchell » Sun Aug 22, 2010 6:52 pm

All your error means is that the lua wasn't able to read far enough to load your world. Your problem is that all the random unit stuff is outside ScriptInit (it should be inside).

Jedi Admin
User avatar
Posts: 2186
Joined: Mon May 30, 2005 5:22 pm
Location: North Texas

Re: How to add "Rising Son" to your mod

Postby EraOfDesann » Sun Aug 22, 2010 6:59 pm

Oh, I guess I saw this:

---------------------------------------------------------------------------
-- 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.
---------------------------------------------------------------------------


And just automatically pasted the material below that instead of reading down further.

I've edited the lua accordingly. Right now it's munging so I'll post an update in a bit.

EDIT: No success. Here's the edited lua.

Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("TFURandom")
ScriptCB_DoFile("AIHeroSupport")

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

ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\core.lvl")

function ScriptPostLoad()end


--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"}
cp5 = CommandPost:New{name = "cp5"}
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(cp4)
conquest:AddCommandPost(cp5)
conquest:AddCommandPost(cp6)
conquest:AddCommandPost(cp7)
conquest:AddCommandPost(cp8)


conquest:Start()

EnableSPHeroRules()
if not ScriptCB_InMultiplayer() then
herosupport = AIHeroSupport:New{AIATTHeroHealth = 4000, AIDEFHeroHealth = 4000, gameMode = "NonConquest",}
herosupport:SetHeroClass(ALL, herostrAll)
herosupport:SetHeroClass(IMP, herostrEmp)
herosupport:AddSpawnCP("CP1","CP1SpawnPath")
herosupport:AddSpawnCP("CP2","CP2SpawnPath")
herosupport:AddSpawnCP("CP3","CP3SpawnPath")
herosupport:AddSpawnCP("CP4","CP4SpawnPath")
herosupport:AddSpawnCP("CP5","CP5SpawnPath")
herosupport:AddSpawnCP("CP6","CP6SpawnPath")
herosupport:AddSpawnCP("CP7","CP7SpawnPath")
herosupport:AddSpawnCP("CP8","CP8SpawnPath")
herosupport:Start()
else

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

gcwera = math.random(1,4)

if not ScriptCB_InMultiplayer() then
bothan = "all_inf_bothan_offline"
if gcwera < 3 then
DecideUnitsANH(1, 0, 1, 2, 2, 2, 2, 1, 1, 2, 2, 1, 0, 2)
allsoldier = "all_inf_soldier_anh"
allheavy = "all_inf_heavy_anh"
allmarksman = "all_inf_marksman_anh"
impsoldier = "imp_inf_soldier_anh"
impheavy = "imp_inf_heavy_anh"
impmarksman = "imp_inf_marksman_anh"
allsupport = "all_inf_honorguard"
impsupport = "imp_inf_darktrooper_p1"
elseif gcwera > 2 then
DecideUnits(1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1)
allsoldier = "all_inf_soldier"
allheavy = "all_inf_heavy"
allmarksman = "all_inf_marksman"
impsoldier = "imp_inf_soldier"
impheavy = "imp_inf_heavy"
impmarksman = "imp_inf_marksman"
allsupport = "all_inf_durosmerc"
impsupport = "imp_inf_heavymelee"
end
elseif ScriptCB_InMultiplayer() then
allsoldier = "all_inf_soldier"
allheavy = "all_inf_heavy"
allmarksman = "all_inf_marksman"
impsoldier = "imp_inf_soldier"
impheavy = "imp_inf_heavy"
impmarksman = "imp_inf_marksman"
allsupport = "all_inf_durosmerc"
impsupport = "imp_inf_heavymelee"
bothan = "all_inf_bothan"
herostrAll = "all_hero_solo"
supportstrAll = "all_inf_renegade"
herostrEmp = "imp_hero_bossk"
supportstrEmp = "imp_inf_radtrooper"
end





SetMaxFlyHeight(40)
SetMaxPlayerFlyHeight(40)


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("..\\..\\addon\\BDT\\data\\_LVL_PC\\ingame.lvl")
ReadDataFile("ingame.lvl")



ReadDataFile("sound\\yav.lvl;yav1gcw")
ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\sound\\tes.lvl;tescw")
ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\sound\\bgl.lvl;bglgcw")
ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\SIDE\\dark.lvl",
"all_hero_bail",
allsoldier,
allheavy,
allmarksman,
"all_inf_moncaleng",
allsupport,
bothan,
impsoldier,
impmarksman,
impheavy,
"imp_inf_gunner",
impsupport,
"imp_inf_commando",
"imp_inf_jumptrooper",
supportstrAll,
supportstrEmp)

ReadDataFile("..\\..\\addon\\BDT\\data\\_LVL_PC\\SIDE\\lead.lvl",
herostrAll,
herostrEmp)



---[[ Gamorrean Guards
ReadDataFile("SIDE\\gam.lvl",
"gam_inf_gamorreanguard")
SetTeamName(3, "locals")
AddUnitClass(3, "gam_inf_gamorreanguard", 5,8)
SetUnitCount(3, 8)
SetTeamAsEnemy(3, ATT)
SetTeamAsEnemy(3, DEF)
SetTeamAsEnemy(ATT, 3)
SetTeamAsEnemy(DEF, 3)
AddAIGoal(3,"Deathmatch",100)
--]]



SetupTeams{
all = {
team = ALL,
units = 20,
reinforcements = 150,
soldier = { allsoldier,9, 25},
assault = { allheavy,1,4},
engineer = { "all_inf_moncaleng",1,4},
sniper = { allmarksman,1,4},
officer = { allsupport,1,4},
special = { bothan,1,4},

},
imp = {
team = IMP,
units = 20,
reinforcements = 150,
soldier = { impsoldier,9, 25},
assault = { impheavy,1,4},
engineer = { "imp_inf_gunner",1,4},
sniper = { impmarksman,1,4},
officer = { impsupport,1,4},
special = { "imp_inf_jumptrooper",1,4},
},

}




AddUnitClass(IMP, supportstrEmp, 1, 4)
AddUnitClass(ALL, supportstrAll, 1, 4)

if ScriptCB_InMultiplayer() then
SetHeroClass(ALL, herostrAll)
SetHeroClass(IMP, herostrEmp)

else
end

-- 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:HUT\\HUT.lvl", "HUT_conquest")
SetDenseEnvironment("false")

-- Birdies
SetNumBirdTypes(1)
SetBirdType(0,1.0,"bird")



-- Sound Stats

voiceSlow = OpenAudioStream("sound\\global.lvl", "all_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "imp_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "gam_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\\yav.lvl", "yav1")
OpenAudioStream("sound\\yav.lvl", "yav1")
OpenAudioStream("sound\\yav.lvl", "yav1_emt")
-- 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_yav_amb_start", 0,1)
SetAmbientMusic(ALL, 0.8, "all_yav_amb_middle", 1,1)
SetAmbientMusic(ALL, 0.2, "all_yav_amb_end", 2,1)
SetAmbientMusic(IMP, 1.0, "imp_yav_amb_start", 0,1)
SetAmbientMusic(IMP, 0.8, "imp_yav_amb_middle", 1,1)
SetAmbientMusic(IMP, 0.2, "imp_yav_amb_end", 2,1)

SetVictoryMusic(ALL, "all_yav_amb_victory")
SetDefeatMusic (ALL, "all_yav_amb_defeat")
SetVictoryMusic(IMP, "imp_yav_amb_victory")
SetDefeatMusic (IMP, "imp_yav_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
--OpeningSateliteShot
AddCameraShot(0.848782, 0.066194, 0.522995, -0.040787, 176.365219, 6.009165, 81.628265);
AddCameraShot(-0.312871, 0.034323, -0.943515, -0.103508, 263.294067, 16.757160, -60.383335);
AddCameraShot(0.794501, 0.100186, 0.594236, -0.074933, 120.151840, 2.220867, -67.272118);
AddCameraShot(-0.106692, 0.001804, -0.994148, -0.016812, 138.863220, 3.762535, -17.066034);
AddCameraShot(0.888544, 0.065466, -0.452870, 0.033366, 67.615456, 3.762535, 61.796051);

end


What should it look like?

Sith Master
User avatar
Posts: 2786
Joined: Mon Jun 12, 2006 3:46 pm

Re: How to add "Rising Son" to your mod

Postby Xavious » Sun Aug 22, 2010 9:36 pm

This might be an issue.

Code: Select all
function ScriptPostLoad()end

Jedi Admin
User avatar
Posts: 2186
Joined: Mon May 30, 2005 5:22 pm
Location: North Texas

Re: How to add "Rising Son" to your mod

Postby EraOfDesann » Mon Aug 23, 2010 11:58 am

Xavious wrote:This might be an issue.

Code: Select all
function ScriptPostLoad()end


My MungeLog told me that I needed an end at that line, but I tried removing it anyway and it still crashes.

My BF2Log is the same.

Jedi Admin
User avatar
Posts: 7391
Joined: Mon Aug 21, 2006 11:03 pm

Re: How to add "Rising Son" to your mod

Postby Maveritchell » Mon Aug 23, 2010 12:21 pm

EraOfDesann wrote:My MungeLog told me that I needed an end at that line, but I tried removing it anyway and it still crashes.

What your mungelog told you is that you needed to end the statement started at that line, not that you needed to end it there. You are still missing an "end" at the end of ScriptPostLoad (the end that's currently down there is just the "end" to an if statement).

Jedi Admin
User avatar
Posts: 2186
Joined: Mon May 30, 2005 5:22 pm
Location: North Texas

Re: How to add "Rising Son" to your mod

Postby EraOfDesann » Tue Aug 24, 2010 12:27 pm

Okay, that fixed it. Thanks for all the help!

Jedi
User avatar
Posts: 1011
Joined: Wed Jun 29, 2011 10:42 pm
Location: Vermontw
Games I'm Playing :: SWBF2 TF2 RC KOTOR
xbox live or psn: My steam is yuke5.

Re: How to add "Rising Son" to your mod

Postby yuke5 » Tue Jul 16, 2013 10:48 pm

Hey Mav, do you still have your TFURandom and HeroSupport scripts. The gamefront link is dead.

Jedi Admin
User avatar
Posts: 7391
Joined: Mon Aug 21, 2006 11:03 pm

Re: How to add "Rising Son" to your mod

Postby Maveritchell » Tue Jul 16, 2013 11:16 pm

Here's the link, and it's been updated in the first post.
http://www.mediafire.com/?jdyp2m9tj5qpam3

Remember that the HeroSupport script isn't mine, it's Archer01's.

Jedi
User avatar
Posts: 1011
Joined: Wed Jun 29, 2011 10:42 pm
Location: Vermontw
Games I'm Playing :: SWBF2 TF2 RC KOTOR
xbox live or psn: My steam is yuke5.

Re: How to add "Rising Son" to your mod

Postby yuke5 » Thu Jul 18, 2013 3:06 am

Will do. I guess I mistakenly thought that you had edited Archer's original scripts. Thanks for re-uploading.

Previous

Return to The Dark Times

Who is online

Users browsing this forum: No registered users and 2 guests