Author Topic: Expanding the team in New York  (Read 1421 times)

Offline BaconWizard17

  • Admin
  • Incredible Member
  • ************
  • Posts: 1503
  • Upvotes: 85
  • Sometimes you just gotta go for it, ya know?
Expanding the team in New York
« on: February 27, 2019, 03:53pm »
I decompiled the fb package for the third section of New York (nyc1_1_3, the map just after defeating Mystique). I want to try to make it so that you get 4 players at this point. So there are 2 options, and hopefully both can be played with.

Option 1: Converting the limited extraction point to an expanded extraction point

I feel like this may be the more simple method of doing this. I suspect that the answer to this is in the map's eng file (nyc1_1_3.eng). That file contains a few lines referring to the xtraction point.

First:
Code: [Select]
<entity name="xtraction_point" classname="gameent" actsound="common/game/xtraction"
acttogglesanim="false" quickuse="true" model="puzzles/beacon_xtraction" nogravity="true"
animstarton="true" toggleonact="false" nopickup="true" nopush="true" actonuse="true"
description="Xtraction Point" actscript="extractionPoint('_OWNER_')" team="hero"
actmatchteam="true" actleader="true" ignoretelekinesis="true"/>

and then further down:

Code: [Select]
<entinst type="xtraction_point">
<inst name="xtraction_point" pos="-360.571 1619.3 -188.577"/>
</entinst>

Obviously, the second part is just position info, so it's not relevant. In theory, the first part should yield results. However, I don't see any differences between that code and this one, taken from HAARP 1:

Code: [Select]
<entity name="xtraction_point" classname="gameent" actsound="common/game/xtraction"
acttogglesanim="false" quickuse="true" model="puzzles/beacon_xtraction" nogravity="true"
animstarton="true" toggleonact="false" nopickup="true" nopush="true" actonuse="true"
description="Xtraction Point" actscript="extractionPoint('_OWNER_')" team="hero"
actmatchteam="true" actleader="true" ignoretelekinesis="true"/>

So either I'm missing something, the info is located in another file, or this is a hard-coded feature of the game.

Option 2: Spawning in new teammates with Cyclops

In the scripts for the same mission, there is a script called add_cyclops.py, which reads as such:

Code: [Select]
# Generated by BehavEd
# ( "comment" )
sound (  "PLAY_SOUND", "voice/cyclops/1_1_0045_1", "", "" )
waittimed ( 1.000 )
setInCampaign("cyclops", "TRUE" )
addHero("cyclops" )
waittimed ( 1.000 )
createPopupDialogXml("dialogs/tut15" )

