XML1: Unlocking all characters from the start

Started by Generic Unit, July 09, 2019, 11:56PM

Previous topic - Next topic
July 09, 2019, 11:56PM Last Edit: July 15, 2019, 06:44AM by Teancum
I did it guys! I found the script that allows you to unlock characters as you proceed through the game. It took me a bit but I happened to find and take it from the sewers mission where you save Gambit from Marrow. When he leaves his cell, he is automatically unlocked and joins your team.
Here's the original script:

setInCampaign("gambit", "TRUE" )

If we want to unlock all characters from the start, we will be using the same method we did to unlock characters in X-Men Legends 2 (minus having to use the required button combinations because the first game doesn't have this cheat).

And now to our tutorial on how to do this:

In our Assetsfb, we'll open up our script that plays at the very beginning of game, which will be the file Alison.py since that's the script that initiates the preview movie before the very first mission begins. We can find it under the Scripts folder in the root of the assetsfb.

So Assetsfb>scripts>missions>alison.py. The default Alison.py file won't allow you to edit this because it's a Read-Only file. So you'll need to right-click the file, open its properties, and uncheck the Read-Only box, apply changes and you'll be able to make edits to it.



Now if we add multiple copies of the script used to unlock Gambit to the Alison.py with all the heroes listed in the game. We'll paste all the added scripts above the loadMap("nyc/alison/nyc1_1_1") so they are read first before the map loads and save the file. I don't know if this affects anything but just to be safe:



With our new edited Alison.py, we'll replace the one in the assetsfb, and import the assetsfb into the X-Men Legends ISO using GCNRebuilder.

And now for the results...

POOF! All characters unlocked from the very beginning! Professor X is also in the character selection now! He starts out high level because those are his default stats in the herostats. Since I'm using my permanent 4-player modpack, I can easily preview them in the very first mission after defeating Mystique. (I also had to change the two placeholder characters from REQUIREDHERO to RECOMMENDEDHERO so I can swap them out.). If you're doing this on a clean version of the game, then you'll have to wait till the HAARP facility mission to see your results.





And yes, it looks like all heroes remain permanent in the roster, so when you attend the next mission, you'll be able to have the entire x-men join the second mission with you! And If you forgot to talk to Beast at the X-Mansion before you start the HAARP mission, it won't affect the roster because he is already unlocked.




Good luck with modding XML1, guys!


Fun fact: you can force the game to allow you to play as NPCs. I think we discussed this before, but the proof is in the "ProfXGladiator" character in the last Astral Plane level. He is not in the herostat, but the game selects him. See assetsfb.zip > data\missions\astral_sk.eng.

<MISSION descname="Astral_SK" description="[This zone is currently un-available]   Fight Shadow King on the Astral Plane" scriptstart="" minheros="1" maxheros="1" location="42 36" remote="true" mapload="astral/savepx/final_astral" maploadblackbird="true" skinset="default" teamselect="false">
<REQUIREDHERO name="PROFXGLADIATOR"/>
<OBJECTIVE name="defeat" descname="Battle Shadow King." enabled="true" description="Combat Shadow King and defeat him." xp="1000000"/>
</MISSION>


Speaking of Professor X, technically we could have the normal version, ProfXAstral, as an NPC too, which frees up a mod hero slot. I wonder if we can add him (ProfXAstral) to the list of playables using SetInCampaign() on a NPC (instead of him being in the herostat), and if not maybe it'd be fun to have some other NPCs playable in other missions, like Havok in the one Weapon X mission.

***EDIT***
I just realized I don't have the XML1-specific PY commands in the Modding Rundown: PY scripts topic
http://marvelmods.com/forum/index.php/topic,1367.0.html

Quote from: Teancum on July 10, 2019, 07:21AM
Fun fact: you can force the game to allow you to play as NPCs. I think we discussed this before, but the proof is in the "ProfXGladiator" character in the last Astral Plane level. He is not in the herostat, but the game selects him. See assetsfb.zip > data\missions\astral_sk.eng.

<MISSION descname="Astral_SK" description="[This zone is currently un-available]   Fight Shadow King on the Astral Plane" scriptstart="" minheros="1" maxheros="1" location="42 36" remote="true" mapload="astral/savepx/final_astral" maploadblackbird="true" skinset="default" teamselect="false">
<REQUIREDHERO name="PROFXGLADIATOR"/>
<OBJECTIVE name="defeat" descname="Battle Shadow King." enabled="true" description="Combat Shadow King and defeat him." xp="1000000"/>
</MISSION>


Speaking of Professor X, technically we could have the normal version, ProfXAstral, as an NPC too, which frees up a mod hero slot. I wonder if we can add him (ProfXAstral) to the list of playables using SetInCampaign() on a NPC, and if not maybe it'd be fun to have some other NPCs playable in other missions, like Havok in the one Weapon X mission.

Indeed. In the 4 player mod i released a while back, I used that method so in specific missions that originally don't allow a full party, the remaining players spawn as NPCs as placeholder characters. In the weapon X mission, I removed Havok as in NPC and had him spawn as a playable character instead, but he is only temporarily like how Professor X is in the Astral missions. As for adding SetInCampaign() to an NPC character, it would nice to see if they get added in to the hero roster. Other than that, i think it might just register those who are listed in the herostat.
A preview of him in action:
https://www.youtube.com/watch?v=iJWXQTBXlME&list=PLcIaD7xk8XKjsif41miqEazw3YzPzIKvP&index=5

As for testing out custom characters, I just tested unlocking one from the start, and it worked! Although I still chose to remove a someone in the hero roster because I don't know the limit in the herostat. But now, you no longer have to make changes to an existing X-Man's files and have their roll call as the person you modified them over.

We're getting closer to adding custom characters for this game! The only downfall is getting voices to work will be a problem since we can't open the Gamecube version's file that contains their voices at the moment.






Amazing work! I must say, it's fascinating finally seeing Xavier's character icon to select him. There's never any point where you'd be able to see it in the vanilla game, at least that I recall, so it's interesting that they even made him a selection portrait.

How smoothly does XML1 play on the Dolphin emulator? I can get the PS2 version to work on it quite crisp and stable. Is Dolphin similar?

You know, back in the day when I had the console version of XML1, I had prayed for someone to find a way to have all the X-Men unlocked at the very beginning (via Gameshark or other code breakers), so that I can play as any of them all throughout the game. This is because I was so pissed that Psylocke came so late in the game. Sadly, that code never came.

Even though this is the PC version, I'm glad someone found it. Well done.


Hey Lags, try this Cyclops model out. UltraMegaMagnus converted it and it works great in XML1 Xbox. I've re-optimized it for Gamecube but don't currently have a way to test it.

https://www.mediafire.com/file/75oo9yc6033v60m/Cyclops_GameCube_%28UltraMegaMagnus_conversion%29.7z/file


What makes you say that? Worked fine on the Xbox, and I only converted the texture to GameCube formatting


Oh. How did you find that out lol?

Also, I can make the texture size smaller I think

By testing ps2  models and some don't work,also it would suggest you make under 200kb


Makes sense. I'll probably set up Dolphin emulator to see just how small I have to make it without making someone else test each time.