Page 1 of 1

Tantive TDM Problem

Posted: Thu Feb 19, 2015 2:41 pm
by Anakin
i have a problem with TDM on Tantive. As you can see i disabled the control and capture regions (i looked at an stock ctf map in Zero) and saw that the cps have these both values not set. So i removed them with the setproperty command. But if you are on a special place on tantive you can capture all CPs at once :faint: And the CP4 and CP5 are not set to CIS and REP. Anyone an idea why??
Hidden/Spoiler:
[code]--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

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

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

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

---------------------------------------------------------------------------
-- 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.
---------------------------------------------------------------------------
---------------------------------------------------------------------------
-- ScriptPostLoad
---------------------------------------------------------------------------
function ScriptPostLoad()

EnableSPHeroRules()
-- This is the actual objective setup
TDM = ObjectiveTDM:New{teamATT = ATT, teamDEF = DEF,
multiplayerScoreLimit = 100,
textATT = "game.modes.tdm",
textDEF = "game.modes.tdm2", multiplayerRules = true, isCelebrityDeathmatch = true}
TDM:Start()

AddAIGoal(1, "Deathmatch", 100)
AddAIGoal(2, "Deathmatch", 100)

AddDeathRegion("turbinedeath")

KillObject("blastdoor")
DisableBarriers("barracks")
DisableBarriers("liea")
SetMapNorthAngle(180)

-- Turbine Stuff --
BlockPlanningGraphArcs("turbine")
OnObjectKillName(destturbine, "turbineconsole")
OnObjectRespawnName(returbine, "turbineconsole")



--Setup Timer--

timeConsole = CreateTimer("timeConsole")

SetTimerValue(timeConsole, 0.3)

StartTimer(timeConsole)
OnTimerElapse(
function(timer)
SetProperty("turbineconsole", "CurHealth", GetObjectHealth("turbineconsole") + 1)
DestroyTimer(timer)
end,
timeConsole
)


SetProperty("CP4CON", "Team", "REP") -- Fluchtkapseln
SetProperty("CP5CON", "Team", "CIS") -- Rettungskapseln

SetProperty("CP4CON", "CaptureRegion", "") -- Fluchtkapseln
SetProperty("CP5CON", "CaptureRegion", "") -- Rettungskapseln
SetProperty("CP6CON", "CaptureRegion", "") -- Maschinenraum
SetProperty("CP7CON", "CaptureRegion", "") -- Cockpit

SetProperty("CP4CON", "ControlRegion", "")
SetProperty("CP5CON", "ControlRegion", "")
SetProperty("CP6CON", "ControlRegion", "")
SetProperty("CP7CON", "ControlRegion", "")


end

function destturbine()
UnblockPlanningGraphArcs("turbine")
PauseAnimation("Turbine Animation")
RemoveRegion("turbinedeath")
-- SetProperty("woodr", "CurHealth", 15)
end

function returbine()
BlockPlanningGraphArcs("turbine")
PlayAnimation("Turbine Animation")
AddDeathRegion("turbinedeath")
-- SetProperty("woodr", "CurHealth", 15)
end

---------------------------------------------------------------------------
-- ScriptInit
---------------------------------------------------------------------------

function ScriptInit()
ReadDataFile("dc:Load\\RCM_Load.lvl")

StealArtistHeap(1536*1024)
-- Designers, these two lines *MUST* be first!
SetPS2ModelMemory(2097152 + 65536 * 8)

SetMemoryPoolSize("ParticleTransformer::SizeTransf", 2500)
SetMemoryPoolSize("ParticleTransformer::ColorTrans", 3000)
SetMemoryPoolSize("ParticleTransformer::PositionTr", 2500)
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

local screenWidth, screenHeight = ScriptCB_GetScreenInfo()
local aspectRatio = screenWidth / screenHeight

ReadDataFile("dc:SIDE\\fpanimset.lvl")

if aspectRatio <= 1.4 then
print("RCM_loading: Aspect Ratio 4:3 detected")
ReadDataFile("dc:HUD\\hud43.lvl")
ReadDataFile("ingame.lvl")
ReadDataFile("dc:HUD\\hudBmpKill.lvl")
elseif aspectRatio <= 1.63 and aspectRatio >= 1.5 then
print("RCM_loading: Aspect Ratio 16:10 detected")
ReadDataFile("dc:HUD\\hud1610.lvl")
ReadDataFile("ingame.lvl")
ReadDataFile("dc:HUD\\hudBmpKill.lvl")
elseif aspectRatio <= 1.9 and aspectRatio >= 1.63 then
print("RCM_loading: Aspect Ratio 16:9 detected")
ReadDataFile("dc:HUD\\hud169.lvl")
ReadDataFile("ingame.lvl")
ReadDataFile("dc:HUD\\hudBmpKill.lvl")
else
print("RCM_loading: Aspect Ratio unkown. Loading stock HUD.")
ReadDataFile("dc:HUD\\hudUnknown.lvl")
ReadDataFile("ingame.lvl")
end

AISnipeSuitabilityDist(30)


ReadDataFile("sound\\tan.lvl;tan1cw")
ReadDataFile("dc:sound\\rcm.lvl;comSnd")
ReadDataFile("dc:sound\\rcm.lvl")

ReadDataFile("dc:SIDE\\rep.lvl",
"rep_inf_commando_01_rifleman",
"rep_inf_commando_03_sniper",
"rep_inf_commando_04_engineer",
"rep_inf_commando_06_sergeant")

ReadDataFile("dc:SIDE\\cis.lvl",
"cis_inf_b1_rifleman",
"cis_inf_b1_sniper")

ReadDataFile("dc:SIDE\\mdo.lvl",
"mdo_inf_assassin",
"mdo_inf_officer")

ReadDataFile("dc:SIDE\\tnd.lvl",
"tnd_inf_slaver",
"tnd_inf_mercenary")

TrandoOrMando = math.random(1,10)

if TrandoOrMando < 6 then

SetupTeams{
rep = {
team = REP,
units = 16,
reinforcements = -1,
soldier = { "rep_inf_commando_01_rifleman",9, 25},
sniper = { "rep_inf_commando_03_sniper",1,4},
engineer= { "rep_inf_commando_04_engineer",1,4},
special = { "rep_inf_commando_06_sergeant",1,4}
},
cis = {
team = CIS,
units = 16,
reinforcements = -1,
soldier = {"cis_inf_b1_rifleman",10, 30},
sniper = {"cis_inf_b1_sniper",1, 4},
engineer= {"mdo_inf_assassin",1, 3},
special = {"mdo_inf_officer",1, 2}
}
}
end

if TrandoOrMando > 5 then

SetupTeams{
rep = {
team = REP,
units = 16,
reinforcements = -1,
soldier = { "rep_inf_commando_01_rifleman",9, 25},
sniper = { "rep_inf_commando_03_sniper",1,4},
engineer= { "rep_inf_commando_04_engineer",1,4},
special = { "rep_inf_commando_06_sergeant",1,4}
},
cis = {
team = CIS,
units = 16,
reinforcements = -1,
soldier = {"cis_inf_b1_rifleman",10, 30},
sniper = {"cis_inf_b1_sniper",1, 4},
engineer= {"tnd_inf_mercenary",1, 3},
special = {"tnd_inf_slaver",1, 2}
}
}
end


-- Level Stats
ClearWalkers()
AddWalkerType(0, 5) -- number of droidekas

local weaponCnt = 300
local guyCnt = 32
SetMemoryPoolSize ("Aimer", 17)
SetMemoryPoolSize ("AmmoCounter", weaponCnt)
SetMemoryPoolSize ("BaseHint", 250)
SetMemoryPoolSize ("EnergyBar", weaponCnt)
SetMemoryPoolSize ("EntityCloth", 60)
SetMemoryPoolSize ("EntitySoundStream", 14)
SetMemoryPoolSize ("EntitySoundStatic", 29)
SetMemoryPoolSize("EntityHover", 32)
SetMemoryPoolSize ("EntityFlyer", 6)
SetMemoryPoolSize ("MountedTurret", 2)
SetMemoryPoolSize ("Navigator", guyCnt)
SetMemoryPoolSize ("Obstacle", 250)
SetMemoryPoolSize ("PathFollower", guyCnt)
SetMemoryPoolSize ("PathNode", 384)
SetMemoryPoolSize ("SoundspaceRegion", 15)
SetMemoryPoolSize ("TentacleSimulator", 0)
SetMemoryPoolSize ("TreeGridStack", 150)
SetMemoryPoolSize ("UnitAgent", guyCnt)
SetMemoryPoolSize ("UnitController", guyCnt)
SetMemoryPoolSize ("Weapon", weaponCnt)
SetMemoryPoolSize("SoldierAnimation", 580)


-- SetMemoryPoolSize("Obstacle", 182)
--
SetSpawnDelay(10.0, 0.25)
ReadDataFile("tan\\tan1.lvl", "tan1_conquest")
--ReadDataFile("tan\\tan1.lvl", "tan1_tdm")
SetDenseEnvironment("false")
AISnipeSuitabilityDist(30)
--AddDeathRegion("Sarlac01")
-- SetMaxFlyHeight(90)
-- SetMaxPlayerFlyHeight(90)

-- Sound Stats

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("dc:sound\\rcm.lvl", "rcm_music")
OpenAudioStream("sound\\tan.lvl", "tan1")
OpenAudioStream("sound\\tan.lvl", "tan1")
-- OpenAudioStream("sound\\global.lvl", "global_vo_quick")
-- OpenAudioStream("sound\\global.lvl", "global_vo_slow")
-- OpenAudioStream("sound\\tan.lvl", "tan1_emt")

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(1, "Repleaving")
SetOutOfBoundsVoiceOver(2, "Cisleaving")

