Author Topic: [XP] Missing File Logger  (Read 5397 times)

Offline Fantasist

  • Lexima Warrior
  • *******
  • Posts: 2222
  • LV: 146
  • Gender: Male
    • View Profile
    • Blog
[XP] Missing File Logger
« on: March 01, 2009, 07:44:38 PM »
Missing File Logger
Authors: Fantasist
Version: 1.0
Type: Game Debug Utility
Key Term: Game Utility

Introduction

This script prevents the game from crashing due to missing files. It also maintains a list of missing files. It can create a text file listing all the lissing files, the latest time they were used and the number of times they were used. It can also check for all the missing files. It any files are found, they are removed from the list.

Features

  • Creates and maintains a dynamic list of missing resources, both graphics and audio.
  • Prevents the game from crashing due to missing files.
  • If any of the missing files are found, they are removed from the list.
  • You don't have to look through the log; all files will be sorted properly.
  • No repetitions: instead, the number of times the file was used will be displayed.
  • Date and time when a missing resource was last used will be stored.
  • Rescue bitmap which lets you know that a graphic is missing.

Screenshots

Not really needed.

Demo

http://www.sendspace.com/file/z8a1lt

Script

Place this script anywhere above "Main". I recommend you place it on top of all scripts.
(click to show/hide)

Instructions

You can save the collected data by using the following code:
Code: [Select]
FTSConfig.save_missing_file_data
You can create a readable log file by using the following code:
Code: [Select]
FTSConfig.write_missing_file_data
You can check if any of the missing files are found by using:
Code: [Select]
FTSConfig.check_missing_files
Remember to mod "Main" if you set the "SAVE_FREQUENCY_TYPE" setting to 0. Even if it is 1, there's no harm in applying this mod.

Instructions to mod "Main":

Go to "Main". Erase the last line ("end") and paste the following code:
Code: [Select]
#===========Start copying from here===========
ensure
  FTSConfig.save_missing_file_data
  FTSConfig.write_missing_file_data if $DEBUG
end

If you set the SAVE_FREQUENCY_TYPE to 0:

The data will be saved when:
  • You close the game normally.
  • You use Alt+F4 to close the game.
  • The game crashes but an but some error message is displayed.

The data will NOT be saved when:
  • You close the game by using the "End Task" command from the Task Manager

Compatibility

Should be compatible with almost everything.

Credits and Thanks

  • Fantasist, for making this.

Author's Notes

If you have any questions, suggestions or comments, you can find me (Fantasist) at:


Enjoy ^_^
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)

The best of freeware reviews: Gizmo's Freeware Reviews



Offline Fantasist

  • Lexima Warrior
  • *******
  • Posts: 2222
  • LV: 146
  • Gender: Male
    • View Profile
    • Blog
Re: [XP] Missing File Logger
« Reply #1 on: March 01, 2009, 07:46:42 PM »
I said I wouldn't work on scripts anymore, but I'm updating my Game Distributing tutorial. I wanted to include useful tools and I had this idea in mind for ages, so yeah :P
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)

The best of freeware reviews: Gizmo's Freeware Reviews



Offline Aqua

  • Lexima Warrior
  • *******
  • Posts: 2554
  • LV: 118
  • Gender: Female
  • Quack!
    • View Profile
Re: [XP] Missing File Logger
« Reply #2 on: March 01, 2009, 07:48:56 PM »
Wow... nice!

Definitely deserves power ups!

Such a useful tool <3

Offline Reno-s--Joker

  • Astral Trancist
  • *****
  • Posts: 674
  • LV: 34
  • Gender: Female
  • Zombie account.
    • View Profile
    • My DeviantART
Re: [XP] Missing File Logger
« Reply #3 on: March 02, 2009, 05:31:08 AM »
I haven't tested it out yet, but definitely AWESOME and handy. <3
*powers up*

I'm a big fan. :haha:

Offline Fantasist

  • Lexima Warrior
  • *******
  • Posts: 2222
  • LV: 146
  • Gender: Male
    • View Profile
    • Blog
Re: [XP] Missing File Logger
« Reply #4 on: March 02, 2009, 01:46:28 PM »
Thanks Aqua and RenoSJ ^.^

If I do say so myself, this isn't much of a big deal. Let's take Blizz's Resource Tester and add some file checking and file moving capabilities to it; imagine how awesome THAT would be!
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)

The best of freeware reviews: Gizmo's Freeware Reviews



Offline Reno-s--Joker

  • Astral Trancist
  • *****
  • Posts: 674
  • LV: 34
  • Gender: Female
  • Zombie account.
    • View Profile
    • My DeviantART
Re: [XP] Missing File Logger
« Reply #5 on: March 03, 2009, 11:40:09 AM »
Lol, very true... ^-^

Is that a hint...?
:xD:

Offline Fantasist

  • Lexima Warrior
  • *******
  • Posts: 2222
  • LV: 146
  • Gender: Male
    • View Profile
    • Blog
Re: [XP] Missing File Logger
« Reply #6 on: March 03, 2009, 11:44:24 AM »
Is that a hint...?
:xD:

Not consciously intended but I guess so... *pokes Bliz*
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)

The best of freeware reviews: Gizmo's Freeware Reviews



Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 19916
  • LV: 642
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Missing File Logger
« Reply #7 on: March 03, 2009, 01:02:34 PM »
You know what would actually be better? I'm not going to do it, but the Resource Tester could be enhanced to move all necessary files into a specific subfolder. Then you just use those resources including the required script resources.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline Fantasist

  • Lexima Warrior
  • *******
  • Posts: 2222
  • LV: 146
  • Gender: Male
    • View Profile
    • Blog
Re: [XP] Missing File Logger
« Reply #8 on: March 04, 2009, 02:02:22 PM »
Quote
Let's take Blizz's Resource Tester and add some file checking and file moving capabilities to it; imagine how awesome THAT would be!

I might do it on a randomly driven whim.
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)

The best of freeware reviews: Gizmo's Freeware Reviews