[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,207
Reaction score
448
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
606
Reaction score
405
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

The final version of our game is already available both in English and Spanish! ^___^
Can't believe this day has finally come... T_T
Im so happy that Dead By Daylight is getting a Silent Hill chapter! Cant wait to play as pyramid head
I'm glad I found those fishies by @whtdragon so I had a proper base to start pixeling the first enemies in the game.
Such cuties... yeah.
Yesterday, for my youngest sibling's birthday, we watched one of his favorite movies.
Ponyo is such a beautiful, but certainly strange, movie.
I just have to say that I prefer the majority of Studio Ghibli's works to those of Disney.
*sees work place in incoming call history* .... =www= hisssssSSSSSssss.

Forum statistics

Threads
97,812
Messages
947,121
Members
129,026
Latest member
Frive1000
Top