Load Screen Utility

Releasing the source files for your mod or map? Post em' here. (Applies to both SWBF1 & SWBF2)

Moderator: Moderators

User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Load Screen Utility

Post by [RDH]Zerted »

Heres a little tool I made to aid in the addition of a load screen image for mod maps. Feel free to request any changes or ideas for improvement.

Image

Website -> Load Screen Utility Page -> Zip File (272K)
MediaFire

Readme:
Hidden/Spoiler:
SWBF2_LoadScreenUtility_Jan-25-2008_Readme.txt

SWBF2 Load Screen Utility
January 25th, 2008
by [RDH]Zerted


What it should do:
The Load Screen Utility provides an easy-to-use interface to adding a loading
screen image to SWBF2 mod maps. Loading screen images are the pictures a player
sees while the mod map is loading. No program is perfect for everyone. The
Load Screen Utility has been extensively tested, but it can damage/destroy the
map if the user does not know how to use it or if something unexpected happens.
It is always recommended to make regular backups of the mods and additional
backups right before and after major changes.


How to use it:
1) Select your mod map's folder (example: c:\bf2_modtools\data_XXX\)
2) Select the image you want to use (example: c:\screenshots\image_0032.tga)
3) Select the game's addon folder (example: c:\games\SWBF2\GameData\addon)
4) Go to page 2. Do this by clicking on 'Add To Modes' or clicking the 'Next'
until 'Add To Modes' is selected
5) Use the 'Add' button to add one or more of the mod map's game mode lua scripts
(example: c:\bf2_modtools\data_XXX\Common\scripts\XXX\XXXg_con.lua)
6) Review the Progress buttons. If a button's text is red, then there is an error
with its value. Fix any errors
7) To add the load screen image to the mod map, click the 'Process Map' button
8) Carefully read, and follow, any prompts
9) When the tool has finsihed, play the mod map to verify the sucess
10) If you want to review or backup the tool's log, it should be stored at
<system temp directory>/SWBF2_LoadScreenUtility_Log_<#>.txt.


Why it was written:
Some modders are having a hard time figuring out how to manually add load screen
images to their maps. This tool allows them to add an image without learning all
the ins and outs of the process. However, to better understand the entire mod map, it
is recommended tto take the time to do it manually at least once. Also,
[RDH]Zerted likes to program.


What can be done with it:
Anything except sell it to others, claim someone except other than [RDH]Zerted
as its author/developer, redistribute it without this information (I don't want
a bunch of emails about how do I use this?), or use it in/with/for a professional
company or group without approval from [RDH]Zerted first.


How it does what it does:
The readme author does not feel like typing all this out right now. Checkout
the LoadScreen HowTo topic at Gametoast to learn more. The Load Screen Utility
follows almost the same process outlined in that topic.


Known Problems/Issues:
-If the tool is run and nothing seems to happen or it seems to hang at any point,
switch through your open programs and see if the Load Screen Utility
opened a pop-up behind one of them.
-Load Screen images cannot be removed through this tool. To remove the load
screen image, checkout the LoadScreen HowTo topic at Gametoast.
-Words in this scntimze ane sqeIIcd wnorg bvt yeu cen still umdertsnad tehm.
-The message saying the map is finished looks like an error message, but it is
not an error.
-All the error prompts use recursive calls. Thus its possible to get a stack
overflow (which crashes the program) by providing 'bad' choices to keep
looping through the error prompts a few thousand times. This is by
design to prevent possible infinite loops when error prompts are hidden.
-An extra line is added before and after 'function ScriptInit()' when adding
code to the script file. This is to ensure the utility functions
correctly in linux operating systems.
-Errored fields are not saved when exiting the program. This is by design.
-The 'Back'/'Next' buttons cycle through each field, not page. This is by design.
If this is too confusing or hard to follow, email the developer and
request it to be changed in any future releases.


