• Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Help and Request Thread

Status
Not open for further replies.
i am having toruble putting mmy bacground into RM2K3 for a title scree. can someone tell me how to do it.|?
 
i have a question i dont knwo if i need to post thew scripts for you to help me but i havea a bag system that i want to work in the battle....right now if you click item in battle then click out it takes you to the menu not the battle.........can sumone tell me how to fix that but still making it work out of battle too? Thanks in advance

Code:
#==============================================================================
# ■ Scene_Item
#------------------------------------------------------------------------------
#  アイテム画面の処理を行うクラスです。
#==============================================================================

class Scene_Item
  #--------------------------------------------------------------------------
  # ● メイン処理
  #--------------------------------------------------------------------------
  def main
    # ヘルプウィンドウ、アイテムウィンドウを作成
    @help_window = Window_Help.new
    @item_window = Window_Item.new
    @card = Sprite.new
    @card.bitmap = RPG::Cache.picture("bag")
    @card.zoom_x = 2
    @card.zoom_y = 2
    @help_window.windowskin = RPG::Cache.windowskin("infosys")

    # ヘルプウィンドウを関連付け
    @item_window.help_window = @help_window
    # ターゲットウィンドウを作成 (不可視・非アクティブに設定)
    @target_window = Window_Target.new
    @target_window.visible = false
    @target_window.active = false
    # トランジション実行
    Graphics.transition
    # メインループ
    loop do
      # ゲーム画面を更新
      Graphics.update
      # 入力情報を更新
      Input.update
      # フレーム更新
      update
      # 画面が切り替わったらループを中断
      if $scene != self
        break
      end
    end
    # トランジション準備
    Graphics.freeze
    # ウィンドウを解放
    @help_window.dispose
    @item_window.dispose
    @target_window.dispose
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新
  #--------------------------------------------------------------------------
  def update
    # ウィンドウを更新
    @help_window.update
    @item_window.update
    @target_window.update
    # アイテムウィンドウがアクティブの場合: update_item を呼ぶ
    if @item_window.active
      update_item
      return
    end
    # ターゲットウィンドウがアクティブの場合: update_target を呼ぶ
    if @target_window.active
      update_target
      return
    end
  end
  #--------------------------------------------------------------------------
  # ● フレーム更新 (アイテムウィンドウがアクティブの場合)
  #--------------------------------------------------------------------------
  def update_item
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      # メニュー画面に切り替え
      $scene = Scene_Menu.new(0)
      return
    end
    if Input.press?(Input::RIGHT)
      $game_system.se_play($data_system.decision_se)
      $scene = Scene_Item2.new
      return
    end
    if Input.press?(Input::LEFT)
      $game_system.se_play($data_system.decision_se)
      $scene = Scene_Item4.new
      return
    end

    
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # アイテムウィンドウで現在選択されているデータを取得
      @item = @item_window.item
      # 使用アイテムではない場合
      unless @item.is_a?(RPG::Item)
        # ブザー SE を演奏
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # 使用できない場合
      unless $game_party.item_can_use?(@item.id)
        # ブザー SE を演奏
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # 決定 SE を演奏
      $game_system.se_play($data_system.decision_se)
      # 効果範囲が味方の場合
      if @item.scope >= 3
        # ターゲットウィンドウをアクティブ化
        @item_window.active = false
        @target_window.x = (@item_window.index + 1) % 2 * 304
        @target_window.visible = true
        @target_window.active = true
        # 効果範囲 (単体/全体) に応じてカーソル位置を設定
        if @item.scope == 4 || @item.scope == 10
          @target_window.index = -1
        else
          @target_window.index = 0
        end
      # 効果範囲が味方以外の場合
      else
        # コモンイベント ID が有効の場合
        if @item.common_event_id > 0
          # コモンイベント呼び出し予約
          $game_temp.common_event_id = @item.common_event_id
          # アイテムの使用時 SE を演奏
          $game_system.se_play(@item.menu_se)
          # 消耗品の場合
          if @item.consumable
            # 使用したアイテムを 1 減らす
            $game_party.lose_item(@item.id, 1)
            # アイテムウィンドウの項目を再描画
            @item_window.draw_item(@item_window.index)
          end
          # マップ画面に切り替え
          $scene = Scene_Map.new
          return
        end
      end
      return
    end
  end
  
  #--------------------------------------------------------------------------
  # ● フレーム更新 (ターゲットウィンドウがアクティブの場合)
  #--------------------------------------------------------------------------
  def update_target
    # B ボタンが押された場合
    if Input.trigger?(Input::B)
      # キャンセル SE を演奏
      $game_system.se_play($data_system.cancel_se)
      # アイテム切れなどで使用できなくなった場合
      unless $game_party.item_can_use?(@item.id)
        # アイテムウィンドウの内容を再作成
        @item_window.refresh
      end
      # ターゲットウィンドウを消去
      @item_window.active = true
      @target_window.visible = false
      @target_window.active = false
      return
    end
    # C ボタンが押された場合
    if Input.trigger?(Input::C)
      # アイテムを使い切った場合
      if $game_party.item_number(@item.id) == 0
        # ブザー SE を演奏
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # ターゲットが全体の場合
      if @target_window.index == -1
        # パーティ全体にアイテムの使用効果を適用
        used = false
        for i in $game_party.actors
          used |= i.item_effect(@item)
        end
      end
      # ターゲットが単体の場合
      if @target_window.index >= 0
        # ターゲットのアクターにアイテムの使用効果を適用
        target = $game_party.actors[@target_window.index]
        used = target.item_effect(@item)
      end
      # アイテムを使った場合
      if used
        # アイテムの使用時 SE を演奏
        $game_system.se_play(@item.menu_se)
        # 消耗品の場合
        if @item.consumable
          # 使用したアイテムを 1 減らす
          $game_party.lose_item(@item.id, 1)
          # アイテムウィンドウの項目を再描画
          @item_window.draw_item(@item_window.index)
        end
        # ターゲットウィンドウの内容を再作成
        @target_window.refresh
        # 全滅の場合
        if $game_party.all_dead?
          # ゲームオーバー画面に切り替え
          $scene = Scene_Gameover.new
          return
        end
        # コモンイベント ID が有効の場合
        if @item.common_event_id > 0
          # コモンイベント呼び出し予約
          $game_temp.common_event_id = @item.common_event_id
          # マップ画面に切り替え
          $scene = Scene_Map.new
          return
        end
      end
      # アイテムを使わなかった場合
      unless used
        # ブザー SE を演奏
        $game_system.se_play($data_system.buzzer_se)
      end
      return
    end
  end
