Neon Black

The Classy Prostitute
Veteran
Joined
Mar 17, 2012
Messages
1,149
Reaction score
377
First Language
Sarcasm
Primarily Uses
Developer Console Script V1.3




Created by Neon Black


What is it?

This script adds a developer console to your RPG Maker Ace game similar to the developer console in valve games created in the source engine. This console can be accessed by pressing the assigned key (tilde by default). With the console you can perform a number of simple functions such as checking methods or variables or performing short lines of code.

How can I use it?

I designed it with a few functions I knew I would use myself while scripting (such as "peek" which lets me see where a window is or "make" which lets me set variables). I can't really say how it will be useful for any individual use, though I plan to add a few more extra uses to it. For full information on how to use it and all current commands check the user manual on my blog-in-progress here.

What does it look like?

oQ283.png
What does it work with?

Technically it should work with everything, unless someone was brazen enough to modify the "Scene_Base" class. In any case, put this above all the other scripts in materials and it should work with everything. This DOES NOT mean you can OPEN it in everything. This script will actually pause the currently running scene in order to start working through some kind of forceful tactics. As always, if you notice any compatibility issues, let me know and I'll look into them.

How can I get the script?

Version 1.3 (base script, 11.15.2012) is available from my pastebin account here.

This script also requires version 1.0 or higher of the keyboard module now that I've split them. You can get that from my pastebin account here.

I would like to use this code.



This work is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License.

Permissions beyond the scope of this license may be available at http://cphouseset.wo...d-terms-of-use/.

Author's Disclaimer:

While I feel this script is really powerful, I also fear that for the most part people will find it pretty worthless. Sure it's really neat looking, but its uses are currently pretty limited if you don't really know how to use it. I do plan to add a few graphical user interfaces to it for debugging purposes, but I need to code those up first. I kinda hope I didn't disappoint anyone that was wondering what kinda console I was talking about, though I guess you can't really expect that much from me.... Or maybe I'm jumping the gun and people will find a use for this script. I guess I'll see how it goes.

I feel like saying it again. The user manual is here on my wanna-be blog. Please read it to get an idea of what it can do. I'll certainly answer any questions you might have about it. And I don't really know much else to add to it, so I'm looking for ideas. Seriously, let me know what you want, I'll try to add it.
 
Last edited by a moderator:

hyde9318

RMC Coordinator
Veteran
Joined
Apr 1, 2012
Messages
2,593
Reaction score
680
First Language
English
Primarily Uses
RMMV
Oh wow, you really came through, didnt you? This is amazingly cool. And the things I can do with this.... Oh lord.... this is going to be fun.
 

AlaiaVee

Villager
Member
Joined
Mar 14, 2012
Messages
76
Reaction score
21
First Language
English
Primarily Uses
Very nice, going to be useful for testing.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,886
First Language
English
lol I would need to see how people are using it to determine whether it's good for debugging.
 

Death10

;D
Veteran
Joined
Jul 18, 2012
Messages
30
Reaction score
6
First Language
Vietnamese
Primarily Uses
I will use this script for sure :D
 

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,504
Reaction score
731
First Language
indonesian
i want to ask you permission to mod this script.

i'm planning to mod this script to have two modes : administrator and player.

administrator have password, player also have password (shown when finishing the game so after you know the password you can start new game and use console)

if password administrator inputted. it's the same function.

