Does anyone have any good recommendations for where I can learn coding for XP? Or related resources?

I've been working on a game for about a year now on RPG Maker XP, all the basic assets and event codes are in and the game is mostly playable from start to finish.

Now that the basic things are in, I'm looking to make customized code (likely through scripting) for the following things:
  1. A custom text box with "typing" text similar to undertale or omori, built with custom audio for each letter as it appears on screen and pauses in the middle of text at certain times using XP's frames function.
  2. A simplified menu only with access to items and nothing else (not armor, party, saving, or any of the other default menu things, which I intend to be accessed by other means and not the menu.)
  3. A simplified save menu separate from the default menu. I want the menu to display the player's current location and game time. The menu should only be able to save the game and exit the save menu, whereas save files can only be accessed from the game's start menu.
Are there any resources available that can help me learn how to code for the specific things that I listed? Anything works, such as videos, websites/blogs, or even pieces of small advice that anyone here can give me. I have next to no knowledge of RPG Maker XP's type of coding aside from knowing it's somewhat similar to java code (which I know more of).

I should also note that this game is planned to be published commercially, which is why it would be easier to make the code myself instead of using code already made by others for obvious reasons. I also don't have the funds to cover someone else's work for a commercial project, so coding it myself is the easiest option here.

I think I wrote everything I could here to the best of my ability, but please let me know if you have any questions or need more details about anything.
miezew said:
I also don't have the funds to cover someone else's work for a commercial project, so coding it myself is the easiest option here.

For a newcomer, that's not the easiest thing to do. 🤣

The first step would be to learn the difference between $global, @@class, @instance and local variables plus CONSTANTS or Constants. This part is pure Ruby so you can find guides online that can help you with this. That's also valid for using if or unless or case conditional statements and defining a class or a module and def a method inside any of them and how to access them. Also learn about Strings with single or double quotes, they're not treated the same way. :awink:

OK, let's say you're used to craft some simple scripts at this point. You need to learn how to create windows and sprites. This means you have to take a look at the Window and Sprite classes. The help file includes a list of methods they include but no actual code because it's written in C/C++. (RPG::Sprite does offer several lines of Ruby code.) Later you can take a look at how Window_Base and Window_Selectable work, this is also valid for Sprite_Character or Sprite_Battler.
I should also note that this game is planned to be published commercially, which is why it would be easier to make the code myself instead of using code already made by others for obvious reasons.
It's not obvious - why? Have you come across scripts you want to use and they aren't free for commercial use?
It's not obvious - why? Have you come across scripts you want to use and they aren't free for commercial use?
Looking back at what I wrote yesterday, I apologize, it wasn't as obvious in writing as I initially thought and probably should have clarified better😅

But yes, there are scripts I've come across that were either not free for commercial use, or the person who made the script is hard to contact about permissions for commercial projects. It's why I feel it would be "easier" to do it myself instead of running into those complications. I know it's not actually going to be easy to learn, but it's the best solution I feel I can rely on more comfortably.

What I was hoping for in this thread was for people to recommend places I can either learn from or general resources that could help.

For a newcomer, that's not the easiest thing to do. 🤣

The first step would be to learn the difference between $global, @@class, @instance and local variables plus CONSTANTS or Constants. This part is pure Ruby so you can find guides online that can help you with this. That's also valid for using if or unless or case conditional statements and defining a class or a module and def a method inside any of them and how to access them. Also learn about Strings with single or double quotes, they're not treated the same way. :awink:

OK, let's say you're used to craft some simple scripts at this point. You need to learn how to create windows and sprites. This means you have to take a look at the Window and Sprite classes. The help file includes a list of methods they include but no actual code because it's written in C/C++. (RPG::Sprite does offer several lines of Ruby code.) Later you can take a look at how Window_Base and Window_Selectable work, this is also valid for Sprite_Character or Sprite_Battler.
Thanks, I'll definitely take a look at those!

I've moved this thread to Learning Ruby and RGSSx. Thank you.

Use CONSTANT or THIS_CONSTANT for permanent values.
Constants or This_Constant or AnotherConstant are used as class or module names.

NOTE: Both classes and modules are different types of containers. They're made of methods and possibly some CONSTANTS as well. These CONSTANTS should be defined right after defining a class or module.

If you need to make copies of something, called an object in Ruby, use a class. Otherwise, just create or modify a module.

Classes and modules are defined once, but can be reopened as many times as deemed necessary.

Define a module:
Ruby:
module MyModule
  MY_CONSTANT = 0
  # A comment, just ignore me.
end

Define a custom class:
Ruby:
class MyClass
  # This is a comment, and will get ignored
end

A class like the one above has a default parent class: Object.
Sometimes you need to set a different parent class like the default script Window_Selectable.

Ruby:
class Window_Selectable < Window_Base
  # Many lines of code here
end

In case we are dealing with a modification of a default script, we don't need to remind Ruby of its parent class.

Ruby:
class Window_Selectable
  def custom_print
    print "Hello!"
  end
end

What I did there was to reopen the existing Window_Selectable class and add a method called custom_print that includes a call to print and it will display a popup window, a very useful tool for debugging.

Modules have no custom parent class, it will always be Object.

I could also mention stuff about nesting classes or modules or classes inside modules, but that's a conversation we shouldn't hold until later on. :awink:
What I was hoping for in this thread was for people to recommend places I can either learn from or general resources that could help.
Look up Ruby tutorials. A few pages of them come up when I Google it; pick one (or more) and go through them.

When you understand the syntax of the language and how data structures are constructed and such, that's what kyonides is talking about in the prior post. Then you'll be able to look at XP's material and understand what it says.

Original thread: https://forums.rpgmakerweb.com/threads/does-anyone-have-any-good-recommendations-for-where-i-can-learn-coding-for-xp-or-related-resources.172787/