[ACE] Need help with CDR Guide script

Taiki16

Villager
Member
Joined
Oct 23, 2014
Messages
25
Reaction score
1
First Language
Français
Primarily Uses
Hi everyone,

I use this very useful script in my project who is made by Ceodore but modified by GreatRedSpirit. You can find this script here: https://rpgmaker.net/forums/topics/15877/

However, i encountered one problem:

- When i save the game, the tutorials doesn't save. So when i restart, i lost them.
So if anyone can fix this problem it would be very nice.

Thanks for your help.
 
Last edited:

Taiki16

Villager
Member
Joined
Oct 23, 2014
Messages
25
Reaction score
1
First Language
Français
Primarily Uses
bump again if anyone can resolve this problem
 

Taiki16

Villager
Member
Joined
Oct 23, 2014
Messages
25
Reaction score
1
First Language
Français
Primarily Uses
I had exactly the same problem on another script and thanks to a very generous person, he managed to solve the problem.
He added this in the script:
Code:
module DataManager
  class <<self
    alias fog_init init
    def init
      fog_init
      load_latest_variables rescue nil
    end
  end
 
  def self.load_latest_variables
    File.open(make_filename(latest_savefile_index), "rb") do |file|
      Marshal.load(file)
      contents = Marshal.load(file)
      $game_variables = contents[:variables]
    end
  end
end
But the problem is that CDR tutorial use switches instead of variables. So i tried to replace the variables with switches but no result. :headshake:
And since I'm not very good at scripting, I'm not sure how to do it.
 

Taiki16

Villager
Member
Joined
Oct 23, 2014
Messages
25
Reaction score
1
First Language
Français
Primarily Uses
Help? Nobody?
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,233
Reaction score
457
First Language
English
Primarily Uses
RMVXA
the problem with the script is that it actually doesn't use the switches for knowing what guides are available or watched. As soon as you get the guide the switch for it is turned off. The data is saved in some other variable.
 

A-Moonless-Night

WINTER IS COMING
Veteran
Joined
Mar 17, 2012
Messages
613
Reaction score
407
First Language
English
Primarily Uses
RMVXA
Does this work?
Code:
module DataManager
  class << self
    alias :amn_guides_datamanager_makesavecontents :make_save_contents
    alias :amn_guides_datamanager_extractsavecontents :extract_save_contents
  end
 
  def self.make_save_contents
    contents = amn_guides_datamanager_makesavecontents
    contents[:guides] = {}
    contents[:guides][:memory] = GuideManager.get_memory
    contents[:guides][:read] = GuideManager.get_read
    contents
  end

  def self.extract_save_contents(contents)
    amn_guides_datamanager_extractsavecontents(contents)
    GuideManager.set_memory(contents[:guides][:memory])
    GuideManager.set_read(contents[:guides][:read])
  end

end

module GuideManager
  def self.get_read
    @read
  end
 
  def self.get_memory
    @memory
  end 
 
  def self.set_read(data)
    @read = data
  end
 
  def self.set_memory(data)
    @memory = data
  end
end
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

I decided to rework my main character's portrait and logo at the same time....


Honestly I was going to use a lot more yellow in the game along with red and white to represent characters.... But yellow really is just like.... the ugliest color in the color pie. So er... I'm going to use blues/purples in place of it. :LZSwink:
XwwX OMG! Only 4 more weeks till I can leave my crappy job and never ever go back! I am SO freaking excited!!!
Sometimes, it's so hard to resist
"this boss is too easy, what if I add more gimmicks". Then I remember most of my players might be already dying fighting the boss.
You certainly should show love and recognition to teammates who have achieved great success! Congrats Eli!
Just 2 Days of no Internet and I made more Progress in my Game than last 2 Weeks combined. Now I know, Internet makes me a Lazy person.. :D

Forum statistics

Threads
98,076
Messages
949,098
Members
129,358
Latest member
AbidNaga
Top