Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
Izyees Fariz

Help with my skill script !

Question

Hi guys, I need some help with my skill script.

 

skill.png?_subject_uid=331346561&w=AAAjy

you see that blank space ?

I want to put skill elements, state, atk, str, agi, etc...

Can someone help me, i want like the info window... show the info of the selected skill.

Can someone make the script like this...

 

Attack                   130

Strong                    67

etc...  

       

            Elements :

[icon-fire] [icon-earth] [icon-water]   etc...

              States :

[icon-venom] [icon-stun] [icon-clumsy]

 

 

or maybe only some help... I don't know how the help window work.

The Window_Help not help me, maybe you can explain to me a little...

 

I Hope someone can help me...

here the script :

 

 

#==============================================================================
# ** Izy Skill Window
#------------------------------------------------------------------------------
#    This window displays usable skills on the skill and battle screens.
#==============================================================================

class Window_Skill < Window_Selectable
  def initialize(actor)
    super(0, 128, 320, 352)
    @actor = actor
    @column_max = 1
    refresh
    self.index = 0
    if $game_temp.in_battle
      self.y = 88
      self.x = 164
      self.width = 320
      self.height = 200
      self.back_opacity = 160
    end
  end
  def skill
    return @data[self.index]
  end
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    for i in 0...@actor.skills.size
      skill = $data_skills[@actor.skills[i]]
      if skill != nil
        @data.push(skill)
      end
    end
    @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
  def draw_item(index)
    skill = @data[index]
    if @actor.skill_can_use?(skill.id)
      self.contents.font.color = normal_color
    else
      self.contents.font.color = disabled_color
    end
    x = 4
    y = index * 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(skill.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, 204, 32, skill.name, 0)
    self.contents.font.color = Color.new(0, 255, 255, 250)
    self.contents.draw_text(x + 232, y, 48, 32, skill.sp_cost.to_s, 2)
  end
  def update_help
    @help_window.set_text(self.skill == nil ? "" : self.skill.description)
  end
end
#==============================================================================
class Window_SkillStatus < Window_Base
  def initialize(actor)
    super(0, 64, 320, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    @actor = actor
    self.contents.draw_text(0, 0, 640, 32, "List Skill Learn By " + @actor.name + " :")
    refresh
  end
  def refresh
  end
end
 

 

 

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

You seem to have a good start on things, so I'm not sure exactly which part you need help with. I can tell you that the names of the components you'll need are scattered throughout the Game_Battler 3 script, under the section labeled   # * Apply Skill Effects starting around line 106. They tend to be the same as for actors, but with "_f" on the end.

For instance:

skill.str_f

skill.pdef_f

skill.eva_f

Some exceptions are scope, power, and hit rate. They are simply

skill.scope

skill.power

skill.hit

 

Checking the elements and state change effects may be more complicated. Look a further down and you'll see references to

skill.element_set

skill.plus_state_set

skill.minus_state_set

I'm not sure exactly how you'll want to use those, but they appear to be arrays.

I know that I check for a specific element on a skill by using $data_skills[skill_id].element_set.include?(19)

where 19 is the number of the element I was checking for.

 

I hope that's helpful.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...