Page 1 of 1

Problems with adding a 3rd team.

Posted: Sun Jul 20, 2014 11:44 am
by thelegend
Hey all,
for my GTA Mod I have decided to add some custom modes. One of them is the free mode. You have to play as team one and choose your fav. gta character. Anyway I wanted to make my map a bit more living. So I added a third team just filled with passants on street. I have added the local cp, local spawn, added the correct lines in my lua but there aren't any third team guys.
Here's my lua:
Hidden/Spoiler:
--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveTDM")


local ALL = 1
local IMP = 2
-- These variables do not change
local ATT = 1
local DEF = 2

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





function ScriptInit()
SetUberMode(1);

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




SetMaxFlyHeight(60)
SetMaxPlayerFlyHeight(60)


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("sound\\tat.lvl;tat2gcw")
ReadDataFile("dc:SIDE\\niko.lvl",
"niko_bellic",
"tommy_ver",
"claude_speed")

ReadDataFile("dc:SIDE\\cop.lvl",
"cop_officer",
"cop_striker" )

ReadDataFile("dc:SIDE\\pas.lvl",
"pas_1",
"pas_2",
"pas_3",
"pas_4",
"pas_5",
"pas_6",
"pas_7" )

SetupTeams{
all = {
team = ALL,
units = 0,
reinforcements = -1,
soldier = { "tommy_ver",0, 0},
assault = { "niko_bellic",0,0},
engineer = { "claude_speed",0,0},
sniper = { "",0,0},
officer = { "",0,0},
special = { "",0,0},

},
imp = {
team = IMP,
units = 30,
reinforcements = -1,
soldier = { "cop_officer",10, 20},
assault = { "cop_striker",5,10},
engineer = { "",0,0},
sniper = { "",0,0},
officer = { "",0,0},
special = { "",0,0},
},
}

SetTeamName (3, "passants")
AddUnitClass (3, "pas_1",15,40)
AddUnitClass (3, "pas_2",15,40)
AddUnitClass (3, "pas_3",15,40)
AddUnitClass (3, "pas_4",15,30)
AddUnitClass (3, "pas_5",15,30)
AddUnitClass (3, "pas_6",15,30)
AddUnitClass (3, "pas_7",15,30)
SetUnitCount (180, 250)
AddAIGoal(3, "Deathmatch", 100)

SetTeamAsFriend(ATT,3)
SetTeamAsFriend(3,ATT)
SetTeamAsFriend(DEF,3)
SetTeamAsFriend(3,DEF)


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


-- Sound Stats



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


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

-- Camera Stats
--Tat2 Mos Eisley
AddCameraShot(0.974338, -0.222180, 0.035172, 0.008020, -82.664650, 23.668301, 43.955681);

end
And here my files for the freemode in my world's folder:

Lyr file:
Hidden/Spoiler:
Version(3);
SaveType(0);

Camera("camera")
{
Rotation(-0.476, -0.068, -0.868, 0.125);
Position(-189.809, 12.608, -338.270);
FieldOfView(55.400);
NearPlane(1.000);
FarPlane(500.000);
ZoomFactor(1.000);
Bookmark(0.000, 0.000, 0.000, 1.000, 0.000, 0.000, 0.000);
Bookmark(0.000, 0.000, 0.000, 1.000, 0.000, 0.000, 0.000);
Bookmark(0.000, 0.000, 0.000, 1.000, 0.000, 0.000, 0.000);
Bookmark(0.000, 0.000, 0.000, 1.000, 0.000, 0.000, 0.000);
Bookmark(0.000, 0.000, 0.000, 1.000, 0.000, 0.000, 0.000);
Bookmark(0.000, 0.000, 0.000, 1.000, 0.000, 0.000, 0.000);
Bookmark(0.000, 0.000, 0.000, 1.000, 0.000, 0.000, 0.000);
Bookmark(0.000, 0.000, 0.000, 1.000, 0.000, 0.000, 0.000);
Bookmark(0.000, 0.000, 0.000, 1.000, 0.000, 0.000, 0.000);
Bookmark(-24.000, 55.608, -140.280, 0.524, 0.446, -0.552, 0.471);
}
LightName("LC1_hunt.LGT");
ControllerManager("StandardCtrlMgr");

