Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Jaiden

1
RMXP Script Database / [XP] Extra Fogs & Panorama Lock
October 22, 2019, 01:27:01 pm
Extra Fogs & Panorama Lock
Authors: Jaiden
Version: 1.0
Type: Mapping Enhancement
Key Term: Environment Add-on

Introduction

This is a script that I've used to enhance XP's mapping even further. It allows for an additional fog that is exclusive to the map ID instead of the tileset, plus an additional two fogs: one drawn as a "lightmap" to add lighting effects and one drawn as a "parallax" (like RMVXA's parallax mapping) to add additional little details to the map like vegetation, etc.

Lastly, there is an option to lock the panorama (background image) of a map so it can also be used as a ground layer, effectively giving you two more layers to work with if you know how to drive it.

I've included a demo to help solidify the concept a bit. Note that you will still need to understand how to make parallaxes and lightmaps in GIMP/Photoshop. There are lots of tutorials on this--this script just makes it much easier to apply them.

Features

  • Allows for an additional fog, which is per map instead of per tileset
  • Allows a panorama to lock so it doesn't scroll, allowing it to be used as a ground layer
  • Designated fog for parallax/detail mapping
  • Designated fog for lighting overlay

Screenshots

Nothing to show here, just try the demo if you'd like.

Demo

https://drive.google.com/open?id=1z6Xas94VmIQca1KVA1T_BbLssb_C3l4w

Script
Hosted on Github
Place this script above main just as you would any other custom script.


Instructions

Please see the script for instructions, or check out the demo.

Compatibility

This script aliases the Spriteset_Map class. Place it above main like any other custom script.
It hasn't been extensively tested, but should otherwise play nicely with other map scripts.

Credits and Thanks

  • Game_Guy (for helping with the parallax lock)

Author's Notes

Feel free to let me know if there are any bugs. Commercial use is OK, but I would really appreciate it if you credited me (and showed me what kind of awesome game you're making with it!)

I made this script specifically for use in my game Legends of Astravia. Consider supporting it if you were happy with this script!
2
RMXP Script Database / [XP] Audio Extras
February 05, 2019, 12:15:26 pm
Audio Extras
Authors: Jaiden
Version: 1.2
Type: Game System Utility
Key Term: Misc Add-on


Introduction

This script contains a few extra audio functions, and thanks to RPG Maker XP Ace, includes a feature that was only available via RGSS3.

Note that you must have RPG Maker XP Ace installed in order to use the "Pause/Resume BGM" feature of this script.
You can get it here: https://forum.chaos-project.com/index.php/topic,12899.0.html

Otherwise, only the master volume and map volume change features will be available.



Features
  • Ability to pause and resume BGM at the position it was paused [RGSS3/XPA ONLY]
  • Master volume controls for BGM, BGS, and SE
  • Automatic BGM/BGS volume decrease when entering "houses" or any other marked map

Screenshots

Not relevant to the script.

Demo

None at this time.

Script
Hosted on Github


Instructions

Install this script above main as you would any other script.

If you create an options menu that controls the master volume, make sure this script is ABOVE that menu.

See the script for directions on how to use this script. Note that the pause and resume function will not work with MIDI (it can be used, but the MIDI will always start from the beginning).

Compatibility

This script makes modifications to the Game_System class, including re-writing the "bgm/bgs/se_play" methods. Use with caution with any other audio scripts.

As noted above, this script has a feature that will only be accessible if used with RPG Maker XP Ace. This is highly recommended.


Credits and Thanks
  • KK20, as always, for helping me make it not-garbage.


Author's Notes
I created this script for my game, Legends of Astravia, but I figured anyone else using XPA would love to have access to these functions.

I may create an options menu that goes along with this at a later time! Let me know if you run into any bugs.
3
RMXP Script Database / [XP] "Inspect" Event Animation
October 01, 2018, 11:14:56 pm
"Inspect" Event Animation
Authors: Jaiden, KK20
Version: 2.0
Type: Event Feature
Key Term: Environment Add-on

Introduction

Do you want to indicate that an event can be interacted with using a nifty animation? This is the script for you! Similar to how most games have some sort of a "press to interact" indicator, this script displays an animation when the player is facing events you've marked for "inspection".

Features

  • Easy to select which event / event page to display on
  • Animation displayed is customizable
  • Should be reasonably compatible with most scripts

Screenshots

Gif example using a custom animation:
Spoiler: ShowHide


Demo

(N/A)

Script
Hosted on Github


Instructions

Instructions are in the script, but it is as simple as putting a comment with "\inspect_event" in the event page you want the animation to display on. Note that the default animation used, "EM Exclamation" plays a sound every time it is looped. I suggest creating a new, silent animation and setting its ID in the configuration.

Compatibility

This script aliases the Game_Map, Game_Event, Game_Character and Sprite_Character classes. This will not be compatible with any scripts that heavily re-write those classes.

Credits and Thanks

  • KK20 for helping with 90% of this
  • Everyone else in the Discord server for helping out and/or dealing with my ramblings

Author's Notes

This is my first script. I figured I'd make a contribution back to Chaos Project since this community has been so helpful in my game's development. Hopefully this script treats someone else just as well!

Credit for this script isn't required, but greatly appreciated, with the exception of redistribution. If you post this script elsewhere, please link back to this original post.
4
Script Troubleshooting / [RMXP] Battlebacks
November 14, 2017, 08:05:56 pm
All set on this now, but I'll leave it for future reference so someone else doesn't do what I did.

RPG Maker XP default battlebacks are not 640x480. If you use them with a transparent window, you won't notice the transparency! Took me hours to figure that one out, derp.




5
Script Troubleshooting / Understanding Aliases
November 08, 2017, 01:56:38 pm
I've done some reading on aliases and understand (somewhat) how they work, but there is still something I don't understand:

When looking at an alias method, I've noticed the method appears within the alias, but I'm not sure I correctly understand it's function in relation to its placement, as I've seen it both ways. For example:

alias superduper_update_target update_target
def update_target
   #some code
   #goes here
   superduper_update_target
end


vs

alias superduper_update_target update_target
def update_target
   superduper_update_target
   #some code
   #goes here
end


Does this determine where in the original "update_target" method the code is placed? In this case, the first method places the new code above the original method, and the second method places the new code below the original method, or is it visa versa?

Thanks guys.





6
Projects / Games / Legends of Astravia
November 06, 2017, 01:42:43 pm

Traverse a world of magic in this classic role-playing game full of exciting battles, dungeons, and secrets.

Description
Legends of Astravia is a story-driven role-playing game built on engaging battles and fulfilling exploration.
It takes its inspiration from Japanese-style RPGs like Golden Sun, Chrono Trigger, and Grandia.

Lost within the turmoil of Astravia's past, you and your companions must find a way to unite its people before the Cataclysm brings about another age of ruin.


Features
✧ Engaging, character-driven storyline that will keep you attached until the end.
✧ Entirely custom "Action Time Battle" system--with a completely unique twist.
✧ Plenty of monsters, but no random encounters! You choose your own battles.
✧ 8-direction pixel movement that makes moving and exploring feel great.
✧ Multiple party members with individual combat styles, stories, and secrets.
✧ Various dungeons, caves, and towns to explore with unique puzzles and characters.

Screenshots
Spoiler: ShowHide

(To be updated)


Story
Chapter 1 - Mist
The world of Astravia is in an unstable peace; divided by unrest between mysticians and humans who fear their magic.
Once seen as heroes, the passage of time eroded the mysticians' feats into myth, and anyone who
shares their likeness in the present day must hide from the ruling country of Valica and its brutal knights.

Thus, the magic-adept Oliver must tread with caution as he escapes the woods of a Valican territory.
Left behind by the mystician Azel and at loss as to how he arrived there, the stakes are raised even higher when Oliver realizes he must pass through the capitol in order to find answers about his past.
[/size]

Download
The game is in active development, and not yet available to download. It will be purchasable on Steam when the time comes.
7
Script Requests / Sprite Opacity "Glow"
November 04, 2017, 05:48:35 pm
I am having a hard time understanding how to properly use the sprite class. Long story short, I am using sprites on the title screen instead of a command window to display selections. I'd like to have a custom cursor that fades in and out (like the window cursor), but using a custom bitmap instead of a rectangle.

How would I make a sprite fade in and out? I understand this would use the "update" method, I considered using a for loop like so:
#Assuming @com is the sprite bitmap for the "selection" sprite...
for i in 1...17
if @com.opacity > 0
@com.opacity = 255 - i * 15
elsif @com.opacity < 255
@com.opacity = 0 + i * 15
end
end


But I assumed this is just...bad logic. Thoughts?
8
Script Troubleshooting / [Resolved] Blank Error
November 02, 2017, 11:13:35 am
So I have found sometimes I get a blank error message when editing scripts. I assume it means "you messed up so bad even the engine doesn't know what's wrong":


But I'm curious if there is actually an explanation? It generally makes troubleshooting a bear unless I've paid attention to the changes I've made. Is it related to the stack?
I noticed I've seen it appear with events most often, but this current case is related to gaining EXP at the end of battle, and I believe it may be a recursion issue.

Also, the problem script, if someone would like to help. I am trying to figure out how EXP is calculated with this battle script, it seems to be completely wrong--my actor is gaining way more exp than the enemy provides--so I was trying to fix it, rather unsuccessfully:

The phase 5 calls "gain_exp" after battle like so:
exp = gain_exp


And gain_exp
Spoiler: ShowHide
  def gain_exp
    exp = exp_gained
    for i in 0...$game_party.actors.size
      actor = $game_party.actors[i]
      if actor.cant_get_exp? == false
        last_level = actor.level
        actor.exp += exp
        if actor.level > last_level
          @status_window.level_up(i)
        end
      end
    end
    return exp
  end
  #--------------------------------------------------------------------------
  def exp_gained
    # For each enemy in the troop
    for enemy in $game_troop.enemies
      # Add their exp to the pool
      exp += enemy.exp
      # Old line: exp = exp.nil? ? enemy.exp : exp + enemy.exp
    end
    if EXP_SHARE
      actor_number = 0
      for actor in $game_party.actors
        actor_number += 1 unless actor.cant_get_exp?
      end
      exp = exp / [actor_number, 1].max
      #exp = exp / [actor_number, 1].max
    end
    return exp
  end

9
I am getting an error with ForeverZer0's Blacksmith script (the fixed version by KK20):
http://forum.chaos-project.com/index.php/topic,6171.0.html
(I didn't want to necropost, and I'm not sure if it's the script as much as it's a conflict)

It's giving me the following error:


In the following method:
Spoiler: ShowHide
  def self.materials?(type, id)
    # Get the required materials for the item
    materials = case type
    when 0 then [self.weapon_forges(id), self.weapon_gold(id)]
    when 1 then [self.armor_forges(id), self.armor_gold(id)]
    when 2 then [self.item_forges(id), self.item_gold(id)]
    end
    materials[0] = [] if materials[0] == nil
    # Check gold, skipping item check if there is not enough.
    if $game_party.gold >= materials[1][0]
      # Iterate all required materials, making sure enough are in inventory.
      materials[0].each {|item|
        # Branch by the type of the item.
        result = case item[0]
        when 0 then ($game_party.weapon_number(item[1]) >= item[2])
        when 1 then ($game_party.armor_number(item[1]) >= item[2])
        when 2 then ($game_party.item_number(item[1]) >= item[2])
        end
        # End iteration and return false immidiately if missing required item.
        return false unless result
      }
      return true
    end
    return false
  end


Here is my config:
Spoiler: ShowHide
module Blacksmith
 
#===============================================================================
#                          BEGIN CONFIGURATION
#===============================================================================

  FORGE_SE = ['006-System06', 80, 100]
  # SE played when an item is forged. ['FILENAME', VOLUME, PITCH]
  EXTRACT_SE = ['020-Teleport03', 80, 100]
  # SE played when an item extraction is performed. ['FILENAME', VOLUME, PITCH]
  ENCHANT_SE = ['020-Teleport03', 80, 100]
  # SE played when an item enchantment is performed. ['FILENAME', VOLUME, PITCH]
 
  USE_ENCHANTMENTS = true
  # Set to true to enable the "Enchant" feature of the system.
 
  NO_ENCHANT_WEAPONS = []
  NO_ENCHANT_ARMORS = []
  # Include IDs of any equipment that cannot be enchanted in the respective
  # arrays, seperating by commas. Ignore these if not using enchant feature.
 
  # Define the colors used for the text in the Blacksmith shop.
  PLUS_COLOR = Color.new(128, 255, 128)
  MINUS_COLOR = Color.new(255, 128, 128)
 
  MAP_BACK = true
  # Set to true if you would like slightly opaque windows with the map showing
  # through.
 
  #-----------------------------------------------------------------------------
  # FORGE DATABASE
  #-----------------------------------------------------------------------------
  # Define the materials used for each weapon/armor/item that can be forged and
  # extracted. They configuration is slightly different than what it was in the
  # first version of the script. You can seperately define materials that are
  # given during extraction if you like, or ignore it and it will simply return
  # the same materials it takes to forge them. It works like this:
  #
  # STEP 1:
  #   Create a new "case" in the appropriate method below for the type of item
  #   you are trying to define. There are three of them, one each for weapons,
  #   armors, and items. Just use this syntax:
  #       
  #          when DATABASE_ID then []
  #
  # STEP 2:
  #   Now you can begin to add materials to forge the item. Each material has
  #   an number which defines what type of item is is. Here is the "key":
  #
  #       0 = Weapon
  #       1 = Armor
  #       2 = Item
  #
  #   To define a material for an item, you simply create a three element array
  #   using this format:
  #                       [ITEM_TYPE, DATABASE_ID, QUANTITY]
  #
  #   ...and add it the appropriate empty array in the case statement you made
  #   in Step 1. You can add as many different items as you please to forge an
  #   weapon/armor/item, simply seperate the material arrays with commas. See
  #   below for a few examples.
  #-----------------------------------------------------------------------------
  def self.weapon_forges(id)
    return case id
    when 1 then [[2, 33, 3]]            # Bronze Sword
    end
  end
 
  def self.armor_forges(id)
    return case id
    when 1 then [[2, 33, 5]]
    end
  end
 
  def self.item_forges(id)
    return case id
    when 2 then [[2, 33, 5]]
    end
  end
 
  #-----------------------------------------------------------------------------
  # EXTRACT DATABASE
  #-----------------------------------------------------------------------------
  # Here you can define the items received when a specific item is extracted.
  # It can be setup the same as way as above. Items left undefined will return
  # the same items that are required to forge it. You can define an item with an
  # empty array to have it return no items, though it can still return gold.
  #-----------------------------------------------------------------------------
  def self.weapon_extractions(id)
    return case id
    when 1 then [[2, 33, 1], [2, 42, 1]]
    else
      self.weapon_forges(id)
    end
     
  end
 
  def self.armor_extractions(id)
    return case id
    when 1 then [[2, 34, 2], [0, 1, 1]]
    else
      self.armor_forges(id)
    end
  end
 
  def self.item_extractions(id)
    return case id
    when 1 then []                     # Potion
    when 2 then [[2, 1, 2]]            # High Potion
    when 3 then [[2, 2, 2], [2, 1, 2]] # Full Potion
    when 4 then []                     # Perfume
    when 5 then [[2, 4, 2]]            # High Perfume
    when 6 then [[2, 4, 2], [2, 5, 2]] # Full Perfume
    else
      self.item_forges(id)
    end
  end
 
  #-----------------------------------------------------------------------------
  # GOLD DATABASE
  #-----------------------------------------------------------------------------
  # Here you can define the amount of gold that is required to forge an item,
  # and the amount that is given if extracted. There are three methods, one each
  # for weapons, armors, and items. Simply follow this pattern for each
  # category:
  #
  #     when DATABASE_ID then [FORGE_PRICE, EXTRACT_GOLD,]
  #-----------------------------------------------------------------------------
  def self.weapon_gold(id)
    return case id
    when 1 then [200, 50]
    when 2 then [450, 225]
    else
      [0, 0]
    end
  end
 
  def self.armor_gold(id)
    return case id
    when 1 then []
    when 2 then []
    when 3 then []
    when 4 then []
    when 5 then []
    else
      [0, 0]
    end
  end
 
  def self.item_gold(id)
    return case id
    when 1 then [100, 0]
    else
      [0, 0]
    end
  end
 
  #-----------------------------------------------------------------------------
  # ENCHANT DATABASE
  #-----------------------------------------------------------------------------
 
  #-----------------------------------------------------------------------------
  # Here you can define what items will alter stats when used to enchant with.
  # You need to create a two element array, and add it to the respective array
  # below that corresponds with the desired item.
  #
  # ex.
  #     when ITEM_ID then [[KEYWORD, VALUE], [KEYWORD, VALUE]]
  #
  #     KEYWORD: See below for a list of possible keywords. Stat changes that
  #              can affect only weapons will have no effect on armors, and
  #              vice-versa.
  #     VALUE : The amount by which to change the stat. Negative values will
  #             lower the stat.
  #-----------------------------------------------------------------------------
  # KEYWORDS:
  #
  #   'ATK' (Weapon Only)           'DEX'               'PDEF'
  #   'EVA' (Armor Only)            'AGI'               'MDEF'
  #   'STR'                         'INT'   
  #
  #   ** Keywords have to be written EXACTLY as they appear.
  #   ex: when 40 then [['STR', 15], ['ATK', 5]] # Behemoth Juice
  #-----------------------------------------------------------------------------
  def self.enchant_stats(item_id)
    return case item_id
    when 1 then []
    #Enter stats here
    end
  end
 
  #-----------------------------------------------------------------------------
  # Define state altering enchantments.
  #
  # ex.
  #     when ITEM_ID then [[VALUE, STATE_ID], [VALUE, STATE_ID]]
  #
  #     VALUE: One of three different values to represent states efficiency.
  #              -1 = Minus state (Does nothing on armors)
  #               0 = Neutral
  #               1 = Plus state
  #     STATE_ID: The ID in the database of the state.
  #-----------------------------------------------------------------------------
  def self.enchant_states(item_id)
    return case item_id
    when 1 then []
    #when 38 then [[1, 2], [1, 4], [1, 6]] # Chaos Orb
    end
  end
 
  #-----------------------------------------------------------------------------
  # Define element altering enchantments.
  #
  # ex.
  #     when ITEM_ID then [[VALUE, ELEMENT_ID], [VALUE, ELEMENT_ID]]
  #
  #     VALUE: One of two different values to represent element efficiency.
  #              true  = Uses element
  #              false = Doesn't use element (Negates element if present)
  #     ELEMENT_ID: The ID in the database of the element.
  #-----------------------------------------------------------------------------
  def self.enchant_elements(item_id)
    return case item_id
    when 1 then []
    #when 36 then [[true, 3], [false, 5]] # Amethyst
    #when 37 then [[true, 1]]             # Ruby ;)
    end
  end 
 
  #-----------------------------------------------------------------------------
  # Define the amount of gold it takes to enchant a weapon or armor with the
  # item.
  #-----------------------------------------------------------------------------
  def self.enchant_gold(item_id)
    return case item_id
    when 1 then []
    #when 36 then 1500
    else
      0
    end
  end
 
#===============================================================================
#                              END CONFIGURATION
#===============================================================================
 


I tried troubleshooting with puts and I found that "materials[0][1]" is nil but I'm not sure why. materials[0] and materials[1] are both normal values. I have a feeling it's a script conflict, as I've got quite a few in my game now.

Thanks!
10
Script Troubleshooting / Ruby Question
October 28, 2017, 05:39:25 pm
I am having a hard time figuring out what a method with an "=" is. I'm sure it's really basic Ruby stuff, but what is the difference between these two methods? Rather, what does it mean to attach "=()" at the end of a method?

#--------------------------------------------------------------------------
  # * Get Top Row
  #--------------------------------------------------------------------------
  def top_row
    # Divide y-coordinate of window contents transfer origin by 1 row
    # height of 32
    return self.oy / 32
  end

#--------------------------------------------------------------------------
  # * Set Top Row
  #     row : row shown on top
  #--------------------------------------------------------------------------
  def top_row=(row)
    # If row is less than 0, change it to 0
    if row < 0
      row = 0
    end
    # If row exceeds row_max - 1, change it to row_max - 1
    if row > row_max - 1
      row = row_max - 1
    end
    # Multiply 1 row height by 32 for y-coordinate of window contents
    # transfer origin
    self.oy = row * 32
  end
11
Troubleshooting / Help / Combat System Basics
October 27, 2017, 09:30:47 pm
I'm at it again, another silly question.

Is there any documentation on the RMXP battle system phases? I can gather some things from reading the comments in the base RPG Maker scripts, but I am going to be making some edits to a sideview battle system and was looking for more detailed documentation or tutorials if possible.

12
I'm hoping someone can help me with writing a script. I'm not really looking for free code as much as I'm looking for assistance figuring out how to implement something, so I can learn how to code better.

Right now I have a custom status menu with a standard help window. The user can select and scroll through the list of stats to see a description of what each one does (Though it's kind of broken, see below).

I now want to create a window that displays the actors current status effects (states) and populates information to the help window about each state. I understand I'll need a custom array that associates each state with a description, as RPG Maker XP does not provide state descriptions by default. I am using Blizz's states as icons scripts, if that helps.

I actually already have the framework for the window (I know how to create the window, make it active/inactive, set the index, the screenshot below is all in-game with the exception of the white text/icons), but I'm not entirely sure what the best way to draw each state and its associated icon on the list and assure it is properly selected and populated into the help window.

Here is a screenshot example:
Spoiler: ShowHide


Bonus question:
For some reason, my stats window isn't working properly. The first item on the list is selected properly, but nothing happens when I scroll (the index doesn't change?). Is it because I need to explicitly set the "commands"? In this case, I would happy to accept help, but I feel like I really need to figure it out on my own.

Here is the code:
class Window_Stats < Window_Selectable

include CMS_Config

  #--------------------------------------------------------------------------
  # * Object Initialization
  #     actor : actor
  #--------------------------------------------------------------------------
  def initialize(actor)
super(0, 0, 152, 246)
self.contents = Bitmap.new(width - 32, height - 32)
@item_max = 8
@column_max = 1
@actor = actor
self.z += 10
self.active = false
self.index = -1
refresh
  end
 
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
 
  def refresh
self.contents.clear
for i in 0...7
draw_actor_parameter(@actor, 0, i*32, i)
end
update_cursor_rect
  end

  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
      #update cursor rectangle
  update_cursor_rect
  end

    # Update cursor rectangle
      def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
# Get current row
row = @index / @column_max
# If current row is before top row
if row < self.top_row
# Scroll so that current row becomes top row
self.top_row = row
end
# If current row is more to back than back row
if row > self.top_row + (self.page_row_max - 1)
# Scroll so that current row becomes back row
self.top_row = row - (self.page_row_max - 1)
end
# Calculate cursor width
cursor_width = self.width / @column_max - 16
# Calculate cursor coordinates
x = 4
y = @index * 32
# Update cursor rectangle
self.cursor_rect.set(x, y, cursor_width, 32)
end
end

 
  #--------------------------------------------------------------------------
  # * Help Text Update
  #--------------------------------------------------------------------------

  def update_help
@help_window.set_text(self.index < 0 ? "" : STAT_DESCRIPTIONS[@index], 0)
  end
 
  #--------------------------------------------------------------------------
  # * Draw Parameters
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #     type  : parameter type (0-6)
  #--------------------------------------------------------------------------
  def draw_actor_parameter(actor, x, y, type)
    case type
    when 0
      parameter_name = $data_system.words.atk
      parameter_value = actor.atk
    when 1
      parameter_name = $data_system.words.pdef
      parameter_value = actor.pdef
    when 2
      parameter_name = $data_system.words.mdef
      parameter_value = actor.mdef
    when 3
      parameter_name = $data_system.words.str
      parameter_value = actor.str
    when 4
      parameter_name = $data_system.words.dex
      parameter_value = actor.dex
    when 5
      parameter_name = $data_system.words.agi
      parameter_value = actor.agi
    when 6
      parameter_name = $data_system.words.int
      parameter_value = actor.int
    end
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 80, 32, parameter_name)
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 80, y, 36, 32, parameter_value.to_s, 2)
  end