Random Assumptions:
-A mod map's root directory is in the format: '<RandomChars>_<MapName>' where
<RandomChars> does not include an underscore (_) and <MapName> is the
character code for the map.
-When being prompted for value by a pop-up window, you will not answer 'null'.
-You have above basic computer skills.
-You can at least sort-of read English or know how to get it translated. If not
how are you reading this file?
-The load screen image is a TGA image and ends with '.tga'.

Random Stuff:
-Not counting the GUI, the program is over 1350 lines of code (including comments and white space)
-Email the author if you want the source code
-The tool automatically saves and restores any valid fields when it is exited or loaded.


Change Log:
Version: January 25st, 2007
-Added the GUI
-Added prompts for errors
-Updated the readme and change log

Version: August 20th, 2007 beta
-Changed everything as there was nothing before

Possible Roadmap:
-Easy user requests
-Add the ability to remove a Load Screen image from a mod map
-Add the option to cancel in all user prompts
-Add an about button
-Add a multi-map page
-Add an options page (include an uninstall button)
-Add better logging controls
-Disable/Enable gui controls based on possible, valid actions
-Add value guessing to the gui fields
-Add auto-competition to the gui fields
-???


Random Characters?: ap98ehfp34hP(*#HRP(RH;JRB#UhG:*RO:KJWB?jb"oduiHD'obP|:mds,.pv


Resources:
-Download Link: (Sorry, I have to upload it before I can get the download link) (X.XMB)
-Gametoast (a modding community): http://www.gametoast.com
-Gametoast discussion about this tool: http://www.gametoast.com/forums/viewtop ... 35&t=12745
-PC Gaming Clan: rdhclan.net
-[RDH]Zerted's current website: http://ouch.rh.rit.edu/swbf2/
-[RDH]Zerted's email: zerted+SWBF2_LSU@gmail.com
-[RDH]Zertes's XFire: zerted
Last edited by AceMastermind on Wed Jun 17, 2015 10:03 pm, edited 5 times in total.
mutedrancor
Master Sergeant
Master Sergeant
Posts: 177
Joined: Fri Dec 07, 2007 8:27 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: HMMM.......

Re: Load Screen Utility

Post by mutedrancor »

Thanks Zerted :)
SilvaDalek
Sith
Sith
Posts: 1329
Joined: Sun Dec 02, 2007 12:52 pm
Games I'm Playing :: Destiny and FIFA
xbox live or psn: TH3 R0LL3R

Re: Load Screen Utility

Post by SilvaDalek »

Is there another way to add load screens? I'm not quite sure I want to take this risk on almost completed maps, but for not-near-completion I'll use this. Thanks!
Caleb1117
2008 Most Original Avatar
Posts: 3096
Joined: Sun Aug 20, 2006 5:55 pm
Projects :: No Mod project currently.
xbox live or psn: No gamertag set
Location: X-Fire: caleb1117 ಠ_ಠ

Re: Load Screen Utility

Post by Caleb1117 »

SilvaDalek wrote:Is there another way to add load screens? I'm not quite sure I want to take this risk on almost completed maps, but for not-near-completion I'll use this. Thanks!
There is a manual way.
But this works fine.
User avatar
Delta 47
Jedi
Jedi
Posts: 1127
Joined: Sun Dec 23, 2007 12:07 am
Games I'm Playing :: BioShock
xbox live or psn: Delta811
Location: MI, USA
Contact:

Re: Load Screen Utility

Post by Delta 47 »

Looks good, thanks
jedi_pilot
Command Sergeant Major
Command Sergeant Major
Posts: 288
Joined: Sat Sep 15, 2007 2:09 pm

Re: Load Screen Utility

Post by jedi_pilot »

Awsome program :thumbs: !!!! Going to try it out as soon as possible :D .
Ace_Azzameen_5
Jedi
Jedi
Posts: 1119
Joined: Sat Apr 23, 2005 8:52 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: Load Screen Utility

Post by Ace_Azzameen_5 »

Yeah, thanks for the tool. A real time saver. Any luck on getting it to run the munge bat by itself?
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Load Screen Utility

Post by [RDH]Zerted »

It is extremely unlikely that the tool would damage a map, but it is always possible that the computer could lose power in the middle of writing to the lua or something like that.

