Random Heroes?

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
Glitch25
Sergeant Major
Sergeant Major
Posts: 222
Joined: Mon May 07, 2012 1:01 pm
Projects :: [ISM] [BFU]
Games I'm Playing :: [SWBFII] [SWBFI]
Location: Baktoid Combat Automata
Contact:

Random Heroes?

Post by Glitch25 »

I think it would be interesting if I could somehow implement the use of random heroes when plain Phase I or Phase II clones are used. (Excluding the few maps that have Jedi Generals that lead a specific legion) I know that each side can only use 9 different classes at a time. Maybe I'll add all heroes to new sides. hbd hgd

Ex: Enter the map Naboo Theed as the Republic and play as Jinn or Kenobi when the hero is unlocked.

Does anyone know if this is possible?
User avatar
yuke5
Field Commander
Field Commander
Posts: 945
Joined: Wed Jun 29, 2011 10:42 pm
Games I'm Playing :: SWBF2 TF2 RC KOTOR
xbox live or psn: My steam is yuke5.
Location: Vermont

Re: Random Heroes?

Post by yuke5 »

Do you mean rotating heroes on one specific map? I don't know if that is possible. I know that you can pre-load a random hero before the map starts, and that you can assign specific units to specific heroes.
User avatar
Glitch25
Sergeant Major
Sergeant Major
Posts: 222
Joined: Mon May 07, 2012 1:01 pm
Projects :: [ISM] [BFU]
Games I'm Playing :: [SWBFII] [SWBFI]
Location: Baktoid Combat Automata
Contact:

Re: Random Heroes?

Post by Glitch25 »

Rotating heroes on one specific map, the specific hero assignment per unit also sounds intriguing. It would be awesome to see multiple heroes during conquest. Maybe I'll let bots use them as well.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Random Heroes?

Post by Marth8880 »

I don't know how well it would work or if it would work at all, and I've only really tested it once or twice for Unification, but what you could do is create a looping timer that, upon elapse, initiates a math.random function to decide a new hero.


Example:

Code: Select all

function DecideSSVHeroClass()
		CreateTimer("ssv_hero_timer")
		SetTimerValue("ssv_hero_timer", 45)
		StartTimer("ssv_hero_timer")
		ShowTimer("ssv_hero_timer")
		OnTimerElapse(
			function(timer)
				DecideSSVHeroClass = math.random(1,4)
					print("execute 'decide ssv hero class")
				if DecideSSVHeroClass == 1 then
						print("decide ssv hero::decide shepard class")
					DecideShepClass() -- decide random Shepard class
				elseif DecideSSVHeroClass == 2 then
						print("decide ssv hero::samara")
					SetHeroClass(REP, "ssv_hero_samara")
				elseif DecideSSVHeroClass == 3 then
						print("decide ssv hero::jack")
					SetHeroClass(REP, "ssv_hero_jack")
				elseif DecideSSVHeroClass == 4 then
						print("decide ssv hero::legion")
					SetHeroClass(REP, "ssv_hero_legion")
				else
				end
				
				SetTimerValue("ssv_hero_timer", 45)
				StartTimer("ssv_hero_timer")
			end,
		"ssv_hero_timer"
	)
end
User avatar
Zapattack1234
Rebel Colonel
Rebel Colonel
Posts: 574
Joined: Mon Sep 24, 2012 6:44 pm
Projects :: The Wrecked Graveyard_Amongst the Ruins
Games I'm Playing :: SWBF 1 and 2
xbox live or psn: xbla:Rehmfire49
Location: Isla Nublar (Jurassic Park)

Re: Random Heroes?

Post by Zapattack1234 »

i believe there is a topic somewhere about this ill try to find it i remember seeing this somewhere else, and it was possible. :cpu:
User avatar
Glitch25
Sergeant Major
Sergeant Major
Posts: 222
Joined: Mon May 07, 2012 1:01 pm
Projects :: [ISM] [BFU]
Games I'm Playing :: [SWBFII] [SWBFI]
Location: Baktoid Combat Automata
Contact:

Re: Random Heroes?

Post by Glitch25 »

Finally got a chance to try this out. It does not randomize the heroes but you can still choose between them after getting to the class selection menu. I cannot use the number of heroes I was hoping for, each time I add a new one it takes up one of the 3 slots remaining for classes.

Image
Hidden/Spoiler:
Image
The additional hero uses the first heroes spawn lines and death lines.All the heroes within the game have been moved over to the "JED" side. Maybe I should make the heroes a separate side? I'm not even sure how many heroes I could use at once.

Does anyone know of another method I could use?
Hidden/Spoiler:
----------HERO SETUP----------


Episode 1: The Phantom Menace
[list][*]Aayla Secura
[*]Darth Maul
[*]Ki-Adi-Mundi
[*]Kit Fisto
[*]Mace Windu
[*]Obi-Wan Kenobi
[*]OOM-9
[*]Plo Koon
[*]Qui-Gon Jinn
[*]Yoda[/list]

Episode 2: Attack of the Clones
[list][*]Aayla Secura
[*]Anakin Skywalker
[*]Asajj Ventress
[*]Count Dooku
[*]Jango Fett
[*]Ki-Adi-Mundi
[*]Kit Fisto
[*]Mace Windu
[*]Obi-Wan Kenobi
[*]Plo Koon
[*]Yoda[/list]

Episode 3: Revenge of the Sith
[list][*]Aayla Secura
[*]Anakin Skywalker
[*]Asajj Ventress
[*]Chewbacca (Kashyyyk Exclusive)
[*]Count Dooku
[*]General Grevious
[*]Ki-Adi-Mundi
[*]Kit Fisto
[*]Mace Windu
[*]Obi-Wan Kenobi
[*]Plo Koon
[*]Yoda[/list]

Episode 4: A New Hope
[list][*]Chewbacca
[*]Darth Sidious
[*]Darth Vader
[*]Han Solo
[*]Leia Organa
[*]Luke Skywalker
[*]Obi-Wan Kenobi
[*]Yoda[/list]

Episode 5: The Empire Strikes Back
[list][*]Boba Fett
[*]Chewbacca
[*]Darth Sidious
[*]Darth Vader
[*]Han Solo
[*]IG-88
[*]Lando Calrissian
[*]Leia Organa
[*]Luke Skywalker
[*]Yoda[/list]

Episode 6: Return of the Jedi
[list][*]Boba Fett
[*]Chewbacca
[*]Darth Sidious
[*]Darth Vader
[*]Han Solo
[*]IG-88
[*]Leia Organa
[*]Luke Skywalker
[*]Yoda[/list]
Post Reply