end

Code:
#==============================================================================
# ■ Window_Item
#------------------------------------------------------------------------------
#  アイテム画面、バトル画面で、所持アイテムの一覧を表示するウィンドウです。
#==============================================================================

class Window_Item < Window_Selectable
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    super(175, 12, 292, 200)
    @column_max = 1
    refresh
    self.index = 0
    self.opacity = 0
    self.back_opacity = 0
    # 戦闘中の場合はウィンドウを画面中央へ移動し、半透明にする
    if $game_temp.in_battle
      self.y = 0
      self.height = 0
      super(175, 12, 292, 195)
    @column_max = 1
    refresh
    self.index = 0
      
  end
end

  #--------------------------------------------------------------------------
  # ● アイテムの取得
  #--------------------------------------------------------------------------
  def item
    return @data[self.index]
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    # アイテムを追加
    for i in 1...47
      if $game_party.item_number(i) > 0
        @data.push($data_items[i])
      end
    end
    # 戦闘中以外なら武器と防具も追加
    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
  
    @item_max = @data.size
    if @item_max > 0
      self.contents = Bitmap.new(width-32, row_max * 32) 
      self.contents.font.name = $fontface
      self.contents.font.size = $fontsize
      for i in 0...@item_max
        draw_item(i)
      end
    end
  end
  def draw_item(index)
    item = @data[index]
    case item
    when RPG::Weapon
      number = $game_party.weapon_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 = 12 + index % 2 * (0 + 0)
    y = index /-1 * -32
    rect = Rect.new(x, y, self.width / @column_max - 100,100)
    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 + 200, y, 30, 32, ":", 1)
    self.contents.draw_text(x + 200, y, 40, 32, number.to_s, 2)
  end
  #--------------------------------------------------------------------------
  # ● ヘルプテキスト更新
  #--------------------------------------------------------------------------
  def update_help
    @help_window.set_text(self.item == nil ? "" : self.item.description)
  end
end
 
OverTheBelow said:
I'm really puzzeled.

Please can someone tell me how to let you through if you have atleast 1 pokemon, and not let you through when you don't?

Thanks tons

Please can somebody help...
 
create a variable to hold a boolean value, when you are in a battle turn the variable to true and when you leave the battle turn it to false, then make a conditional branch for the bag system so that it returns to the battle if the variable is true or to the menu if it's not :)
 
[_DarkDragon_] said:
create a variable to hold a boolean value, when you are in a battle turn the variable to true and when you leave the battle turn it to false, then make a conditional branch for the bag system so that it returns to the battle if the variable is true or to the menu if it's not :)
i think it's in the battle.
because in the battle Scene_Item isn't called.
it should be in something like Scene Battle, update_phase3_item_select
 
eww, ruby is weird. I was explaining how I would do it in Sphere XD
 
does anybody have an idea about how to make a bag show how much of a certaint item you have.....i have my bag displaying a number but the number is Zero...all the tiem it never changes...any ideas on how to fix this?

