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.

Non-Mog treasure popup thing

Well yeah, I was using Mog's stuff, but then I quit cuz I couldn't find custom graphics for it, and I'm too stupid to make my own. And also something in the Mog stuff was interfering with my variables, which isn't good...especially since my skill system uses variables to store how much AP the characters have.

But then I realized I didn't have the treasure popup thing anymore. So now I have all these treasure chests that don't have any indication of what you just got from it...and I don't want to go in and change every single treasure chest so it gives a message and does a sound, especially since I might change the item names later on and stuff.

So it would be a lot better in every way if I could just have a simple standalone treasure popup thing. It wouldn't even need a sound or anything...all I want is for it to just show you what items you gain through a script. And also I need a way to turn it off and on easily, like with a switch or something.
 

Kraft

Sponsor

Do you want graphics for it?

I made several that I use in my game that look pretty good. ^_^

Also, the mog thing needs the newest (2.2 I think) version of the SDK...

I had problems with the new SDK (it interfered with other scripts)
and I just Put (in the script editor) the 2.2 SDK, and then under that the SDK 2.2 patch that makes it work with older scripts, and then under THAT I placed the older version of the SDK that worked with what I was useing.

All of that worked out for me... so ^_^

But yeah, if that doesnt work, I guess I cant help you ^_^

But again, I make good-looking graphics for it if you are interested ^_^

~Kraft
 
You just confused the crap out of me lol. Maybe I'll consider it sometime in the next couple months. I decided that like in a couple months I'm just gonna start all over on all my scripts, so maybe I'll do it then, we'll see.
 

Kraft

Sponsor

Sorry...

Just read it slower ^_^

I had problems with the SDK and the MOG treasure window also.
The treasure window thing needs the SDK version 2.2.

That version screws up all of the older SDK scripts, so I just put both the new, and the older SDK scripts in there and it all worked.

And I asked you if you wanted me to make you some graphics for the treasure window thing. (You said you couldnt find any..)

~Kraft
 
Hm...well once I start over with my scripts I'll let you know. You wouldn't mind helping a sad, helpless noob like myself? Lol.

Edit: Was your problem with variables too? Has that issue been fixed or not...cuz that was the main reason I stopped using the Mog stuff.
 
#_________________________________________________
# MOG_Window Treasure Name V1.5
#_________________________________________________
# By Moghunter
# http://www.atelier-rgss.com
#_________________________________________________
module MOG
#Font Name.
MPFONT = "Exocet"
#Fade ON/OFF (True - False).
MPITFD = true
#Fade Time.
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_Temp #
#############
class Game_Temp
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
end
###############
# Interpreter #
###############
class Interpreter
alias mog25_command126 command_126
def command_126
mog25_command126
$game_temp.item_typ = 1
$game_temp.fdittm = 255 + 40 * MOG::MPITTM
$game_temp.it_id = @parameters[0]
value = operate_value(@parameters[1], @parameters[2], @parameters[3])
$game_temp.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_temp.item_typ = 2
$game_temp.fdittm = 255 + 40 * MOG::MPITTM
$game_temp.it_id = @parameters[0]
value = operate_value(@parameters[1], @parameters[2], @parameters[3])
$game_temp.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_temp.item_typ = 3
$game_temp.fdittm = 255 + 40 * MOG::MPITTM
$game_temp.it_id = @parameters[0]
value = operate_value(@parameters[1], @parameters[2], @parameters[3])
$game_temp.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_temp.it_id].name
end
def mpwpnm
$mpwpnm = load_data("Data/Weapons.rxdata")
$mpwpnm[$game_temp.it_id].name
end
def mparnm
$mparnm = load_data("Data/Armors.rxdata")
$mparnm[$game_temp.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_temp.item_typ == 1
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(x - 19, y + 19, 110, 32, $game_temp.item_qua.to_s + "X",1)
self.contents.draw_text(x + 80, y + 29, 110, 32, $game_map.mpitnm.to_s,1)
self.contents.font.color = Color.new(255,255,255,255)
self.contents.draw_text(x - 20, y + 18, 110, 32, $game_temp.item_qua.to_s + "X",1)
self.contents.draw_text(x + 81, y + 30, 110, 32, $game_map.mpitnm.to_s,1)
icon_name = $data_items[$game_temp.it_id].icon_name
icon_pic = RPG::Cache.icon(icon_name.to_s)
self.contents.blt(x + 55, y + 34, icon_pic, Rect.new(0, 0, 24, 24), 255)
elsif $game_temp.item_typ == 2
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(x - 19, y + 19, 110, 32, $game_temp.item_qua.to_s + "X",1)
self.contents.draw_text(x + 80, 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 + 81, y + 29, 110, 32, $game_map.mpwpnm.to_s,1)
self.contents.draw_text(x - 20, y + 18, 110, 32, $game_temp.item_qua.to_s + "X",1)
icon_name = $data_weapons[$game_temp.it_id].icon_name
icon_pic = RPG::Cache.icon(icon_name.to_s)
self.contents.blt(x + 55, y + 34, icon_pic, Rect.new(0, 0, 24, 24), 255)
elsif $game_temp.item_typ == 3
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(x + 80, y + 30, 110, 32, $game_map.mparnm.to_s,1)
self.contents.draw_text(x - 19, y + 19, 110, 32, $game_temp.item_qua.to_s + "X",1)
self.contents.font.color = Color.new(255,255,255,255)
self.contents.draw_text(x + 81, y + 29, 110, 32, $game_map.mparnm.to_s,1)
self.contents.draw_text(x - 20, y + 18, 110, 32, $game_temp.item_qua.to_s + "X",1)
icon_name = $data_armors[$game_temp.it_id].icon_name
icon_pic = RPG::Cache.icon(icon_name.to_s)
self.contents.blt(x + 55, y + 34, icon_pic, Rect.new(0, 0, 24, 24), 255)
else
end
end
end
##########
# Mpitem #
##########
class Mpitem < Window_Base
def initialize
super($game_temp.mpit_x, $game_temp.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_temp.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 or $game_temp.fdittm <= 0
@mpit.visible = false
else
@mpit.visible = true
end
$game_temp.mpit_x = @mpit.x
$game_temp.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_temp.fdittm
if MOG::MPITFD == true
$game_temp.fdittm -= 3 if $game_temp.fdittm > 0
end
end
end
 
Sorry it took me so long to respond. Thx a lot dude, it works great.

I did go ahead and put messages in all the chests...so it looks like I'm off to change each treasure chest...again lol. But I need to cuz with the messages it's not aligned within the borders well just because of the messaging system I'm using.

Is there a way to use a picture as a frame for the pop up window? Or maybe use the windowskin?

Edit: Oh, and also would there be a way to modify this so that it will pop up for when gold is obtained? Like maybe just have it like with items, but just show the number of gold, and then have whatever currency is set as in the database where the item name usually is.
 

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