Any way to read/write a txt file and make it affect the game?

I want to be able to edit a txt file ingame and then have a condition depending on whats in the txt file.

Anyway to edit a txt file in vx ace?

(Sorry if this may be the wrong place to put this im kind of new here.)
You can do whatever you want to in a text file, but you will require a script to read it at the appropriate times and change the game accordingly.


If that's what you want to do, you will need to make a new thread in RGSS3 Script Requests and specify EXACTLY what you want to do (I am working on the assumption that you will need someone else to make the script for you)
Yea of course! I have a script that will allow the player to skip the intro if they have already seen it using a txt file in the game folder.
Yea of course! I have a script that will allow the player to skip the intro if they have already seen it using a txt file in the game folder.
Cool :0 where can i find it?
Dek wrote it for me some months ago.... if I remember correctly, he even cold wrote it on his mobile or something, pretty impressive

Code:
module GlobalSaveData  # Filename constant - set to whatever:  FILENAME = "Introstring.txt"   # GlobalSaveData::read_file  def self.read_file    save_file(nil) unless FileTest::exist?(FILENAME)    Marshal::load(File::open(FILENAME,'rb')::read)  end  # GlobalSaveData::save_file(data)  def self.save_file(data)    File::open(FILENAME,'wb'){|file| Marshal::dump(data,file)}  end  # GlobalSaveData::test_print  def self.test_print    puts "TEST PRINT: %s" % read_file  end  # End Moduleend
Dek wrote it for me some months ago.... if I remember correctly, he even cold wrote it on his mobile or something, pretty impressive

module GlobalSaveData  # Filename constant - set to whatever:  FILENAME = "Introstring.txt"   # GlobalSaveData::read_file  def self.read_file    save_file(nil) unless FileTest::exist?(FILENAME)    Marshal::load(File:😮pen(FILENAME,'rb')::read)  end  # GlobalSaveData::save_file(data)  def self.save_file(data)    File:😮pen(FILENAME,'wb'){|file| Marshal::dump(data,file)}  end  # GlobalSaveData::test_print  def self.test_print    puts "TEST PRINT: %s" % read_file  end  # End Moduleend
Im not exactly a pro at this stuff, can you give me an example on how i could use this?
Well I have to admit you have got me pretty confused at this point. You began by asking whether or not you could edit a txt file ingame. The answer is clearly yes. Then you asked for my script that I had mentioned. Now you're asking how to use it. How did we get from the there to here? 🙂 This couldn't have been your intention barring some clairvoyance!

I'm not the best in explaining how this works seeing as this was made for me, but if I remember correctly, you use this script to modify "GlobalSaveData" with the following scriptcall:

GlobalSaveData::save_file(1)Once you do this, it will overwrite the txt file to return a "true" or a "1" (again, i am only going from memory, I dont know anything about Ruby)

Then on my starting screen after New Game has been selected, I assign a local variable to GlobalSaveData (keep in mind you have to change "varID" to the ID of the variable you are intending to use.

$game_variables[varID] =GlobalSaveData::read_fileAnd then I run a conditional branch checking for a "true" or a "1" and if it is found, i skip the intro.
Well I have to admit you have got me pretty confused at this point. You began by asking whether or not you could edit a txt file ingame. The answer is clearly yes. Then you asked for my script that I had mentioned. Now you're asking how to use it. How did we get from the there to here? 🙂 This couldn't have been your intention barring some clairvoyance!

I'm not the best in explaining how this works seeing as this was made for me, but if I remember correctly, you use this script to modify "GlobalSaveData" with the following scriptcall:

GlobalSaveData::save_file(1)Once you do this, it will overwrite the txt file to return a "true" or a "1" (again, i am only going from memory, I dont know anything about Ruby)

Then on my starting screen after New Game has been selected, I assign a local variable to GlobalSaveData (keep in mind you have to change "varID" to the ID of the variable you are intending to use.

$game_variables[varID] =GlobalSaveData::read_fileAnd then I run a conditional branch checking for a "true" or a "1" and if it is found, i skip the intro.
Thanks. Sorry for any trouble, im just new to this stuff is all. 
You also could use a unused Hero in the Database and than use the Change Hero Name command ingame.

after that make conditional branch about that heroes name. With some rgss3 commands you maybe able to advance the whole stuff.

Or its ok like it is.
I just tested this out and it works! Thanks for the help guys.
Hi
Someone can help me
Can anyone create a new Cryptotab script?
I have used several scripts so far but all of them were inactive and out of date
I will also pay for it
But after installing it, it works to make sure
Thanks
Necro-post notice: safa

You have also hijacked a completely unrelated thread for your own question.

Please post your own request in the Script or Plugin request forum, for whatever engine you are using. When you do, explain that "a new Cryptotab script" should do. Link to the ones you have tried and state what goes wrong when you try to use them.

I have removed payment reference from your post. You will be able to offer payment for scripts after you gain access to the Classifieds area, which requires at least 30 meaningful posts.

Original thread: https://forums.rpgmakerweb.com/threads/any-way-to-read-write-a-txt-file-and-make-it-affect-the-game.49790/