[RESOLVED] Custom Item HUD

Started by RogerSmith, April 10, 2010, 11:34:31 pm

Previous topic - Next topic

RogerSmith

April 10, 2010, 11:34:31 pm Last Edit: April 12, 2010, 10:37:48 pm by RogerSmith
Intro

Hey group, i'm looking for a script that would show the names, and hopefully rarity, of dropped items/weapons/armors, much like Phantasy Star Online. I've included example pictures below.
-----------
Scripts In Use

  • Blizzard-ABS

  • Tons of Addons

  • Item Rarity by game_guy


http://forum.chaos-project.com/index.php/topic,3633.0.html - game_guy's rarity script JIC
-----------
Spoiler: ShowHide

Spoiler: ShowHide


-----------

Description of Request

Blizzard's ABS allows items to be dropped on the ground as I'm sure you know. I'd like for the script to show what item you picked up, and if possible, the rarity show up on screen. Now, the way PSO's works is by targeting whatever item box is in front of you and it shows the name and the rarity, as you guys see in those 2 pics above. I'm not sure how tough that would be to convert onto XP. If not, then simply picking up a dropped item and THEN the info appearing on screen would be great. If adding the rarity rating onto the item description box is too much, then I'd be a happy duckling to settle for just the description itself.

----------
Well, that's my request. I appreciate you, YES YOU, taking the time to read through it and I hope one of you have a bit of spare time to help me out.

Jragyn

I know blizzard at one point said he had a script telling the name of items collected off the ground...in the making. Though I also heard he had made a retirement from rmXP. So I erm, dunno what that means.

hah, I only know this cuz I too asked for a script that generally does what you wanted, of course I'm certain if Blizzard himself didn't incorperate the rarity, that maybe G_G himself could make it work, presuming said script hits the script database.


--JeR
A bright light can either illuminate or blind, but how will you know which until you open your eyes?

Subsonic_Noise

There's a MOG script for this... wait a sec.

Theeeeere you go.
You'll need a picture named "Itname" in your pictures folder, which will be shown behind the item name.