SetAmbientMusic(REP, 1.0, "rep_amb_start", 0,1)
SetAmbientMusic(REP, 0.8, "rep_amb_middle", 1,1)
SetAmbientMusic(REP, 0.2, "rep_amb_end", 2,1)
SetAmbientMusic(CIS, 1.0, "cis_amb_start", 0,1)
SetAmbientMusic(CIS, 0.8, "cis_amb_middle", 1,1)
SetAmbientMusic(CIS, 0.2, "cis_amb_end", 2,1)

SetVictoryMusic(REP, "rep_tan_amb_victory")
SetDefeatMusic (REP, "rep_tan_amb_defeat")
SetVictoryMusic(CIS, "cis_tan_amb_victory")
SetDefeatMusic (CIS, "cis_tan_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
AddCameraShot(0.233199, -0.019441, -0.968874, -0.080771, -240.755920, 11.457644, 105.944176);
AddCameraShot(-0.395561, 0.079428, -0.897092, -0.180135, -264.022278, 6.745873, 122.715752);
AddCameraShot(0.546703, -0.041547, -0.833891, -0.063371, -309.709900, 5.168304, 145.334381);

if aspectRatio <= 1.4 then
ReadDataFile("dc:SIDE\\43.lvl")
ReadDataFile("dc:HUD\\hudTxtKill.lvl")
elseif aspectRatio <= 1.63 and aspectRatio >= 1.5 then
ReadDataFile("dc:SIDE\\1610.lvl")
ReadDataFile("dc:HUD\\hudTxtKill.lvl")
elseif aspectRatio <= 1.9 and aspectRatio >= 1.63 then
ReadDataFile("dc:SIDE\\169.lvl")
ReadDataFile("dc:HUD\\hudTxtKill.lvl")
else
ReadDataFile("dc:SIDE\\unkown.lvl")
end

end


[/code]

Re: Tantive TDM Problem

Posted: Thu Feb 19, 2015 5:05 pm
by Marth8880
And where exactly *is* this special place? :o

Re: Tantive TDM Problem

Posted: Fri Feb 20, 2015 5:41 am
by Anakin
I see you want to get an advantage over the others on multi ;)
Hidden/Spoiler:
Image
It's around the red point. Maybe i can change the SetProperty("CP4CON", "CaptureRegion", "") to SetProperty("CP4CON", "CaptureRegion", "blub"). I'm sure there won't be a region called blub. But why does the team set not work?
An work around would be to take the CTF layer instead of the conquest, but i wanted the 4 CPs. and the conquest path.

Re: Tantive TDM Problem

Posted: Fri Feb 20, 2015 5:44 am
by Marth8880
Anakin wrote:I see you want to get an advantage over the others on multi ;)
I no longer play multiplayer seeing as how GameSpy no longer exists. :p

You will likely be best off using the CTF CPs instead since the AI won't stupidly try to cap them.

Re: Tantive TDM Problem

Posted: Tue Feb 24, 2015 12:17 pm
by ZoomV
Marth8880 wrote:
Anakin wrote:I see you want to get an advantage over the others on multi ;)
I no longer play multiplayer seeing as how GameSpy no longer exists. :p

You will likely be best off using the CTF CPs instead since the AI won't stupidly try to cap them.
I'm pretty sure if a CP doesn't have a capture region, the AI won't try to cap them. I noticed when I was recently playing around with a map that if you put capture regions in a different spot than the CP object, the AI will still navigate to the region rather than the object, so I would assume if there is no capture region they won't go after the command post.

Re: Tantive TDM Problem

Posted: Tue Feb 24, 2015 2:58 pm
by Anakin
They do. Before i took the tdm layer from mos eisley i went with some comandos to an enemy cp. I wanted to wait for ai spawning, and the others seamed to do that, too. But this is nothing they do normaly on a tdm map.
Tdm: find enemy kill enemy.
Conquest: went to cp, wait x seconds, go to next cp. If you find an enemy kill him.

I think the ai is not that good that it looks for campture regions and notice hey i can capture the cp, so lets do that.

Re: Tantive TDM Problem

Posted: Tue Feb 24, 2015 10:55 pm
by Marth8880
ZoomV wrote:
Marth8880 wrote:
Anakin wrote:I see you want to get an advantage over the others on multi ;)
I no longer play multiplayer seeing as how GameSpy no longer exists. :p

You will likely be best off using the CTF CPs instead since the AI won't stupidly try to cap them.
I'm pretty sure if a CP doesn't have a capture region, the AI won't try to cap them. I noticed when I was recently playing around with a map that if you put capture regions in a different spot than the CP object, the AI will still navigate to the region rather than the object, so I would assume if there is no capture region they won't go after the command post.
They will still try to cap them. Have you ever noticed how on Mos Eisley a bunch of the AI like to sometimes stand around in some areas? That's because they're (hilariously) attempting to cap the Jawa CP that's located somewhere underneath the terrain despite the fact that it doesn't have an associated capture region.