Mission lua for PSP

For all things related to AnthonyBF2's Battlefront PSP mod

Moderators: AnthonyBF2, Moderators

Post Reply
cbadal
Private First Class
Posts: 85
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
Contact:

Mission lua for PSP

Post by cbadal »

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_mo ... 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]setup_teams
gametype_conquest
gametype_capture
objective_goto
linkeddestroyables
linkedturrets
ambush
playmoviewithtransition [/code]
Thought you might like to take a look.
Teancum
Jedi Admin
Jedi Admin
Posts: 11031
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Mission lua for PSP

Post by Teancum »

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.
AnthonyBF2
Jedi
Jedi
Posts: 1210
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: SWBF2 PSP+PS2 Conversion
Location: San Diego

Re: Mission lua for PSP

Post by AnthonyBF2 »

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_mo ... 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]setup_teams
gametype_conquest
gametype_capture
objective_goto
linkeddestroyables
linkedturrets
ambush
playmoviewithtransition [/code]
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]"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"[/code]
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.
cbadal
Private First Class
Posts: 85
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
Contact:

Re: Mission lua for PSP

Post by cbadal »

[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.
cbadal
Private First Class
Posts: 85
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
Contact:

Re: Mission lua for PSP

Post by cbadal »

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]
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}
}
[/code]
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?
DylanRocket
2nd Lieutenant
2nd Lieutenant
Posts: 365
Joined: Sun Sep 02, 2012 2:47 am
Projects :: None
Games I'm Playing :: SWBF2
xbox live or psn: No gamertag set
Location: HK Factory
Contact:

Re: Mission lua for PSP

Post by DylanRocket »

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?
cbadal
Private First Class
Posts: 85
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
Contact:

Re: Mission lua for PSP

Post by cbadal »

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
cbadal
Private First Class
Posts: 85
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
Contact:

Re: Mission lua for PSP

Post by cbadal »

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_Diet Dr. Pepper' and 'spa1g_Diet Dr. Pepper').
Post Reply