Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

2 Pages V  < 1 2  
Closed TopicStart new topic
> [Legacy] High Priority v1.1 XP/VX, Sets the Game.exe to High priority
Legacy
post Nov 5 2011, 11:23 AM
Post #21


B★RS Coding Ninja
Group Icon

Group: Global Mod
Posts: 1,414
Type: Scripter
RM Skill: Advanced
Rev Points: 15




The script has the same functionality as if you where to manually set it, just saves the hassle of opening up task manager and doing it manually.


__________________________
Freelance Programmer (C#, C++, Ruby)
#onegameamonth


Have you seen the new Unity3D sections?..
Unity 3D Discussion
Unity Script Development
Unity Projects
Go to the top of the page
 
+Quote Post
   
HellFencer
post Nov 8 2011, 07:13 AM
Post #22


Level 1
Group Icon

Group: Member
Posts: 11
Type: Developer
RM Skill: Skilled




Nice code guys! I'm going to save it for the chance I have lag in later maps (or this one I'm currently working on once I'm done).

I noticed that the read function to open the game.ini is extremely similar to, say , PHP. Just an observation there. Is it also possible then to use a script to read and write to a file, just by changing the r to a w (I think that's the syntax)? I'm not sure if this is useful or not, but I always like the idea of being able to save... something... to a text file for later use.


__________________________
Busy busy busy... Father, band member, rpg developer, song writer, fiction writer, full-time job... phew!!

Currently working on Savage for RPG Maker VX. See profile for details.
Go to the top of the page
 
+Quote Post
   
Night_Runner
post Nov 9 2011, 01:08 AM
Post #23


Level 50
Group Icon

Group: +Gold Member
Posts: 1,520
Type: Scripter
RM Skill: Undisclosed




Of course it's possible, but that's getting off topic.

Explanation


Source 1: Ruby File
Source 2 Ruby IO

Use Ruby File for opening/closing the file, as if you were the Explorer.exe
Use Ruby IO for editing the file, as if you were notepad

So to make a file
CODE
if not File.exists?("Hello_World.txt")
  file = File.new("Hello_World.txt", "w")
  file.write("Starting\n")
  file.close
end


Appending
CODE
if File.exists?("Hello_World.txt")
  file = File.new("Hello_World.txt", "a")
  file.write("Beaten Dungeon 1\n")
  file.close
end


Reading
CODE
if File.exists?("Hello_World.txt")
  file = File.new("Hello_World.txt", "r")
  @file_text = file.read
  file.close
end
p @file_text
p @file_text.include?("Beaten Dungeon")


Or something like that happy.gif


Moderator Time
If you have any future questions about RGSS or ruby, our rules say that asking about it here counts as Unsolicited Spam, so I recommend asking in the RGSS Script Support smile.gif


__________________________
K.I.S.S.
Want help with your scripting problems? Upload a demo! Or at the very least; provide links to the scripts in question.

Most important guide ever: Newbie's Guide to Switches
Go to the top of the page
 
+Quote Post
   
HellFencer
post Nov 9 2011, 01:39 PM
Post #24


Level 1
Group Icon

Group: Member
Posts: 11
Type: Developer
RM Skill: Skilled




Okay, I'll direct further questions there, thanks, but this IS the RGSS section, so I figured it was cool to, y'know, talk about RGSS scripts.


__________________________
Busy busy busy... Father, band member, rpg developer, song writer, fiction writer, full-time job... phew!!

Currently working on Savage for RPG Maker VX. See profile for details.
Go to the top of the page
 
+Quote Post
   

2 Pages V  < 1 2
Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 19th May 2013 - 10:50 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker