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,982
Reaction score
665
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
689
Reaction score
448
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
 

Latest Threads

Latest Profile Posts

When you don't find any time to work... :kaocry:
First Ten Minutes of my Caretaker inspired game

Finally, I got a good Gmail message [from smg5urded]
"This game does look a bit plain, but, I'm sure this does not destroy the experience as a whole. Monsters fit your style of game-play, mapping looks crude but I'm sure you can make it better if you do a remake of Forgotten Eclipse"
Going to start a new project today. OMG, it will be on RPGMaker MV. :D
Paid material WIP~
EysZO9cVEAEWy9W

This is Alchemy pack.
I decided to add more witch elements.

Now we have wooden props, candles, pots, and potion bottles.
We also want to add herbs, kettles, fireplaces, etc.

Forum statistics

Threads
110,397
Messages
1,052,940
Members
143,450
Latest member
Magnus-barvock
Top