Post everything from general questions, to modding questions, to map WIPs to releases. (SWBF1 only)
Moderator: Moderators
breakdown
Lance Corporal
Posts: 91 Joined: Thu Oct 16, 2008 6:44 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Post
by breakdown » Fri Jul 10, 2009 6:35 pm
How can you set up a map like the campaign missions so one side is unplayable and you can only play as one side? Like, you cannot choose differet.
I have looked through the shipped LUA's but no luck so far, does anybody know how?
Thanks
-Breakdown
Frog
Lance Corporal
Posts: 96 Joined: Sat Apr 04, 2009 9:44 am
Post
by Frog » Fri Jul 10, 2009 9:42 pm
well no its hard to edit campaign since its part of the game not just a insant map
breakdown
Lance Corporal
Posts: 91 Joined: Thu Oct 16, 2008 6:44 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Post
by breakdown » Fri Jul 10, 2009 9:49 pm
That's not what I am saying, I already know that...
What I was asking was how you can set up an instant map so only one team is selectable LIKE the campaign missions
Frog
Lance Corporal
Posts: 96 Joined: Sat Apr 04, 2009 9:44 am
Post
by Frog » Fri Jul 10, 2009 11:15 pm
oooooo
id either try seeing wat taking the out of your LUA but make a backup copy just incase cuz that might crash your map and if that dosent work then id study the luas of those campaign missions very carefully to see how they do it
Battleffront_Conquer
Master Sergeant
Posts: 160 Joined: Sat Apr 04, 2009 2:44 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: InDooRs
Post
by Battleffront_Conquer » Fri Jul 10, 2009 11:33 pm
this is possible, I have done it in my map of Hoth.
You simply make the attacking team the team you wish to allow and the defending team the un-allowed. And all you have to add is "
ScriptCB_SetGameRules("campaign")"
where the scripts are called in. If you take a look at some of the shipped Lua's You might find some very interesting things.
BattleBelk
Private First Class
Posts: 77 Joined: Thu Jun 28, 2007 7:08 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Russia
Contact:
Post
by BattleBelk » Sat Jul 11, 2009 10:47 am
Battleffront_Conquer wrote: this is possible, I have done it in my map of Hoth.
You simply make the attacking team the team you wish to allow and the defending team the un-allowed. And all you have to add is "
ScriptCB_SetGameRules("campaign")"
where the scripts are called in. If you take a look at some of the shipped Lua's You might find some very interesting things.
and of couse you did it for swbf2 right?
there is no ScriptCB_SetGameRules for swbf1
Maybe need play around with hystorical luas and with:
Some hystorical missions playbale online for example Naboo Theed (nab2c_h). I played guards vs droids and my CPs was yellow color
breakdown
Lance Corporal
Posts: 91 Joined: Thu Oct 16, 2008 6:44 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Post
by breakdown » Sat Jul 11, 2009 12:49 pm
Hmm yes I tried with the SetHistorical, yet nothing happened.
I'll play around with it more, thanks
The SetHistorical () just removes my ingame vehicles, no other changes that I can see.
BattleBelk
Private First Class
Posts: 77 Joined: Thu Jun 28, 2007 7:08 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Russia
Contact:
Post
by BattleBelk » Sat Jul 18, 2009 4:22 pm
I've found something intresting, maybe not exactly that need
but if set inside function ScriptInit() :
you will able to choose sides in singleplayer campaign
Bellow example for Naboo Plains (NAB1c_h.lua):
Hidden/Spoiler:
[code]---------------------------------------------------------------------------
-- 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()
ScriptCB_SetCanSwitchSides()
-- GUN Attacking (attacker is always #1)
local GUN = 2
local CIS = 1
-- These variables do not change
local ATT = 1
local DEF = 2
SetHistorical()
SetTeamAggressiveness(GUN, 1.0)
SetTeamAggressiveness(CIS, 0.7)
SetPlayerTeamDifficultyEasy (14)
SetEnemyTeamDifficultyEasy (-3)
SetPlayerTeamDifficultyMedium (-1)
SetEnemyTeamDifficultyMedium (6)
-- SetPlayerTeamDifficultyHard (-10)
-- SetEnemyTeamDifficultyHard (12)
SetMaxFlyHeight(-40)
SetMaxPlayerFlyHeight(-40)
AddMissionObjective(CIS, "orange", "level.naboo1.objectives.1a");
AddMissionObjective(CIS, "red", "level.naboo1.objectives.4h");
AddMissionObjective(CIS, "red", "level.naboo1.objectives.5h");
AddMissionObjective(GUN, "orange", "level.naboo1.objectives.1a");
AddMissionObjective(GUN, "red", "level.naboo1.objectives.2h");
AddMissionObjective(GUN, "red", "level.naboo1.objectives.3h");
SetTeamName(GUN, "Gungans")
SetTeamName(CIS, "CIS")
ReadDataFile("sound\\nab.lvl;nab1cw");
ReadDataFile("SIDE\\cis.lvl",
"cis_inf_basic_battledroids",
"cis_fly_fedlander_dome",
"cis_hover_aat",
"cis_hover_stap")
ReadDataFile("SIDE\\gun.lvl",
"gun_inf_basic",
"gun_walk_kaadu",
"nab_bldg_fambaa_shield")
-- Level Stats
ClearWalkers()
-- SetMemoryPoolSize ("EntityWalker",)
AddWalkerType(0, -- 8 droidekas (special case: 0 leg pairs)
AddWalkerType(1, 6) --
AddWalkerType(2, 0) -- 2 spider walkers with 2 leg pairs each
AddWalkerType(3, 0) -- 2 attes with 3 leg pairs each
SetMemoryPoolSize ("CommandWalker",0)
SetMemoryPoolSize ("CommandHover", 1)
SetMemoryPoolSize ("MountedTurret",40)
SetMemoryPoolSize("EntityFlyer", 2)
-- SetMemoryPoolSize("EntityTauntaun", 0)
SetMemoryPoolSize("EntityHover", 15)
SetMemoryPoolSize("EntityCarrier", 0)
SetMemoryPoolSize("PowerupItem", 40)
SetMemoryPoolSize("EntityMine", 40)
SetMemoryPoolSize("Aimer", 200)
SetSpawnDelay(10.0, 0.25)
ReadDataFile("NAB\\nab1_h.lvl")
-- Gungan Stats
-- SetTeamIcon (REP, "rep_icon")
AddUnitClass(GUN, "gun_inf_soldier", 17)
AddUnitClass(GUN, "gun_inf_rider", 7)
AddUnitClass(GUN, "gun_inf_defender",
-- CIS Stats
SetTeamName (CIS,"CIS")
SetTeamIcon(CIS, "cis_icon")
AddUnitClass(CIS, "cis_inf_battledroid_inf",15)
AddUnitClass(CIS, "cis_inf_battledroid_av",5)
AddUnitClass(CIS, "cis_inf_battledroid_pilot",6)
AddUnitClass(CIS, "cis_inf_battledroid_sniper",6)
-- Attacker Stats
SetUnitCount(ATT, 32)
SetReinforcementCount(ATT, 200)
AddBleedThreshold(ATT, 31, 0.0)
AddBleedThreshold(ATT, 21, 0.75)
AddBleedThreshold(ATT, 11, 2.25)
AddBleedThreshold(ATT, 1, 3.0)
-- Defender Stats
SetUnitCount(DEF, 32)
SetReinforcementCount(DEF, 200)
AddBleedThreshold(DEF, 31, 0.0)
AddBleedThreshold(DEF, 21, 0.75)
AddBleedThreshold(DEF, 11, 2.25)
AddBleedThreshold(DEF, 1, 3.0)
SetDenseEnvironment("false")
-- Birdies
SetNumBirdTypes(1);
SetBirdType(0,1.0,"bird");
-- Sound
OpenAudioStream("sound\\nab.lvl", "nabcw_music");
OpenAudioStream("sound\\cw.lvl", "cw_vo");
OpenAudioStream("sound\\cw.lvl", "cw_tac_vo");
OpenAudioStream("sound\\nab.lvl", "nab1");
OpenAudioStream("sound\\nab.lvl", "nab1");
--SetBleedingVoiceOver(GUN, GUN, "rep_off_com_report_us_overwhelmed", 1);
--SetBleedingVoiceOver(GUN, CIS, "rep_off_com_report_enemy_losing", 1);
SetBleedingVoiceOver(CIS, GUN, "cis_off_com_report_enemy_losing_generic", 1);
SetBleedingVoiceOver(CIS, CIS, "cis_off_com_report_us_overwhelmed_generic", 1);
SetOutOfBoundsVoiceOver(1, "cisleaving");
SetOutOfBoundsVoiceOver(2, "repleaving");
-- SetAmbientMusic(GUN, 1.0, "rep_nab_amb_start", 0,1);
-- SetAmbientMusic(GUN, 0.98, "rep_nab_amb_middle", 1,1);
-- SetAmbientMusic(GUN, 0.1,"rep_nab_amb_end", 2,1);
SetAmbientMusic(CIS, 1.0, "cis_nab_amb_start", 0,1);
SetAmbientMusic(CIS, 0.98, "cis_nab_amb_middle", 1,1);
SetAmbientMusic(CIS, 0.1,"cis_nab_amb_end", 2,1);
-- SetVictoryMusic(GUN, "rep_nab_amb_victory");
-- SetDefeatMusic (GUN, "rep_nab_amb_defeat");
SetVictoryMusic(CIS, "cis_nab_amb_victory");
SetDefeatMusic (CIS, "cis_nab_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");
SetPlanetaryBonusVoiceOver(CIS, CIS, 0, "CIS_bonus_CIS_medical");
SetPlanetaryBonusVoiceOver(CIS, GUN, 0, "CIS_bonus_REP_medical");
SetPlanetaryBonusVoiceOver(CIS, CIS, 1, "");
SetPlanetaryBonusVoiceOver(CIS, GUN, 1, "");
SetPlanetaryBonusVoiceOver(CIS, CIS, 2, "CIS_bonus_CIS_sensors");
SetPlanetaryBonusVoiceOver(CIS, GUN, 2, "CIS_bonus_REP_sensors");
SetPlanetaryBonusVoiceOver(CIS, CIS, 3, "CIS_bonus_CIS_hero");
SetPlanetaryBonusVoiceOver(CIS, GUN, 3, "CIS_bonus_REP_hero");
SetPlanetaryBonusVoiceOver(CIS, CIS, 4, "CIS_bonus_CIS_reserves");
SetPlanetaryBonusVoiceOver(CIS, GUN, 4, "CIS_bonus_REP_reserves");
SetPlanetaryBonusVoiceOver(CIS, CIS, 5, "CIS_bonus_CIS_sabotage");--sabotage
SetPlanetaryBonusVoiceOver(CIS, GUN, 5, "CIS_bonus_REP_sabotage");
SetPlanetaryBonusVoiceOver(CIS, CIS, 6, "");
SetPlanetaryBonusVoiceOver(CIS, GUN, 6, "");
SetPlanetaryBonusVoiceOver(CIS, CIS, 7, "CIS_bonus_CIS_training");--advanced training
SetPlanetaryBonusVoiceOver(CIS, GUN, 7, "CIS_bonus_REP_training");--advanced training
--SetPlanetaryBonusVoiceOver(REP, REP, 0, "REP_bonus_REP_medical");
--SetPlanetaryBonusVoiceOver(REP, CIS, 0, "REP_bonus_CIS_medical");
--SetPlanetaryBonusVoiceOver(REP, REP, 1, "");
--SetPlanetaryBonusVoiceOver(REP, CIS, 1, "");
--SetPlanetaryBonusVoiceOver(REP, REP, 2, "REP_bonus_REP_sensors");
--SetPlanetaryBonusVoiceOver(REP, CIS, 2, "REP_bonus_CIS_sensors");
--SetPlanetaryBonusVoiceOver(REP, REP, 3, "REP_bonus_REP_hero");
--SetPlanetaryBonusVoiceOver(REP, CIS, 3, "REP_bonus_CIS_hero");
--SetPlanetaryBonusVoiceOver(REP, REP, 4, "REP_bonus_REP_reserves");
--SetPlanetaryBonusVoiceOver(REP, CIS, 4, "REP_bonus_CIS_reserves");
--SetPlanetaryBonusVoiceOver(REP, REP, 5, "REP_bonus_REP_sabotage");--sabotage
--SetPlanetaryBonusVoiceOver(REP, CIS, 5, "REP_bonus_CIS_sabotage");
--SetPlanetaryBonusVoiceOver(REP, REP, 6, "");
--SetPlanetaryBonusVoiceOver(REP, CIS, 6, "");
--SetPlanetaryBonusVoiceOver(REP, REP, 7, "REP_bonus_REP_training");--advanced training
--SetPlanetaryBonusVoiceOver(REP, CIS, 7, "REP_bonus_CIS_training");--advanced training
SetAttackingTeam(ATT);
--Opening Satalite Shot
--Nab1 Plains
--Hill
AddCameraShot(0.983066, -0.039190, 0.178868, 0.007131, 44.779041, -92.555016, 223.609207);
--Pillars
AddCameraShot(0.558071, -0.004864, -0.829747, -0.007232, -99.522423, -104.189438, 102.993027);
--Center
AddCameraShot(-0.180345, 0.002299, -0.983521, -0.012535, 38.772453, -105.314598, 24.777697);
end
[/code]
EDIT: for disable switch side in singleplayer (you will spawn as attacker)
But for multiplayer server override it for auotassign or player select as usual
breakdown
Lance Corporal
Posts: 91 Joined: Thu Oct 16, 2008 6:44 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Post
by breakdown » Sat Jul 18, 2009 6:08 pm
Cool, thanks Battle Belk!
I'll try it out in a bit
BattleBelk
Private First Class
Posts: 77 Joined: Thu Jun 28, 2007 7:08 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Russia
Contact:
Post
by BattleBelk » Wed Jul 22, 2009 12:20 pm
no problem
Another thing:
or
force side to 1 or 2