Perhaps additional characters could be added to this script (and I'd imagine they'd need to be spawned in as well, so there would need to be some manipulation of the map's .eng file). This would present a more canonical way of adding teammates.

Hopefully someone has some insights on these and can help. Another idea I had was adding an extraction point to the start of the game, but I'm not sure how the game would take to added extraction points. All it takes is some testing though.

Offline Dream Weaver

  • Amazing Member
  • **
  • Posts: 83
  • Upvotes: 19
Re: Expanding the team in New York
« Reply #1 on: February 28, 2019, 12:55pm »
My gut tells me the second way would likely work, though I wouldn't be surprised if it dumped the additional characters on top of Cyclops. Maybe they'd just fall into place beside him. Nowhere in that does it define the specific location of where they're spawned?

I'd also recommend Beast, Iceman or Rogue. The first two can be briefly seen with Alison in the X-Jet along with Colossus after you've rescued her from the rooftops ó though he is not canonically unlocked until the nuclear plant mission ó while Rogue is among some of the earliest unlocked characters.

Offline BaconWizard17

  • Admin
  • Incredible Member
  • ************
  • Posts: 1503
  • Upvotes: 85
  • Sometimes you just gotta go for it, ya know?
Re: Expanding the team in New York
« Reply #2 on: February 28, 2019, 02:26pm »
My gut tells me the second way would likely work, though I wouldn't be surprised if it dumped the additional characters on top of Cyclops. Maybe they'd just fall into place beside him. Nowhere in that does it define the specific location of where they're spawned?

The map's .eng file has a spawn location for Cyclops, so I'm sure the others could be added

I'd also recommend Beast, Iceman or Rogue. The first two can be briefly seen with Alison in the X-Jet along with Colossus after you've rescued her from the rooftops ó though he is not canonically unlocked until the nuclear plant mission ó while Rogue is among some of the earliest unlocked characters.

I was thinking one of them as well. No other characters are available at that point, and Storm and Jean both contribute as NPCs. Of course, Storm never shows up and has no dialogue, so you could probably alter the text dialogue a bit to have the controlled character talk to storm directly. Arguably, the same could be done for Jean. Within the game's files, Storm and Jean are technically in the default 4 characters unlocked from the beginning. On the other hand, the default team that the game normally sets is Cyclops, Wolverine, Storm, and Iceman, so that could be another option

Offline Dream Weaver

  • Amazing Member
  • **
  • Posts: 83
  • Upvotes: 19
Re: Expanding the team in New York
« Reply #3 on: February 28, 2019, 04:41pm »
Probably could with Storm, though there is the spoken dialogue by Jean where she talks telepathically to Cyclops/Wolverine. This should work either way though if Cyclops' spawn location is defined in the file. Maybe some time I'll take a look into modding XML1. Only modded the second game.

Offline Lags

  • Marvel Modder
  • Uncanny Member
  • **********
  • Posts: 46
  • Upvotes: 4
  • Loves the Generic faceless Soldiers
Re: Expanding the team in New York
« Reply #4 on: March 01, 2019, 01:52am »
In the map's .eng file, there should be a code that looks something like:
Code: [Select]
<inst name="player_start01" pos="3247.05 1793.95 30" extents="3225.48 1776 30 3276 1811.92 113.954" orient="0 0 3.14159"/>or something like that at the bottom somewhere (all maps use this to spawn heroes i believe, and this player_start is just an example I pulled out from Astral mission's). Adding in more of those <entinst type="player_startXX">'s should spawn additional heroes into the map. It's easy to just copy and paste player 1's script (and player 2's if there is one) and renaming the player_start(XX) to 02, 03, and 04, so it applies to the respective players. I don't have a point of reference (like X, Y, and Z axis) on how to position where each hero will spawn, so they'll just fall on top of each other and get pushed aside when a map loads.

But that's not all, I'm pretty sure setting spawn points just tells the game that certain amount of heroes can join the map. In order to tell the game which hero you want to spawn, you'll have to navigate over to the assetsfb/data/missions/and edit the script for a missions .eng file and set which heroes to appear. So in that case, (I believe I pulled out the right one that corresponds to the very first mission's) it looks something like this:

Code: [Select]
<MISSION descname="Alison in NYC" description="Save Alison from bad guys" scriptstart="missions/alison" remote="true" minheros="2" maxheros="2" skinset="default" teamselect="false" keepheroes="false">
<REQUIREDHERO name="wolverine"/>
<REQUIREDHERO name="cyclops"/>
<OBJECTIVE name="defeat_blob" descname="Defeat Blob" description="Defeat Blob to rescue Alison." updatedescription="Blob Defeated!" enabled="false"/>
<OBJECTIVE name="defeat_mystique" descname="Defeat Mystique" description="Defeat Mystique to get to Blob." updatedescription="Mystique Defeated!" enabled="false"/>
<OBJECTIVE name="get_to_jet" descname="Get to the X-Jet" enabled="false" description="Make your way through the rooftops to the X-Jet."/>
<OBJECTIVE name="find_blob" descname="Find Blob" description="Find Blob's trail and track him down." updatedescription="You found Blob!" enabled="true"/>
</MISSION>

You'll have to add in two additional <HERO name="X-men"/> after Wolverine and Cyclops so it adds in the last two heroes. Names are based on what their file name is in the Characters folder so if you're adding Iceman and Jean Grey in the first mission, an example would be:

Code: [Select]
<REQUIREDHERO name="wolverine"/>
<REQUIREDHERO name="cyclops"/>
<REQUIREDHERO name="iceman"/>
<REQUIREDHERO name="phoenix"/>

This way, it should register them into the mission and they are ready to appear anywhere in the mission as long as a spawn point is set when a map loads.

And lastly, a mission's eng file seems pretty explanatory but we should mainly focus on these:
minheros = min amount of heroes you want 
maxheros = maximum amount of heroes you can have.  (I recommend just keeping both of them at 4.)
 
You'll also want to keep in mind of these:

<REQUIREDHERO name="X-HERO SLOT"/> - Cannot be removed out of team even at Xtraction points.
<RECOMMENDEDHERO name="X-HERO SLOT"/> - Who the mission recommends you to use. Can be swapped out. (It's used when a you're in the team select screen at the beginning of the mission, they start you off with a certain set of heroes.)
<RESTRICTEDHERO name="X-HERO SLOT"/> - Cannot use them (usually applies to Jean Grey in certain missions)
<MUSTLIVEHERO name="X-Hero SLOT"/> - A side thing that's applied in the file and does not correspond to selecting a hero to start off with in a mission. I assume if this hero dies, you instant game over. Which is applied on Professor X on the Astral mission.

As for the Cyclops.py, I haven't messed around with that but I think that's just a script to have you perform a little more work to get him into the team when you walk past him, rather than having him spawn instantly into the team when the map loads.
« Last Edit: March 01, 2019, 02:20am by Lags »

Offline BaconWizard17

  • Admin
  • Incredible Member
  • ************
  • Posts: 1503
  • Upvotes: 85
  • Sometimes you just gotta go for it, ya know?
Re: Expanding the team in New York
« Reply #5 on: March 01, 2019, 07:59am »
Wow thanks for that! Iíll look deeper into it. So basically, it should be possible to unrestricted any map, yes?

In terms of the Cyclops script, the only reason I considered adding to that was to make the addition of heroes a bit more realistic so that theyíre not just spawning right on top of you randomly. Iíll try to play with all of this.

Offline Teancum

  • Admin
  • Ultimate Member
  • ************
  • Posts: 5883
  • Upvotes: 79
Re: Expanding the team in New York
« Reply #6 on: March 01, 2019, 12:24pm »
You can share one spawn point. The characters just spawn on top each other then spread out.

Offline Lags

  • Marvel Modder
  • Uncanny Member
  • **********
  • Posts: 46
  • Upvotes: 4
  • Loves the Generic faceless Soldiers
Re: Expanding the team in New York
« Reply #7 on: April 04, 2019, 09:43am »
I've been messing with the players sharing one spawn point to load everyone and encountered an issue. The weird thing is that when you enter into a different zone, it switches the character you play as when the map loads. For example, in the first mission when playing as Wolverine, I included placeholder characters  (Brotherhood Insurgent and an Anti-Mutant Troop) to spawn as the remaining two heroes that are left out after you get Cyclops, so you can have 4 players automatically after you beat mystique. The Anti-Mutant Troop was set on second player's slot when he spawns, and when the map loaded, the game forced me as the Anti-Mutant Troop to play as first, before I can switch over to Wolverine. Which is a little bit of an issue because if you have all 4 controllers signed in before you enter the zone where all heroes spawn, the game doesn't assign controllers to the respective heroes, rather, it still believes only 2 players can play and leaves the other two players out, despite the remaining heroes being left controlled by the AI. So far, the only way to fix the it is to re-sign them in from the players menu so all players can control a hero.

Offline BaconWizard17

  • Admin
  • Incredible Member
  • ************
  • Posts: 1503
  • Upvotes: 85
  • Sometimes you just gotta go for it, ya know?
Re: Expanding the team in New York
« Reply #8 on: April 04, 2019, 12:24pm »
I wonder if thatís a hard-coded thing. It may not be possible to override that in a way other than what you did