Custom text on loading screen?

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

Private First Class
User avatar
Posts: 82
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

Custom text on loading screen?

Postby cbadal » Sun Mar 11, 2018 8:20 pm

Hey,
Anyone know how to post messages to the loading screen?

I know how to do custom load screen images, but I'm interested in putting debug strings on the load screen to aid in debugging on the Xbox as the level is loading.

We currently get random localized strings from 'level.comon.tips' on the load screens as the stock maps load.
But, I not finding the 'level.comon.tips' strings referenced in any of the lua code, so it's not obvious to me where to make the change.

Jedi Admin
User avatar
Posts: 11033
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: Custom text on loading screen?

Postby Teancum » Sun Mar 11, 2018 9:09 pm

The loadscreens are compiled a bit differently. They use some basic config files (see my link below) but they (probably) don't have access to the lua engine. Take a look at load.cfg to see more. It'd be great if you found a way to do something more than just random tips.

viewtopic.php?p=427683#p427683

Private First Class
User avatar
Posts: 82
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: Custom text on loading screen?

Postby cbadal » Mon Mar 12, 2018 7:50 pm

Hmm...

I found no tips string ids in the executable, so that does make me feel like lua is involved somewhere.
But I certainly can't prove that yet.

Tonight I'll search through the .lvl files looking for the string ids.

Haven't done it yet, but the following command would reveal the .lvl files with 'level.common.tip' references:
Code: Select all
C:\Program Files (x86)\LucasArts\Star Wars Battlefront II\GameData\>  findstr /m /i /s level.common.tip *.lvl



EDIT
Well... unsurprisingly that string does appear in 'load.lvl' it is apparently used in a .cfg file.

Unmunge reveals the following:
Hidden/Spoiler:
Code: Select all
2257176673()
{
   LoadingTextBlinkRate(1);
   LoadingTextColorPallete()
   {
      Color(200, 200, 200, 75);
      Color(200, 200, 255, 200);
   }

   TipsBoxTexture("loadtipsbox_pieces");
   TipsColor(155, 171, 207, 210);
   TipsPrefix("level.common.tips");
   TipsTime(10, -9223372036854775808);
   ProgressBarLEDColor(200, 200, 200, 255);
   ProgressBarLEDMinIntensity(0.300000, -9223372036854775808);
   ProgressBarLEDTexture("loading");
   ProgressBarLEDHeight(20);
   ProgressBarLEDWidth(20);
   ProgressBarLEDSpacing(0.500000);
   ProgressBarNumLEDs(12);
   ProgressBarTotalTime(10);
   RandomBackdrop("load\common");
   AmbientColor(0, 0, 0);
   SunColor(255, 255, 255);
   SunDirection(0.705000, -0.078000, -0.705000);
}

Map("shell")
{
   RandomBackdrop("load\common");
   ProgressBarTotalTime(1);
}

Map("gal_cam")
{
   RandomBackdrop("load\gal_con");
   ProgressBarTotalTime(2);
}

Map("gal_cam_shell")
{
   RandomBackdrop("load\gal_con");
   ProgressBarTotalTime(2);
}

Map("gal_con")
{
   TipsPrefix("level.gal1.tips");
   RandomBackdrop("load\gal_con");
   ProgressBarTotalTime(2);
}

Map("gal_con_shell")
{
   TipsPrefix("level.gal1.tips");
   RandomBackdrop("load\gal_con");
   ProgressBarTotalTime(4);
}

Map("cor1")
{
   RandomBackdrop("load\cor1");
   ProgressBarTotalTime(12);
}

Map("dag1")
{
   RandomBackdrop("load\dag1");
   ProgressBarTotalTime(10);
}

Map("dea1")
{
   RandomBackdrop("load\dea1");
   ProgressBarTotalTime(11);
}

Map("end1")
{
   RandomBackdrop("load\end1");
   ProgressBarTotalTime(12);
}

Map("fel1")
{
   RandomBackdrop("load\fel1");
   ProgressBarTotalTime(10);
}

Map("geo1")
{
   RandomBackdrop("load\geo1");
   ProgressBarTotalTime(11);
}

Map("hot1")
{
   RandomBackdrop("load\hot1");
   ProgressBarTotalTime(12);
}

Map("kam1")
{
   RandomBackdrop("load\kam1");
   ProgressBarTotalTime(11);
}

Map("kas2")
{
   RandomBackdrop("load\kas2");
   ProgressBarTotalTime(10);
}

Map("mus1")
{
   RandomBackdrop("load\mus1");
   ProgressBarTotalTime(10);
}

Map("myg1")
{
   RandomBackdrop("load\myg1");
   ProgressBarTotalTime(11);
}

Map("nab2")
{
   RandomBackdrop("load\nab2");
   ProgressBarTotalTime(11);
}

Map("pol1")
{
   RandomBackdrop("load\pol1");
   ProgressBarTotalTime(11);
}

Map("spa1")
{
   RandomBackdrop("load\spa");
   ProgressBarTotalTime(1);
}

Map("spa2")
{
   RandomBackdrop("load\spa");
}

Map("spa3")
{
   RandomBackdrop("load\spa");
   ProgressBarTotalTime(12);
}

Map("spa4")
{
   RandomBackdrop("load\spa");
}

Map("spa5")
{
   RandomBackdrop("load\spa");
}

Map("spa6")
{
   RandomBackdrop("load\spa");
   ProgressBarTotalTime(12);
}

Map("spa7")
{
   RandomBackdrop("load\spa");
   ProgressBarTotalTime(11);
}

Map("spa8")
{
   RandomBackdrop("load\spa");
   ProgressBarTotalTime(12);
}

Map("spa9")
{
   RandomBackdrop("load\spa");
   ProgressBarTotalTime(11);
}

Map("tan1")
{
   RandomBackdrop("load\tan1");
   ProgressBarTotalTime(10);
}

Map("tat2")
{
   RandomBackdrop("load\tat2");
   ProgressBarTotalTime(11);
}

Map("tat3")
{
   RandomBackdrop("load\tat3");
   ProgressBarTotalTime(10);
}

Map("uta1")
{
   RandomBackdrop("load\uta1");
   ProgressBarTotalTime(11);
}

Map("yav1")
{
   RandomBackdrop("load\yav1");
   ProgressBarTotalTime(12);
}

Map("geo1c_c")
{
   CampaignLayout(1);
   CampaignName("ifs.sp.campaign1.mission1name");
   RandomBackdrop("load\cam_p1");
   ProgressBarTotalTime(11);
}

Map("spa2c_c")
{
   CampaignLayout(1);
   CampaignName("ifs.sp.campaign1.mission2name");
   RandomBackdrop("load\cam_p1");
   ProgressBarTotalTime(11);
}

Map("myg1c_c")
{
   CampaignLayout(1);
   CampaignName("ifs.sp.campaign1.mission6name");
   RandomBackdrop("load\cam_p1");
   ProgressBarTotalTime(12);
}

Map("fel1c_c")
{
   CampaignLayout(1);
   CampaignName("ifs.sp.campaign1.mission4name");
   RandomBackdrop("load\cam_p1");
   ProgressBarTotalTime(11);
}

Map("spa3c_c")
{
   CampaignLayout(1);
   CampaignName("ifs.sp.campaign1.mission5name");
   RandomBackdrop("load\cam_p1");
   ProgressBarTotalTime(12);
}

Map("kas2c_c")
{
   CampaignLayout(1);
   CampaignName("ifs.sp.campaign1.mission7name");
   RandomBackdrop("load\cam_p1");
   ProgressBarTotalTime(12);
}

Map("uta1c_c")
{
   CampaignLayout(1);
   CampaignName("ifs.sp.campaign1.mission3name");
   RandomBackdrop("load\cam_p1");
   ProgressBarTotalTime(11);
}

Map("cor1c_c")
{
   CampaignLayout(1);
   CampaignName("ifs.sp.campaign1.mission8name");
   RandomBackdrop("load\cam_p1");
   ProgressBarTotalTime(12);
}

Map("nab2g_c")
{
   CampaignLayout(1);
   CampaignName("ifs.sp.campaign1.mission9name");
   RandomBackdrop("load\cam_p2");
   ProgressBarTotalTime(12);
}

