Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[VX] Custom Commands

Dargor I'm trying to add omega7's Achievements to the customs command so that it comes up in the main menu. I tried to put it in the update command selection but I don't know how.

Here is Omega7's Achievements Module
# ===========================================================================
# Achievements System Script by Omegas7.
# ===========================================================================
# Version: 2.0.
# Possibly final version, functional.
# ===========================================================================
# Author: Omegas7.
# Exclusive script for: http://www.myrpgmaker.com
# Platform: RPG Maker VX.
# ===========================================================================
#
# New to version 2.0:
# Set complete achievements icon.
# Set incomplete achievements icon.
# Window showing the total achievements done.
#
# ===========================================================================


# ===========================================================================
# Module, here you may edit the achievements here.
# ===========================================================================

module OMEGAS7_ACHIEVEMENTS

# Achievents Icons ID when incomplete.
ICON_INCOMPLETE = 87

# Achievents Icons ID when complete.
ICON_COMPLETE = 86

# Achievements Icons spaces before the achievements names.
# Default 3 (3 spaces).
ICON_SPACE_LEVEL = 3

# Achievements Names, separated by commas.
ACHIEVEMENT_NAME = ["01- Super Love.","02- Super Hate.","03- Amazing Chest."]

# Achievements Done Switches ID, sperated by commas.
ACHIEVEMENT_SWITCH = [1,2,3]


ACHIEVEMENT_INFO = [] # <--- Don't edit this.

# Achievements Information/Descriptions.
# ACHIEVEMENT_INFO[N] = [Text Lines]
# N is the Achievement ID, counting from 0.
# The text lines, each separated by a comma.

ACHIEVEMENT_INFO[0] = [
"There is a pretty green haired girl.",
"I bet I could make her love me",
"easily."
]

ACHIEVEMENT_INFO[1] = [
"I bet I could make that green",
"haired girl hate me."
]

ACHIEVEMENT_INFO[2] = [
"There is a quite interesting red,",
"chest wonder what's in it?"
]

end

# ===========================================================================
# End of module.
# ===========================================================================

class Omegas_Achievements_Scene < Scene_Base

include OMEGAS7_ACHIEVEMENTS

def initialize
create_values
create_commands
create_info
create_info_window
end

def start
create_menu_background
end

def create_values
@names = []
@switches = ACHIEVEMENT_SWITCH
@info = []
@info_2 = []
end

def create_commands
for i in 0...ACHIEVEMENT_NAME.size
if $game_switches[@switches] == true
@names = ACHIEVEMENT_NAME.to_s
else
@names = "???"
end
end
@command_window = Window_Command_Ach.new(200,@names)
@command_window.height = 316
end

def update
@command_window.update
@info_2 = @info[@command_window.index]
@info_window.update(@info_2)

if Input.trigger?(Input::B)
@command_window.dispose
@info_window.dispose
@info_window_2.dispose
$scene = Scene_Map.new
end

end

def create_info
for i in 0...ACHIEVEMENT_INFO.size
if $game_switches[@switches] == true
@info = ACHIEVEMENT_INFO
else
@info = ["Unknown Information."]
end
end
end

def create_info_window
@info_window = Omegas7_Achievement_Info.new
@info_window_2 = Omegas7_Achievement_Info_2.new
end

end


class Omegas7_Achievement_Info < Window_Base
def initialize
super(200,0,544 - 200,316)
@info = [""]
refresh
end
def refresh
self.contents.clear
for i in 0...@info.size
self.contents.draw_text(0,i * 28,self.width,28,@info.to_s)
end
end
def update(info)
if @info != info
@info = info
refresh
end
end
end

class Omegas7_Achievement_Info_2 < Window_Base

include OMEGAS7_ACHIEVEMENTS

def initialize
super(0,316,544,100)
@complete = 0
refresh
end

def refresh
for i in 0..ACHIEVEMENT_NAME.size
if $game_switches[ACHIEVEMENT_SWITCH.to_i] == true
@complete += 1
end
end
self.contents.clear
self.contents.draw_text(0,0,544,50,"Complete Achievements: " + @complete.to_s + " / " + ACHIEVEMENT_NAME.size.to_s)
end