end


Thanks everyone!
13
Script Troubleshooting / NoMethodError Help
October 23, 2017, 04:19:10 pm
I'm running into a little trouble with a NoMethodError and I'm just looking for a little help to get me into the right direction.

I am using a custom menu script made by "albertfish", it's quite old. I am using it as a framework to write my own custom menu.

I am currently using RPG Maker XP with the RPG Maker VX Ace engine, as defined here: http://forum.chaos-project.com/index.php/topic,12899.msg173956.html#msg173956

This error:
Spoiler: ShowHide


Appears when my actors receive items.

The specific line is here:
if $recent_items[i].id == $data_items[item_id].id && $recent_items[i].is_a?(RPG::Item)


The problem I'm having is with a custom "Game_Party" class. It is telling me the method "id" is not defined, but I'm pretty certain it is a built-in RGSS method. I'm not sure if the problem is due to me using the RPG Maker VX engine and that there is a syntax change, or it is a script conflict issue.

This is the particular area that it is flagging:
Spoiler: ShowHide
#--------------------------------------------------------------------------
  # * Gain Recent Items
  #     item_id  : item ID
  #--------------------------------------------------------------------------
  def gain_recent_item(item_id)
    for i in 0...$recent_items.size
      if $recent_items[i].id == $data_items[item_id].id && $recent_items[i].is_a?(RPG::Item)
        $recent_items.delete_at(i)
      end
    end
    $recent_items.push($data_items[item_id])
    if $recent_items.size > 40
      $recent_items.delete_at(0)
    end
  end


This script is pretty big I've uploaded the whole thing to pastebin:
https://pastebin.com/WEGdtdrK

Any sort of hints or advice would be helpful!


14
Troubleshooting / Help / Basic RGSS Window Questions
October 23, 2017, 12:09:45 pm
Hi guys,

I am pretty new to this forum, but I've been using RPG Maker for a while. I am currently working with RPG Maker XP ("Ace" version). Hopefully I am asking this in the right spot.

I am working on modifying the menu system in my game and I was wondering if there was a good resource that had basic explanations of the basic methods or if someone could give a quick explanation. I don't really need a full RGSS guide--I've got a pretty good handle on things--but I'm curious on the process of drawing a window to make sure I get things right.

I understand the classes "Window_" handle how a window is drawn and "Scene_" actually draws the windows.

I just need a little help with the basic methods and when to use them. I understand "initialize" initializes the object, but I am a little confused with "refresh" and "update" and the difference between the two.

I suppose the TL:DR of my question: Is there a quick explanation on the "refresh" and "update" methods and when to use them when drawing menu windows?

Or, if anyone knows of a nice tutorial focused on creating/editing menu systems specifically, that would also be helpful. I have had a hard time finding one.

Thanks!