Spoiler: ShowHide
Quote#_________________________________________________
# MOG_Window Treasure Name V1.2           
#_________________________________________________
# By Moghunter
# http://www.atelier-rgss.com
#_________________________________________________
module MOG
#Font Name.
MPFONT = "Georgia"
#Fade ON/OFF (True - False).
MPITFD = true
#Fade Time(in seconds).
MPITTM = 7
#Window Position.
# 0 = Upper.
# 1 = Left.
# 2 = Right.
# 3 = Lower.
MPITPS = 0
# Disable Window Switch.
MPITVIS = 5
# SE.
MPITSE = "056-Right02"
end
#_________________________________________________
$mogscript = {} if $mogscript == nil
$mogscript["mptreasure"] = true
###############
# Game_System #
###############
class Game_System
attr_accessor :fdittm
attr_accessor :mpit_x
attr_accessor :mpit_y
attr_accessor :it_id
attr_accessor :item_typ
attr_accessor :item_qua
alias mog25_initialize initialize
def initialize
mog25_initialize
@fdittm = 0
@it_id = 1
@wp_id = 1
@ar_id = 1
@item_typ = 0
@mpit_x = 0
@mpit_y = 0
@item_qua = 1
end
def item_typ
return @item_typ
end
def item_qua
return @item_qua
end
def mpit_x
return @mpit_x
end
def mpit_y
return @mpit_y
end
def fdittm
if @fdittm <= 0
@fdittm = 0
end
return @fdittm
end
def it_id
return @it_id
end
end
###############
# Interpreter #
###############
class Interpreter
alias mog25_command126 command_126
def command_126
mog25_command126
$game_system.item_typ = 1
$game_system.fdittm = 255 + 40 * MOG::MPITTM
$game_system.it_id = @parameters[0]
value = operate_value(@parameters[1], @parameters[2], @parameters[3])
$game_system.item_qua = value
unless $game_switches[MOG::MPITVIS] == true
Audio.se_play("Audio/SE/" + MOG::MPITSE, 100,100) rescue nil
end
$ref = true
end
alias mog25_command127 command_127
def command_127
mog25_command127
$game_system.item_typ = 2
$game_system.fdittm = 255 + 40 * MOG::MPITTM
$game_system.it_id = @parameters[0]
value = operate_value(@parameters[1], @parameters[2], @parameters[3])
$game_system.item_qua = value
unless $game_switches[MOG::MPITVIS] == true
Audio.se_play("Audio/SE/" + MOG::MPITSE, 100,100) rescue nil
end
$ref = true
end
alias mog25_command128 command_128
def command_128
mog25_command128
$game_system.item_typ = 3
$game_system.fdittm = 255 + 40 * MOG::MPITTM
$game_system.it_id = @parameters[0]
value = operate_value(@parameters[1], @parameters[2], @parameters[3])
$game_system.item_qua = value
unless $game_switches[MOG::MPITVIS] == true
Audio.se_play("Audio/SE/" + MOG::MPITSE, 100,100) rescue nil
end
$ref = true
end
end 
############
# Game_Map #
############
class Game_Map
attr_reader   :map_id 
def mpitnm
$mpitnm = load_data("Data/Items.rxdata")
$mpitnm[$game_system.it_id].name
end
def mpwpnm
$mpwpnm = load_data("Data/Weapons.rxdata")
$mpwpnm[$game_system.it_id].name
end
def mparnm
$mparnm = load_data("Data/Armors.rxdata")
$mparnm[$game_system.it_id].name
end
end
###############
# Window Base #
###############
class Window_Base < Window
def nd_itpic   
mapic = RPG::Cache.picture("")       
end
def draw_mpitem(x,y)
mapic = RPG::Cache.picture("Itname") rescue nd_itpic     
cw = mapic.width 
ch = mapic.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x , y - ch + 65, mapic, src_rect)
self.contents.font.name = MOG::MPFONT
self.contents.font.size = 22
if $game_system.item_typ == 1
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(x + 76, y + 30, 110, 32, $game_map.mpitnm.to_s,1)
self.contents.draw_text(x - 19, y + 19, 110, 32, $game_system.item_qua.to_s + "X",1)
self.contents.font.color = Color.new(255,255,255,255)
self.contents.draw_text(x + 75, y + 29, 110, 32, $game_map.mpitnm.to_s,1)
self.contents.draw_text(x - 20, y + 18, 110, 32, $game_system.item_qua.to_s + "X",1)
elsif $game_system.item_typ == 2
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(x - 19, y + 19, 110, 32, $game_system.item_qua.to_s + "X",1)
self.contents.draw_text(x + 76, y + 30, 110, 32, $game_map.mpwpnm.to_s,1)
self.contents.font.color = Color.new(255,255,255,255)
self.contents.draw_text(x + 75, y + 29, 110, 32, $game_map.mpwpnm.to_s,1)
self.contents.draw_text(x - 20, y + 18, 110, 32, $game_system.item_qua.to_s + "X",1)
elsif $game_system.item_typ == 3
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(x + 76, y + 30, 110, 32, $game_map.mparnm.to_s,1)
self.contents.draw_text(x - 19, y + 19, 110, 32, $game_system.item_qua.to_s + "X",1)
self.contents.font.color = Color.new(255,255,255,255)
self.contents.draw_text(x + 75, y + 29, 110, 32, $game_map.mparnm.to_s,1)
self.contents.draw_text(x - 20, y + 18, 110, 32, $game_system.item_qua.to_s + "X",1)
else
end 
end
end
##########
# Mpitem #
##########
class Mpitem < Window_Base
def initialize
super($game_system.mpit_x, $game_system.mpit_y, 250, 100)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
refresh
end
def refresh
self.contents.clear
draw_mpitem(10,0) 
end
end
#############
# Scene_Map #
#############
class Scene_Map
alias mog25_main main
def main
@mpit =  Mpitem.new
if  $game_switches[MOG::MPITVIS] == true
@mpit.visible = false
else
@mpit.visible = true 
end
@mpit.contents_opacity = $game_system.fdittm
mog25_main
@mpit.dispose
end
alias mog25_update update
def update
mog25_update
if $ref == true
@mpit.refresh
if MOG::MPITPS == 0
@mpit.x = 200
@mpit.y = -150
elsif MOG::MPITPS == 1
@mpit.x = -240
@mpit.y = 200 
elsif MOG::MPITPS == 2
@mpit.x = 640
@mpit.y = 200 
else
@mpit.x = 200
@mpit.y = 480   
end 
$ref = false
end
if  $game_switches[MOG::MPITVIS] == true
if $game_system.fdittm <= 0
@mpit.visible = false 
else 
@mpit.visible = true
end
else
@mpit.visible = true 
end
$game_system.mpit_x = @mpit.x
$game_system.mpit_y = @mpit.y
if MOG::MPITPS == 0
if @mpit.y < 0
@mpit.y += 8
elsif @mpit.x >= 0
@mpit.y = 0
end   
elsif MOG::MPITPS == 1
if @mpit.x < 0
@mpit.x += 10
elsif @mpit.x >= 0
@mpit.x = 0
end
elsif MOG::MPITPS == 2
if @mpit.x > 400
@mpit.x -= 10
elsif @mpit.x >= 400
@mpit.x = 400
end 
else
if @mpit.y > 380
@mpit.y -= 8
elsif @mpit.y >= 380
@mpit.y = 380
end
end
@mpit.contents_opacity = $game_system.fdittm
if MOG::MPITFD == true
$game_system.fdittm -= 3
end
end
end