I haven't spent much time looking into the bat files. If all I would need to do is run them, then it would be an easy addition to the tool. However, you wouldn't get any error logs if the munged failed.
MandeRek
Sith Master
Sith Master
Posts: 2766
Joined: Tue Oct 02, 2007 10:51 am
Projects :: Battlefront Zer0
Games I'm Playing :: SWTOR
xbox live or psn: No gamertag set
Location: Ghosting around GT
Contact:

Re: Load Screen Utility

Post by MandeRek »

This is great! I didn't understand the tut for some strange reason, but this is trully awesome! Thanks a lot Zerted!
BF2-Master
Captain
Captain
Posts: 468
Joined: Thu Mar 02, 2006 7:08 pm

Re: Load Screen Utility

Post by BF2-Master »

For some reason, whenever I try to run the exe I get this error:

Java Virtual Machine Launcher
Could Not Find the Main Class. Program will exit.
EGG_GUTS
Master Bounty Hunter
Master Bounty Hunter
Posts: 1626
Joined: Thu Dec 07, 2006 7:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: CANADA!

Re: Load Screen Utility

Post by EGG_GUTS »

Very Nice, it will save alot of time now.

Question: With this could you load you map and your pic and your addon, select your CW lua process it then change your pic select your GCW Lua then have a different pic for each Era?
Ace_Azzameen_5
Jedi
Jedi
Posts: 1119
Joined: Sat Apr 23, 2005 8:52 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: Load Screen Utility

Post by Ace_Azzameen_5 »

I looked into it and if you just replace some of the variables (or maybe fill them inside the bat somehow) with your own directories, it will munge on double click. So you could get the load screen app to write it out using the info given in the browse boxes.
Heres basically what I did, still a lot of possible fat to identify and trim...
Hidden/Spoiler:
REM WARNING: enabledelayedexpansion means ! is a special character,
REM which means it isn't available for use as the mungeapp recursive
REM wildcard character. Use the alternate $ instead.
setlocal enabledelayedexpansion

set MUNGE_ROOT_DIR=..\..
if not "%1"=="" set MUNGE_PLATFORM=%1
if %MUNGE_PLATFORM%x==x set MUNGE_PLATFORM=PC
if "%MUNGE_BIN_DIR%"=="" (
set MUNGE_BIN_DIR=%CD%\%MUNGE_ROOT_DIR%\..\ToolsFL\Bin
set PATH=%CD%\..\..\..\ToolsFL\Bin;%PATH%
echo MUNGE_BIN_DIR=!MUNGE_BIN_DIR!
)

set MUNGE_ARGS=-checkdate -continue -platform %MUNGE_PLATFORM%
set MUNGE_DIR=MUNGED\%MUNGE_PLATFORM%
set OUTPUT_DIR=%MUNGE_ROOT_DIR%\_LVL_%MUNGE_PLATFORM%\Load

set LOCAL_MUNGE_LOG="%CD%\%MUNGE_PLATFORM%_MungeLog.txt"
if "%MUNGE_LOG%"=="" (
set MUNGE_LOG=%LOCAL_MUNGE_LOG%
if exist %LOCAL_MUNGE_LOG% ( del %LOCAL_MUNGE_LOG% )
)

REM ===== Handle files in Load\
set SOURCE_SUBDIR=Load
set SOURCE_DIR=
if not %MUNGE_OVERRIDE_DIR%x==x (
for %%a in (%MUNGE_OVERRIDE_DIR%) do set SOURCE_DIR=%SOURCE_DIR% %MUNGE_ROOT_DIR%\%SOURCE_SUBDIR%\%%a
)
set SOURCE_DIR=%SOURCE_DIR% %MUNGE_ROOT_DIR%\%SOURCE_SUBDIR%

REM copy premunged data from source\munged
if not exist MUNGED mkdir MUNGED
if not exist %MUNGE_DIR% mkdir %MUNGE_DIR%
REM if exist %MUNGE_ROOT_DIR%\%SOURCE_SUBDIR%\MUNGED xcopy %MUNGE_ROOT_DIR%\%SOURCE_SUBDIR%\MUNGED\*.* %MUNGE_DIR% /D /Q /Y
REM if exist %MUNGE_ROOT_DIR%\%SOURCE_SUBDIR%\%MUNGE_DIR% xcopy %MUNGE_ROOT_DIR%\%SOURCE_SUBDIR%\%MUNGE_DIR%\*.* %MUNGE_DIR% /D /Q /Y

configmunge -inputfile $*.cfg %MUNGE_ARGS% -sourcedir %SOURCE_DIR% -outputdir %MUNGE_DIR% -chunkid load -ext config 2>>%MUNGE_LOG%

C:\BF2_ModTools\ToolsFL\bin\PC_texturemunge -inputfile loadscreen.tga %MUNGE_ARGS% -sourcedir C:\BF2_ModTools\data_ABC\Load -outputdir C:\BF2_ModTools\data_ABC\_BUILD\Load\MUNGED\PC
%MUNGE_PLATFORM%_modelmunge -inputfile $*.msh %MUNGE_ARGS% -sourcedir %SOURCE_DIR% -outputdir %MUNGE_DIR% 2>>%MUNGE_LOG%


REM === Create a temp folder to hold the req's
set TEMP_DIR=%SOURCE_DIR%\__TEMP__
if not exist %TEMP_DIR% mkdir %TEMP_DIR%

REM ========== for each backdrop create a level file
for /D %%b in (%MUNGE_ROOT_DIR%\%SOURCE_SUBDIR%\backdrops\*) do (
for %%a in (%MUNGE_ROOT_DIR%\%SOURCE_SUBDIR%\backdrops\%%b\*.tga %MUNGE_ROOT_DIR%\%SOURCE_SUBDIR%\backdrops\%%b\*.pic
%MUNGE_ROOT_DIR%\%SOURCE_SUBDIR%\backdrops\%%b\%MUNGE_PLATFORM%\*.tga %MUNGE_ROOT_DIR%\%SOURCE_SUBDIR%\backdrops\%%b\%MUNGE_PLATFORM%\*.pic) do (
echo ucft{ REQN { "texture" "%%~na" } } > %TEMP_DIR%\%%~na.req
)
)

C:\BF2_ModTools\ToolsFL\bin\levelpack -inputfile C:\BF2_ModTools\data_ABC\Load\common.req -common ..\Common\MUNGED\PC\core.files %MUNGE_ARGS% -sourcedir C:\BF2_ModTools\data_ABC\_BUILD\Load\MUNGED\PC -inputdir C:\BF2_ModTools\data_ABC\_BUILD\Load\MUNGED\PC -outputdir C:\BF2_ModTools\data_ABC\_LVL_PC\Load


del /q %TEMP_DIR%\*.*

REM ========== create an req for each directory
for /D %%b in (%MUNGE_ROOT_DIR%\%SOURCE_SUBDIR%\backdrops\* ) do (
echo ucft{ REQN { "lvl" > %TEMP_DIR%\%%~nb.req
for %%a in (%MUNGE_ROOT_DIR%\%SOURCE_SUBDIR%\backdrops\%%b\*.tga %MUNGE_ROOT_DIR%\%SOURCE_SUBDIR%\backdrops\%%b\*.pic
%MUNGE_ROOT_DIR%\%SOURCE_SUBDIR%\backdrops\%%b\%MUNGE_PLATFORM%\*.tga %MUNGE_ROOT_DIR%\%SOURCE_SUBDIR%\backdrops\%%b\%MUNGE_PLATFORM%\*.pic) do (
echo "%%~na" >> %TEMP_DIR%\%%~nb.req
)
echo } } >> %TEMP_DIR%\%%~nb.req
)
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Load Screen Utility

Post by [RDH]Zerted »

EGG_GUTS wrote:Question: With this could you load you map and your pic and your addon, select your CW lua process it then change your pic select your GCW Lua then have a different pic for each Era?
I didn't think of that user case. It will not work. Each time, the tool will replace Load\common.lvl with the latest image. I'm focusing on finishing FakeConsole now. If you want to post the additional steps that you do to get a loadscreen on different eras, I'll look into adding it when I take a look at the automatic munging stuff.

