- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- Custom world loading screens
- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- Custom world loading screens
Replies: 7 (Who?), Viewed: 2296 times.
#1
1st Mar 2015 at 7:15 AM
Posts: 19
Custom world loading screens
Hi guys,I've found some interesting script in UI.dll which controlls the loading screens of EA worlds. I tried adding custom pictures to store worlds but without success. I guess the only possible solution is a core mod (but if you know an easier way let me know ).
So this code can be found in the Init() method of LoadingScreenController. There are 4 part, where the loading screen is defined.
The first part is the save game loading screen:
Code:
switch (sSaveGameMetadata.mWorldFile) { case "China": str3 = "world_loading_beijing"; goto Label_0676; case "Bridgeport": str3 = "world_loading_bridgeport"; version = ProductVersion.Undefined | ProductVersion.EP3; goto Label_0676; }
The second part is the travelling screen (like Egypt, Univrsity, Future):
Code:
text3.Caption = Responder.Instance.LocalizationModel.LocalizeString("Ui/Caption/TravelLoadingScreen:TravelingTo", new object[] { sTravelWorldName }); if (sWorldName == WorldName.China) { str3 = "world_loading_beijing"; }
The third part is the new world loading screen (with welcome text):
Code:
text3.Caption = Responder.Instance.LocalizationModel.LocalizeString("Ui/Caption/GameEntry/LoadingScreen:WelcomeText", new object[] { sWorldFileMetadata.mCaption }); string mWorldFile = sWorldFileMetadata.mWorldFile; if (mWorldFile != null) { if (!(mWorldFile == "Twinbrook.world")) { if (mWorldFile == "Bridgeport.world") { str3 = "world_loading_bridgeport"; version = ProductVersion.Undefined | ProductVersion.EP3; } else { str3 = "world_loading_twinbrook"; } }
The 4th part is the travelling home screen (I don't really understand what str6 is supposed to be) :
Code:
Text text2 = base.GetChildByID(0x6eb5220, true) as Text; text2.Caption = Responder.Instance.LocalizationModel.LocalizeString("Ui/Caption/TravelLoadingScreen:TravelingHome", new object[0]); string str6 = sTravelWorldName.ToLower(); if (str6 != null) { if (!(str6 == "twinbrook_0x09b610fa")) { if (str6 == "bridgeport_0x09ffe3d7") { str3 = "world_loading_bridgeport"; version = ProductVersion.Undefined | ProductVersion.EP3; } else { str3 = "world_loading_twinbrook"; } }
So we have 3 strings for one world:
Code:
private const string kAppaloosaPlainsImage = "ep5_world_loading_screen"; // Name of the image private const string kAppaloosaPlainsName = "AppaloosaPlains"; // Name of the world public const string kWorldFileNameAppaloosaPlains = "AppaloosaPlains.world"; // Name of the world file
There is the possibility of adding new images to store and custom worlds but I need some help because I don't know how to do it exactly.
Never say never.
Advertisement
#2
1st Mar 2015 at 12:58 PM
Posts: 997
Thanks: 22102 in 95 Posts
Do custom worlds have names? Can you assign one with CAW or with any other means?
I've only give this a quick look and, as far as I can tell, all the info about store worlds is hard-coded,
so it seems that only a core mod can handle custom worlds. I guess you want a universal solution
(you can't possibly list all custom worlds!), so I'd say to try to use the filename of the world (with or
without extension) also as hashing key of the IID of the IMAG resource to use as image for the
loading screen. This is just an idea, I'm not sure if it can work or not.
Things like this: string str6 = sTravelWorldName.ToLower();
are used to convert a string to lowercase (Eg: "MyCustomWorld" ---> "mycustomworld")
I've only give this a quick look and, as far as I can tell, all the info about store worlds is hard-coded,
so it seems that only a core mod can handle custom worlds. I guess you want a universal solution
(you can't possibly list all custom worlds!), so I'd say to try to use the filename of the world (with or
without extension) also as hashing key of the IID of the IMAG resource to use as image for the
loading screen. This is just an idea, I'm not sure if it can work or not.
Things like this: string str6 = sTravelWorldName.ToLower();
are used to convert a string to lowercase (Eg: "MyCustomWorld" ---> "mycustomworld")
#3
11th Mar 2015 at 8:09 PM
Posts: 19
Sorry for the late response, but I've been trying to make this mod since last week and finally I managed to compile it (just compile, not test, and it's just a prototype...). Custom worlds have names, but they aren't hard coded in the script. I'm still not sure if it's necessary for making a working mod.
I've found the names in SimIFace.dll:
str6 contains lowered strings and an enum value assigned to the world. I'm curious if these are important things or they don't affect the code.
Anyway, I upload the dll, but this only contains the datas of Riverview for testing. If it works I'll add the other store worlds and try to make it support custom worlds. I'll be able to test it only at the weekend, so you can test it if you want.
Never say never.
I've found the names in SimIFace.dll:
Code:
[ComVisible(false)] public enum WorldName { AppaloosaPlains = 0xc50c56d, China = 0x859db4c, DOT06 = 0xde07c78, DOT07 = 0xde07c83, DOT08 = 0xde07c8b, DOT09 = 0xde07c9c, DOT10 = 0xde07e7d, DOT11 = 0xde07e86, DOT12 = 0xde07e92, DOT13 = 0xde08059, DOT14 = 0xde08091, DOT15 = 0xde0809d, Egypt = 0x859db48, Ep3FocusTestWorld = 0x9ffe3d8, Ep3PerformanceTestWorld = 0x9ffe3d9, France = 0x859db50, FutureWorld = 0xf36012a, IslaParadiso = 0xc50c382, MoonlightFalls = 0x9b61110, NewDowntownWorld = 0x9ffe3d7, NonShipping = 0x8866eb8, RiverView = 0x859db43, StarlightShores = 0x9b610ff, SunsetValley = 0x859db3c, TouristWorld = 0xc086272, TwinBrook = 0x9b610fa, Undefined = -1, University = 0xe41c954, UserCreated = 0 }
str6 contains lowered strings and an enum value assigned to the world. I'm curious if these are important things or they don't affect the code.
Anyway, I upload the dll, but this only contains the datas of Riverview for testing. If it works I'll add the other store worlds and try to make it support custom worlds. I'll be able to test it only at the weekend, so you can test it if you want.
Attached files:
UI.zip (1.00 MB, 18 downloads) - View custom content | ||
3010560 03-11-2015 18:59 UI.dll --------- ------- 3010560 1 file |
||
Description: Only contains UI.dll, for further information write me a PM |
Never say never.
#4
11th Mar 2015 at 9:38 PM
Posts: 997
Thanks: 22102 in 95 Posts
### Custom worlds have names, but they aren't hard coded in the script
Yeah, that's hardly surprising since, you know, they are custom :P
What does your core mod do? Wasn't Riverview already included?
Now that I've read again your first post I'm wondering: these store worlds already have a loading
screen picture that you want to change or they don't have it and you want to add one?
Yeah, that's hardly surprising since, you know, they are custom :P
What does your core mod do? Wasn't Riverview already included?
Now that I've read again your first post I'm wondering: these store worlds already have a loading
screen picture that you want to change or they don't have it and you want to add one?
#5
12th Mar 2015 at 10:38 AM
Posts: 997
Thanks: 22102 in 95 Posts
I took another look at the code. I don't think you need to mess with the WorldName enum.
The string used in the variable text is the key to get the IMAG resource (with FNV64 hashing).
So my suggestion is that if the world name is not recognized (i.e. is not one of those hard-coded),
then you use it as hashing key (i.e. you assign it to the text variable) adding a "default" case in the
switch command or a final else. You also have to use ProductVersion.BaseGame as version.
Example: let's say a custom world filename is called "MyCustomWorld.world". You put in your mod
(the one containing the modded UI.dll or maybe even in the world file itself) an IMAG resource with
type 2F7D0004, group 00000000 and Instance FB92E1AFF31EC20E ("MyCustomWorld" FNV64 hashed).
Maybe you already did it this way, I haven't looked at the file you uploaded.
The string used in the variable text is the key to get the IMAG resource (with FNV64 hashing).
So my suggestion is that if the world name is not recognized (i.e. is not one of those hard-coded),
then you use it as hashing key (i.e. you assign it to the text variable) adding a "default" case in the
switch command or a final else. You also have to use ProductVersion.BaseGame as version.
Example: let's say a custom world filename is called "MyCustomWorld.world". You put in your mod
(the one containing the modded UI.dll or maybe even in the world file itself) an IMAG resource with
type 2F7D0004, group 00000000 and Instance FB92E1AFF31EC20E ("MyCustomWorld" FNV64 hashed).
Maybe you already did it this way, I haven't looked at the file you uploaded.
#6
12th Mar 2015 at 7:33 PM
Posts: 19
My mod adds Riverview to the script so a loading screen can be assigned to the world file name. I'd like to add all the store world loading screen and the possibility of handling custom worlds. Store worlds don't have their own loading screen so they use Sunset Valley's picture (default).
I'm not sure if product version is important. As far as I know it is used to define which FullBuild.package the content is in or which EP is needed to run the code. So I think it isn't necessary for store and custom worlds (correct me if I'm wrong).
I'll make the package, give it a try and see if it's working or not.
Never say never.
I'm not sure if product version is important. As far as I know it is used to define which FullBuild.package the content is in or which EP is needed to run the code. So I think it isn't necessary for store and custom worlds (correct me if I'm wrong).
I'll make the package, give it a try and see if it's working or not.
Never say never.
#7
12th Mar 2015 at 9:28 PM
Posts: 997
Thanks: 22102 in 95 Posts
"version" is used to generate the correct RK (Resource Key) of the IMAG.
"Basegame" means that the GroupId has to be 0x00000000.
But "BaseGame" is the default value, so you don't have to specify it.
"Basegame" means that the GroupId has to be 0x00000000.
But "BaseGame" is the default value, so you don't have to specify it.
#8
14th Mar 2015 at 11:48 AM
Posts: 19
OMG! It's working! Now I have a custom loading screen for Riverview. Thanks for the help Arsil It looks cool (see the attached picture )
So I'm uploading this mod here and anyone can test it. Now I'm working on the remained store worlds.
Before you install, make sure you read all the instructions below
1. This mod will conflict with any other core mod, that contains UI.dll
2. Make sure you don't have a saved game of Riverview, because this can become unaccessable
3. Setting up the mod:
- Go to the game folder (Program Files\The Sims 3\GameData\Shared\NonPackaged\Worlds)
- Find Riverview: don't be frightened by the hash codes (though I forgot what was Riverview's), you can easily find it by opening up the package and scearch for the TWNI resource, which is the little thumbnail of the world in the main menu
- Once you fing it, and this is the dangerious method which can cause the problem mentioned in point 2, change its name to Riverview.world
Don't change anything else
4. Place the mod into the Mods folder
5. Now you're ready to play
Never say never.
So I'm uploading this mod here and anyone can test it. Now I'm working on the remained store worlds.
Before you install, make sure you read all the instructions below
1. This mod will conflict with any other core mod, that contains UI.dll
2. Make sure you don't have a saved game of Riverview, because this can become unaccessable
3. Setting up the mod:
- Go to the game folder (Program Files\The Sims 3\GameData\Shared\NonPackaged\Worlds)
- Find Riverview: don't be frightened by the hash codes (though I forgot what was Riverview's), you can easily find it by opening up the package and scearch for the TWNI resource, which is the little thumbnail of the world in the main menu
- Once you fing it, and this is the dangerious method which can cause the problem mentioned in point 2, change its name to Riverview.world
Don't change anything else
4. Place the mod into the Mods folder
5. Now you're ready to play
Attached files:
anagy_worldloadingscrmod_riverview.rar (2.28 MB, 20 downloads) - View custom content | ||||||||||
Size Packed Ratio Date Time Attr CRC Meth Ver ------------------------------------------------------------------------------- anagy_worldloadingscrmod_riverview.package 4560036 2385434 52% 14-03-15 10:17 .....A. CB181B00 m3g 2.9 ------------------------------------------------------------------------------- 1 4560036 2385434 52% |
||||||||||
Description: Make sure you read all the instructions before installing |
Never say never.
Who Posted
|