Thank me later, or just send me a couple of cookies,  I feel like I could really need some.
But make sure those are vegan cookies.

RogerSmith

Quote from: Subsonic_Noise on April 12, 2010, 07:49:07 am
There's a MOG script for this... wait a sec.

Theeeeere you go.
You'll need a picture named "Itname" in your pictures folder, which will be shown behind the item name.

Spoiler: ShowHide
Quote#_________________________________________________
# MOG_Window Treasure Name V1.2           
#_________________________________________________
# By Moghunter
# http://www.atelier-rgss.com
#_________________________________________________
module MOG
#Font Name.
MPFONT = "Georgia"
#Fade ON/OFF (True - False).
MPITFD = true
#Fade Time(in seconds).
MPITTM = 7
#Window Position.
# 0 = Upper.
# 1 = Left.
# 2 = Right.
# 3 = Lower.
MPITPS = 0
# Disable Window Switch.
MPITVIS = 5
# SE.
MPITSE = "056-Right02"
end
#_________________________________________________
$mogscript = {} if $mogscript == nil
$mogscript["mptreasure"] = true
###############
# Game_System #
###############
class Game_System
attr_accessor :fdittm
attr_accessor :mpit_x
attr_accessor :mpit_y
attr_accessor :it_id
attr_accessor :item_typ
attr_accessor :item_qua
alias mog25_initialize initialize
def initialize
mog25_initialize
@fdittm = 0
@it_id = 1
@wp_id = 1
@ar_id = 1
@item_typ = 0
@mpit_x = 0
@mpit_y = 0
@item_qua = 1
end
def item_typ
return @item_typ
end
def item_qua
return @item_qua
end
def mpit_x
return @mpit_x
end
def mpit_y
return @mpit_y
end
def fdittm
if @fdittm <= 0
@fdittm = 0
end
return @fdittm
end
def it_id
return @it_id
end
end
###############
# Interpreter #
###############
class Interpreter
alias mog25_command126 command_126
def command_126
mog25_command126
$game_system.item_typ = 1
$game_system.fdittm = 255 + 40 * MOG::MPITTM
$game_system.it_id = @parameters[0]
value = operate_value(@parameters[1], @parameters[2], @parameters[3])
$game_system.item_qua = value
unless $game_switches[MOG::MPITVIS] == true
Audio.se_play("Audio/SE/" + MOG::MPITSE, 100,100) rescue nil
end
$ref = true
end
alias mog25_command127 command_127
def command_127
mog25_command127
$game_system.item_typ = 2
$game_system.fdittm = 255 + 40 * MOG::MPITTM
$game_system.it_id = @parameters[0]
value = operate_value(@parameters[1], @parameters[2], @parameters[3])
$game_system.item_qua = value
unless $game_switches[MOG::MPITVIS] == true
Audio.se_play("Audio/SE/" + MOG::MPITSE, 100,100) rescue nil
end
$ref = true
end
alias mog25_command128 command_128
def command_128
mog25_command128
$game_system.item_typ = 3
$game_system.fdittm = 255 + 40 * MOG::MPITTM
$game_system.it_id = @parameters[0]
value = operate_value(@parameters[1], @parameters[2], @parameters[3])
$game_system.item_qua = value
unless $game_switches[MOG::MPITVIS] == true
Audio.se_play("Audio/SE/" + MOG::MPITSE, 100,100) rescue nil
end
$ref = true
end
end 
############
# Game_Map #
############
class Game_Map
attr_reader   :map_id 
def mpitnm
$mpitnm = load_data("Data/Items.rxdata")
$mpitnm[$game_system.it_id].name
end
def mpwpnm
$mpwpnm = load_data("Data/Weapons.rxdata")
$mpwpnm[$game_system.it_id].name
end
def mparnm
$mparnm = load_data("Data/Armors.rxdata")
$mparnm[$game_system.it_id].name
end
end
###############
# Window Base #
###############
class Window_Base < Window
def nd_itpic   
mapic = RPG::Cache.picture("")       
end
def draw_mpitem(x,y)
mapic = RPG::Cache.picture("Itname") rescue nd_itpic     
cw = mapic.width 
ch = mapic.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x , y - ch + 65, mapic, src_rect)
self.contents.font.name = MOG::MPFONT
self.contents.font.size = 22
if $game_system.item_typ == 1
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(x + 76, y + 30, 110, 32, $game_map.mpitnm.to_s,1)
self.contents.draw_text(x - 19, y + 19, 110, 32, $game_system.item_qua.to_s + "X",1)
self.contents.font.color = Color.new(255,255,255,255)
self.contents.draw_text(x + 75, y + 29, 110, 32, $game_map.mpitnm.to_s,1)
self.contents.draw_text(x - 20, y + 18, 110, 32, $game_system.item_qua.to_s + "X",1)
elsif $game_system.item_typ == 2
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(x - 19, y + 19, 110, 32, $game_system.item_qua.to_s + "X",1)
self.contents.draw_text(x + 76, y + 30, 110, 32, $game_map.mpwpnm.to_s,1)
self.contents.font.color = Color.new(255,255,255,255)
self.contents.draw_text(x + 75, y + 29, 110, 32, $game_map.mpwpnm.to_s,1)
self.contents.draw_text(x - 20, y + 18, 110, 32, $game_system.item_qua.to_s + "X",1)
elsif $game_system.item_typ == 3
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(x + 76, y + 30, 110, 32, $game_map.mparnm.to_s,1)
self.contents.draw_text(x - 19, y + 19, 110, 32, $game_system.item_qua.to_s + "X",1)
self.contents.font.color = Color.new(255,255,255,255)
self.contents.draw_text(x + 75, y + 29, 110, 32, $game_map.mparnm.to_s,1)
self.contents.draw_text(x - 20, y + 18, 110, 32, $game_system.item_qua.to_s + "X",1)
else
end 
end
end
##########
# Mpitem #
##########
class Mpitem < Window_Base
def initialize
super($game_system.mpit_x, $game_system.mpit_y, 250, 100)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
refresh
end
def refresh
self.contents.clear
draw_mpitem(10,0) 
end
end
#############
# Scene_Map #
#############
class Scene_Map
alias mog25_main main
def main
@mpit =  Mpitem.new
if  $game_switches[MOG::MPITVIS] == true
@mpit.visible = false
else
@mpit.visible = true 
end
@mpit.contents_opacity = $game_system.fdittm
mog25_main
@mpit.dispose
end
alias mog25_update update
def update
mog25_update
if $ref == true
@mpit.refresh
if MOG::MPITPS == 0
@mpit.x = 200
@mpit.y = -150
elsif MOG::MPITPS == 1
@mpit.x = -240
@mpit.y = 200 
elsif MOG::MPITPS == 2
@mpit.x = 640
@mpit.y = 200 
else
@mpit.x = 200
@mpit.y = 480   
end 
$ref = false
end
if  $game_switches[MOG::MPITVIS] == true
if $game_system.fdittm <= 0
@mpit.visible = false 
else 
@mpit.visible = true
end
else
@mpit.visible = true 
end
$game_system.mpit_x = @mpit.x
$game_system.mpit_y = @mpit.y
if MOG::MPITPS == 0
if @mpit.y < 0
@mpit.y += 8
elsif @mpit.x >= 0
@mpit.y = 0
end   
elsif MOG::MPITPS == 1
if @mpit.x < 0
@mpit.x += 10
elsif @mpit.x >= 0
@mpit.x = 0
end
elsif MOG::MPITPS == 2
if @mpit.x > 400
@mpit.x -= 10
elsif @mpit.x >= 400
@mpit.x = 400
end 
else
if @mpit.y > 380
@mpit.y -= 8
elsif @mpit.y >= 380
@mpit.y = 380
end
end
@mpit.contents_opacity = $game_system.fdittm
if MOG::MPITFD == true
$game_system.fdittm -= 3
end
end
end


Thank me later, or just send me a couple of cookies,  I feel like I could really need some.
But make sure those are vegan cookies.


Subsonic, I've never told anyone this before.....but I love you. I LOVE you. I'll give you any cookie you want.  In fact: