Mission lua for PSP

For all things related to AnthonyBF2's Battlefront PSP mod

Moderators: AnthonyBF2, Moderators

Private First Class
User avatar
Posts: 77
Joined: Sun Jan 18, 2015 5:23 pm
Projects :: SWBF2 XBOX Mod Environment
Games I'm Playing :: SW Battlefront 2
xbox live or psn: No gamertag set

Mission lua for PSP

Postby cbadal » Tue Feb 06, 2018 2:38 am

Hey AnthonyBF2,
I figured out how to mount an iso as a folder in Windows 10 tonight (if right click doesn't show 'mount', then at command line type 'explorer xxxx.iso').
And so I ran my decompiler on the mission lua files for the PSP. I recovered 85 out of 166 lua files in psp's 'mission.lvl'
I posted a zip at:
https://github.com/BAD-AL/SWBF2_Xbox_mod_effort/blob/master/LuaMissionFilesPSP_2_5_2018.zip
A few files were too tricky for my program to decompile correctly; I included them for inspection in the 'decompileFailed' sub folder though.

I also found that the following files share exactly the same code as the PC version:
Hidden/Spoiler:
Code: Select all
setup_teams
gametype_conquest
gametype_capture
objective_goto
linkeddestroyables
linkedturrets
ambush
playmoviewithtransition


Thought you might like to take a look.

Jedi Admin
User avatar
Posts: 11018
Joined: Wed Sep 07, 2005 11:42 pm
Location: Indiana
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set

Re: Mission lua for PSP

Postby Teancum » Tue Feb 06, 2018 8:46 am

Very cool! The _mc*.lua files seem to be a mode that's a hero vs enemies for one player. I thought one of them would be the PSP's Rebel Raider mode, but no such luck. I was hoping to extract that mode some day. It's really simple, but for some reason I love it.

Jedi
User avatar
Posts: 1156
Joined: Wed Aug 21, 2013 3:55 pm
Location: San Diego
Projects :: SWBF2 PSP+PS2 Conversion

Re: Mission lua for PSP

Postby AnthonyBF2 » Tue Feb 06, 2018 11:33 am

cbadal wrote:Hey AnthonyBF2,
I figured out how to mount an iso as a folder in Windows 10 tonight (if right click doesn't show 'mount', then at command line type 'explorer xxxx.iso').
And so I ran my decompiler on the mission lua files for the PSP. I recovered 85 out of 166 lua files in psp's 'mission.lvl'
I posted a zip at:
https://github.com/BAD-AL/SWBF2_Xbox_mod_effort/blob/master/LuaMissionFilesPSP_2_5_2018.zip
A few files were too tricky for my program to decompile correctly; I included them for inspection in the 'decompileFailed' sub folder though.

I also found that the following files share exactly the same code as the PC version:
Hidden/Spoiler:
Code: Select all
setup_teams
gametype_conquest
gametype_capture
objective_goto
linkeddestroyables
linkedturrets
ambush
playmoviewithtransition


Thought you might like to take a look.


This is a great gesture but I honestly do not need most of those. A new mission file was one of the first things I mastered when I began applying the mod tools to the PSP version about two years ago. The only ones that matter are the PSP-specific missions which are listed here:
Hidden/Spoiler:
Code: Select all
"cor1c_mcm"
"cor1c_mcp"
"dag1g_mcm"
"dag1g_mcp"
"dag1g_mct"
"end1g_dcm"
"end1g_dcp"
"hot1g_scm"
"hot1g_scp"
"kas2g_dcm"
"kas2g_dcp"
"myg1c_mcm"
"myg1c_mcp"
"myg1c_mct"
"myg1c_scm"
"myg1c_scp"
"nab2c_scm"
"nab2c_scp"
"nab2g_dcm"
"nab2g_dcp"
"pol1c_mcm"
"pol1c_mcp"
"pol1c_mct"
"spa1g_scm"
"spa1g_scp"
"tat2g_dcm"
"tat2g_dcp"
"tat3g_mcm"
"tat3g_mcp"
"uta1c_scm"
"uta1c_scp"
"yav1g_mcm"
"yav1g_mcp"
"yav1g_mct"


Teancum wrote:Very cool! The _mc*.lua files seem to be a mode that's a hero vs enemies for one player. I thought one of them would be the PSP's Rebel Raider mode, but no such luck. I was hoping to extract that mode some day. It's really simple, but for some reason I love it.


In regards to those PSP-specific missions, I will be using SleepKiller's tool to just take out the old lua files and toss them in with a new mission file without changing anything in them. That's the plan for now unless cbadal wants to decompile those for us, then I'll be glad to add them in and set them up and upgrade them to our desires.

Again cbadal, those are the only ones that matter. Anything else in the mission can be and has already been replaced/upgraded by me from the mod tools.

Lastly, the things that really matter to me are the lua files in shell and common.

Private First Class
User avatar
Posts: 77
Joined: Sun Jan 18, 2015 5:23 pm
Projects :: SWBF2 XBOX Mod Environment
Games I'm Playing :: SW Battlefront 2
xbox live or psn: No gamertag set

Re: Mission lua for PSP

Postby cbadal » Tue Feb 06, 2018 1:50 pm

[quote][/quote]
Ok, we at least got some partials on those then.

It looks like the decompiler messed up decompiling functions as arguments in the partially recovered files.

Result was:
Code: Select all
    missiontimer = CreateTimer("missiontimer")
    SetTimerValue(missiontimer,300)
    StartTimer(missiontimer)
    ShowTimer(missiontimer)
    OnTimerElapse(
       function missiontimer()
          MissionVictory(DEF)
       end,
   "missiontimer"
)


Where I think it should have derived:
Code: Select all
    missiontimer = CreateTimer("missiontimer")
    SetTimerValue(missiontimer, 300)
    StartTimer(missiontimer)
    ShowTimer(missiontimer)
    OnTimerElapse(
        function(timer)
            MissionVictory(DEF)
       end,
missiontimer
)


Anyway, I should be able to get those to decompile correctly with a little more work.
The Shell files will be harder though.

Private First Class
User avatar
Posts: 77
Joined: Sun Jan 18, 2015 5:23 pm
Projects :: SWBF2 XBOX Mod Environment
Games I'm Playing :: SW Battlefront 2
xbox live or psn: No gamertag set

Re: Mission lua for PSP

Postby cbadal » Fri Mar 09, 2018 7:08 pm

I've been decompiling some more of the PSP mission scripts for Teancum to use on the Xbox and noticed that the 'mission.lvl' has what looks to be unused missions.

I found that the single player mini campaign missions for PSP are defined in 'ifs_minicamp_campselect' in the 'shell.lvl' file.
Hidden/Spoiler:
Code: Select all
 Rebel Raider
gMCMode =  "smug"
{ {Map="Myg1c_scm", Side= 1},
  {Map="Nab2c_scm",Side= 1},
  {Map="Hot1g_scm", Side= 1},
  {Map="Spa1g_scm", Side= 1}
}

 Imperial Enforcer
gMCMode =  "dipl"
{ {Map= "Nab2g_dcm", Side= 1},
  {Map= "Tat2g_dcm", Side= 1},
  {Map= "End1g_dcm", Side= 1},
  {Map= "Kas2g_dcm", Side= 1}
}

 Rogue Assassin
gMCMode ="merc"
ScriptCB_GetPSPMCProgress(1)
{ {Map= "dag1g_mcm", Side= 1},
  {Map= "myg1c_mcm", Side= 1},
  {Map= "yav1g_mcm", Side= 1},
  {Map= "Pol1c_mcm", Side= 1}
}

I've started adding them to my GitHub at: https://github.com/BAD-AL/SWBF2_Xbox_mo ... i_campaign
I should have all of the decompiled within the next week.

In the 'Rogue Assassin' mode (_mcm) you can play through "dag1g_mcm", "myg1c_mcm", "yav1g_mcm" and "Pol1c_mcm".
But there is also a "cor1c_mcm" and a "tat3g_mcm"!
And for 'Rebel Raider' mode, there is a 'uta1c_scm' that I don't think was playable on the PSP either.
And I'll soon post the source for all those.

I am curious about the other mission files now.
There are a bunch of '_mcp', '_dcp', '_mct', '_mcp', '_scp' mission files too.

There is also one called simply 'gal1' which looks pretty odd to me.

Anyone know what those mission types are?

2nd Lieutenant
User avatar
Posts: 372
Joined: Sun Sep 02, 2012 2:47 am
Location: HK Factory
Projects :: None
Games I'm Playing :: SWBF2
xbox live or psn: No gamertag set

Re: Mission lua for PSP

Postby DylanRocket » Fri Mar 09, 2018 7:11 pm

I'm pretty sure Gal1 is Galactic Conquest. Not sure what the others are. Should be interesting to take a look at I think. What maps are those game modes for?

Private First Class
User avatar
Posts: 77
Joined: Sun Jan 18, 2015 5:23 pm
Projects :: SWBF2 XBOX Mod Environment
Games I'm Playing :: SW Battlefront 2
xbox live or psn: No gamertag set

Re: Mission lua for PSP

Postby cbadal » Sat Mar 10, 2018 4:41 pm

Yes, it does look like 'Gal1' is the assets that get used in the Galactic Conquest selection mode. ** Edit

I did a little more poking around and de-compiled the psp's missionlist.

The '_mcp', '_dcp', '_mct', '_mcp', '_scp' and '_scm' mission files are selectable in the multiplayer mode on PSP.
I've decompiled most of these too and posted them (along with a README) at the GitHub reference above.

I believe the different modes are mapped like:
Code: Select all
'_mct' ==> Rogue Assassin Co-op
'_mcp' ==> Rogue Assassin Competitive
'_dcm' ==> Imperial Enforcer Co-op
'_dcp' ==> Imperial Enforcer Competitive
'_scm' ==> Rebel Raider Co-op
'_scp' ==> Rebel Raider Competitive

Private First Class
User avatar
Posts: 77
Joined: Sun Jan 18, 2015 5:23 pm
Projects :: SWBF2 XBOX Mod Environment
Games I'm Playing :: SW Battlefront 2
xbox live or psn: No gamertag set

Re: Mission lua for PSP

Postby cbadal » Sun Mar 11, 2018 2:04 pm

I recovered the rest of the PSP-only mission files and posted them to:
https://github.com/BAD-AL/SWBF2_Xbox_mo ... i_campaign

I also zipped up all the PSP mission files recovered and posted them at:
https://github.com/BAD-AL/SWBF2_Xbox_mo ... 1_2018.zip

This zip has all the PSP-only mission files as well as the 'Slightly-tweaked' conquest, hunt, capture the flag and assault missions (except for 'spa3_ass' and 'spa1g_ass').

Return to SWBF2 PSP Mod

Who is online

Users browsing this forum: No registered users and 2 guests