Author Topic: [XP] Chaos Project Save Layout  (Read 15898 times)

Offline Fantasist

  • Lexima Warrior
  • *******
  • Posts: 2223
  • LV: 146
  • Gender: Male
    • View Profile
    • Blog
[XP] Chaos Project Save Layout
« on: March 19, 2008, 05:45:25 PM »
Chaos Project Save Layout
Authors: Fantasist, Blizzard
Version: 1.4.2
Type: Save/Load Scene Mod
Key Term: Title / Save / Load / GameOver Add-on

Introduction

This replaces the default Save/Load scenes with the layout from the game Chaos Project.

Features

Features taken from Chaos Project:
  • The layout
  • Confirm overwrite window (optional)
  • Detects and uses the windowskin from the savefile (useful with other scripts which enable in-game changing of windowskins)
  • Detects and uses the font from the savefile (made to work with Ultimate Font Override from Tons of Addons)
  • Load-on-demand feature which temporarilyloads save data for faster file selection. Handy especially when using scripts like DREAM
  • Prevents crashing and displays 'Corrupted save data' (customizable) if a savefile is corrupted
  • Compatible with DREAM for Savefiles
  • Location names (optional)

Additional features:
  • Chapter System (optional)
  • Following things are customizable: number of save slots, savefile name, savefile extension, savefile location, text in the Save/Load scene (help window text, overwrite prompt text, etc)
  • Indicates if file exists by colouring the text in the list window (optional)

Screenshots

(click to show/hide)

Demo

Come on already, this is almost plug-and-play! (Demo on demand, but respect my laziness ^_^)

Script

Installation: Place this script anywhere above main and below Scene_Load. Place above Tons of Addons if you're using it.
(click to show/hide)

Now, search for the following or similar in Scene_Title:
Code: [Select]
   @continue_enabled = false
    for i in 0..3
      if FileTest.exist?("Save#{i+1}.rxdata")
        @continue_enabled = true
      end
    end

Comment those lines and add this line:
Code: [Select]
   @continue_enabled = (0...CPSL::Save_number).any? {|i|FileTest.exist?(CPSL.make_savename(i))}


Instructions

In script header.

Compatibility

Quote
#------------------------------------------------------------------------------
# Compatibility:
#
#   Might not be compatible with other save/load systems. Should be compatible
#   with everything else.
#   Compatible with 'Ultimate Font Override' from Tons of Addons,
#   'Storm Tronics CMS' and 'DREAM for Savefiles' by Blizzard
#------------------------------------------------------------------------------

Credits and Thanks

Credits: Fantasist for making this, Blizzard for the layout
Thanks: Blizzard (and his game Chaos Project) for the original layout and inspiration, Sase for pointing out the issue with the confirm overwrite window, and IserLuick for suggesting a feature

Author's Notes

   I'm not perfectly happy with the bars. If anything seems too troublesome or annoying while using the script, please let me know. I want to make this as practically pleasant as possible.

If you have any questions, problems or suggestions, you can find me at:
 - www.chaos-project.com
 - www.quantumcore.forumotion.com
Enjoy ^_^
« Last Edit: February 24, 2011, 12:50:54 PM by Fantasist »
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: 20015
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: Chaos Project Save Layout
« Reply #1 on: March 19, 2008, 05:48:58 PM »
I use load-on-demand as well if you haven't noticed. ^_^

BTW, add the [RMXP] tag to the topic's title.
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: 2223
  • LV: 146
  • Gender: Male
    • View Profile
    • Blog
Re: Chaos Project Save Layout
« Reply #2 on: March 19, 2008, 06:00:38 PM »
Forgot in the excitement. And yeah, I know. When 1.3 is out, it'll be added to the Features from CP list :D
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



Flermza

  • Guest
Re: Chaos Project Save Layout
« Reply #3 on: March 19, 2008, 06:01:13 PM »
Great work, Fantasist!

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20015
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP]Chaos Project Save Layout
« Reply #4 on: March 19, 2008, 06:45:11 PM »
I just tested it, nice job on it. Here are my suggestions and comments:

1. In your header it says v1.0 while in the version history it says v1.2. xD

2. When you try to overwrite a file and choose "No", the next time you select a file to overwrite, the cursor was memorized and is still pointing at "No". You should reset it.

3. This piece here:

Code: [Select]
    if @index == i
      return
    else
      @index = i
    end

Just this is enough:

Code: [Select]
    return if @index == i
    @index = i

4. Interesting, you used the load bar for the load state of the files. I used the load bar when actually loading the game data. I only display "Loading file..." when a file is being loaded to display. Of course, it doesn't have to be a complete clone so I think you should leave it that way.

5. Change

Code: [Select]
    if @list_win.active
      update_list
      return
    end
    if @confirm_win.active
      update_confirm
      return
    end

to

Code: [Select]
    if @list_win.active
      update_list
    elsif @confirm_win.active
      update_confirm
    end

6. Change

Code: [Select]
      @continue_enabled = false
      (0...CPSL::Save_number).each {|i|
      @continue_enabled = true if FileTest.exist?(CPSL.make_savename(i))
      }

to

Code: [Select]
      @continue_enabled = (0...CPSL::Save_number).any? {|i|
          FileTest.exist?(CPSL.make_savename(i))
      }

7. There's a "little glitch" in the title menu. Initially the "Continue" option is not enabled and is being enabled after the loading was done. You should add instructions how to edit the title script instead of making your script do the work. I did the same in DREAM for Savefiles.

8. Load-on-demand will become very useful if somebody can't resist to use more 50 fileslots... >.<

9. I put up 2 screenshots. ::)
« Last Edit: March 19, 2008, 06:47:14 PM by Blizzard »
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: 2223
  • LV: 146
  • Gender: Male
    • View Profile
    • Blog
Re: [XP]Chaos Project Save Layout
« Reply #5 on: March 19, 2008, 07:32:58 PM »
@Flermza; Thank you :)

@Blizz:

Quote
In your header it says v1.0 while in the version history it says v1.2. xD
Oops! Will have to correct that.

Quote
2. When you try to overwrite a file and choose "No", the next time you select a file to overwrite, the cursor was memorized and is still pointing at "No". You should reset it.
I know, I just forgot to do it.

Quote
return if @index == i; @index = i
lol! I wrote that code just to get it out of the way at that moment and never bothered to correct it.

Quote
4. Interesting, you used the load bar for the load state of the files. I used the load bar when actually loading the game data. I only display "Loading file..." when a file is being loaded to display. Of course, it doesn't have to be a complete clone so I think you should leave it that way.
Well, I know. But since it's a substitute for load-on-demand and it's noticable, I had to make a loading bar there. And the loading bar when actually loading a save, I know how to make a bar for normal Marshal files, but DREAM has DREAM.data(file) to directly get the data, is there a way I can make a loading bar which is not a fake? (I'd never want to put a fake bar, so I decided to just make 'Loading...' without the bar).

Quote
if @list_win.active
      update_list
    elsif @confirm_win.active
      update_confirm
    end
Point to be noted. But I think the scene messes up if I don't use 'return', I guess the 'elsif' takes care of that. ty :)

Quote
@continue_enabled = (0...CPSL::Save_number).any? {|i|
          FileTest.exist?(CPSL.make_savename(i))
      }
I was in a hurry to get the Scene_Title thing out of the way, I didn't realize >.<

Quote
7. There's a "little glitch" in the title menu. Initially the "Continue" option is not enabled and is being enabled after the loading was done. You should add instructions how to edit the title script instead of making your script do the work. I did the same in DREAM for Savefiles.
I wanted to mention about it, but it makes the script 100% plug-and-play. I'll remove that when this becomes beta (when this becomes worthy of having to change a script, lol!)

Quote
8. Load-on-demand will become very useful if somebody can't resist to use more 50 fileslots... >.<
lol, yeah. I tested it with 100 save slots and it takes a couple of seconds even without no savefiles. (but at least the loading bar looks nice... ahem...)

Quote
9. I put up 2 screenshots.
Hey! Where's the screenshot of the confirmation window >:(
j/k
Very much appreciated :D
« Last Edit: March 19, 2008, 07:40:00 PM by Fantasist »
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: 20015
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP]Chaos Project Save Layout
« Reply #6 on: March 19, 2008, 07:53:46 PM »
4. Not without hacking DREAM. I use a modified version of DREAM for CP of course. The only thing that COULD work is if you hack DREAM and extract the method "dream4_decryption" AND mess around with it.

7. Some scripts just can't work plug-n-play. ._.

8. 2.5 seconds with 100 empty files.

9. Add it yourself. :P
« Last Edit: March 19, 2008, 07:54:32 PM by Blizzard »
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: 2223
  • LV: 146
  • Gender: Male
    • View Profile
    • Blog
Re: [XP]Chaos Project Save Layout
« Reply #7 on: March 19, 2008, 08:12:56 PM »
4. - I guess I have to accept it. (and can and will you sue me if I DID hack DREAM, modify the method and upload the new files? Now that I think about it, your license allows derivative works with proper attribution...)

7. - I just made it work :P (by compromizing effeciency and a nagging piece of concience that tells me I coded a lame excuse for "Some scripts just can't work plug-n-play", lol)

8. - Speaking of which I've been uising Time.now a lot lately.

9. - lol, OK :P

(click to show/hide)
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 Sally

  • Sallygirl :P
  • Chaos User
  • ******
  • Posts: 1283
  • LV: 12
  • Gender: Female
    • View Profile
