Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
lolidk

Where exactly do I add new scripts?

Question

I know how to use the RPG Maker program pretty easily, but I'm lost when it comes to scripts. When I look in help forums for certain scripts, I'll find the script I need, but I have no idea where to put them, it just says "add this code to your script." Am I supposed to insert a new blank space and put it in? Put it in the Main script? Somewhere in Cocoa's UMS?

 

Example:

Font.default_name = "font name"
Font.default_size = 14

I don't know where to put it.

 

Same with 

#====================================================== 
#Kingboo_12's Item Only Menu 
#Features: Allows four(4) sections that replace the item menu. It has Items, 
#Key Items, Save, and the end game option. Edit if you want. Just be careful. 
#This is best used for Survival-Horror games. 
#-------------------------------------------------------------------------------------- 
#Do not edit any of the script. It may cause computer malfunction or rmvxa 
#failure. 
#====================================================== 

class Window_ItemCommand < Window_ItemCategory 
#-------------------------------------------------- 
#*Create Command List 
#-------------------------------------------------- 
def make_command_list 
add_command(Vocab::item, :item) 
add_command(Vocab::key_item, :key_item) 
add_command(Vocab::save, :save) 
add_command(Vocab::game_end :game_end 
end 
#-------------------------------------------------- 
#Get Activation State of Save 
#-------------------------------------------------- 
def save_enabled 
!$game_system.save_disabled 
end 
end 

#================================= 
#**Scene_Item 
#================================= 

class Scene_Item < Scene_ItemBase 
#-------------------------------------------------- 
#Frame Update 
#-------------------------------------------------- 
def update 
super 
return on_cancel if Input.trigger?(:B) 
end 
#-------------------------------------------------- 
#Create Category Window 
#-------------------------------------------------- 
def create_category_window 
@category_window = Window_ItemCommand.new 
@category_window.viewport = @viewport 
@category_window.help_window = @help_window 
@category_window.y = @help_window.height 
@category_window.set_handler(:ok, method(:on_category_ok)) 
end 
#-------------------------------------------------- 
#Cancel 
#-------------------------------------------------- 
def on_cancel 
Sound.play_cancel 
return_scene 
end 
#-------------------------------------------------- 
#**Category 
#-------------------------------------------------- 
def on_category_ok 
case @category_window.current_symbol 
when :item, :key_item 
@item_window.activate 
@item_window.select_last 
when :save 
SceneManager.call(Scene_Save) 
when :game_end 
SceneManager.call(Scene_End) 
end 
end 
end 
#================================= 
#End of File 
#=================================

If someone could explain where I'm supposed to put custom scripts (especially the small ones, like Ex. 1) I would be very grateful.

 

Thanks!

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

http://bigaceworld.wordpress.com/tutorials/how-to-insert-a-script/

 

and yes the first one can be in its own space as long as its above main.

 

Thank you --- but the second example keeps giving me a "Syntax Error line 20" message when I put it in (above Main). That happened with another Items Only script I tried using, only with a different number. Any idea why it keeps doing this?

Share this post


Link to post
Share on other sites
  • 0

on line 19, your missing an parentheses at the end of the line. 

Share this post


Link to post
Share on other sites
  • 0

yea i cut and pasted it to take a quick look and on your line

 

add_command(Vocab::game_end :game_end

 

should actually be 

 

 

add_command(Vocab::game_end :game_end)

                                                               

Notice the extra Punctuation that the programming language requires you to have

(the game is scripted in C++)

Edited by wuggles57

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...