WorldExtents()
{
Min(0.000000, 0.000000, 0.000000);
Max(0.000000, 0.000000, 0.000000);
}

NextSequence(-4882658);

Object("hunt_cp1", "com_bldg_controlzone", 1063352604)
{
ChildRotation(0.001, -1.000, 0.000, 0.000);
ChildPosition(-142.000, 8.000, -525.000);
SeqNo(1063352604);
Team(1);
NetworkId(-1);
Layer(2);
CaptureRegion("");
ControlRegion("cp1_control");
SpawnPath("cp1_spawn");
TurretPath("");
AllyPath("");
AllyCount("65536");
SpawnRegion("");
Radius("0.0");
ValueBleed_Alliance("10");
ValueBleed_CIS("10");
ValueBleed_Empire("10");
ValueBleed_Republic("10");
ValueBleed_Neutral("0");
ValueBleed_Locals("0");
Value_ATK_Alliance("10");
Value_ATK_CIS("10");
Value_ATK_Empire("10");
Value_ATK_Republic("10");
Value_ATK_Locals("10");
Value_DEF_Alliance("10");
Value_DEF_CIS("10");
Value_DEF_Empire("10");
Value_DEF_Republic("10");
Value_DEF_Locals("10");
VO_All_AllCapture("all_off_com_report_captured_commandpost");
VO_All_AllLost("all_off_com_report_lost_commandpost");
VO_All_AllInDispute("");
VO_All_AllSaved("");
VO_All_AllInfo("");
VO_All_ImpCapture("all_off_com_report_enemyCaptured_commandpost");
VO_All_ImpLost("");
VO_All_ImpInDispute("");
VO_All_ImpSaved("");
VO_All_ImpInfo("");
VO_Imp_AllCapture("imp_off_com_report_enemyCaptured_commandpost");
VO_Imp_AllLost("");
VO_Imp_AllInDispute("");
VO_Imp_AllSaved("");
VO_Imp_AllInfo("");
VO_Imp_ImpCapture("imp_off_com_report_captured_commandpost");
VO_Imp_ImpLost("imp_off_com_report_lost_commandpost");
VO_Imp_ImpInDispute("");
VO_Imp_ImpSaved("");
VO_Imp_ImpInfo("");
VO_Rep_RepCapture("rep_off_com_report_captured_commandpost");
VO_Rep_RepLost("rep_off_com_report_lost_commandpost");
VO_Rep_RepInDispute("");
VO_Rep_RepSaved("");
VO_Rep_RepInfo("");
VO_Rep_CISCapture("rep_off_com_report_enemyCaptured_commandpost");
VO_Rep_CISLost("");
VO_Rep_CISInDispute("");
VO_Rep_CISSaved("");
VO_Rep_CISInfo("");
VO_CIS_RepCapture("cis_off_com_report_enemyCaptured_commandpost");
VO_CIS_RepLost("");
VO_CIS_RepInDispute("");
VO_CIS_RepSaved("");
VO_CIS_RepInfo("");
VO_CIS_CISCapture("cis_off_com_report_captured_commandpost");
VO_CIS_CISLost("cis_off_com_report_lost_commandpost");
VO_CIS_CISInDispute("");
VO_CIS_CISSaved("");
VO_CIS_CISInfo("");
SoldierBan("");
HoverBan("");
SmallBan("");
MediumBan("");
HugeBan("");
FlyerBan("");
AISpawnWeight("");
HUDIndex("");
HUDIndexDisplay("1");
}

