Help - Search - Members - Calendar
Full Version: Oni Series Pack
RPG RPG Revolution Forums > Scripting > Script Development and Support > RGSS2
Pages: 1, 2
onidsouza
Oni Series Pack

The Full Library


Version 1.6

What is this thing?
This, my friend, is the full library of all the important scripts i made.

Where i can download it? (Recommended)
Here
and Here

What are the scripts? (In the editor order)
Oni Respawn
Oni Debug HUD
Oni Feed Me
Oni Jump System
Oni Stamina
Oni Profiles
Oni Introducing to Maps
Oni Better Timer
Oni Actor face in message
Oni Monetary Substitution
Oni Widescreen Cutscene
Oni Different Coins
Oni About Menu
Main (Modified)

There are more scripts coming?
Yes. But, you can help me requesting! it will guive me a lot of more ideas!

Credits
Onidsouza

Thanks to
Woratana ~ If you haven't teached me how to script the basics, i won't be here.
All the noobs who request scripts ~ You guys help to create even better scripters

FAQ
Any help that you need, ask here!

ChangeLog
[Show/Hide] Changes

v1.6 Fixed Minor Bugs, Added Oni Feed Me
v1.5; Added the Oni Widescreen Script
v1.4: Fixed a Debug Error, Fixed a profile system error
v1.3: Fixed a F12 error; Added the Introducing Menu Script
v1.2: Added the Oni Better Timer Script (Plug&Play)
v1.1: Improved the About Menu Script
onidsouza
Updated! Improved the About Menu Script!
Shanghai
Could you link the individual scripts to txt files?

EDIT: Also, isn't this kinda... small to be called a "library"?
onidsouza
Well, i made a LOT of more scripts, but i consider them too small to be considered good scripts. This is only big scripts. And don't worry, i'm making more.

EDIT: Link to txt now...
Shanghai
Aren't these even smaller then?

CODE
#==================================
# ** Oni Actor Face
#----------------------------------
# Developed by Onidsouza
# Do not redestribute without permission
# In a message,
# F[Actor Id] change the face graphic.
#============================================

class Window_Message < Window_Selectable

alias onicsc convert_special_characters

def convert_special_characters
onicsc
@text.gsub!(/\\F\[([0-9]+)\]/i) { set_fc_graphic($1.to_i) }
end

def set_fc_graphic(id)
$game_message.face_name = $game_actors[id].face_name
$game_message.face_index = $game_actors[id].face_index
return ""
end

end


CODE
#==================================
# ** Oni Monetary Substitution
#----------------------------------
# Developed by Onidsouza
# Do not redestribute without permission
# In a message,
# \M[Number] transfer that into the monetary system
#============================================

class Window_Message < Window_Selectable

alias onicscm convert_special_characters

def convert_special_characters
onicscm
@text.gsub!(/\\M\[([0-9]+)\]/i) { to_monetary_system($1.to_i) }
end

end


Edit: Thanks for uploading them as txt files. I dislike downloading exe's because people usually are unaware of the viruses they have.
onidsouza
They are add-ons. When i say smaller, i wanted to say difficult. Sorry
Dark Santum
are those just minor addons scripts?
Shanghai
Oh, I see. Could you post some of those other ones? Even if they aren't difficult, they can still be helpful for us users.
onidsouza
Sure. (If i find them im my big HD tongue.gif )
@dark Satum

2 of they are add-ons to the message system.
onidsouza
Update! Added the Better timer script!
Shanghai
Shouldn't they be in your RPG VX folder? Don't need to look through the whole HD.
also, the monetary substitution script doesnt work without the different coins script. shouldn't you put them together in the same one or at least say it requires the other? I was getting confused why it didnt work for me.

edit: theres a few bugs


the stamina display textdoesn't disappear in new scenes and the names for items scrunch up the monetary text
also, i get this error when i press f12

