for a long time I wasn't sure whether this topic isn't placed better in the Traveler discussion, but I think the following content is almost interesting for developers.
Traveler is one of my most favourite NRaas-mods because it allows you to visit every installed town in the game with your sims without switching the savegame.
But as great as the mod is, one thing has bugged me very often a lot since I've been using it.
Whenever my Sims are travelling to any world, which couldn't be travelled without Traveler (e.g. Bridgeport) the loading screen while travelling looks like this:
As you can see, the text obove the gametips, that contains "Travelling to ..." is shown without the name of the destination world (or is missing completely). The background image is the default and not that one, which is normally displayed while loading a new game or a savegame in Bridgeport. Also, the loading background music isn't played.
Of cause, the gameplay isn't affected by this issue, but it just doesn't look nice. I have searched in some boards, but I didn't find anything useful.
So, I tried to find a working solution to fix that problem with the loading screens myself by modifiing Traveler. First, I created a new class named "LoadingScreenControllerEx" with a list and two static methods, as you can see in the code the below. The "LoadTravellingLoadingScreen"-method is a modified version of the original in the "LoadingScreenController"-class, which can be found in UI.dll.
Code: Select all
using System.Collections.Generic;
using Sims3.SimIFace;
using Sims3.UI;
namespace NRaas.TravelerSpace.Helpers
{
public class LoadingScreenControllerEx
{
/* Contains the names of the worlds which do not need any special handling. */
public static readonly List<WorldName> sVacationWorldNames = new List<WorldName>
{
WorldName.China,
WorldName.Egypt,
WorldName.France,
WorldName.University,
WorldName.FutureWorld
};
/* Traveler will use this function to create a travel loadscreen instead of the EA-default. */
public static void LoadTravellingLoadingScreen(string travelWorldName, WorldName worldName, bool travellingHome, bool isFirstTimeTravelingToFuture)
{
if (!LoadingScreenController.IsLayoutLoaded())
{
LoadingScreenController.sTravelWorldName = travelWorldName;
LoadingScreenController.sbLoadingSaveGame = false;
LoadingScreenController.sWorldName = worldName;
LoadingScreenController.sbTravellingHome = travellingHome;
LoadingScreenController.ResetStatics();
LoadingScreenController.sFirstTimeTravelingToFuture = isFirstTimeTravelingToFuture;
if (worldName == WorldName.China || worldName == WorldName.Egypt || worldName == WorldName.France)
{
LoadingScreenController.sOverrideGameTipsFilename = "GameTipsEP1" + worldName.ToString();
}
else
{
if (worldName == WorldName.University && !travellingHome)
{
LoadingScreenController.sOverrideGameTipsFilename = "GameTipsEP9" + worldName.ToString();
}
else
{
if (worldName == WorldName.FutureWorld && !travellingHome)
{
LoadingScreenController.sOverrideGameTipsFilename = "GameTipsEP11" + worldName.ToString();
}
else
{
LoadingScreenController.sOverrideGameTipsFilename = string.Empty;
}
}
}
if (travellingHome || !sVacationWorldNames.Contains(worldName))
{ /* Play the standard loadloop audio when travelling home or to any world, which has not a specific loadloop. */
Responder.Instance.HudModel.PlayLoadLoopAudio(WorldName.Undefined);
}
else
{ /* Play specific loadloop when travelling to China, Egypt, France, University or FutureWorld. */
Responder.Instance.HudModel.PlayLoadLoopAudio(worldName);
}
if (!LoadingScreenController.CreateInteractiveLoadingScreenIfEnabled() && LoadingScreenController.sLayout == null)
{
ResourceKey resKey = ResourceKey.CreateUILayoutKey("TravelLoadingScreen", 0u);
LoadingScreenController.sLayout = UIManager.LoadLayoutAndAddToWindow(resKey, UICategory.Tooltips);
if (!travellingHome && !sVacationWorldNames.Contains(worldName))
{ /* Start function task to fix the broken loadscreen when travelling to any world which is not a EA-vacation world. */
Simulator.AddObject(new OneShotFunctionTask(new Function(LoadingScreenControllerEx.FixTravelLoadingScreen)));
}
}
}
}
public static void FixTravelLoadingScreen()
{
bool screenHandled = false;
while (!screenHandled)
{
if (LoadingScreenController.sInstance != null)
{
if (LoadingScreenController.sChosenLoadScreen == -1)
{
/* (Re-)create the TravellingTo-string above the gametips. */
Text text = LoadingScreenController.sInstance.GetChildByID(116085280u, true) as Text;
text.Caption = Responder.Instance.LocalizationModel.LocalizeString("Ui/Caption/TravelLoadingScreen:TravelingTo", new object
{
LoadingScreenController.sTravelWorldName
});
/* Replace the default screen image with the right one. */
string text2 = string.Empty;
ProductVersion version = ProductVersion.BaseGame;
if (LoadingScreenController.sTravelWorldName != WorldData.GetLocationName(WorldName.TwinBrook))
{
if (LoadingScreenController.sTravelWorldName != WorldData.GetLocationName(WorldName.NewDowntownWorld))
{
if (LoadingScreenController.sTravelWorldName != WorldData.GetLocationName(WorldName.AppaloosaPlains))
{
if (LoadingScreenController.sTravelWorldName != WorldData.GetLocationName(WorldName.StarlightShores))
{
if (LoadingScreenController.sTravelWorldName != WorldData.GetLocationName(WorldName.MoonlightFalls))
{
if (LoadingScreenController.sTravelWorldName == WorldData.GetLocationName(WorldName.IslaParadiso))
{
text2 = "ep10_world_loading_screen";
version = ProductVersion.EP10;
}
}
else
{
text2 = "world_loading_EP7World";
version = ProductVersion.EP7;
}
}
else
{
text2 = "world_loading_EP6World";
version = ProductVersion.EP6;
}
}
else
{
text2 = "ep5_world_loading_screen";
version = ProductVersion.EP5;
}
}
else
{
text2 = "world_loading_bridgeport";
version = ProductVersion.EP3;
}
}
else
{
text2 = "world_loading_twinbrook";
}
if (!string.IsNullOrEmpty(text2))
{
ImageDrawable imageDrawable = LoadingScreenController.sInstance.Drawable as ImageDrawable;
imageDrawable.Image = UIManager.LoadUIImage(ResourceKey.CreatePNGKey(text2, ResourceUtils.ProductVersionToGroupId(version)));
LoadingScreenController.sInstance.Invalidate();
}
}
screenHandled = true;
}
}
}
}
}
Code: Select all
public static void StartLoadingScreen(bool isReturningHome)
{
try
{
PersistStatic.MainMenuLoading = false;
GameStates.EnsureNoModalDialogsUp();
GameUtils.EnableSceneDraw(false);
if (GameStates.DestinationTravelWorld != WorldName.Undefined)
{
string travelWorldName;
if (isReturningHome)
{
travelWorldName = GameStates.sTravelData.mHomeWorld;
}
else
{
if (LoadingScreenControllerEx.sVacationWorldNames.Contains(GameStates.DestinationTravelWorld))
{ /* Get full name string for one of the default vacation worlds. */
travelWorldName = Sims3.Gameplay.UI.Responder.Instance.HudModel.LocationName(GameStates.DestinationTravelWorld, true);
}
else
{ /* Get the right name string for any other world */
travelWorldName = WorldData.GetLocationName(GameStates.DestinationTravelWorld);
}
}
bool isFirstTimeTravelingToFuture = (GameStates.DestinationTravelWorld == WorldName.FutureWorld) && ((CauseEffectService.GetInstance() != null) && (CauseEffectService.GetInstance().GetTimesTraveledToFuture() == 0));
/* Call the modified method instead of the original */
LoadingScreenControllerEx.LoadTravellingLoadingScreen(travelWorldName, GameStates.DestinationTravelWorld, isReturningHome, isFirstTimeTravelingToFuture);
}
SpeedTrap.Sleep(0);
}
catch (Exception e)
{
Common.Exception("StartLoadingScreen", e);
}
}
When the loading screen is starting, there may be a short flickering because the image and the text are just replaced after the instance of the loading screen is created.
Otherwise, I couldn't find any other issues during my tests I did in the German version of the game. The correct text should also be displayed in all other languages.
Hope this is useful for everyone who is also bothered by broken loading screens.