Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[Resolved] Help: Encrypted .rmvx files

elder

Member

When I open a mapXXX.rmvx with a .doc document, the content is encrypted. How can I get the result in readable text?
 
Simple put, you can't.

The data is isn't really encrypted, just in binary form, so you can't read it.

Let me see if I can't make a script that reads rxdata and rvdata and converts them to a readable text format for inspecting stuff. Hopefully won't take too long...


Ok. Here's a little something I came up with:
Code:
module Read_RXRVData
  def self.read(data_file, dest_file = "#{data_file}.txt")
    begin
      data = load_data(data_file)
    rescue
      p "#{data_file} file not found."
      return
    end
    f = File.new(dest_file, 'w')
    for object in data
      next if object == nil
      self.inspect_object(object, f)
      f.write("\n")
    end
    f.close
  end
  private
  def self.inspect_object(object, f)
    f.write("#{object}\n")
    object.instance_variables.sort.each do |iv|
      f.write("#{iv.sub(/@/, '')}: ")
      self.inspect_object(object.instance_variable_get(iv), f)
    end
  end
end

So if you wanted to read the contents, of save, your Actors.rvdata file, you would use

Code:
Read_RXRVData.read('Data/Actors.rvdata')

Now look in your data folder for a text document. It should be there, with you able to look at the various instance variables and what they are set at. Let me know if it doesn't work.
 
Oh yeah. I did this for the $data junk. And in my rush, I completely forgot what you originally asked for. Sorry about that.

I'll work on something that should be what you are looking for.

Well, its far from perfect, but works decent.
Code:
module ReadMaprvdata
  @map_infos = load_data('Data/MapInfos.rvdata')
  def self.write(map_id)
    map = load_data(sprintf("Data/Map%03d.rvdata", map_id))
    f = File.new(sprintf("Data/Map%03d.text", map_id), 'w')
    f.write("#{sprintf("Map%03d", map_id)}: #{@map_infos[map_id].name}\n")
    @indent = 0
    map.instance_variables.sort.each do |iv|
      self.write_object(iv, map.instance_variable_get(iv), f)
      @indent -= 1
    end
    f.close
  end
  private
  def self.write_object(iv, g_iv, f)
    f.write("#{' ' * @indent}#{iv.sub(/@/, '')}: #{g_iv}\n")
    @indent += 1
    if g_iv.is_a?(Hash)
      g_iv.each do |key, value|
        self.write_object("@#{key}", value, f)
        @indent -= 1
      end
    elsif g_iv.is_a?(Array)
      g_iv.each do |value|
        self.write_object("@#{g_iv.index(value)}", value, f)
        @indent -= 1
      end
    else
      g_iv.instance_variables.sort.each do |iv2|
        self.write_object(iv2, g_iv.instance_variable_get(iv2), f)
        @indent -= 1
      end
    end
  end
end

Just use:
ReadMaprvdata.write(map_id)
then check you data folder
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top