onidsouza
About the item name there is no solution. You must make items with smaller names. Or you don't use this script.
The stamina works fine here, have you put the scripts in the right order? I Strongly recommend that you download the demo, because everything is already configured and in the right order.
About the projects, most of them i save in separeted folders.
About the Jump Error, i fixed it, uploading now...
Shanghai
Actually, I took those screenshots right out of your demo.
onidsouza
Well, in my game that sword name isn't legenday king sword, is only king sword. Anyway, you got the point.


Shanghai
I renamed it to Legendary King Sword to make sure if it was a bug.
onidsouza
Ah. It's uploaded now, v1.3.
Still uploading the demo... Wait...
Demo uploaded.
Now the scripts here are in the order to be placed in the RPG Maker Script Editor
Shanghai
I downloaded your new "demo" and found some more bugs.


that's what happened when i tried pressing f12 again after one reset.

also profiles dont save when you click the X button or do alt+f4
onidsouza
Solved That SystemStackError, coming on next release
About the X button, i'm shearching on how to solve this, i will need to call Win32API

EDIT: No need to use Win32API, just use rescue SystemExit command
Uploading new version now... Uploaded
Shanghai
Yet another one... This one from alt + f4



Do you really test these? I think I'm gonna quit after this... I was so excited, too.. wwwww
breadlord
Oni - When I click on the link for map introducctions it says file not found. huh.gif, but otherwise, nice biggrin.gif
onidsouza
I've tested! Is becaus i suck at finding my own errors...
Please don't guive up! You are a perfect tester!
Hey, i tested now and Alt+F4 worked very nice. What you are doing exactly when you got that error?
@breadlord
I fixed the link
KPaxian
So I have a request that would make my game (and many others I guess) more realistic.
Could you make a script that enables hunger and thirst to characters? Like when you get thirsty you can't run, or when hungry your HP cannot recover. And a tag to items that can recover the states.
Thanks and regards.
newking
thanks for this pack smile.gif
onidsouza
You're welcome. Version 1.5, uploading. I've made a Widescreen Cutscene script.
Uploading...complete
EDIT:
I haven't seen your request. I will start to work on it right now! Maybe in 2 or 3 days it will be ready (I'm really busy this weeken)
Shanghai
QUOTE (onidsouza @ Jul 3 2009, 12:32 AM) *
I've tested! Is becaus i suck at finding my own errors...
Please don't guive up! You are a perfect tester!
Hey, i tested now and Alt+F4 worked very nice. What you are doing exactly when you got that error?
@breadlord
I fixed the link

Sorry, the whole thing doesn't really interest me. The scripts are pretty mediocre and they're far from complete so you'll just have to find someone else to test them for you. Besides, all the things you're doing can be mostly evented anyway.
KPaxian
QUOTE (onidsouza @ Jul 3 2009, 02:07 PM) *
You're welcome. Version 1.5, uploading. I've made a Widescreen Cutscene script.
Uploading...complete
EDIT:
I haven't seen your request. I will start to work on it right now! Maybe in 2 or 3 days it will be ready (I'm really busy this weeken)



Thanks, you're the best!
onidsouza
It's ready, i'm uploading now. About the tags, i cound't do-it (I suck at regular expressions, most i made i copied them from the original scripts).
You need to configure them via script. But it's simple:
Item ID => How much it recovers.
Uploading... Complete
New version: 1.6
KPaxian
QUOTE (onidsouza @ Jul 4 2009, 09:20 AM) *
It's ready, i'm uploading now. About the tags, i cound't do-it (I suck at regular expressions, most i made i copied them from the original scripts).
You need to configure them via script. But it's simple:
Item ID => How much it recovers.
Uploading... Complete
New version: 1.6


Thanks again! I'm speechless mellow.gif
onidsouza
You're welcome!
KPaxian
Have you tested the Feed me script. Because when I use the item it plays the error sound but still feeds the hero. And the item doesn't disappear after usage. I made it consumable, so I guess it a bug in the script.
onidsouza
Ah, i forgot to tell you one thing! In grow effect, choose any value and set it to 0. If you look at the demo all the items that recover/increase hungry and thirsth have the grow effect value set to 0. Please download the demo before asking for solutions,
KPaxian
QUOTE (onidsouza @ Jul 5 2009, 05:41 AM) *
Ah, i forgot to tell you one thing! In grow effect, choose any value and set it to 0. If you look at the demo all the items that recover/increase hungry and thirsth have the grow effect value set to 0. Please download the demo before asking for solutions,


Damn I didn't even see the demo! sad.gif I'm really sorry... Thanks
deffenex
Two problems. #1- I need the Profile script to be compatible with Requiem Battle system.
#2- This isn't that big of a deal but the Feed Me script is very glitchy.
onidsouza
1. i will try to make that
2. what do you mean glitchy?
onidsouza
Here, should be compatible:
CODE

#==================================
# ** Oni Profiles
#----------------------------------
# Developed by Onidsouza
# Do not redestribute without permission
#=================================

module Prof

Alarm = "Profiles Limit Reached!"

Save_Name = "Save"

Del_Text = "Press D to delete an Save"

Key = Input::Z

Confirmation = ["Delete", "Cancel"]

DisableSave = true

end

class Profile

attr_accessor :file

def initialize(save_file = "")
@file = save_file
end

def loaded?
return @file != ""
end

def save
fileM = Scene_File.new(true, false, true)
file = File.open(@file, "wb")
fileM.write_save_data(file)
file.close
end

end


class Scene_File

alias onidsouza_profiles_rsd read_save_data
alias onidsouza_do_load do_load
alias onidsouza_update update
alias onidsouza_selec update_savefile_selection
def start
super
create_menu_background
@help_window = Window_Help.new
create_savefile_windows
if @saving
@index = $game_temp.last_file_index
@help_window.set_text(Vocab::SaveMessage)
else
@index = self.latest_file_index
@help_window.set_text(Vocab::LoadMessage)
@help_window.set_text(Vocab::LoadMessage + " " + Prof::Del_Text) if not @saving
end
@savefile_windows[@index].selected = true
end

def update
onidsouza_update
if Input.trigger?(Prof::Key)
Sound.play_buzzer if not File.exists?(@savefile_windows[@index].filename)
confirm_delete if not @saving
end
end

def confirm_delete
do_delete
end

def do_delete
if @savefile_windows[@index].file_exist
File.delete(@savefile_windows[@index].filename)
$scene = Scene_File.new(@saving, @from_title, @from_event)
end
end

def do_load
$profile.save if $profile.loaded?
onidsouza_do_load
end

def read_save_data(file)
onidsouza_profiles_rsd(file)
$profile = Profile.new(make_filename(@index))
end

end

class Scene_Title

alias opsmain main
alias opsnewgame command_new_game
alias opsterminate terminate
alias opsupdate update

def main
$profile = Profile.new
$profile.save if $profile.loaded?
@window_alarm = Window_Alarm.new
@window_alarm.visible = false
opsmain
end

def terminate
opsterminate
@window_alarm.dispose
end

def update
opsupdate
if (Input.trigger?(Input::B)) and @window_alarm.alarming
@window_alarm.alarming = false
end
@window_alarm.refresh
if @window_alarm.alarming
@command_window.active = false
@window_alarm.visible = true
else
@command_window.active = true
@window_alarm.visible = false
end
end

def command_new_game
for i in 0..3
next if File.exists?("#{Prof::Save_Name}#{i + 1}.rvdata")
$profile.file = "#{Prof::Save_Name}#{i + 1}.rvdata"
break
end
unless $profile.file == ""
opsnewgame
$profile.save
end
if $profile.file == ""
@window_alarm.alarming = true
end
end

end

class Window_Alarm < Window_Base

attr_writer :alarming

def initialize
super(150, 200, 240, 60)
@alarming = false
self.z = 200
end

def alarming
return @alarming
end

def refresh
self.contents.clear
draw_alarm
end

def draw_alarm
self.contents.draw_text(0, 0, 200, WLH, Prof::Alarm, 1)
end

end

class Scene_Menu < Scene_Base

alias onips_ccw create_command_window
alias onips_start start

def start
onips_start
$game_system.save_disabled = true
end

def create_command_window
onips_ccw
@command_window.draw_item(4, false) if Prof::DisableSave
end

end

class Scene_End < Scene_Base
alias oniprof command_to_title

def command_to_title
$profile.save
oniprof
end

end


Tell me the results, i don't want to upload this new one without have sure it's compatible.
KPaxian
Oni, sorry about bothering you again, but i'd be very grateful if could make huds for the FeedMe script that appear on map, not in the status menu. Like the Stamina scrpit if it's not too dificult.
Thanks again.
onidsouza
QUOTE (KPaxian @ Jul 8 2009, 12:09 PM) *
Oni, sorry about bothering you again, but i'd be very grateful if could make huds for the FeedMe script that appear on map, not in the status menu. Like the Stamina scrpit if it's not too dificult.
Thanks again.


Yes i can but...
1. You must explain how to you wan't the HUD.
2. It will guive a lot of LAG
KPaxian
QUOTE
Yes i can but...
1. You must explain how to you wan't the HUD.
2. It will guive a lot of LAG


1. I want a hud that has two gauges - 1 for the hunger and 1 for the thirst. The hud for the stamina script, for example, which updates in real time and shows up on the map. Like the gauges in the status menu but on the map screen. I hope I didn't confuse you happy.gif

2. I hope it won't biggrin.gif
Kinerex Shiomi
QUOTE (onidsouza @ Jul 2 2009, 10:14 PM) *
Solved That SystemStackError, coming on next release
About the X button, i'm shearching on how to solve this, i will need to call Win32API

EDIT: No need to use Win32API, just use rescue SystemExit command
Uploading new version now... Uploaded


you said u would help people...how about spreading your knowledge of scripting. I would love to learn so i can contribute to this website. And i seen ur scripts and would like to become as talented.

its up to you, but thanks anyway
onidsouza
QUOTE (Kinerex Shiomi @ Jul 12 2009, 12:22 AM) *
you said u would help people...how about spreading your knowledge of scripting. I would love to learn so i can contribute to this website. And i seen ur scripts and would like to become as talented.

its up to you, but thanks anyway


Well, you can ask what you want here!
You can ask for help in the RGSS2 support forum, or PM on me. I'm sure someone could be able to help you.
I do not recommed my scripts for begginers, because they aren't very commented. But anything that you do not understand in my scripts PM on me that i will explain very detailed for you!
Not only you, i'm up to help anyone who need help to script.
smile.gif

@KPaxian

1. I'm working on that.

2. I'm sure it will affect the frame rate (the famous LAG)

3. Do you want it in the bottom or in the top?
KPaxian
1. Wish you luck.
2. It's a pity.
aaand
3. Top right, thank you smile.gif
Khev
How about some RGSS2 tutorials for some brazilian fellas ;D
onidsouza
@KPaxian

Almost done... maybe tomorrow

@Khev

Brazil? You can ask anything you want in my community, i will be glad to help:
www.magnarpg.com.br
KPaxian
When you are ready. It's not so urgent.
KPaxian
QUOTE (KPaxian @ Jul 14 2009, 02:20 AM) *
When you are ready. It's not so urgent.


Okay I shouldn't have said it's not urgent, but I thought you'd finish it in a couple of days or so... Not more than 2 weeks! Isn't it ready?
onidsouza
QUOTE (KPaxian @ Aug 2 2009, 04:31 PM) *
QUOTE (KPaxian @ Jul 14 2009, 02:20 AM) *
When you are ready. It's not so urgent.


Okay I shouldn't have said it's not urgent, but I thought you'd finish it in a couple of days or so... Not more than 2 weeks! Isn't it ready?


