Page 1 of 1

Addme/New Era Troubles

Posted: Tue Apr 05, 2011 12:44 pm
by modmaster13
Hey I am trying to add my mod into Marvel4's Rhen Var: Harbor map (I have permission from him) and the new era won't show up. Yes I have the 1.3 patch. I only want to add conquest.

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




--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 = "RVH%s_%s", era_n = 1, era_m = 1, mode_con_n = 1, mode_con_m = 1,}
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("RVH","RVHn_con",4)
AddDownloadableContent("RVH","RVHm_con",4)

-- all done
newEntry = nil
n = nil

-- Now load our core.lvl into the shell to add our localize keys
ReadDataFile("..\\..\\addon\\RVH\\data\\_LVL_PC\\core.lvl")
RVHm_con
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

-- load the gametype script
ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams")

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


function ScriptPostLoad()


--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "CP2"}
cp2 = CommandPost:New{name = "CP3"}
cp3 = CommandPost:New{name = "CP5"}
cp4 = CommandPost:New{name = "CP6"}
cp5 = CommandPost:New{name = "CP7"}



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

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

ReadDataFile("dc:load\\common.lvl")

ReadDataFile("ingame.lvl")


SetMaxFlyHeight(30)
SetMaxPlayerFlyHeight (30)

SetMemoryPoolSize ("SoldierAnimation", 800)
SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",50) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",650) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",550) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",6000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",100) -- should be ~1x #combo

ReadDataFile("dc:sound\\RVH.lvl;RVHcw")
ReadDataFile("sound\\fel.lvl;fel1cw")
ReadDataFile("sound\\hot.lvl;hot1gcw")
ReadDataFile("SIDE\\rep.lvl",
"rep_inf_ep3_marine",
"rep_inf_ep3_rocketeer",
"rep_inf_ep3_engineer",
"rep_inf_ep3_sniper",
"rep_inf_ep3_officer",
"rep_inf_ep3_jettrooper",
"rep_walk_atte",
"rep_walk_oneman_atst")

ReadDataFile("SIDE\\cis.lvl",
"cis_inf_rifleman",
"cis_inf_rocketeer",
"cis_inf_engineer",
"cis_inf_officer",
"cis_inf_sniper",
"cis_inf_droideka",
"cis_hero_darthmaul",
"cis_tread_snailtank")

ReadDataFile("dc:SIDE\\kit.lvl",
"rep_hero_fisto")


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

SetupTeams{
rep = {
team = REP,
units = 20,
reinforcements = 150,
soldier = { "rep_inf_ep3_marine",9, 25},
assault = { "rep_inf_ep3_rocketeer",1, 4},
engineer = { "rep_inf_ep3_engineer",1, 4},
sniper = { "rep_inf_ep3_sniper",1, 4},
officer = {"rep_inf_ep3_officer",1, 4},
special = { "rep_inf_ep3_jettrooper",1, 4},

},
cis = {
team = CIS,
units = 20,
reinforcements = 150,
soldier = { "cis_inf_rifleman",9, 25},
assault = { "cis_inf_rocketeer",1, 4},
engineer = { "cis_inf_engineer",1, 4},
sniper = { "cis_inf_sniper",1, 4},
officer = {"cis_inf_officer",1, 4},
special = { "cis_inf_droideka",1, 4},
}
}

SetHeroClass(CIS, "cis_hero_darthmaul")
SetHeroClass(REP, "rep_hero_fisto")


-- Level Stats
-- ClearWalkers()
AddWalkerType(0, 4) -- special -> droidekas
AddWalkerType(1, 2) -- 1x2 (1 pair of legs)
AddWalkerType(2, 0) -- 2x2 (2 pairs of legs)
AddWalkerType(3, 1) -- 3x2 (3 pairs of legs)
local weaponCnt = 1024
SetMemoryPoolSize("Aimer", 75)
SetMemoryPoolSize("AmmoCounter", weaponCnt)
SetMemoryPoolSize("BaseHint", 1024)
SetMemoryPoolSize("CommandWalker", 1)
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:RVH\\RVH.lvl", "RVH_conquest")
ReadDataFile("..\\..\\addon\\RVH\\data\\_LVL_PC\\RVH\\Rhn1.lvl", "Rhenvar1_conquest")
SetDenseEnvironment("false")
SetAIVehicleNotifyRadius(80)


-- Sound

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")

voiceSlow = OpenAudioStream("sound\\global.lvl", "rep_unit_vo_slow")
AudioStreamAppendSegments("sound\\global.lvl", "cis_unit_vo_slow", voiceSlow)
AudioStreamAppendSegments("sound\\global.lvl", "global_vo_slow", voiceSlow)

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\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\hot.lvl", "hot1gcw")
OpenAudioStream("sound\\hot.lvl", "hot1gcw")

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(2, "cisleaving")
SetOutOfBoundsVoiceOver(1, "repleaving")

SetAmbientMusic(REP, 1.0, "rep_fel_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_fel_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2,"rep_fel_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_fel_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_fel_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2,"cis_fel_amb_end", 2,1)

SetVictoryMusic(REP, "rep_fel_amb_victory")
SetDefeatMusic (REP, "rep_fel_amb_defeat")
SetVictoryMusic(CIS, "cis_fel_amb_victory")
SetDefeatMusic (CIS, "cis_fel_amb_defeat")

SetSoundEffect("ScopeDisplayZoomIn", "binocularzoomin")
SetSoundEffect("ScopeDisplayZoomOut", "binocularzoomout")
--SetSoundEffect("BirdScatter", "birdsFlySeq1")
--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

-- Top Down
AddCameraShot(0.876900, -0.442794, 0.166961, 0.084308, -92.842827, 91.021690, 161.355850);
-- CP3
AddCameraShot(0.931816, -0.181206, -0.308678, -0.060027, -147.396545, 25.021837, 128.233185);
AddCameraShot(0.909842, -0.262073, 0.309156, 0.089050, -91.736038, 34.621788, 163.739639);
-- CP5
AddCameraShot(0.813412, -0.193748, -0.533549, -0.127087, -70.256043, 25.621792, 115.028290);
AddCameraShot(0.968388, -0.181738, -0.167961, -0.031521, -27.984699, 17.221787, 142.233933);
-- CP6
AddCameraShot(0.985705, -0.078090, -0.148826, -0.011790, -35.218330, 15.421706, 16.465012);
AddCameraShot(0.559177, -0.053046, -0.823652, -0.078135, -71.415993, 16.921690, -12.113598);
-- CP7
AddCameraShot(0.146996, -0.058009, -0.918500, -0.362469, -220.067062, 26.905960, 28.651220);
AddCameraShot(0.982701, -0.135933, -0.124598, -0.017235, -222.859299, 18.505959, 68.993172);
-- CP2
AddCameraShot(0.800503, -0.205155, -0.545494, -0.139800, -352.629608, 23.605942, 117.735550);
AddCameraShot(0.882701, -0.040039, -0.467747, -0.021217, -318.316254, 3.505955, 125.752930);
-- Pretty
AddCameraShot(0.563676, -0.109911, 0.803518, 0.156678, -231.592621, 22.405914, 223.867676);
AddCameraShot(0.938392, 0.112758, 0.324325, -0.038971, -251.608917, 1.105925, 266.066315);
AddCameraShot(0.723019, 0.100555, 0.676954, -0.094148, -39.843826, 0.805894, 111.416893);
AddCameraShot(0.968209, 0.021490, -0.249156, 0.005530, -75.747406, 12.505874, 75.078301);
AddCameraShot(0.264429, -0.053655, -0.943684, -0.191482, -125.556999, 26.605818, 48.874596);


end
RVHn_con
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

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

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

function ScriptPostLoad()


--This defines the CPs. These need to happen first
cp1 = CommandPost:New{name = "CP2"}
cp2 = CommandPost:New{name = "CP3"}
cp3 = CommandPost:New{name = "CP5"}
cp4 = CommandPost:New{name = "CP6"}
cp5 = CommandPost:New{name = "CP7"}



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

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

ReadDataFile("dc:load\\common.lvl")

ReadDataFile("ingame.lvl")



SetMaxFlyHeight(30)
SetMaxPlayerFlyHeight (30)


SetMemoryPoolSize ("SoldierAnimation", 800)
SetMemoryPoolSize ("ClothData",20)
SetMemoryPoolSize ("Combo",50) -- should be ~ 2x number of jedi classes
SetMemoryPoolSize ("Combo::State",650) -- should be ~12x #Combo
SetMemoryPoolSize ("Combo::Transition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Condition",650) -- should be a bit bigger than #Combo::State
SetMemoryPoolSize ("Combo::Attack",550) -- should be ~8-12x #Combo
SetMemoryPoolSize ("Combo::DamageSample",6000) -- should be ~8-12x #Combo::Attack
SetMemoryPoolSize ("Combo::Deflect",100) -- should be ~1x #combo