Re: [XP]Chaos Project Save Layout
« Reply #8 on: March 19, 2008, 08:59:53 PM »
this seems cool,
what dose "Customizable savefile extension" mean?

Offline Fantasist

  • Lexima Warrior
  • *******
  • Posts: 2223
  • LV: 146
  • Gender: Male
    • View Profile
    • Blog
Re: [XP]Chaos Project Save Layout
« Reply #9 on: March 19, 2008, 09:06:42 PM »
thanks :) It's a complete script I did after a long time.

Customizable Savefile extension means your savefiles can have any extension you want other than .rxdata, just like Chaos Project saves have the extension .cps (Chaos Project Save).

Oh! And if you're using DREAM, don't forget to change it accordingly! (got to add this line in v1.3)
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: 20015
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Chaos Project Save Layout
« Reply #10 on: March 25, 2008, 03:02:22 PM »
4. - I guess I have to accept it. (and can and will you sue me if I DID hack DREAM, modify the method and upload the new files? Now that I think about it, your license allows derivative works with proper attribution...)

Hack DREAM and see what happens. There is a license redefinition in there. WcW found it already. xD
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: 2223
  • LV: 146
  • Gender: Male
    • View Profile
    • Blog
Re: [XP] Chaos Project Save Layout
« Reply #11 on: March 25, 2008, 03:24:44 PM »
I'm not even a beginner at hacking XD
I normally use notepad to open files when I want to look at them. I DID try a hex editor once, but everything was Greek and Latin. I don't think I'll go that far, I can pass without the loading bar. For now, I just used the bar, but it only displays 0 and 100%. 0% when starting to load the data, and 100% when done. It's not really fake, but it'll look better without the bar and only words imo. I'll do that later.
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: 20015
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: [XP] Chaos Project Save Layout
« Reply #12 on: March 25, 2008, 07:28:28 PM »
You just need to figure out how it gets decoded, nothing more. It's not even REAL hacking. ::)
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: 2223
  • LV: 146
  • Gender: Male
    • View Profile
    • Blog
Re: [XP] Chaos Project Save Layout
« Reply #13 on: March 26, 2008, 02:10:14 PM »
Will give it a shot then, ty :)

EDIT: v1.4 is up.

New features:
 - A little remodel (gave more space for the names of actors)
 - Chapter System and location names added
 - Other little things I can't remember right now
« Last Edit: April 04, 2008, 05:00:42 AM by Fantasist »
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 Sase

  • Transcended Spirit
  • ***
  • Posts: 174
  • LV: 5
  • Gender: Male
    • View Profile
Re: [XP] Chaos Project Save Layout
« Reply #14 on: April 06, 2008, 09:01:47 AM »
Nice, I will use ^^;

I searched the script but it's too messy for me. How to change the "overwrite"-choices default by No, because it may prevent some mishabs if you accidently press Enter.

Offline Fantasist

  • Lexima Warrior
  • *******
  • Posts: 2223
  • LV: 146
  • Gender: Male
    • View Profile
    • Blog
Re: [XP] Chaos Project Save Layout
« Reply #15 on: April 06, 2008, 08:10:49 PM »
Hm, good point. For the time being, find Scene_File and scroll down to 'def update_list'. Somewhere below that line, you'll find these lines:

Code: [Select]
def update_list
    @list_win.update
    if Input.trigger?(Input::C)
      if $scene.is_a?(Scene_Save) && CPSL::Confirm_Overwrite &&
        FileTest.exist?(make_filename(@list_win.index))
        @list_win.active = false
        @confirm_win.index = 0
        @confirm_win.visible = @confirm_win.active = true
        .
        .
        .

Now, change the 0 in "@confirm_win.index = 0" to 1 and you're done.


EDIT:

Sorry for the necro, but I've updated the script to 1.4.2 to address the following:

Nice, I will use ^^;

I searched the script but it's too messy for me. How to change the "overwrite"-choices default by No, because it may prevent some mishabs if you accidently press Enter.

A post from this topic:
Hi :)
Why didn't you post in that topic? Making a new topic is pointless, I think, because the original topic is there so that you can ask stuff, you know?  :roll:

Quote
This isn't a huge modification I think, I just want to draw Icons on the left side of the filenames; if the file has a game saved, it will show an icon, if there isn't, it will show another.
It can definitely be done, but I stopped coding a while ago...
Oh what the hell. This has been due an update for so long. I'll be on it, it shouldn't take too long.
EDIT: Sorry, but I'm not going to do it. I'll have to increase the width of the file list window for both the text and the icon to fit in, and that means I'll have to adjust the layout of the information window (since it's width is reduced). I don;t think it's worth it, I'm sorry :(
Instead, I'll add an option to change the text colour depending on whether the file exists or not. I hope that'll suffice :)
« Last Edit: February 24, 2011, 12:54:38 PM by Fantasist »
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