Oh my god! I forgot your request! Making in 3 seconds! ^^

Sorry.

Here:


CODE
#==============================================================================
# ** Oni Feed Me
#----------------------------------
# Developed by Onidsouza
# Do not redestribute without permission
#==============================================================================
module FeedMe
  
  #========================================
  # <<<<<<<<< NEED TO CONFIGURE >>>>>>>>>>
  #========================================
  
  Time = 1 # Minutes to increase the Hungry and Thirst +1
  
  ShowMenu = true # Show Hungry and Thirst in the Status Menu
  
  HungryColor = Color.new(255, 0, 0) # If in menu, what's the
                                     #color to represent hungry?
  ThirstColor = Color.new(0, 0, 255) # If in menu, what's the
                                     #color to represent thirst?
  
  RecoverHungry = {21 => 3, # Items that change the Hungry Value
                            # Item ID => Value
                            # To increase Hungry, use a negative value
                            # To decrease Hungry, use a positive value
                   23 => -3}
                  
  RecoverThirst = {22 => 3, # Items that change the Thirst Value
                            # Item ID => Value
                            # To increase Thirst, use a negative value
                            # To decrease Thirst, use a positive value
                   23 => -3}
                  
  #========================================
  # <<<<<<<<< NEED TO CONFIGURE >>>>>>>>>>
  #========================================
  
end

class Game_Actor < Game_Battler
  
  alias feedMeInitialize initialize
  alias feedMeExecute execute_damage
  alias feedMeItemEffect item_effect
  
  attr_reader :hungry
  attr_reader :thirst
  attr_reader :time
  
  def initialize(actor_id)
    feedMeInitialize(actor_id)
    @hungry = 0
    @thirst = 0
    @time = 0
  end
  
  def update
    @time += 1
    unless (@time / Graphics.frame_rate) < (FeedMe::Time * 60)
      @time = 0
      @hungry = [@hungry + 1, 10].min
      @thirst = [@thirst + 1, 10].min
    end
  end
  
  def food(level)
    @hungry = [[(@hungry - level), 0].max, 10].min
  end
  
  def drink(level)
    @thirst = [[(@thirst - level), 0].max, 10].min
  end
  
  def execute_damage(user)
    unless @hp_damage < 0 and @thirst == 10
      feedMeExecute(user)
    end    
  end
  
  def item_effect(user, item)
    unless FeedMe::RecoverHungry[item.id] == nil
      food(FeedMe::RecoverHungry[item.id])
    end
    unless FeedMe::RecoverThirst[item.id] == nil
      drink(FeedMe::RecoverThirst[item.id])
    end
    unless item.hp_recovery != 0 and @hungry == 10
    feedMeItemEffect(user, item)
    end
  end
  
end

class Game_Player < Game_Character
  
  alias feedMeDash dash?  
  
  def dash?
    return false if $game_party.members[0].thirst == 10
    feedMeDash
  end
  
end

class Scene_Map < Scene_Base
  
  alias feedMeUpdate update
  
  def update
    feedMeUpdate
    for actor in $game_party.members
      actor.update
    end
  end
  
end

class Window_Status < Window_Base
  
  alias feedMeRefresh refresh
  
  def refresh
    feedMeRefresh
    draw_hunger_status(300, 300)
  end
  
  def draw_hunger_status(x, y)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 100, WLH, "Hunger")
    self.contents.draw_text(x, y + 30, 100, WLH, "Thirst")
    self.contents.font.color = normal_color
    self.contents.fill_rect(x + 100, y, 100, WLH, Color.new(0, 0, 0))
    self.contents.fill_rect(x + 100, y + 30, 100, WLH, Color.new(0, 0, 0))
    xx = x + 100
    @actor.hungry.times do
      self.contents.fill_rect(xx, y, 10, WLH, FeedMe::HungryColor)
      xx += 10
    end
    xx = x + 100
    yy = y + 30
    @actor.thirst.times do
      self.contents.fill_rect(xx, yy, 10, WLH, FeedMe::ThirstColor)
      xx += 10
    end
  end
  