At BF2-Master:
Can you run any of the other Programs from my website? Do you have at least Java 1.5 (also called Java 5) installed? If not, install Java 1.6 (Java 6).
BF2-Master
Captain
Captain
Posts: 468
Joined: Thu Mar 02, 2006 7:08 pm

Re: Load Screen Utility

Post by BF2-Master »

Thanks, I'm installing Java 6 now.
Commander_Cody771
Vader's Apprentice
Posts: 1069
Joined: Thu Jun 07, 2007 5:02 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Looking for a new CPU
Contact:

Re: Load Screen Utility

Post by Commander_Cody771 »

Cool! :thumbs:
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Load Screen Utility

Post by [RDH]Zerted »

EGG_GUTS wrote:...could you load your map and your pic and your addon, select your CW lua process it then change your pic select your GCW Lua then have a different pic for each Era?
I'll work on adding that feature. I think I'll try to change the sequence to:
1) Select your addon folder (saved value)
2) Select your mod tools folder (saved value)
3) Pick your map (from a generated list)
4) Pick a lua (from a generated list)
5) Select the loadscreen image for that lua
6) Go to step 4 as required
7) Process the load screens

Any suggestions?
MandeRek
Sith Master
Sith Master
Posts: 2766
Joined: Tue Oct 02, 2007 10:51 am
Projects :: Battlefront Zer0
Games I'm Playing :: SWTOR
xbox live or psn: No gamertag set
Location: Ghosting around GT
Contact:

Re: Load Screen Utility

Post by MandeRek »

I'm getting the munge-log that it says 3 dimension.. I think this might be because the pic was tga, but i didn't remember something with layers.. Maybe you could make an auto-fix/converter for that.. Dunno how to solve this problem btw :P
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Load Screen Utility

Post by [RDH]Zerted »

I can't solve that problem for you through the tool. You need to save the image in the correct format (I don't know what that is). The format is in the original LoadingScreens HowTo topic. Check the modding FAQ topic to find it.

Progress Update:
I've coded the new GUI written for supporting different images for different modes. However, I have yet to add support for processing these extra images. You give the tool your bf2_modtools folder and it will generate your list of mod maps. Select a map, and it will generate a list of the map's mode scripts. Click on a mode script, then find a load screen image for it. (note: this is for the future version, not the one on the first post). I'm not planning to include the auto-munging in this version, as I want to get going on trying to mod the shell for custom eras. I can't start that until I get this next Load Screen Utility version out.
Note to [RDH]Zerted: Remember to add support for generated list of mode script files to include multiple map scripts from different maps in the Common\sciprts folder, like the PAC map or other retail lvl building maps.

Progress Update 2:
Sorry guys, I don't know what I was doing. For some reason, I thought all you needed to do to get different load screens for different eras was to rename each munged load lvl to something different. I forgot that each lvl has to contain an image named loadscreen. I was wrongly thinking that the image names could be different. In order to support this, almost every section of the utility needs to be redesigned and rewritten (before it was just adding a couple of loops and the GUI). While I have already rewritten the GUI to support the extra image selection, I don't want to rewrite all the processing code. At the moment, I am no longer planning on releasing another major version. The good news in this is that I'll be able to start working on custom eras now.
vegati
Chief Warrant Officer
Chief Warrant Officer
Posts: 352
Joined: Fri Dec 26, 2008 1:21 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: At Gametoast.com enjoyin some fresh salmon jerky. Mmmmmm.
Contact:

Re: Load Screen Utility

Post by vegati »

I tried doing this with a TGA file and it didn't work. Is there a specific kind of file you have to use?
Commander_Fett
High General
High General
Posts: 847
Joined: Fri Oct 17, 2008 9:59 pm
Projects :: No Mod project currently.

Re: Load Screen Utility

Post by Commander_Fett »

Bit of a bump...
anyway, before this topic is locked, is your tga 1024 by 1024? If not, it must be.
Post Reply