Object("hunt_cp2", "com_bldg_controlzone", 568017048)
{
ChildRotation(0.001, 0.000, 0.000, -1.000);
ChildPosition(198.000, 8.000, -175.000);
SeqNo(568017048);
Team(2);
NetworkId(-1);
Layer(2);
CaptureRegion("");
ControlRegion("");
SpawnPath("cp2_spawn");
TurretPath("");
AllyPath("");
AllyCount("65536");
SpawnRegion("");
Radius("0.0");
ValueBleed_Alliance("10");
ValueBleed_CIS("10");
ValueBleed_Empire("10");
ValueBleed_Republic("10");
ValueBleed_Neutral("0");
ValueBleed_Locals("0");
Value_ATK_Alliance("10");
Value_ATK_CIS("10");
Value_ATK_Empire("10");
Value_ATK_Republic("10");
Value_ATK_Locals("10");
Value_DEF_Alliance("10");
Value_DEF_CIS("10");
Value_DEF_Empire("10");
Value_DEF_Republic("10");
Value_DEF_Locals("10");
VO_All_AllCapture("all_off_com_report_captured_commandpost");
VO_All_AllLost("all_off_com_report_lost_commandpost");
VO_All_AllInDispute("");
VO_All_AllSaved("");
VO_All_AllInfo("");
VO_All_ImpCapture("all_off_com_report_enemyCaptured_commandpost");
VO_All_ImpLost("");
VO_All_ImpInDispute("");
VO_All_ImpSaved("");
VO_All_ImpInfo("");
VO_Imp_AllCapture("imp_off_com_report_enemyCaptured_commandpost");
VO_Imp_AllLost("");
VO_Imp_AllInDispute("");
VO_Imp_AllSaved("");
VO_Imp_AllInfo("");
VO_Imp_ImpCapture("imp_off_com_report_captured_commandpost");
VO_Imp_ImpLost("imp_off_com_report_lost_commandpost");
VO_Imp_ImpInDispute("");
VO_Imp_ImpSaved("");
VO_Imp_ImpInfo("");
VO_Rep_RepCapture("rep_off_com_report_captured_commandpost");
VO_Rep_RepLost("rep_off_com_report_lost_commandpost");
VO_Rep_RepInDispute("");
VO_Rep_RepSaved("");
VO_Rep_RepInfo("");
VO_Rep_CISCapture("rep_off_com_report_enemyCaptured_commandpost");
VO_Rep_CISLost("");
VO_Rep_CISInDispute("");
VO_Rep_CISSaved("");
VO_Rep_CISInfo("");
VO_CIS_RepCapture("cis_off_com_report_enemyCaptured_commandpost");
VO_CIS_RepLost("");
VO_CIS_RepInDispute("");
VO_CIS_RepSaved("");
VO_CIS_RepInfo("");
VO_CIS_CISCapture("cis_off_com_report_captured_commandpost");
VO_CIS_CISLost("cis_off_com_report_lost_commandpost");
VO_CIS_CISInDispute("");
VO_CIS_CISSaved("");
VO_CIS_CISInfo("");
SoldierBan("");
HoverBan("");
SmallBan("");
MediumBan("");
HugeBan("");
FlyerBan("");
AISpawnWeight("");
HUDIndex("");
HUDIndexDisplay("1");
}

Object("local_cp", "com_bldg_invisible_controlzone", 1590871219)
{
ChildRotation(-0.017, -0.479, 0.009, -0.877);
ChildPosition(-117.000, 9.000, -268.000);
SeqNo(1590871219);
Team(3);
NetworkId(-1);
Layer(2);
CaptureRegion("");
ControlRegion("");
SpawnPath("local_spawn");
TurretPath("");
AllyPath("");
AllyCount("65536");
Radius("0.0");
ValueBleed("10");
Value_ATK_Alliance("10");
Value_ATK_CIS("10");
Value_ATK_Empire("10");
Value_ATK_Republic("10");
Value_DEF_Alliance("10");
Value_DEF_CIS("10");
Value_DEF_Empire("10");
Value_DEF_Republic("10");
Value_DEF_Locals("10");
VO_All_AllCapture("all_off_com_report_captured_commandpost");
VO_All_AllLost("all_off_com_report_lost_commandpost");
VO_All_AllInDispute("");
VO_All_AllSaved("");
VO_All_AllInfo("");
VO_All_ImpCapture("all_off_com_report_enemyCaptured_commandpost");
VO_All_ImpLost("");
VO_All_ImpInDispute("");
VO_All_ImpSaved("");
VO_All_ImpInfo("");
VO_Imp_AllCapture("imp_off_com_report_enemyCaptured_commandpost");
VO_Imp_AllLost("");
VO_Imp_AllInDispute("");
VO_Imp_AllSaved("");
VO_Imp_AllInfo("");
VO_Imp_ImpCapture("imp_off_com_report_captured_commandpost");
VO_Imp_ImpLost("imp_off_com_report_lost_commandpost");
VO_Imp_ImpInDispute("");
VO_Imp_ImpSaved("");
VO_Imp_ImpInfo("");
VO_Rep_RepCapture("rep_off_com_report_captured_commandpost");
VO_Rep_RepLost("rep_off_com_report_lost_commandpost");
VO_Rep_RepInDispute("");
VO_Rep_RepSaved("");
VO_Rep_RepInfo("");
VO_Rep_CISCapture("rep_off_com_report_enemyCaptured_commandpost");
VO_Rep_CISLost("");
VO_Rep_CISInDispute("");
VO_Rep_CISSaved("");
VO_Rep_CISInfo("");
VO_CIS_RepCapture("cis_off_com_report_enemyCaptured_commandpost");
VO_CIS_RepLost("");
VO_CIS_RepInDispute("");
VO_CIS_RepSaved("");
VO_CIS_RepInfo("");
VO_CIS_CISCapture("cis_off_com_report_captured_commandpost");
VO_CIS_CISLost("cis_off_com_report_lost_commandpost");
VO_CIS_CISInDispute("");
VO_CIS_CISSaved("");
VO_CIS_CISInfo("");
SoldierBan("");
HoverBan("");
SmallBan("");
MediumBan("");
HugeBan("");
FlyerBan("");
AISpawnWeight("");
HUDIndex("");
HUDIndexDisplay("0");
}
and my pth file:
Hidden/Spoiler:
Version(10);
PathCount(3);

Path("cp1_spawn")
{
Data(0);
PathType(0);
PathSpeedType(0);
PathTime(0.000000);
OffsetPath(0);
Layer(2);
SplineType("Hermite");

Properties(0)
{
}

Nodes(3)
{
Node()
{
Position(-140.803085, 10.133225, -515.376770);
Knot(0.000000);
Data(1);
Time(1.000000);
PauseTime(0.000000);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Properties(0)
{
}
}

Node()
{
Position(-143.323990, 10.026474, -519.338135);
Knot(0.000000);
Data(1);
Time(1.000000);
PauseTime(0.000000);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Properties(0)
{
}
}

Node()
{
Position(-137.093582, 10.000000, -522.070923);
Knot(0.000000);
Data(1);
Time(1.000000);
PauseTime(0.000000);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Properties(0)
{
}
}

}

}