end

class Window_FeedMe_HUD < Window_Base
  
  def initialize
    super(0, 0, 544, 416)
    self.opacity = 0
    @actor = $game_party.members[0]
  end
  
  def refresh
    self.contents.clear
    draw_hunger_status(300, 0)
  end
  
  def draw_hunger_status(x, y)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 100, WLH, "Hunger")
    self.contents.draw_text(x, y + 30, 100, WLH, "Thirst")
    self.contents.font.color = normal_color
    self.contents.fill_rect(x + 100, y, 100, WLH, Color.new(0, 0, 0))
    self.contents.fill_rect(x + 100, y + 30, 100, WLH, Color.new(0, 0, 0))
    xx = x + 100
    @actor.hungry.times do
      self.contents.fill_rect(xx, y, 10, WLH, FeedMe::HungryColor)
      xx += 10
    end
    xx = x + 100
    yy = y + 30
    @actor.thirst.times do
      self.contents.fill_rect(xx, yy, 10, WLH, FeedMe::ThirstColor)
      xx += 10
    end
  end
  
end

class Scene_Map < Scene_Base
  
  alias fmhudinit start
  alias fmhuddis terminate
  alias fmhudupdate update
  
  def start
    fmhudinit
    @fmhud = Window_FeedMe_HUD.new
  end
  
  def terminate
    fmhuddis
    @fmhud.dispose
  end
  
  def update
    fmhudupdate
    @fmhud.refresh
  end
  
end

KPaxian
QUOTE (onidsouza @ Aug 2 2009, 01:13 PM) *
QUOTE (KPaxian @ Aug 2 2009, 04:31 PM) *
QUOTE (KPaxian @ Jul 14 2009, 02:20 AM) *
When you are ready. It's not so urgent.


Okay I shouldn't have said it's not urgent, but I thought you'd finish it in a couple of days or so... Not more than 2 weeks! Isn't it ready?


Oh my god! I forgot your request! Making in 3 seconds! ^^

Sorry.

Here:


CODE
#==============================================================================
# ** Oni Feed Me
#----------------------------------
# Developed by Onidsouza
# Do not redestribute without permission
#==============================================================================
module FeedMe
  
  #========================================
  # <<<<<<<<< NEED TO CONFIGURE >>>>>>>>>>
  #========================================
  
  Time = 1 # Minutes to increase the Hungry and Thirst +1
  
  ShowMenu = true # Show Hungry and Thirst in the Status Menu
  
  HungryColor = Color.new(255, 0, 0) # If in menu, what's the
                                     #color to represent hungry?
  ThirstColor = Color.new(0, 0, 255) # If in menu, what's the
                                     #color to represent thirst?
  
  RecoverHungry = {21 => 3, # Items that change the Hungry Value
                            # Item ID => Value
                            # To increase Hungry, use a negative value
                            # To decrease Hungry, use a positive value
                   23 => -3}
                  
  RecoverThirst = {22 => 3, # Items that change the Thirst Value
                            # Item ID => Value
                            # To increase Thirst, use a negative value
                            # To decrease Thirst, use a positive value
                   23 => -3}
                  
  #========================================
  # <<<<<<<<< NEED TO CONFIGURE >>>>>>>>>>
  #========================================
  
end

