Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Product Chat / [Free] Script Cleaner - Make your games load faster!

Author
Message
knxrb
FPSC Tool Maker
16
Years of Service
User Offline
Joined: 10th Oct 2008
Location: United Kingdom
Posted: 4th Jul 2009 18:15 Edited at: 30th May 2010 23:22


Here's another of my little programs that I've made for the FPSC community

The Script Cleaner removes all unused scripts from the scriptbank folder and all subfolders.

FPSC games load all scripts in the scriptbank folder when it loads the level and by removing the unused scripts using the Script Cleaner it only loads the scripts that are required by the game

Screenshot:


Download: (15.8 kb)
http://www.fpscip.com/scriptcleaner/scriptcleaner.zip

I hope you all find it useful, knxrb
Opposing force
19
Years of Service
User Offline
Joined: 10th Aug 2005
Location: England
Posted: 4th Jul 2009 18:17
Excellent! I get annoyed with FPSC for copying all the script files over after I've built a game. I'm going to use this from now on. Thanks knxrb.
Crusader2
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: Somewhere...
Posted: 4th Jul 2009 18:17
Awesome! Thanks for this knxrb. Does it copy any other folders in their entirety? Because then it shouldn't be too difficult to create a version to remove ALL of those folders.

Some people say that I'm crazy... And I agree.
USE PLY'S MOD!
knxrb
FPSC Tool Maker
16
Years of Service
User Offline
Joined: 10th Oct 2008
Location: United Kingdom
Posted: 4th Jul 2009 18:22
Quote: "Does it copy any other folders in their entirety?"

It doesn't copy any folder, it delets all unused scripts.

I may add in a bit that deletes all empty folders in a later release but each folder is only around 1kb in size so it's not a big deal leaving them in

knxrb

xplosys
18
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 4th Jul 2009 18:22
Cool and useful. Thank you very much.

Brian.

Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 4th Jul 2009 18:58 Edited at: 4th Jul 2009 19:09
Quote: "it only loads the scripts that are required by the game"

SWEET
I've been wishing this was built in FPSC for a long time now.
As you can imagine I have quite a script list, and having them all in each build becomes a problem to manually delete.

Quote: "It doesn't copy any folder, it delets all unused scripts."

I hope there is a built in input validation to prevent someone from accidentally deleting the main scriptbank folder.
It looks as if you have it set up to only work on built game files, so maybe that is covered already.

My only questions are;

How does it know which scripts are used by the game and which ones are not?

Does it open and extract a list of the *.fpi from the FPE files or what?

Are you goin to take this a step further and incorporate it into a game packer?

I only ask because it seems like this would be a great function for game packers.

Thanks again KNXRB

knxrb
FPSC Tool Maker
16
Years of Service
User Offline
Joined: 10th Oct 2008
Location: United Kingdom
Posted: 4th Jul 2009 19:01 Edited at: 4th Jul 2009 19:01
Quote: "How does it know which scripts are used by the game and which ones are not?"

It uses the 'universe.ele' file in the 'levelbank\testlevel' folder of the built game.

Quote: "Are you goin to take this a step further and incorporate it into a game packer?"

Nice idea, I might do that

knxrb

Ekipshi
15
Years of Service
User Offline
Joined: 20th May 2009
Location:
Posted: 4th Jul 2009 19:15 Edited at: 4th Jul 2009 19:15
Thanks very much! Ver useful cause, uh...heh, i have quite a few scripts

All the best!

Yeah... got hurt when i tripped... on some bullets
Exciting Sci-Fi thriller: Equinox. Coming Soon.
http://forum.thegamecreators.com/?m=forum_view&t=151865&b=25
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 4th Jul 2009 19:15 Edited at: 4th Jul 2009 19:31
Quote: "It uses the 'universe.ele' file in the 'levelbanktestlevel' folder of the built game."

Thanks

It's been awhile since I explored ALL of the files (4 years), so I need to go back and look again now.

I don't think that I ever opened up any ELE files before, but now that I have that is very interesting.

THANKS

Quote: "Nice idea, I might do that "

I couldn't remember if you had already made a game packer or not.
I knew a couple people have but I forgot who.
I did remember that you do make handy FPSC tools like the mulitplayer hub thingy. (I only forget the names)

game freak16
18
Years of Service
User Offline
Joined: 25th Jan 2006
Location:
Posted: 4th Jul 2009 22:24 Edited at: 4th Jul 2009 22:25
This is great!

You should add on to this so that it deletes all unused sounds too. Every time I build a game it copies the whole audiobank folder and I have a ton of sounds and music.

knxrb
FPSC Tool Maker
16
Years of Service
User Offline
Joined: 10th Oct 2008
Location: United Kingdom
Posted: 4th Jul 2009 22:26 Edited at: 4th Jul 2009 22:26
Nice idea, I'll look into it

knxrb