Path("cp2_spawn")
{
Data(0);
PathType(0);
PathSpeedType(0);
PathTime(0.000000);
OffsetPath(0);
Layer(2);
SplineType("Hermite");

Properties(0)
{
}

Nodes(15)
{
Node()
{
Position(193.613861, 10.000000, -157.409348);
Knot(0.000000);
Data(1);
Time(1.000000);
PauseTime(0.000000);
Rotation(0.807979, 0.000000, -0.589212, 0.000000);
Properties(0)
{
}
}

Note: Have added a cut, because there were just more spawn nodes.

Node()
{
Position(140.648453, 10.000000, 160.479614);
Knot(0.000000);
Data(2);
Time(1.000000);
PauseTime(0.000000);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Properties(0)
{
}
}

Node()
{
Position(166.721375, 10.000000, 164.736542);
Knot(0.000000);
Data(2);
Time(1.000000);
PauseTime(0.000000);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Properties(0)
{
}
}

Node()
{
Position(215.120575, 10.000000, 144.713135);
Knot(0.000000);
Data(2);
Time(1.000000);
PauseTime(0.000000);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Properties(0)
{
}
}

Node()
{
Position(238.140350, 10.174342, 228.544220);
Knot(0.000000);
Data(2);
Time(1.000000);
PauseTime(0.000000);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Properties(0)
{
}
}

Node()
{
Position(208.131470, 15.000000, 252.154419);
Knot(0.000000);
Data(2);
Time(1.000000);
PauseTime(0.000000);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Properties(0)
{
}
}

Node()
{
Position(94.058945, 15.000000, 259.104431);
Knot(0.000000);
Data(2);
Time(1.000000);
PauseTime(0.000000);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Properties(0)
{
}
}

Node()
{
Position(110.054626, 15.000000, 238.948578);
Knot(0.000000);
Data(2);
Time(1.000000);
PauseTime(0.000000);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Properties(0)
{
}
}

Node()
{
Position(83.199997, 15.000000, 211.899750);
Knot(0.000000);
Data(2);
Time(1.000000);
PauseTime(0.000000);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Properties(0)
{
}
}

Node()
{
Position(-5.311615, 15.000000, 269.638672);
Knot(0.000000);
Data(2);
Time(1.000000);
PauseTime(0.000000);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Properties(0)
{
}
}

Node()
{
Position(5.018551, 15.000000, 212.119141);
Knot(0.000000);
Data(2);
Time(1.000000);
PauseTime(0.000000);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Properties(0)
{
}
}

Node()
{
Position(-164.564926, 10.000000, 133.363281);
Knot(0.000000);
Data(2);
Time(1.000000);
PauseTime(0.000000);
Rotation(1.000000, 0.000000, 0.000000, 0.000000);
Properties(0)
{
}
}

}

}
Again my problem is there are no AI in 3rd team. I have replaced the cops with the passants and it worked but I'd like to set them in third team.
Ah and one other little question: What was the line for forcing the player to team 1?
Thanks for any helps.

Re: Problems with adding a 3d team.

Posted: Sun Jul 20, 2014 11:56 am
by Noobasaurus
You don't have a "local_spawn" path.

And your other q:

Code: Select all

		ForceHumansOntoTeam1()

Re: Problems with adding a 3d team.

Posted: Sun Jul 20, 2014 11:58 am
by razac920
Replace SetUnitCount (180, 250) with SetUnitCount (3, 250) -- first number is the team number, second number is the unit count
and the command you want is ForceHumansOntoTeam1()

Re: Problems with adding a 3d team.

Posted: Sun Jul 20, 2014 12:01 pm
by thelegend
Ah ok. Thank you all. I am going to try that out.

Edit: Ok. It works great. I have one little tiny question more. It is possible to remove the "Follow Me" and "Move out" orders if you press F4? The passants are friendly to the cops and the player, but they should not follow you if you "ask" them. Is that possible?

Re: Problems with adding a 3rd team.

Posted: Sun Jul 20, 2014 4:33 pm
by AnthonyBF2
You can try to set your passant ODFs up to be jedi/hero types. Even if it's not going to be a hero. Jedi and Heroes don't take orders... I don't think they can? I know you can't make them follow. I forget if hero can give orders.

Re: Problems with adding a 3rd team.

Posted: Sun Jul 20, 2014 5:34 pm
by AQT
It's not ODF related. The player as a hero unit can give commands and have them be followed by AI just fine, only when the hero unit was added as a regular unit. It's when they're added with SetHeroClass that the commands aren't followed.