[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,660
Reaction score
563
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
681
Reaction score
446
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

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,050
Members
137,571
Latest member
grr
Top