Selecting a team for campaign mode

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
authraw
1st Lieutenant
1st Lieutenant
Posts: 445
Joined: Mon Jun 26, 2006 3:45 pm

Selecting a team for campaign mode

Post by authraw »

How does one set which team is played by the player in a campaign mode? No matter what I do, my campaign mode always seems to select team 1 as the playable team (when I want team 2 to be playable.) Is it just hard-coded in that team 1 is playable and team 2 is not?
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Selecting a team for campaign mode

Post by Maveritchell »

I'm pretty sure that running the scripted game rules for campaign sets it up so that the player must be on team 1. I'm not sure why it should be a huge issue, since you can just reverse the teams' makeups. But there are even some non-explicitly-campaign callbacks that seem to indicate that team 1 is the only default player team (ForceHumansOntoTeam1 - there's no callback for forcing them onto team 2).
Ace_Azzameen_5
Jedi
Jedi
Posts: 1119
Joined: Sat Apr 23, 2005 8:52 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: Selecting a team for campaign mode

Post by Ace_Azzameen_5 »

Just switch the teams' numbers.
I.E. REP = 2 CIS = 1 . That should do it. Also, if you have custom code refering to the team numbers (and not the team number variables, REP, CIS, ALL, IMP etc) then you need to change that.
Abiter_b

Re: Selecting a team for campaign mode

Post by Abiter_b »

Dunno if this helps but if u get rid of this line you arn't forced onto a team and can choose like in a normal gamemode. I don't think killing this line has any major side effects.

Code: Select all

ScriptCB_SetGameRules("campaign")
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Selecting a team for campaign mode

Post by Maveritchell »

Abiter_b wrote:Dunno if this helps but if u get rid of this line you arn't forced onto a team and can choose like in a normal gamemode. I don't think killing this line has any major side effects.

Code: Select all

ScriptCB_SetGameRules("campaign")
No major side effects except... you aren't forced onto one team, which is kinda crucial to a campaign.
User avatar
authraw
1st Lieutenant
1st Lieutenant
Posts: 445
Joined: Mon Jun 26, 2006 3:45 pm

Re: Selecting a team for campaign mode

Post by authraw »

Alright--if reversing the numbers is the only way to do it, then so be it. Generally it wouldn't be an issue, but I've already written a LOT of code, and reversing the team numbers throughout will be a pain (because I, being the intelligent coder I am, decided to forgo the REP, CIS, DEF, and ATT variables and just used team numbers.) >_<

Very well. Thanks all!
Ace_Azzameen_5
Jedi
Jedi
Posts: 1119
Joined: Sat Apr 23, 2005 8:52 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: Selecting a team for campaign mode

Post by Ace_Azzameen_5 »

My code's the same. Now I know why they have those as variables...
Post Reply