class Game_Actor < Game_Battler
  
  alias feedMeInitialize initialize
  alias feedMeExecute execute_damage
  alias feedMeItemEffect item_effect
  
  attr_reader :hungry
  attr_reader :thirst
  attr_reader :time
  
  def initialize(actor_id)
    feedMeInitialize(actor_id)
    @hungry = 0
    @thirst = 0
    @time = 0
  end
  
  def update
    @time += 1
    unless (@time / Graphics.frame_rate) < (FeedMe::Time * 60)
      @time = 0
      @hungry = [@hungry + 1, 10].min
      @thirst = [@thirst + 1, 10].min
    end
  end
  
  def food(level)
    @hungry = [[(@hungry - level), 0].max, 10].min
  end
  
  def drink(level)
    @thirst = [[(@thirst - level), 0].max, 10].min
  end
  
  def execute_damage(user)
    unless @hp_damage < 0 and @thirst == 10
      feedMeExecute(user)
    end    
  end
  
  def item_effect(user, item)
    unless FeedMe::RecoverHungry[item.id] == nil
      food(FeedMe::RecoverHungry[item.id])
    end
    unless FeedMe::RecoverThirst[item.id] == nil
      drink(FeedMe::RecoverThirst[item.id])
    end
    unless item.hp_recovery != 0 and @hungry == 10
    feedMeItemEffect(user, item)
    end
  end
  
end

class Game_Player < Game_Character
  
  alias feedMeDash dash?  
  
  def dash?
    return false if $game_party.members[0].thirst == 10
    feedMeDash
  end
  
end

class Scene_Map < Scene_Base
  
  alias feedMeUpdate update
  
  def update
    feedMeUpdate
    for actor in $game_party.members
      actor.update
    end
  end
  
end

class Window_Status < Window_Base
  
  alias feedMeRefresh refresh
  
  def refresh
    feedMeRefresh
    draw_hunger_status(300, 300)
  end
  
  def draw_hunger_status(x, y)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 100, WLH, "Hunger")
    self.contents.draw_text(x, y + 30, 100, WLH, "Thirst")
    self.contents.font.color = normal_color
    self.contents.fill_rect(x + 100, y, 100, WLH, Color.new(0, 0, 0))
    self.contents.fill_rect(x + 100, y + 30, 100, WLH, Color.new(0, 0, 0))
    xx = x + 100
    @actor.hungry.times do
      self.contents.fill_rect(xx, y, 10, WLH, FeedMe::HungryColor)
      xx += 10
    end
    xx = x + 100
    yy = y + 30
    @actor.thirst.times do
      self.contents.fill_rect(xx, yy, 10, WLH, FeedMe::ThirstColor)
      xx += 10
    end
  end
  
end

class Window_FeedMe_HUD < Window_Base
  
  def initialize
    super(0, 0, 544, 416)
    self.opacity = 0
    @actor = $game_party.members[0]
  end
  
  def refresh
    self.contents.clear
    draw_hunger_status(300, 0)
  end
  
  def draw_hunger_status(x, y)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 100, WLH, "Hunger")
    self.contents.draw_text(x, y + 30, 100, WLH, "Thirst")
    self.contents.font.color = normal_color
    self.contents.fill_rect(x + 100, y, 100, WLH, Color.new(0, 0, 0))
    self.contents.fill_rect(x + 100, y + 30, 100, WLH, Color.new(0, 0, 0))
    xx = x + 100
    @actor.hungry.times do
      self.contents.fill_rect(xx, y, 10, WLH, FeedMe::HungryColor)
      xx += 10
    end
    xx = x + 100
    yy = y + 30
    @actor.thirst.times do
      self.contents.fill_rect(xx, yy, 10, WLH, FeedMe::ThirstColor)
      xx += 10
    end
  end
  
end

class Scene_Map < Scene_Base
  
  alias fmhudinit start
  alias fmhuddis terminate
  alias fmhudupdate update
  
  def start
    fmhudinit
    @fmhud = Window_FeedMe_HUD.new
  end
  
  def terminate
    fmhuddis
    @fmhud.dispose
  end
  
  def update
    fmhudupdate
    @fmhud.refresh
  end
  
end




Thanks biggrin.gif Sorry about rushing but I've promised a demo to a friend.. laugh.gif
onidsouza
No, i'm sorry.
I totally forgot about your request!
KPaxian
I guess you were right about the hud. My screen is way too overcrowded with huds and stuff... Perhaps I'll go back to the previous script.
Kiku Maru Xtreme
Do you take requests here???
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.