end


class Window_Command_Ach < Window_Selectable

include OMEGAS7_ACHIEVEMENTS

attr_reader :commands

def initialize(width, commands, column_max = 1, row_max = 0, spacing = 32)
if row_max == 0
row_max = (commands.size + column_max - 1) / column_max
end
super(0, 0, width, row_max * WLH + 32, spacing)
@commands = commands
@item_max = commands.size
@column_max = column_max
@spaces = ICON_SPACE_LEVEL.to_i
@spaces_text = ""
@done = []

for i in 0...@spaces
@spaces_text += " "
end

for i in 0..ACHIEVEMENT_NAME.size
if $game_switches[ACHIEVEMENT_SWITCH.to_i] == true
@done = true
else
@done = false
end
end

refresh
self.index = 0
end

def refresh
self.contents.clear
for i in 0...@item_max
draw_item(i)
end
end

def draw_item(index, enabled = true)
rect = item_rect(index)
rect.x += 4
rect.width -= 8
self.contents.clear_rect(rect)
self.contents.font.color = normal_color
self.contents.font.color.alpha = enabled ? 255 : 128
self.contents.draw_text(rect, @spaces_text.to_s + @commands[index])
if @done[index] == true
draw_icon(ICON_COMPLETE.to_i,0,rect.y)
else
draw_icon(ICON_INCOMPLETE.to_i,0,rect.y)
end

end
end
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
def create_command_window
commands = $game_system.menu_commands
index = commands.index(Vocab::save)
$game_system.add_menu_command(index, Vocab::Achievements)
dargor_vx_cmcbestiary_menu_create_command_window
end
#--------------------------------------------------------------------------
# * Update Command Selection
#--------------------------------------------------------------------------
def update_command_selection
dargor_vx_cmcbestiary_menu_update_command_selection
command = @command_window.selection
if Input.trigger?(Input::C)
case @command_window.selection
when Vocab::Achievements
$scene = Omegas_Achievements_Scene.new(true)
end
end
end
 
You can take a look at other custom menu commands I posted here on in other scripts like my bestiary. All you need is to basicaly replace Scene_Whatever.new by the desired scene.

If it's too complicated for you I can make a CMC for Omega7's script.
 
Hey Dargor,

Just checking to see if you have taken a look into my little "Quit" problem that I mentioned back on your Party Changer thread. No rush on it because it is the least of my worry's about my game. I just know that I want to fix that before I finish it, which won't be for about a year or so.
 
Dargor":ftqmo806 said:
No unfortunately, I didn't had the time to work on rpg maker in the past 2 weeks :(
I'm very busy with work and other things.

It's alright I know how it is. I haven't opened up the program in about that long myself. I have been busy trying to catch up and finish out my last few weeks of this college semester strong.

I was just posting here because my problem is a little more related here than it is in the Party Changer. Thanks for all the help and your support by the way. Just take your time man. I'm a real patient guy. Heck, who knows, I might even be able to spot the problem myself once summer rolls around and I have more time on my hands to really dive into the code.
 
Uhh, I need a little help finding where to put this script, I know it kind of tells in the first post, but I'm having a hard time understand. Could someone help please?
 
The place you need to put this script is at the top of your Materials list. It must be below the word "Materials", but above all the other custom scripts you are using. In other words, it must be the first script under the "Materials" section in your script list.

Here is an an example of my Script Screen...

j5i70y.png
 
Titan Strife":213g1mwm said:
The place you need to put this script is at the top of your Materials list. It must be below the word "Materials", but above all the other custom scripts you are using. In other words, it must be the first script under the "Materials" section in your script list.

Here is an an example of my Script Screen...

j5i70y.png


Thanks, I kind of already found that out on another forum.
But I have a problem with battling now.

weirdss1.png


weirdss2.png


weirdss3.png

Each of my characters have different names for each battle command, and some don't have icons by them.

And this.

weirdss4.png

They all have this one at the bottom, it doesn't nothing. Anyway to fix this?
 