Thanks in advance
 
[NoLeAfCloVeR0987] said:
does anybody have an idea about how to make a bag show how much of a certaint item you have.....i have my bag displaying a number but the number is Zero...all the tiem it never changes...any ideas on how to fix this?

Thanks in advance
here's how i did it in my version
Code:
    for i in 1...$data_items.size
      if $game_party.item_number(i) > 0
        item =  $data_items[i]
        # element id is the attribute in the database
        if item != nil and (item.element_set.include?(Element_ID))
          @data.push($data_items[i])
        end
      end
    end
there should be something similiar in Window_Item, that should be replaced with this.
 
Flameguru said:
is it this that u replace?

Code:
for i in 1...47
      if $game_party.item_number(i) > 0
        @data.push($data_items[i])
      end
    end
no its not that i figured it out....BTW that controles what goes into what poket of the bag.........

to make it work you have to replace this
Code:
self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
    self.contents.draw_text(x + 200, y, 16, 32, "x", 2)
    self.contents.font.color = normal_color
    self.contents.draw_text(100, 0, 0, 0, number.to_s, 2)

with this
Code:
 self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
    self.contents.draw_text(x + 200, y, 30, 32, "x", 1)
    self.contents.draw_text(x + 200, y, 40, 32, number.to_s, 2)

and replace this

Code:
    when RPG::Item
      number = $game_party.weapon_number(item.id)

with this
Code:
    when RPG::Item
      number = $game_party.item_number(item.id)
 
Last edited by a moderator:
dan48, have the second pokemon "invisible" by right clicking it in Monster Group
make a monster that has a blank graphic, now go to the attribute tab.
on the left there is A B C D and E
for evry attribute make E 0%
now, back to that monster make its attribute resistances all E so if thw person attacks it, nothing happens.
now in monster tab, put it in the monster group where you want the sending out thing.
Make a new page down the bottom
Trigger: [Pokemon] Hp = 0 +0% then
force flee [pokemon]
show message [Cooltrainer](or whatever)
sends out (new name of pokemon)
show hidden monster: The hidden one you hi at the start

tell me if this is confusing
 
Hi all, another question but easier this time.

Is there a rule about the level of detail each requestee needs to make?

If not, Could I make a rule, It will make it easier to answer the questions that people have...



The rule:

Those who post a question MUST include (when possible):
A screenshot of the problem;
what the steps were that made the problem;
A good layout of text so that it is easy to understand;
And what EXACTLY the screen says when the error occurs.


It's jus that, I've looked over the whole thing and it's noobs who give bad detail who ask for help and it gets clogged up on this thread.
Which means that people who have very important questions sometimes don't get their questions answered.
 
Hi I have a few questions all are related to RMXP

1. How do I do random encounters on certain tiles with events or scrip
2. How do I make the font appear
3. Would it be possible for some one to either write or direct me to a place that has a bag system tutorial, A PKMN Battle System Tutorial and a Menu Tutorial

before you say anything about the Starter Kit yes I did Download it and it has been wonderful thanks to the creator
 
okay... i need to knwo how to change the font color in RMXP but only for the battles....liek when you get into a battle i want the font to be white but when you get out of battle i want the font back to the normal pokemon color (i am useing blizzys starter kit if that helps at all)
 
axlefoley said:
Hi I have a few questions all are related to RMXP

1. How do I do random encounters on certain tiles with events or scrip
2. How do I make the font appear
3. Would it be possible for some one to either write or direct me to a place that has a bag system tutorial, A PKMN Battle System Tutorial and a Menu Tutorial

before you say anything about the Starter Kit yes I did Download it and it has been wonderful thanks to the creator
1. do this with events
Code:
<>variable [x:random] = rand(6)
<>branch if var [x:random] == 3
  <> make encounter
:end
2.add this in the script editor:
Code:
Font.default_name = "Font_name"
3. try GamingWorld for toturials

[NoLeAfCloVeR0987] said:
okay... i need to knwo how to change the font color in RMXP but only for the battles....liek when you get into a battle i want the font to be white but when you get out of battle i want the font back to the normal pokemon color (i am useing blizzys starter kit if that helps at all)
in Window_Message def update add:
Code:
if $game_temp.in_battle
self.contents.font.color = Color.new(r,g,b,a)
else
self.contents.font.color = normal_color
end
 
Blizzy i did that and i got an error that read

"?????'Window_Message*' ? 210 ??? NameError ????????
undifined local variable or method 'r' for #<Window_Message:0x70af0f0>"

what in the world does that mean?
 
I neeed help On RM2K3.

I need to know how to get a smaller gamescreen so the graphics look better. (i want the graphics to look likt the graphics on the map editor.)

How to make a background that works. i have amde various backgrounds and save in png format and other formats but it still won't work.
 
Status
Not open for further replies.
Back
Top