Defining a vocab (complete noob question)

galun

Villager
Member
Joined
Jul 21, 2015
Messages
11
Reaction score
1
Primarily Uses
So, I'm trying to add a new option to the main menu, and I don't really know what I'm doing. I found a tutorial but I think that must be for an older version of rpgmaker. So far I've done this.

In Window_MenuCommand

 def add_internet_command

    add_command(Vocab::internet, :internet, internet_enabled)

  end
In Scene_Menu

  def command_internet

    SceneManager.call(Scene_Internet)

  end
Created Scene_Internet (basically a copy of Scene_Status)

#==============================================================================

# ** Scene_Internet

#------------------------------------------------------------------------------

#  This class performs the internet screen processing.

#==============================================================================

 

class Scene_Internet < Scene_MenuBase

  #--------------------------------------------------------------------------

  # * Start Processing

  #--------------------------------------------------------------------------

  def start

    super

    @status_window = Window_Status.new(@actor)

    @status_window.set_handler:)cancel,   method:)return_scene))

    @status_window.set_handler:)pagedown, method:)next_actor))

    @status_window.set_handler:)pageup,   method:)prev_actor))

  end

  #--------------------------------------------------------------------------

  # * Change Actors

  #--------------------------------------------------------------------------

  def on_actor_change

    @status_window.actor = @actor

    @status_window.activate

  end

end

 
The problem I'm having is with the Window_MenuCommand part saying it can't find the vocab, and I don't know how to define a new vocab or even exactly what it is. In the tutorial I was looking at it said something about defining a internet.new thing, but I don't see anything.new in any of the scripts so I assume that's outdated info. Someone else said I didn't need to have the vocab part in there at all, that I can just call stuff directly. So I assume the vocab means vocabulary and is a way to "shortcut" scripts? Anyway, if anyone could guide me to some info about how to properly do this that would be great.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,425
Reaction score
7,710
First Language
German
Primarily Uses
RMMV
Scripts is for completed scripts, not this. I think the best option for this would be "learning RGSS" as that's what you appearently trying to do.

I've moved this thread to Learning Ruby and RGSS. Please be sure to post your threads in the correct forum next time. Thank you.

A vocab is a text you define for display - in that case you wanted to use a vocab in the very first add_command line. You either have to define the vocab you're trying to use there, or use a direct string instead of a vocab.

However, could you explain what you're trying to do?

Adding real internet functionality is one of the most complex tasks possible - after several years of Ace scripting, there are one or two scripts done by very experienced scripters that manage a basic internet access - it is nothing a new programmer can achieve.
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,517
Reaction score
3,221
First Language
Binary
Primarily Uses
RMMZ
Scene_Internet huh? Whats that all about? :p
 

Kai Monkey

Veteran
Veteran
Joined
Apr 3, 2012
Messages
166
Reaction score
119
First Language
RGSS3
Primarily Uses
Hey ♫

You can replace Vocab::internet with "Internet" (with the quotes) it it should work perfectly. 

The Vocab variables are just Strings (A datatype used for storing strings) which are all kept in one place called "Vocab", but you don't need to add you're string in there for your script to work. You can just "hard code" the string which will be used as the label.

I hope this helps

/Kai

EDIT: If you actually wanted to put your variable in the Vocab section, you could add it in Vocab class (The first script in the list), but there is really no advantage to doing so.

Finally, it looks like you are making changes to the built in scripts themselves, rather than making your changes all in scripts under materials. This is perfectly fine if this is exclusively for you own use, but will make it nigh-impossible to release to others.

If you have any questions, don't hesitate to ask
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.
time for a new avatar :)

Forum statistics

Threads
106,018
Messages
1,018,357
Members
137,803
Latest member
andrewcole
Top