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.

Help with simple edit of Status screen?

Hello,

I don't know if this is the correct forum. I'm not asking for a full script. I just need help with a few edits.

I know next to nothing of Ruby and I want to replace the EXP information with a line of text and a few pictures. Here's a pair of before & after mock pics of what I'm looking for:

jackpaperdollbefore.png


jackpaperdollafter.png


(The EXP information isn't important for my game.)

-I'm using RMXP.
-I'm not using any script that alters the default Status screen.
-The favorite foods for each character never changes through the entire game. So the pictures I want to display are just static and never change.
-Each character has a different set of favorite foods.
-Each character has 2-7 favorite foods.

Can someone provide me with step-by-step instructions on how to do this?
(Is it as easy as I think it is, or is it more involved?)

Will it be easier if I made a single pic for all food items? Or can a series of pics (for each food item) be easier? If it doesn't matter, I'd rather keep them as separate pics and grab them directly from the Graphics/Icons folder.

I'm guessing there will be separate lines I need to add for each character, based on Character IDs. If you provide the code for Character 001 and what and how to add pics, I should be able to figure out the rest.

Any help is appreciated.
 
Okay, I'm done
I'll leave you to finish putting the variables :)
Instructions are included in the script:

Code:
#==============================================================================

# ** FavoriteFoods

#------------------------------------------------------------------------------

#  This class is for all in-game windows.

#==============================================================================

 

module State_Extras

  #--------------------------------------------------------------------------

  # * State Extras

  #     actor : actor

  #--------------------------------------------------------------------------

  #--------------------------------------------------------------------------

  # How to set up skills:

  # ACTOR_SKILLS_NAME refers to the name of the skill the actor has.

  # So the character with the ID of 1 will have Stealing, Stalking and Eating 

  # as their skill names.

  #

  # after you've set up the names, the ACTOR_SKILLS_ID is the id of the variable

  # that stores the points for the respective skill

  #

  # eg.

  # ACTOR_SKILLS_NAME[1] = ['Stealing', 'Stalking', 'Eating']

  # ACTOR_SKILLS_ID[1] =   [        17,        109,       22]

  #

  # Spacing can help with the readability.

  # The first two have been set up as examples:

  

  # EDIT HERE ---------------------------------------------------------------

  ACTOR_SKILLS_NAME = []

  ACTOR_SKILLS_NAME[1] = ['Stealing', 'Stalking', 'Eating']

  ACTOR_SKILLS_NAME[2] = ['Magery', 'Meditation', 'Fishing']

 

  ACTOR_SKILLS_ID = []

  ACTOR_SKILLS_ID[1] = [17, 109, 22]

  ACTOR_SKILLS_ID[2] = [11, 23, 56]

  

  # STOP EDITING HERE -------------------------------------------------------

  

  def self.get_actor_skills(actor)

    add = []

    for actor2 in $data_actors

      next if actor2.id != actor.id

      array = []

      array.push(ACTOR_SKILLS_NAME[actor2.id])

      add = []

      for i in ACTOR_SKILLS_ID[actor2.id]

        add.push($game_variables[i])

      end

      array.push(add)

    end

    return array if array != nil

  end

  

  def self.favorite_foods(actor)

    case actor.id

    when 1

      return ['032-Item01','033-Item02','034-Item03']

    when 2

      return ['032-Item01','033-Item02']

    when 3

      return ['032-Item01','033-Item02','034-Item03','035-Item04','036-Item05',

              '037-Item06','038-Item07']

    when 4

      return ['032-Item01','033-Item02','034-Item03','035-Item04','036-Item05']

    when 5

      return ['032-Item01','033-Item02','034-Item03']

    when 6

      return ['032-Item01','033-Item02']

    when 7

      return ['032-Item01','033-Item02','034-Item03','035-Item04','036-Item05',

              '037-Item06','038-Item07']

    when 8

      return ['032-Item01','033-Item02','034-Item03','035-Item04','036-Item05']

    end

    return []

  end

end

#==============================================================================

# ** Window_Base

#------------------------------------------------------------------------------

#  This class is for all in-game windows.

#==============================================================================

 

class Window_Base < Window

  #--------------------------------------------------------------------------

  # * Draw Favorite Foods

  #     actor : actor

  #     x     : draw spot x-coordinate

  #     y     : draw spot y-coordinate

  #--------------------------------------------------------------------------

  def draw_actor_favorite_foods(actor, x, y)

    return if actor == nil

    favorite_foods = State_Extras::favorite_foods(actor)

    for i in 0...favorite_foods.size

      icon_name = favorite_foods[i]

      bitmap = RPG::Cache.icon(icon_name)

      self.contents.blt(x + i*32, y + 4, bitmap, Rect.new(0, 0, 24, 24))

    end

  end

end

 

 

#==============================================================================

# ** Window_Status

#------------------------------------------------------------------------------

#  This window displays full status specs on the status screen.

#==============================================================================

 

class Window_Status < Window_Base

  #--------------------------------------------------------------------------

  # * Refresh

  #--------------------------------------------------------------------------

  def refresh

    self.contents.clear

    draw_actor_graphic(@actor, 40, 112)

    draw_actor_name(@actor, 4, 0)

    draw_actor_class(@actor, 4 + 144, 0)

    draw_actor_level(@actor, 96, 32)

    draw_actor_state(@actor, 96, 64)

    draw_actor_hp(@actor, 96, 112, 172)

    draw_actor_sp(@actor, 96, 144, 172)

    draw_actor_parameter(@actor, 96, 192, 0)

    draw_actor_parameter(@actor, 96, 224, 1)

    draw_actor_parameter(@actor, 96, 256, 2)

    draw_actor_parameter(@actor, 96, 304, 3)

    draw_actor_parameter(@actor, 96, 336, 4)

    draw_actor_parameter(@actor, 96, 368, 5)

    draw_actor_parameter(@actor, 96, 400, 6)

    skills = State_Extras.get_actor_skills(@actor)

    self.contents.font.color = system_color

    self.contents.draw_text(320, 48-32, 160, 32, "Favorite Foods")

    self.contents.font.color = system_color

    self.contents.draw_text(320, 48+32+16, 120, 32, "Ultima Skills")

    self.contents.font.color = normal_color

    self.contents.draw_text(320, 96+32, 120, 32, "#{skills[0][0]}:", 0)

    self.contents.draw_text(320, 96+64, 120, 32, "#{skills[0][1]}:", 0)

    self.contents.draw_text(320, 96+96, 120, 32, "#{skills[0][2]}:", 0)

    self.contents.draw_text(320 + 120-36,  96+32, 120, 32, "#{skills[1][0]} / 1000", 2)

    self.contents.draw_text(320 + 120-36,  96+64, 120, 32, "#{skills[1][1]} / 1000", 2)

    self.contents.draw_text(320 + 120-36,  96+96, 120, 32, "#{skills[1][2]} / 1000", 2)

    self.contents.font.color = system_color

    draw_actor_favorite_foods(@actor, 320, 48)

    self.contents.draw_text(320, 160+64+16, 96, 32, "Equipment")

    draw_item_name($data_weapons[@actor.weapon_id], 320 + 16, 208+64)

    draw_item_name($data_armors[@actor.armor1_id], 320 + 16, 256+64)

    draw_item_name($data_armors[@actor.armor2_id], 320 + 16, 304+64)

    draw_item_name($data_armors[@actor.armor3_id], 320 + 16, 352+64)

    draw_item_name($data_armors[@actor.armor4_id], 320 + 16, 400+64)

  end

end

 

I'm sorry for the delays!
I hope this is what you were looking for :)
 

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