ReadDataFile("dc:sound\\RVH.lvl;RVHgcw")
ReadDataFile("sound\\hot.lvl;hot1gcw")
ReadDataFile("SIDE\\all.lvl",
"all_inf_rifleman_snow",
"all_inf_rocketeer_snow",
"all_inf_engineer_snow",
"all_inf_sniper_snow",
"all_inf_officer_snow",
"all_hero_chewbacca",
"all_inf_wookiee_snow",
"all_hover_combatspeeder")

ReadDataFile("SIDE\\imp.lvl",
"imp_inf_rifleman_snow",
"imp_inf_rocketeer_snow",
"imp_inf_sniper_snow",
"imp_inf_dark_trooper",
"imp_inf_engineer_snow",
"imp_inf_officer",
"imp_hero_emperor",
"imp_walk_atat",
"imp_hover_fightertank")

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

SetupTeams{
all={
team = ALL,
units = 19,
reinforcements = 150,
soldier = {"all_inf_rifleman_snow",9, 25},
assault = {"all_inf_rocketeer_snow",1, 4},
engineer = {"all_inf_engineer_snow",1, 4},
sniper = {"all_inf_sniper_snow",1, 4},
officer = {"all_inf_officer_snow",1, 4},
special = {"all_inf_wookiee_snow",1, 4},

},

imp={
team = IMP,
units = 19,
reinforcements = 150,
soldier = {"imp_inf_rifleman_snow",9, 25},
assault = {"imp_inf_rocketeer_snow",1, 4},
engineer = {"imp_inf_engineer_snow",1, 4},
sniper = {"imp_inf_sniper_snow",1, 4},
officer = {"imp_inf_officer",1, 4},
special = {"imp_inf_dark_trooper",1, 4},
}
}

SetHeroClass(IMP, "imp_hero_emperor")
SetHeroClass(ALL, "all_hero_chewbacca")

-- Level Stats
ClearWalkers()
AddWalkerType(0, 0) -- special -> droidekas
AddWalkerType(1, 0) -- 1x2 (1 pair of legs)
AddWalkerType(2, 1) -- 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("CommandWalker", 1)
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:RVH\\Rhn1.lvl", "Rhenvar1_conquest")
SetDenseEnvironment("false")
SetAIVehicleNotifyRadius(80)


-- 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\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
OpenAudioStream("sound\\hot.lvl", "hot1gcw")
OpenAudioStream("sound\\hot.lvl", "hot1gcw")

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_hot_amb_start", 0,1)
SetAmbientMusic(ALL, 0.8, "all_hot_amb_middle", 1,1)
SetAmbientMusic(ALL, 0.2, "all_hot_amb_end", 2,1)
SetAmbientMusic(IMP, 1.0, "imp_hot_amb_start", 0,1)
SetAmbientMusic(IMP, 0.8, "imp_hot_amb_middle", 1,1)
SetAmbientMusic(IMP, 0.2, "imp_hot_amb_end", 2,1)

SetVictoryMusic(ALL, "all_hot_amb_victory")
SetDefeatMusic (ALL, "all_hot_amb_defeat")
SetVictoryMusic(IMP, "imp_hot_amb_victory")
SetDefeatMusic (IMP, "imp_hot_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

-- Top Down
AddCameraShot(0.876900, -0.442794, 0.166961, 0.084308, -92.842827, 91.021690, 161.355850);
-- CP3
AddCameraShot(0.931816, -0.181206, -0.308678, -0.060027, -147.396545, 25.021837, 128.233185);
AddCameraShot(0.909842, -0.262073, 0.309156, 0.089050, -91.736038, 34.621788, 163.739639);
-- CP5
AddCameraShot(0.813412, -0.193748, -0.533549, -0.127087, -70.256043, 25.621792, 115.028290);
AddCameraShot(0.968388, -0.181738, -0.167961, -0.031521, -27.984699, 17.221787, 142.233933);
-- CP6
AddCameraShot(0.985705, -0.078090, -0.148826, -0.011790, -35.218330, 15.421706, 16.465012);
AddCameraShot(0.559177, -0.053046, -0.823652, -0.078135, -71.415993, 16.921690, -12.113598);
-- CP7
AddCameraShot(0.146996, -0.058009, -0.918500, -0.362469, -220.067062, 26.905960, 28.651220);
AddCameraShot(0.982701, -0.135933, -0.124598, -0.017235, -222.859299, 18.505959, 68.993172);
-- CP2
AddCameraShot(0.800503, -0.205155, -0.545494, -0.139800, -352.629608, 23.605942, 117.735550);
AddCameraShot(0.882701, -0.040039, -0.467747, -0.021217, -318.316254, 3.505955, 125.752930);
-- Pretty
AddCameraShot(0.563676, -0.109911, 0.803518, 0.156678, -231.592621, 22.405914, 223.867676);
AddCameraShot(0.938392, 0.112758, 0.324325, -0.038971, -251.608917, 1.105925, 266.066315);
AddCameraShot(0.723019, 0.100555, 0.676954, -0.094148, -39.843826, 0.805894, 111.416893);
AddCameraShot(0.968209, 0.021490, -0.249156, 0.005530, -75.747406, 12.505874, 75.078301);
AddCameraShot(0.264429, -0.053655, -0.943684, -0.191482, -125.556999, 26.605818, 48.874596);


end
Please help.

Re: Addme/New Era Troubles

Posted: Tue Apr 05, 2011 1:01 pm
by THEWULFMAN
modmaster13 wrote:Help.
Why should I take time out of my day to help you, when you cant ask nicely.

Anyway, I added my TCW era to that same map.
Hidden/Spoiler:
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\\TCW\\data\\_LVL_PC\\shell.lvl")


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


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)

