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 - Lonelyafman

1
oh well i have nothing to lose
i made the item window be called to appear in the map scene instead of through the menu scene (as well as the player's status) but the arrow keys don't move the cursor between items and pressing the action button only changes the item selection rectangle's opacity. so there are obviously issues with frame update, refresh, and that kind of thing but i can't figure out what to add to the Window_Item class:

Spoiler: ShowHide

#==============================================================================
# ** Window_Item
#------------------------------------------------------------------------------
#  This window displays items in possession on the item and battle screens.
#==============================================================================

class Window_Item < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(160, 64, 300, 260)
    @column_max = 2
    refresh
    self.index = 0
    @item_window = true
    # If in battle, move window to center of screen
    # and make it semi-transparent
    if $game_temp.in_battle
      self.y = 64
      self.height = 256
      self.back_opacity = 255
    end
  end
 
  if Input.trigger?(Input::B)
    $game_system.se_play($data_system.decision_se)
    self.visible = false
    return
  end

  #--------------------------------------------------------------------------
  # * Get Item
  #--------------------------------------------------------------------------
  def item
    return @data[self.index]
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    # Add item
    for i in 1...$data_items.size
      if $game_party.item_number(i) > 0
        @data.push($data_items[i])
      end
    end
    # Also add weapons and items if outside of battle
    unless $game_temp.in_battle
      for i in 1...$data_weapons.size
        if $game_party.weapon_number(i) > 0
          @data.push($data_weapons[i])
        end
      end
      for i in 1...$data_armors.size
        if $game_party.armor_number(i) > 0
          @data.push($data_armors[i])
        end
      end
    end
    # If item count is not 0, make a bit map and draw all items
    @item_max = @data.size
    if @item_max > 0
      self.contents = Bitmap.new(width - 32, row_max * 32)
      for i in 0...@item_max
        draw_item(i)
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Draw Item
  #     index : item number
  #--------------------------------------------------------------------------
  def draw_item(index)
    item = @data[index]
    case item
    when RPG::Item
      number = $game_party.item_number(item.id)
    when RPG::Weapon
      number = $game_party.weapon_number(item.id)
    when RPG::Armor
      number = $game_party.armor_number(item.id)
    end
    if item.is_a?(RPG::Item) and
       $game_party.item_can_use?(item.id)
      self.contents.font.color = normal_color
    else
      self.contents.font.color = disabled_color
    end
    x = 4 + index % 2 * (288 + 32)
    y = index / 2 * 32
    rect = Rect.new(x, y, self.width / @column_max - 32, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    bitmap = RPG::Cache.icon(item.icon_name)
    opacity = self.contents.font.color == normal_color ? 255 : 128
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
    self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
    self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
  end
  #--------------------------------------------------------------------------
  # * Help Text Update and List Update
  #--------------------------------------------------------------------------
  def update_help
    @help_window.set_text(self.item == nil ? "" : self.item.description)
  end
end


screenshot of the static thing:



also, i don't know how to close the window with another ESC press but that's not as high priority.
guidance is much appreciated.
2
wow here i am back at it again with the questions about a program nobody uses anymore.

is there a way to undo the whole justification thing that Ccoa's UMS script does to choice windows and go back to the default? (making choice windows the same size and position as message ones unless specified)
i've been trying to #comment parts of the script that deal with choices, but it's a wild goose chase and i might render the whole thing unuseable :facepalm:

windows are the bane of my existence

thanks in advance
3
yes, i've read this thread:
http://forum.chaos-project.com/index.php?topic=5907.0
and tried out the appropiately named Multiple Message Windows script there
but that script is super long and detailed and very oriented towards making speech bubbles.

is there really no other way to just show 2 or more windows at once (only one active, of course)?
i'm trying to make a custom battle system similar to classic pokemon (1 text window, 1 command window), but the AMS script, as far as I know, does not allow it.



eventing?
editing the Window_ classes?
script calls?

what do i do?
many thanks in advance.
4
Ok first of all I've already read this thread
http://forum.chaos-project.com/index.php?topic=12333.0
but as far as I know the poster didn't end up finding a solution, and posting there would be necroposting sooooo

All I want is to set a different (longer) height for Message Windows when a Show Text event command is accompanied by a Show Choices event command, so that THIS doesn't happen:


(that grey rectangle is the No button... hidden away)

Ideally the choice list would actually be horizontal but the only places I've found that being discussed are

https://forums.rpgmakerweb.com/index.php?threads/choice-window-edit.16160/
and
http://save-point.org/printthread.php?tid=5095

and i have no idea how to implement either of the solutions these people provided...

***I have Dubleax's Advanced Messaging System script installed, with just cosmetic changes (windowskin, no opacity stuff or fading, custom window size and position)


The stupidly simple event that this problem affects.

Thanks in advance, i owe you my frikin' life if you can riddle me this