This is because of the custom commands script, these are test to show you can have different names for the same command. Can you list all the custom scripts you are using?
As I can see in your last screenshot, you are probably using my skill subsets script too.
 
Dargor":bspcbh6c said:
This is because of the custom commands script, these are test to show you can have different names for the same command. Can you list all the custom scripts you are using?
As I can see in your last screenshot, you are probably using my skill subsets script too.

I'm only using the Custom Command and the Party Changer script you made.

And skill subset? I didn't put that one in. D:
 
OK, I saw the "Black" command and thought it was a custom battle command I made.
So you only have these 2 custom scripts? If so, placing them the way Titan Strife showed you should do the trick.

But, can you be more precise about the error? What's the name/kind of the error, the error occures at which line of which script?
 
Dargor":34m5jtud said:
OK, I saw the "Black" command and thought it was a custom battle command I made.
So you only have these 2 custom scripts? If so, placing them the way Titan Strife showed you should do the trick.

But, can you be more precise about the error? What's the name/kind of the error, the error occures at which line of which script?

I do have them that way, and I 'm not getting an error from this, or are you talking about the one I posted in your other thread?
 
I have added a link to the Achievements menu but I can't seem to add a icon.
I have added a Vocab::Achievements => 149, to the list of icons but it comes up with a error.
 
Hey Dargor! I have both your custom command and bestiary scripts in my game, but im having difficulty adding omega7's Achievements to show in the main menu..

(amazing scripts and i love the icons with command names btw!!)

I would like the main menu to show:
item
skill
equip
status
Bestiary
Quest Journal
save
game_end

I think they both use the s5 slot, as it makes your bestiary command disappear...i've tried for a few days trying to get around it, but i have literally no scripting ability and I always make an error appear in custom commands!

Any help would be gratefully received!
 
Man I've been away from this site for awhile, lost all of my bookmarked websites and links.

Anyway, just stopping by to check up and see if you've made any progress with the problem I was encountering a few months ago Dargor. Again, it was nothing major, just a small nuisance I encountered.
 
I've been keeping track of a lot of bugs recently but I don't have the time to fix them right now. I'll let you all know when these bugs will be fixed. ;)

Take care!
-Dargor
 
Dargor":1erz91df said:
I've been keeping track of a lot of bugs recently but I don't have the time to fix them right now. I'll let you all know when these bugs will be fixed. ;)

Take care!
-Dargor

Ok, thanks so much for working on it.
 
Dargor,

I'm just posting to let you know that I dove into the script and after a few hours of just reading through each line of code, I found a correction to the menu problem I was having. The problem was in the Party Changer script. I have the Final Fantasy IX custom menu script by BigEd781 and apparently it and your Party Changer Script don't mesh together perfectly, which is fine because they are two different scripts by two different people. Bugs are bound to occur.

Anyway, with how the FFIX menu kept messing up was because of the "Party Changer Configuration Module". The FFIX menu does not support the two menu functions of "Menu_Party_Changer" and "Menu_Party_Order". Meaning I found out that even when both of those are set to "true" they do not show up anywhere on the menu. And when you click on "Quit" and the cancel back out to the menu, the "Menu_Party_Changer" and "Menu_Party_Order" kick in and add two blank spots after the "Quit" option, making it impossible to scroll back up to the other options to select anything else without having to back out to the Map and bring back up the menu. As I said before that's not a big problem, just a tad bit tacky looking if left.

The solution I found was simply just setting both "Menu_Party_Changer" and "Menu_Party_Order" to false and my problem disappeared. It works out perfectly for me because I never wanted the player to have access to those options from the menu in the first place.

I want to thank you so much for making such awesome scripts. My game wouldn't function right with out them. I just wanted to let you know all of this in case someone else encounters a similar problem as to what I did. Also to let you know of a small compatibility error with another script.

Again, thanks for everything and I look forward to anything else you come up with in the future.

-Titan Strife
 
Hey, it's been a while!
I'm back with a tiny little update that fixes icon placement in horizontal command windows.

That's all!
If you have any more suggestions regarding this script, feel free to share them.

Oh and btw, I'm still investigating for other bugs mentioned before.

Take care!
-Dargor
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top