AddNewGameModes( sp_missionselect_listbox_contents, "RVH%s_%s", {era_w = 1, mode_con_w = 1, change = {
era_w= { name="Star Wars: The Clone Wars", icon2="icon_tcw" },
},})

AddNewGameModes( sp_missionselect_listbox_contents, "RVC%s_%s", {era_w = 1, mode_con_w = 1, change = {
era_w= { name="Star Wars: The Clone Wars", icon2="icon_tcw" },
},})

AddDownloadableContent("RVH","RVHw_con",4)
AddDownloadableContent("RVC","RVCw_con",4)


-- all done
newEntry = nil
n = nil

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

Re: Addme/New Era Troubles

Posted: Tue Apr 05, 2011 1:03 pm
by modmaster13
Can you guys please help me with this problem? Please?

About your addme, it says
AddNewGameModes( sp_missionselect_listbox_contents, "RVC%s_%s", {era_w = 1, mode_con_w = 1, change = {
era_w= { name="Star Wars: The Clone Wars", icon2="icon_tcw" },
What is the "Star Wars: The Clone Wars" doing in the addme? You have to localize it in editlocalize, right? Correct me if I am wrong. Sorry if Im not explaining this well. :(

Re: Addme/New Era Troubles

Posted: Tue Apr 05, 2011 1:06 pm
by THEWULFMAN
THEWULFMAN wrote:
modmaster13 wrote:Help.
Why should I take time out of my day to help you, when you cant ask nicely.

Anyway, I added my TCW era to that same map.
Hidden/Spoiler:
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\\TCW\\data\\_LVL_PC\\shell.lvl")


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


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)

AddNewGameModes( sp_missionselect_listbox_contents, "RVH%s_%s", {era_w = 1, mode_con_w = 1, change = {
era_w= { name="Star Wars: The Clone Wars", icon2="icon_tcw" },
},})

AddNewGameModes( sp_missionselect_listbox_contents, "RVC%s_%s", {era_w = 1, mode_con_w = 1, change = {
era_w= { name="Star Wars: The Clone Wars", icon2="icon_tcw" },
},})

AddDownloadableContent("RVH","RVHw_con",4)
AddDownloadableContent("RVC","RVCw_con",4)


-- all done
newEntry = nil
n = nil

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

:roll:Just try to do exactly what I did.

Re: Addme/New Era Troubles

Posted: Tue Apr 05, 2011 1:13 pm
by modmaster13
THEWULFMAN wrote:
THEWULFMAN wrote:
modmaster13 wrote:Help.
Why should I take time out of my day to help you, when you cant ask nicely.

:roll:Just try to do exactly what I did.
Well you wanted me to ask nicely, so I did. :)

See my edited post above.

Re: Addme/New Era Troubles

Posted: Tue Apr 05, 2011 1:25 pm
by THEWULFMAN
modmaster13 wrote: About your addme, it says
AddNewGameModes( sp_missionselect_listbox_contents, "RVC%s_%s", {era_w = 1, mode_con_w = 1, change = {
era_w= { name="Star Wars: The Clone Wars", icon2="icon_tcw" },
What is the "Star Wars: The Clone Wars" doing in the addme? You have to localize it in editlocalize, right? Correct me if I am wrong. Sorry if Im not explaining this well. :(
Did you even read the documentation about adding new eras?
Zerted wrote:7) In addition to Conquest, we also wanted to change the era's name and icon (eras display no descriptions). The procedure is the same except we use the era's key instead of the game mode's key and an index of 'icon2' instead of 'icon'. Here is the completed example table:

sp_missionselect_listbox_contents[sp_n+1] = {
isModLevel = 1,
mapluafile = "LVL%s_%s",
era_g = 1,
mode_con_g = 1,
change = {
era_g = { name="Ant Wars", icon2="rvb_icon" },
mode_con = { name="Candy Conquest", icon="mode_icon_holo", about="Drop off ten cubes of sugar at your ant hill (CP) to win. Watch out for humans overlords, kids with magnifying glasses, other ant colonies, and sticky traps..." },
},
}
Sorry if I sound rude, not trying to be, but you shouldnt try to do something, without first reading on how to do it.

Re: Addme/New Era Troubles

Posted: Tue Apr 05, 2011 1:35 pm
by modmaster13

Re: Addme/New Era Troubles

Posted: Tue Apr 05, 2011 1:37 pm
by THEWULFMAN
I am talking about the documentation included in the v1.3 patch.
Hidden/Spoiler:
This tutorial will take you through the process changing the displayed label, icon, and description of a Conquest, G era map.

Backgound:
* The v1.3 patch supports over 38 game modes and 27 eras. If you want to add a new game mode or era, look at these predefined ones first. Checkout the change log for shell.lvl and common.lvl to see exactly what was added and is directly supported.
* This tutorial will assume you have created a basic LVLg_con map.

Basic Era Support
1) In addme/addme.lua, expand your sp_missionselect_listbox_contents table. Meaning, put each element on a line by itself so the table is easier to read, like this:

sp_missionselect_listbox_contents[sp_n+1] = {
isModLevel = 1,
mapluafile = "LVL%s_%s",
era_g = 1,
mode_con_g = 1,
}

2) Edit the table to add the 'change' table:

sp_missionselect_listbox_contents[sp_n+1] = {
isModLevel = 1,
mapluafile = "LVL%s_%s",
era_g = 1,
mode_con_g = 1,
change = {

},
}

3) We want to change the Conquest game mode, so add another table inside the new 'change' table. The name/index of the new table has to match the game mode key. For Conquest, the key is 'mode_con'. So:

sp_missionselect_listbox_contents[sp_n+1] = {
isModLevel = 1,
mapluafile = "LVL%s_%s",
era_g = 1,
mode_con_g = 1,
change = {
mode_con = { },
},
}

4) Add indexes for Conquest's new name ('name'), new icon ('icon'), and new description ('about'). You only need to add the indexes you want to change, but this tutorial changes all of them so:

sp_missionselect_listbox_contents[sp_n+1] = {
isModLevel = 1,
mapluafile = "LVL%s_%s",
era_g = 1,
mode_con_g = 1,
change = {
mode_con = { name="Candy Conquest", icon="mode_icon_holo", about="Drop off ten cubes of sugar at your ant hill (CP) to win. Watch out for human overlords, kids with magnifying glasses, other ant colonies, and sticky traps..." },
},
}

5) Munge your map. Since we only changed addme.lua, you don't need to check or select anything in VisualMunge. This will greatly decrease its munge time.
6) Start the game. In the map selection screens, your map's Conquest game mode checkbox will now be labeled 'Candy Conquest' and its icon and description will have changed too.
7) In addition to Conquest, we also wanted to chagne the era's name and icon (eras display no descriptions). The procedure is the same except we use the era's key instead of the game mode's key and an index of 'icon2' instead of 'icon'. Here is the completed example table:

sp_missionselect_listbox_contents[sp_n+1] = {
isModLevel = 1,
mapluafile = "LVL%s_%s",
era_g = 1,
mode_con_g = 1,
change = {
era_g = { name="Ant Wars", icon2="rvb_icon" },
mode_con = { name="Candy Conquest", icon="mode_icon_holo", about="Drop off ten cubes of sugar at your ant hill (CP) to win. Watch out for humans overlords, kids with magnifying glasses, other ant colonies, and sticky traps..." },
},
}

8) In your map's readme, make sure to list that the 'v1.3 patch r112+' is required to correctly view the game mode/era. If the player doesn't have the v1.3 patch, then the map's mission will still be displayed, but it will show the original values (i.e. 'Conquest' instead of 'Candy Conquest').
9) Thats it!