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.

Reading scripts rxdata with external script

I was wondering if exist a created ruby script that can read scripts.rxdata and convert into .rb files.

Just using marshall load or file open with it, wont work, no? They protected it or not?
 

Zeriab

Sponsor

Scripts.rxdata is just marshalled data, yes.
More precisely it's a marshalled array where each element corresponds to a section in the script editor.
A section is an array of the [number, title, compressed_code] form:
  • Number - I don't know what the purpose of this is.
  • Title - The title of the section as a string
  • Compressed_code - The compressed contents. Use Zlib::Inflate.inflate to decompress

I think I made a script which does what you want somewhere in the RMXP Scripter's Edition forum.

*hugs*
 
My guess (which is more than a guess :P) is that "number" is some sort of ID.

When working on the script editor of my FF6 SDK, I found that if you copy [number, title, compressed_code] somewhere else in your array and change only "compressed_code", your code will be changed in every scripts with the same "number". I've discovered this when implementing copy/paste functions to the editor.

This "number" is a big one and I don't know why. Changing it makes your entry uniq.
To fix this in my editor, I simply randomize a new number for my newly copied script, but I'm not sure if it's the right way to do it...
 
Im looking to edit ruby rgss scripts with better tools. The idea will be to create two ruby scripts: one that extract and copy rxdata and other that saves all .rb in a folder to rxdata.

My problem now is that error: incompatible marshal file format
version 4.8 req , 83:39 given
 

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