Map("spa4g_c")
{
   CampaignLayout(1);
   CampaignName("ifs.sp.campaign1.mission10name");
   RandomBackdrop("load\cam_p2");
   ProgressBarTotalTime(11);
}

Map("mus1c_c")
{
   CampaignLayout(1);
   CampaignName("ifs.sp.campaign1.mission11name");
   RandomBackdrop("load\cam_p2");
   ProgressBarTotalTime(12);
}

Map("kam1c_c")
{
   CampaignLayout(1);
   CampaignName("ifs.sp.campaign1.mission13name");
   RandomBackdrop("load\cam_p2");
   ProgressBarTotalTime(11);
}

Map("dea1g_c")
{
   CampaignLayout(1);
   CampaignName("ifs.sp.campaign1.mission14name");
   RandomBackdrop("load\cam_p2");
   ProgressBarTotalTime(12);
}

Map("pol1g_c")
{
   CampaignLayout(1);
   CampaignName("ifs.sp.campaign1.mission15name");
   RandomBackdrop("load\cam_p2");
   ProgressBarTotalTime(12);
}

Map("tan1g_c")
{
   CampaignLayout(1);
   CampaignName("ifs.sp.campaign1.mission16name");
   RandomBackdrop("load\cam_p2");
   ProgressBarTotalTime(12);
}

Map("spa1g_c")
{
   CampaignLayout(1);
   CampaignName("ifs.sp.campaign1.mission17name");
   RandomBackdrop("load\cam_p2");
   ProgressBarTotalTime(12);
}

Map("yav1g_c")
{
   CampaignLayout(1);
   CampaignName("ifs.sp.campaign1.mission18name");
   RandomBackdrop("load\cam_p2");
   ProgressBarTotalTime(13);
}

Map("hot1g_c")
{
   CampaignLayout(1);
   CampaignName("ifs.sp.campaign1.mission19name");
   RandomBackdrop("load\cam_p2");
   ProgressBarTotalTime(12);
}


Looking through the .exe and .lvl files does not reveal who asks for 'TipsPrefix' though.
But at least it looks like we can place our own random strings on the load screen.

Might have to try popping up another screen during the load process for debugging though.

Jedi Admin
User avatar
Posts: 11033
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: Custom text on loading screen?

Postby Teancum » Mon Mar 12, 2018 7:54 pm

I'm not following to be honest. The tips are generated from the loadscreen config (load.cfg) file. It's in the tool I linked to above:

Hidden/Spoiler:
Code: Select all
LoadDisplay()
{
   LoadingTextBlinkRate(1.0)
   LoadingTextColorPallete()
   {
      Color(200,200,200,75);
      Color(200,200,255,200);
   }

   TipsBoxTexture("loadtipsbox_pieces",12,12);
   TipsColor(155, 171, 207, 210);
   TipsPrefix("level.common.tips");
   TipsTime(10.0f);

   ProgressBarLEDColor(200,200,200,255);
   ProgressBarLEDMinIntensity(0.3f);
   ProgressBarLEDTexture("loading");
   ProgressBarLEDHeight(20.0);
   ProgressBarLEDWidth(20.0);
   ProgressBarLEDSpacing(0.5);
   ProgressBarNumLEDs(12);
   ProgressBarTotalTime(10.0);

   RandomBackdrop("load\common");

   AmbientColor(0,0,0);
   SunColor(255,255,255);
   SunDirection(0.705, -0.078,-0.705);
}

The game will pull the tips from the core.lvl localization, or map-specific localization if it's a mod map.

Private First Class
User avatar
Posts: 82
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: Custom text on loading screen?

Postby cbadal » Mon Mar 12, 2018 10:14 pm

Yes, I just didn't go through the config file earlier. Just looked through the .req files.


The Goal being write debug info to the screen while a level is loading (Xbox).

I thought I might be able to update the load screen with debug statements, but that idea is not looking good now.

If I couldn't do that, I thought that maybe I could put up another screen over the load screen.
Updating the text on that screen as the 'ScriptInit' and 'ScriptPostLoad' run.
But I'm not finding success on that either.

Return to SWBF2 Modding

Who is online

Users browsing this forum: No registered users and 2 guests