but if player the command is different. i want to make some sort of input cheat code function :D . ex: type whosyourdaddy will grant immortal state to all members LOL. or greedisgood that will increase your money by 100000 :D (just some example i don't want to sued by blizzard LOL).

edit : sorry apparently i didn't read this:

I would like to use this code.

You are free to use, modify, copy and distribute this code at your own leisure and you do not need to credit me directly, however if you use this code or modify it in any way, please leave the names in the credits box at the top of the code and do not remove that section. For those wishing to use this in a commercial project, please contact me first.
 
Last edited by a moderator:

Neon Black

The Classy Prostitute
Veteran
Joined
Mar 17, 2012
Messages
1,149
Reaction score
377
First Language
Sarcasm
Primarily Uses
Sure, go ahead and modify it. Sorry, though, I'm just getting around to modifying all of my stuff this weekend; I do have a few more terms of use, but you're still free to use it. Double check my terms of use here: http://cphouseset.wo...d-terms-of-use/

It's similar, only real difference is now there is a license you have to abide by, but yeah, go ahead and make those modifications!

EDIT: I updated the terms of use saturday, and as far as I recall I changed the terms of use in the headers of all my scripts. I only haven't gotten around to editing all the topics on this site yet, that's all. Since I'm free right now, I'll do it now.
 
Last edited by a moderator:

Neon Black

The Classy Prostitute
Veteran
Joined
Mar 17, 2012
Messages
1,149
Reaction score
377
First Language
Sarcasm
Primarily Uses
UPDATE: I've updated this script to version 1.2. It doesn't really have any bugfixes and the changes are mostly for scripters. Note that this script now requires another script that I have not technically released yet, however I have linked to it in the main post right under the console script.

The main feature of this update is the ability for a scripter to easily add commands to the console. This can be done with a few simple steps.

First of all, create a method for your new command and a help method for the new command noting that the command must receive 3 arguments and the help command will not receive any. Next alias the new_console_commands method. Then within that method call the alias and use "new_command('name', :do_command, :help_command)" to tell the console where your commands are. Below is an example of how to do this.



Code:
module Console ## All methods must be in the Console module to work.
  class << self ## First we alias new_console_commands.
    alias aliased_new_console_commands new_console_commands
  end

  def self.new_console_commands
    aliased_new_console_commands ## Do the alias method first.
    new_command("world", :do_world, :help_world)
  end ## Our new command is added with "new_command"

  def self.do_world(arg1, arg2, arg3) ## This method must have 3 arguments.
    push_string("Hello world!")
  end

  def self.help_world ## And here we have the help command.
    push_string("Displays a programmers greeting.")
  end
end
Two useful command are "push_string('string')" which displays a line of string in the console window, and "show_list(list, string)" which will show the elements of "list" and finish by displaying "string" as a line of string.

Hopefully this will help the console be a little bit more useful. As always, enjoy.
 

Neon Black

The Classy Prostitute
Veteran
Joined
Mar 17, 2012
Messages
1,149
Reaction score
377
First Language
Sarcasm
Primarily Uses
Updated script from version 1.2 to 1.3. Also did a bugfix to the keyboard input script, updating it from version 1.0 to 1.0a. Here is a list of the console changes:

  • Changed how commands and help options are called. Commands are now given ALL words listed after the command as individual argument or a while string. Please ensure that custom commands use an argument method such as (*args) to receive the arguments or you will get a bug. To receive all text after the command as a single string, when setting up your command set it up in the following format:




Code:
new_command("name", :do_method, :help_method, true)
The 4th argument listed here as "true" tells the script to return all arguments as a single string rather than breaking them down into individual arguments.

  • The debug function has changed. Debug is now a separate command that will bring up a debug scene. The "Save", "Load", and "Delete" commands are now considered debug scenes. To call these, use the command "debug save" or a similar command. To bring up the old debug scene, use "debug variable" or "debug switch". To add your own debug scene, use the console command "new_debug("name", Scene_Name)".
  • Console updating has been separated from the keyboard window. This means that the console updates without the console window being open. This change should not be noticeable.
  • A new command "bitsize" has been added. Bitsize will check the length of the following string in pixels. It's syntax is "bittype This string's size is determined".
  • The skip title screen function has been changed. It will now open the load menu if any save files are found. Closing the load menu will start a new game. This option is only available in test play.
  • Pressing "up" will copy the last command you used into the console input box. This will allow you to use the same command several times in a row to test something if needed. Useful for debug menus and "peek".
  • Other numerous small bugfixes.

For any scripter who wants to make their own add on functions, there have been some changes to commands. Here are 4 main commands to allow data to be displayed in the console:

  • push_string(string) - Displays "string" as a line of text in the console.
  • push_space - Inserts a blank line into the console.
  • push_wrap_string(string) - Takes the entire string sent to it and places it into as many lines as are required to keep the text at normal size. This is pretty much "push_string" with word wrap.
  • push_list(list, string) - Displays each element of "list" and lists them for the user in the console, pausing at the end of a full screen of items. After all items have been displayed, "string" is displayed.
  • pause - Pauses the console and waits for user input.
 
Last edited by a moderator:

Mudgrunt

Veteran
Veteran
Joined
May 24, 2012
Messages
34
Reaction score
0
Primarily Uses
What key is kTILDE? Whenever i change it to the C key or something it dosnt work...
 

Neon Black

The Classy Prostitute
Veteran
Joined
Mar 17, 2012
Messages
1,149
Reaction score
377
First Language
Sarcasm
Primarily Uses
"kTILDE" is an identifier for the keyboard script. If you would like to use another key, check the keyboard script for the names of the keys. They all start with ":k", so if you wanted to set it to the C key, you would need to use :kC. However, I don't recommend using any letters, number, spacebar, enter, or backspace since they are needed for typing and you would end up closing the console once you pressed those keys.
 

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,504
Reaction score
731
First Language
indonesian
kTILDE is ~

(that key located left of '1' and above 'tab'. but the '1' is not the one in numpad)

hope that helps
 

Neon Black

The Classy Prostitute
Veteran
Joined
Mar 17, 2012
Messages
1,149
Reaction score
377
First Language
Sarcasm
Primarily Uses
Oh, yeah, I guess that could have been that question, too. Sorry, not use to such simple questions. =x
 
Joined
Feb 8, 2014
Messages
2
Reaction score
0
First Language
English
Hey I get this error:

Script 'Console' line 649: NameError occurred

uninitialized constant Console::Keyboard

Please help!
 

Gamer_Shy

Villager
Member
Joined
Aug 4, 2014
Messages
13
Reaction score
1
First Language
English
Primarily Uses
So, having an issue.
Script: 'Dev Console' line 343 NoMethodError occurred
undefined method 'open?' for nil:NilClass
I don't know if this is being caused by anothr script I have or not. But it's a lil bit... annoying.
 

Latest Threads

Latest Posts

Latest Profile Posts

The new Dune movie reminds me of the game Dune 2 made by Westwood. A quality product on its own, but extremely disloyal to its source of inspiration.
Terrible Writing Advice, you've done it again.
1635026211997.png
Feeling like my new profile picture is nice. Thinking of making it semi-permanent, does any one has an opinion? Does it look too evil or does it work as a public profile picture? :)
Bishiba.png
My washing machine is a supernatural being. I lost a piece of clothing in there a month ago; searched up and down, inside other clothes, nothing. It just vanished.
Today, put in a new load. When I pull it out, the missing clothing is back! And a sock was sacrificed in the process :yswt2:

Forum statistics

Threads
116,031
Messages
1,095,108
Members
151,362
Latest member
Haniel_Sword
Top