Change Script file location

Is there a way to change the location of the file "Scripts.rvdata2" in the Data folder?
Like "Scripts.rvdata2" will be in the folder game and the game will load the data in that file from the game folder, not the folder "Data"
May I inquire as to why you want to change it?
May I inquire as to why you want to change it?
I want my game can be swap between moving with arrow and "WASD move", but I don't know how to edit the "WASD" script to turn it on/off in-game(or using switch/switches like other script) so I think if I can move the file "Scripts.rvdata2" into the folder game(and change the load location of that file, too) then I will create 2 scripts file. Depending on player's choice, they will change the name of 1 of these two file to "Scripts.rvdata2" to change the game's control.
While I have to admit I'm curious as well, you should be able to change the path if you open the "Game.ini" file in your project folder and change it there.

Edit: This would of course change the scriptset permanently and would also probably be encrypted should you choose to go that route, putting the choice out of the players reach.

Which "WASD" move script are you using by the way? This does not sound like it would necessarily be a big change.
While I have to admit I'm curious as well, you should be able to change the path if you open the "Game.ini" file in your project folder and change it there.
Oh, I didn't realise how simple it could be, but I couldn't have it done without you!
Thanks much!
I want my game can be swap between moving with arrow and "WASD move", but I don't know how to edit the "WASD" script to turn it on/off in-game(or using switch/switches like other script) so I think if I can move the file "Scripts.rvdata2" into the folder game(and change the load location of that file, too) then I will create 2 scripts file. Depending on player's choice, they will change the name of 1 of these two file to "Scripts.rvdata2" to change the game's control.

You probs better off using or request a script to swap between the two in game.
While I have to admit I'm curious as well, you should be able to change the path if you open the "Game.ini" file in your project folder and change it there.

Edit: This would of course change the scriptset permanently and would also probably be encrypted should you choose to go that route, putting the choice out of the players reach.

Which "WASD" move script are you using by the way? This does not sound like it would necessarily be a big change.
I'm using $D13x WSAD Move v1.1 (by Dekita)
Btw when I'm changing the Scripts file location, I cannot open "Game.rvproj2". It said "Failed to load script data"
You probs better off using or request a script to swap between the two in game.
I also thought about it but I could not find the script I need.
I'm using $D13x WSAD Move v1.1 (by Dekita)
Btw when I'm changing the Scripts file location, I cannot open "Game.rvproj2". It said "Failed to load script data"

yeah because your changing the location of the scripts data location, but to your project it's being told the data it needs is in it's old file location.
yeah because your changing the location of the scripts data location, but to your project it's being told the data it needs is in it's old file location.
Is there anyway to fix it?
What I would do is put it back in the original folder and start a new thread request a script to swap between arrow keys and WASD movement in game.
As Martin_Alcainess mentioned, the editor will still use the default file locations to load and save stuff.
I do not think there is an easy way to change that.

Although it is worth to keep in mind that this should only apply to the editor. If a player starts the game through "Game.exe" or if you run a play- or battle test, the game should still load the scripts as indicated in the ini file, so you could just keep the original around for convenience (or change it to throw an error if accidently used in the real game).

I could not find the particular WASD movement script in a quick search, so on top of what Martin_Arcainess suggested it might be helpful if you had a source for it still lying around (I do not know what the forum regulations are regarding sharing "lost" scripts).
Is there a script to change the location of the file "Scripts.rvdata2" in the Data folder?
Like "Scripts.rvdata2" will be in the folder game and the game will load the data in that file from the game folder or another folder in the game folder, not the folder "Data"
As Martin_Alcainess mentioned, the editor will still use the default file locations to load and save stuff.
I do not think there is an easy way to change that.

Although it is worth to keep in mind that this should only apply to the editor. If a player starts the game through "Game.exe" or if you run a play- or battle test, the game should still load the scripts as indicated in the ini file, so you could just keep the original around for convenience (or change it to throw an error if accidently used in the real game).

I could not find the particular WASD movement script in a quick search, so on top of what Martin_Arcainess suggested it might be helpful if you had a source for it still lying around (I do not know what the forum regulations are regarding sharing "lost" scripts).
Here is the source, thanks if you can help!
Assuming you want a script so players can change or swap between WASD or Arrow keys for movement?

That's what I recommended. For now, It's best to just leave the data file alone and ask for a script to change input methods between WASD and the arrow keys for movement.
changes to the script engine are the same as changes to your car engine - you can't do it while the engine is running. Or do you work on the car engine while driving 50 mph on the highway?

what you can do is install controls inside the engine to change its functions, then use control switch or control variable to trigger those changes, But that is an entirely different process.

Merged your threads together, please do not make duplicate threads for the same problem.

Spoiler: 8dir controlled by switch
Ruby:
module WSAD_Move
  #switch to turn the script on
  Turn_ON = 12
end

module Input
  class << self
    alias r2_4dir_wasd  dir4
    alias r2_8dir_wasd  dir8
  end
  #---------------------------------------------------------------------------
  # Dir4 Using $D13x Key Input
  #---------------------------------------------------------------------------
  def self.dir4
    return old_key_original_dir4 if $game_switches[WSAD_Move::Turn_ON] == false
    r2_4dir_wasd
  end
  #---------------------------------------------------------------------------
  # Dir4 using default Vx Ace Key Input
  #---------------------------------------------------------------------------
  def self.old_key_original_dir4
    return 2 if Input.press?(:DOWN)
    return 4 if Input.press?(:LEFT)
    return 6 if Input.press?(:RIGHT)
    return 8 if Input.press?(:UP)
    return 0
  end
  #---------------------------------------------------------------------------
  # Dir8 using $D13x Key Input
  #---------------------------------------------------------------------------
  def self.dir8
    return old_key_original_dir8 if $game_switches[WSAD_Move::Turn_ON] == false
    r2_8dir_wasd
  end
  #---------------------------------------------------------------------------
  # Dir8 using default Vx Ace Key Input
  #---------------------------------------------------------------------------
  def self.old_key_original_dir8
    d = Input.press?(:DOWN)
    l = Input.press?(:LEFT)
    r = Input.press?(:RIGHT)
    u = Input.press?(:UP)
    return 1 if d && l
    return 3 if d && r
    return 7 if u && l
    return 9 if u && r
    return 2 if d
    return 4 if l
    return 6 if r
    return 8 if u
    return 0
  end
 
end
@Roninator2 Don't want to be that person, but since Dekita requests in the header that their script should not be reposted, maybe you could extract your changes into an add-on instead so it can stay up here?

---

Edit: [Deleted a misremembed feature]
Don't want to be that person, but since Dekita requests in the header that their script should not be reposted, maybe you could extract your changes into an add-on instead so it can stay up here?
thanks, totally missed that.
Although I do believe most scripters didn't want their stuff reposted because they were still active scripters, but basically everybody has moved off vx ace, so in my mind everything is irrelevant, but yes we still have to obey previous rules.

Original thread: https://forums.rpgmakerweb.com/threads/change-script-file-location.170828/