CoffeeGrunt
17
Years of Service
User Offline
Joined: 5th Oct 2007
Location: England
Posted: 4th Jul 2009 23:29
Scripts amount to like 50Kb, so they don't hit the Load Time much anyway. Great program anyway, I also noticed that FPSC copies unnecessary audio clips as well, maybe this would be good for an expansion to it?

If we're all God's Children, then what's so special about Jesus?
Airslide
19
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 4th Jul 2009 23:57
Make sure to scan used scripts for references to other scripts using the command runfpi or whatever it is. I have several scripts that do this so they aren't referenced in any entity.

Cool idea, I can see this being very useful, because FPSC pre-loads sounds/images referenced in scripts, so having unnecessary scripts means having other unnecessary content in memory

Doomster
16
Years of Service
User Offline
Joined: 8th Nov 2007
Location: Germany
Posted: 4th Jul 2009 23:58
Quote: "The Script Cleaner removes all unused scripts"

Correct me If I'm wrong but the "testlevel" folder contains only the files of the currently loaded level, to remove all unused scripts the user would have to load every level of his game and run the programm after each level was loaded, so it doesn't remove all unused scripts automatically.

However, the idea is still good.

Ekipshi
15
Years of Service
User Offline
Joined: 20th May 2009
Location:
Posted: 5th Jul 2009 01:10
Um, i think its made for your real, finished polished game, so when you play THAT, it won't take as long

Just sayin

Yeah... got hurt when i tripped... on some bullets
Exciting Sci-Fi thriller: Equinox. Coming Soon.
http://forum.thegamecreators.com/?m=forum_view&t=151865&b=25
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 5th Jul 2009 02:45
Yeah, wouldn't be a good idea to run this on your FPS Creator folder, lmao.

Looking good, knxrb. This is something we've needed for a while. Great contribution.


THe one and only,


knxrb
FPSC Tool Maker
16
Years of Service
User Offline
Joined: 10th Oct 2008
Location: United Kingdom
Posted: 5th Jul 2009 15:26 Edited at: 5th Jul 2009 15:26
@Airslide: Aah, I didn't think of that! I'll look into searching for the runfpi command later.

@GOH Doomster: Didn't think of that either! Maybe build each level seperately, run the Script Cleaner on each built game then copy all the scriptbanks from each?

knxrb

FPSC Models and Media
15
Years of Service
User Offline
Joined: 26th Apr 2009
Location:
Posted: 6th Jul 2009 20:33
Excellent
Inspire
17
Years of Service
User Offline
Joined: 23rd Dec 2006
Location: Rochester, NY
Posted: 7th Jul 2009 03:48
Awesome idea! Thanks muchly.

Somebody should make a thread with all the utilities released for FPSC, unless there already is one (if there is one, can somebody link me to it?).

Nickydude
Retired Moderator
17
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Inspire
17
Years of Service
User Offline
Joined: 23rd Dec 2006
Location: Rochester, NY
Posted: 7th Jul 2009 03:53
Thanks man!
Metal Devil123
16
Years of Service
User Offline
Joined: 13th Jul 2008
Location: Suomi, Finland
Posted: 5th Aug 2009 16:08
I downloaded it. I think it's cool, but when it finished, I got a warning about a worm (virus).

chidem
15
Years of Service
User Offline
Joined: 13th Jan 2009
Location:
Posted: 5th Aug 2009 16:19
Excellent! Downloading now! Thanks so much, Knxrb

Pioneering - Website: http://www.huntersofkentucky.com
bond1
18
Years of Service
User Offline
Joined: 27th Oct 2005
Location:
Posted: 5th Aug 2009 16:57
Nice one, thanks!

----------------------------------------
"bond1 - You see this name, you think dirty."
Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 5th Aug 2009 17:42
...very useful program.

Now, those custom scripts can remain custom....

Tomik18
FPSC Reloaded TGC Backer
15
Years of Service
User Offline
Joined: 8th May 2009
Location: Slovakia
Posted: 5th Aug 2009 19:23
Can I join with FPSCX10 ?
JRH
18
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Stirling, UK
Posted: 6th Aug 2009 11:29
This is great, and heres a solution to:

Quote: "Correct me If I'm wrong but the "testlevel" folder contains only the files of the currently loaded level, to remove all unused scripts the user would have to load every level of his game and run the programm after each level was loaded, so it doesn't remove all unused scripts automatically."


In the directory, for each level there are zip files. You could disarchiveify them using their password to get each levels universe.ele file.

A great tool that I'm gonna use time and time again.
knxrb
FPSC Tool Maker
16
Years of Service
User Offline
Joined: 10th Oct 2008
Location: United Kingdom
Posted: 6th Aug 2009 15:49 Edited at: 6th Aug 2009 15:49
Quote: "Can I join with FPSCX10 ?"

I've never tried it with X10 so just give it a go and see if it works.

knxrb

Login to post a reply

Server time is: 2024-10-12 21:24:28
Your offset time is: 2024-10-12 21:24:28