iPhone App Directory
RPG Maker VX
 
Gallery Members Search Calendar Help


Welcome Guest ( Log In | Register )

Collapse

>Announcement

Keep an eye out for the upcoming 3rd Quarter Contest!
5 Pages V   1 2 3 > »   
Reply to this topicStart new topic
> Alignment System, Now includes Alignment Gauge!
Rating 4 V
Jet
post Jan 5 2010, 01:42 AM
Post #1


He Who Jets
Group Icon


Type: Coder
Alignment: Lawful Neutral




Introduction


This script adds a simple and easy-to-use alignment system to your game. This will allow the character to be good, evil, or anything in-between. You can even change it up from alignment to other stuff like Rank or Vampirism.


Features


- Adds Alignment
- Easy to add/subtract points
- Easy to make new alignment names
- Adds alignment name in status menu
- You can add tags to equipment/skills to require a certain alignment condition


Screenshots




Ignore the Hunger/Thirst/Nature parts on this one. They are from my other scripts.


How To Use


The alignment name and value match to the corresponding one in the other array.

EX: In the default, "Very Evil" is the first name, and -100 is the first condition

This means, if -100 or lower is the value of $game_system.alignment, the
character will be "Very Evil".
--------------------------------------------------------------------------------
How to change alignment: We have 2 command to change alignment points.

sub_alignment(points) and add_alignment(points)

In both commands, replace "points" with the amount of change you want in the
character's alignment points.

sub_alignment will subtract the amount of points.
add_alignment will add the amount of points


Script/Pictures


Can be found here.

Future Features


- Weapons/armor/skills dependent on alignment DONE
- Choose bewteen an in-game variable and add_alignment(points) DONE
- Suggested Features


FAQ


Q: How do I add or subtract points?
A: Read the Instructions!

Q: How do I add more alignment names?
A: Add the name, in quotes, where you want to. Then add the points requirement in the same place, but in the other array.
EX:

CODE
ALIGNMENT_NAMES = ["Very Evil", "Kinda Evil", "evil", "neutral", "good", "very good"]

I added "Kinda Evil" between "very evil" and "evil". Now I must add the requirement.

CODE
ALIGNMENT_CONDITION = [-100, -75, -50, 0, 50, 100]

See how i added -75 between the requirement for "very evil" and "evil" just like i put "kinda evil"? Thats how.


Credit and Thanks

- Jet10985
- CrimsonSeas (rpgmakervx.net)
- Piejamas (rpgmakervx.net)
- Mithran (rpgmakervx.net)
- Yanfly
- OriginalWij
- Synthesis


This post has been edited by Jet: Sep 12 2010, 01:20 AM


--------------------
Go to the top of the page
 
+Quote Post
   
ShadowXzygon
post Jan 5 2010, 03:21 AM
Post #2


The Interloper
Group Icon


Type: Writer
Alignment: Chaotic Evil




This is cool. But, would it be possible to, instead of adding it to the status window, add it onto an HUD during the game? That would be cool.
(The only reason I request this is because I don't actually use a menu. XD.)


--------------------


QUOTE
"You die a lot. That's not healthy."


QUOTE
Real life contains glitches, what the %&$@?
Go to the top of the page
 
+Quote Post
   
Jet
post Jan 5 2010, 05:21 AM
Post #3


He Who Jets
Group Icon


Type: Coder
Alignment: Lawful Neutral




QUOTE (ShadowXzygon @ Jan 4 2010, 09:21 PM) *
This is cool. But, would it be possible to, instead of adding it to the status window, add it onto an HUD during the game? That would be cool.
(The only reason I request this is because I don't actually use a menu. XD.)


If you already have some sort of HUD script, I'd be happy to add it onto there for you.


--------------------
Go to the top of the page
 
+Quote Post
   
mithos
post Jan 5 2010, 10:05 AM
Post #4


Meowthos the zombie cat!!
Group Icon


Type: Coder
Alignment: Lawful Good




nice script smile.gif


--------------------
I've been away for a while. Here's my really quite old stuff
Spoiler:


If it's in one of my threads you can use it so long as you read this, and give me a link to any derivatives (i.e. works based off mine). Credit Mithos.
Full legal bit
(Click image for human-readable version :P )
My Stuff:
My Games:
Spoiler:

Story <60%> Mapping<20%> Art<80%> Scripts<97%> Database<50%>
The Legend of Zelda: Restoration of Time Story<20%> Mapping<0%> Art<2%> Scripts<70%> Database<0%>
Absolute Power Story<21%> Mapping<0%> Art<2%> Scripts<0%> Database<0%>

My Sprites:
My Scripts:
I support:
Spoiler:





Go to the top of the page
 
+Quote Post
   
CrimsonSeas
post Jan 5 2010, 10:07 AM
Post #5



Group Icon


Type: Coder




This is quite nice. Simple, but nice indeed smile.gif


--------------------
As long as I can still make something myself, I'll make it myself. But in the case that I can't, please do help me out :P

Thanks Kaimi!
Go to the top of the page
 
+Quote Post
   
piejamas
post Jan 5 2010, 10:57 AM
Post #6


Pump up the pie, yo!
Group Icon


Type: Coder
Alignment: Neutral Good




Lots of potential in this script smile.gif
a few suggestions?

- Adding the draw_alignment method to Window_Base for use in other scripts
- Making skills/equipmenmt dependant on alignment
- Making the alignment points a game variable(better for use in branches)
- Making killing certain enemies affect alignment

Good luck lol biggrin.gif
Go to the top of the page
 
+Quote Post
   
ZeroManArmy
post Jan 5 2010, 02:52 PM
Post #7


Click the Pokémon Banner!
Group Icon


Type: Undisclosed
Alignment: Chaotic Neutral




I really like this. But how Would I put this into Yanfly Scene Status Redux?


--------------------
Go to the top of the page
 
+Quote Post
   
???nOBodY???
post Jan 5 2010, 07:14 PM
Post #8


moogles + nightmares + coffee = Scripting Psychopathic Tendency
Group Icon


Type: Coder
Alignment: Chaotic Neutral




QUOTE (ZeroManArmy @ Jan 5 2010, 08:52 AM) *
I really like this. But how Would I put this into Yanfly Scene Status Redux?


I'm pretty sure you need to add the draw command from this script to the yanfly script. If that doesn't work, try changing script placement in your script list; aka, moving the script either above or below it. The draw command would be one of these lines:

CODE
def refresh
    jet5839_refresh # calls the old method
    self.contents.font.color = system_color # redefines the self contained font color
    self.contents.draw_text(290, 110, 500, 500, NAME_OF_ALIGNMENT + ":") # draws the name of alignment
    self.contents.font.color = normal_color # redefines the self contained font color
    self.contents.draw_text(400, 110, 500, 500, draw_alignment) # draws the alignment name in the window
  end # ending definition alias


Alternatively, you could try Synthesize's Good VS Evil script (Good VS Evil). I myself use Synthesize's, in conjunction with the yanfly script, but this one looks simpler. Great script, Jet10985!

This post has been edited by ???nOBodY???: Jan 5 2010, 07:16 PM


--------------------
*The Master List Update Project is currently up-to-date with the latest scripts for that dream project!
*By entering the RGSS2/Ruby Scripting section, you are agreeing to abide by The Coder's Creed.

My Scripts
Spoiler:

ACK Script Requests
Spoiler:

Scripts
Stat Change Formulas
GTBS Ziifee's spin menu Submenus
GTBS Weapon Unleash
GTBS Enemy Status
Attack Command Submenu
Jump To (X,Y)
BGM/BGS Fadein
Window_Message - Pop Text
Spell Management Menu
Melee Mastery Management Menu
Ghost List
Save / Autoload
Some Popup v2.9 => v2.91
Scene_StringEntry v1.02
Scene_StringEntry: More Than 24-Character Input
Scene_StringEntry: Scrolling Character Input Window
Scene_StringEntry: Typing Input
MA's Quest Journal - Accept Quest Add-On (internal)
MA's Quest Journal - Accept Quest Add-On (external)
Easy-to-Add Extra Ziifee Spin Commands
Scrolling Battle Message
Non-Differentiating Enemies
Quest Item Drops
(VX) FP Conditional Drops
FFTA World Map HUD bugfix
RSSBS / SSS - Wereforms patch
Death Counterattack
Targetting Extension

My Heart (Resources)
Spoiler:

Projects
Project AMBROSIA
*something generically clever*

Support these:
Spoiler:







Awards:
Spoiler:

Go to the top of the page
 
+Quote Post
   
Jet
post Jan 5 2010, 08:17 PM
Post #9


He Who Jets
Group Icon


Type: Coder
Alignment: Lawful Neutral




@mithos: Thanks

@CrimsonSeas: Also thanks

@Piejamas:
-Next version
-In a couple versions
-I'll add an option for it
-Can be evented

@ZeroManArmy: I'll write up a patch to show it on YERD status Redux and YEZ status change thing. It''l be compatible is what i'm saying.

@???nOBodY???: Thanks for trying to help him out, thanks for the compliment, and i understand you keeping Synthesis's since you probably already evented many alignment changes.

@Everybody: If you need a patch to show the alignment anywhere, feel free to post a request here.

EDIT: Added YERD Patch. Someone please tell me if it works. I'm too busy to grab the status ReDux.

This post has been edited by Jet10985: Jan 5 2010, 08:41 PM


--------------------
Go to the top of the page
 
+Quote Post
   
Mon Dez
post Jan 5 2010, 09:14 PM
Post #10


I'm in Despair!
Group Icon


Type: Designer
Alignment: Chaotic Neutral




This is really good and simple I could use this for my next game that uses the ABS system.


--------------------


Reality is just an illusion, the world is just a dream, but can you see that everything is chaos and it must be eradicated!
Spoiler:


Games that I am currently working on:
Go to the top of the page
 
+Quote Post
   
ZeroManArmy
post Jan 5 2010, 09:15 PM
Post #11


Click the Pokémon Banner!
Group Icon


Type: Undisclosed
Alignment: Chaotic Neutral




QUOTE (Jet10985 @ Jan 5 2010, 02:17 PM) *
@ZeroManArmy: I'll write up a patch to show it on YERD status Redux and YEZ status change thing. It''l be compatible is what i'm saying.

EDIT: Added YERD Patch. Someone please tell me if it works. I'm too busy to grab the status ReDux.


I will test it right now!

Where should the bar come up in the menu? Cause I didn't see it


--------------------
Go to the top of the page
 
+Quote Post
   
Jet
post Jan 5 2010, 09:57 PM
Post #12


He Who Jets
Group Icon


Type: Coder
Alignment: Lawful Neutral




It's not a bar, it's text. I grabbed a copy of the redux and it appears under weight. Grab the newer patch i just posted.


--------------------
Go to the top of the page
 
+Quote Post
   
ZeroManArmy
post Jan 5 2010, 10:02 PM
Post #13


Click the Pokémon Banner!
Group Icon


Type: Undisclosed
Alignment: Chaotic Neutral




Still no luck.


--------------------
Go to the top of the page
 
+Quote Post
   
Jet
post Jan 5 2010, 10:05 PM
Post #14


He Who Jets
Group Icon


Type: Coder
Alignment: Lawful Neutral




Did you put the patch below both the ReDux AND alignment system? The order it goes in is...

Yanfly ReDux
Alignment System
Patch


--------------------
Go to the top of the page
 
+Quote Post
   
ZeroManArmy
post Jan 5 2010, 10:12 PM
Post #15


Click the Pokémon Banner!
Group Icon


Type: Undisclosed
Alignment: Chaotic Neutral




Oh there we go. I Alphabitize my scripts because I so many. Alright thanks!


--------------------
Go to the top of the page
 
+Quote Post
   
Jet
post Jan 9 2010, 05:01 PM
Post #16


He Who Jets
Group Icon


Type: Coder
Alignment: Lawful Neutral




UPDATE: v.2 released.

Now includes the option to add note tags to skills and equipment. This allows you to set an alignment requirement so that the players cannot use/equip the items without being at that requirement or past it.


--------------------
Go to the top of the page
 
+Quote Post
   
ShadowXzygon
post Jan 9 2010, 06:21 PM
Post #17


The Interloper
Group Icon


Type: Writer
Alignment: Chaotic Evil




QUOTE (Jet10985 @ Jan 4 2010, 09:21 PM) *
If you already have some sort of HUD script, I'd be happy to add it onto there for you.

Sorry for the late reply, I've been kind of busy.
I DO have a HUD script, can you tack it on there?
Spoiler:
CODE
#==============================================================================
# Vampyr Hud
#==============================================================================
if Vampyr_Kernel.enabled?("Vampyr Net ABS")
#------------------------------------------------------------------------------
Vampyr_Kernel.register("Vampyr HUD", 1.1, "12/06/2009")
#------------------------------------------------------------------------------
class Sprite
  
  def in_area?(args=[0, 0, self.bitmap.width, self.bitmap.height])
    if $mouse.x.between?(self.x+args[0], self.x+args[0]+args[2]) and
      $mouse.y.between?(self.y+args[1], self.y+args[1]+args[3])
     return true
    end
    return false
  end
  
  def draw_icon(icon, x, y)
    rect = Rect.new(icon%16*24, icon/16*24, 24, 24)
    self.bitmap.blt(x, y, Cache.system("Iconset"), rect)
  end
  
end

#------------------------------------------------------------------------------
class Vampyr_HUD1 < Sprite
  
  def initialize(viewport)
    super(viewport)
    self.x, self.y = 1, 1
    @base   = Cache.system("Actor Base")
    @hpbar  = Cache.system("Actor HP Bar")
    @mpbar  = Cache.system("Actor MP Bar")
    @expbar = Cache.system("Actor Exp Bar")
    self.bitmap = Bitmap.new(156, 64)
    self.bitmap.font.size = 16
    $windows << self
    refresh
  end
  
  def update
    super
    refresh if something_changed?
  end
  
  def refresh
    return if $actor == nil
    @old_hp  = $actor.hp
    @old_mp  = $actor.mp
    @old_exp = $actor.exp
    self.bitmap.clear
    draw_hpbar($actor, 0, 0)
    draw_mpbar($actor, 0, 20)
    draw_expbar($actor, 0, 40) if $actor.next_exp > 0
  end
  
  def draw_hpbar(actor, x, y)
    self.bitmap.draw_outlined_text(x, y, 24, 16, Vocab::hp_a, 0, "FFFFFF".to_rgb)
    rect = Rect.new(0, 0, @hpbar.width*actor.hp/actor.maxhp, @hpbar.height)
    self.bitmap.blt(x+24, y, @base, @base.rect)
    self.bitmap.blt(x+24, y, @hpbar, rect)
  end
  
  def draw_mpbar(actor, x, y)
    self.bitmap.draw_outlined_text(x, y, 24, 16, Vocab::mp_a, 0, "FFFFFF".to_rgb)
    rect = Rect.new(0, 0, @mpbar.width*actor.mp/actor.maxmp, @mpbar.height)
    self.bitmap.blt(x+24, y, @base, @base.rect)
    self.bitmap.blt(x+24, y, @mpbar, rect)
  end
  
  def draw_expbar(actor, x, y)
    self.bitmap.draw_outlined_text(x, y, 24, 16, "Exp", 0, "FFFFFF".to_rgb)
    rect = Rect.new(0, 0, @expbar.width*actor.current_exp/actor.next_exp, @expbar.height)
    self.bitmap.blt(x+24, y, @base, @base.rect)
    self.bitmap.blt(x+24, y, @expbar, rect)
  end
  
  def something_changed?
    return false if $actor == nil
    return true if @old_hp  != $actor.hp
    return true if @old_mp  != $actor.mp
    return true if @old_exp != $actor.exp
    return false
  end
  
  def dispose
    self.bitmap.dispose
    super
  end
  
end

#------------------------------------------------------------------------------
class Vampyr_HUD2 < Sprite
  
  def initialize(viewport)
    super(viewport)
    @bg = Cache.system("Skills Base")
    self.y = Graphics.height-@bg.height
    self.bitmap = Bitmap.new(@bg.width, @bg.height)
    self.bitmap.font.size = 16
    @skills = {}
    $windows << self
    refresh
  end
  
  def update
    super
    update_drag
    update_drop
    update_hotkeys
    refresh if something_changed?
  end
  
  def refresh
    return if $actor == nil
    @hotkeys = {}
    $actor.skill_hotkeys.each { |k, v| @hotkeys[k] = v }
    self.bitmap.clear
    self.bitmap.blt(0, 0, @bg, @bg.rect)
    draw_skills
  end
  
  def draw_skills
    return if $actor == nil
    count = 0
    $actor.skill_hotkeys.each { |key, value|
     @skills[count] = [32*count, 0]
     if value != nil
       skill = $data_skills[value]
       if skill != nil
         draw_icon(skill.icon_index, 32*count+4, 4)
         self.bitmap.draw_outlined_text(32*count, self.bitmap.height-16, 32, 16, Keys.name(key), 1, "FFFFFF".to_rgb)
       end
     end
     count += 1
    }
  end
  
  def update_hotkeys
    return if $actor == nil
    for i in 0...$actor.skill_hotkeys.size
      next unless Input.trigger?(Keys::Mouse_Right)
      next unless $mouse.in_area?(self.x+@skills[i][0], self.y+@skills[i][1])
      $actor.skill_hotkeys[$actor.skill_hotkeys.keys[i]] = 0
      refresh
    end
  end
  
  def update_drag
    return if $actor == nil
    return unless Input.trigger?(Keys::Mouse_Left)
    return unless in_area?
    return if $mouse.object != nil
    for i in 0...$actor.skill_hotkeys.size
      next unless $mouse.in_area?(self.x+@skills[i][0], self.y+@skills[i][1])
      $mouse.object = $data_skills[$actor.skill_hotkeys.values[i]]
    end
    $mouse.parent = self
  end
  
  def update_drop
    return if $actor == nil
    return if Input.press?(Keys::Mouse_Left)
    return unless in_area?
    return if $mouse.object == nil
    return if $mouse.parent == nil
    return if $mouse.parent == self
    return unless $mouse.object.is_a?(RPG::Skill)
    for i in 0...$actor.skill_hotkeys.size
      next unless $mouse.in_area?(self.x+@skills[i][0], self.y+@skills[i][1])
      $actor.skill_hotkeys[$actor.skill_hotkeys.keys[i]] = $mouse.object.id
    end
    refresh
  end
  
  def something_changed?
    return false if $actor == nil
    return true if @hotkeys != $actor.skill_hotkeys
    return false
  end
  
  def dispose
    self.bitmap.dispose
    super
  end
  
end

#------------------------------------------------------------------------------
class Vampyr_HUD3 < Sprite
  
  def initialize(viewport)
    super(viewport)
    @bg = Cache.system("Items Base")
    self.x = 162
    self.y = Graphics.height-@bg.height
    self.bitmap = Bitmap.new(@bg.width, @bg.height)
    self.bitmap.font.size = 16
    @items = {}
    $windows << self
    refresh
  end
  
  def update
    super
    update_drag
    update_drop
    update_hotkeys
    refresh if something_changed?
  end
  
  def refresh
    return if $actor == nil
    @hotkeys = {}
    $actor.item_hotkeys.each { |k, v| @hotkeys[k] = v }
    self.bitmap.clear
    self.bitmap.blt(0, 0, @bg, @bg.rect)
    draw_skills
  end
  
  def draw_skills
    return if $actor == nil
    count = 0
    $actor.item_hotkeys.each { |key, value|
     @items[count] = [32*count, 0]
     if value != nil
       item = $data_items[value]
       if item != nil
         draw_icon(item.icon_index, 32*count+4, 4)
         self.bitmap.draw_outlined_text(32*count, self.bitmap.height-16, 32, 16, Keys.name(key), 1, "FFFFFF".to_rgb)
       end
     end
     count += 1
    }
  end
  
  def update_hotkeys
    return if $actor == nil
    for i in 0...$actor.item_hotkeys.size
      next unless Input.trigger?(Keys::Mouse_Right)
      next unless $mouse.in_area?(self.x+@items[i][0], self.y+@items[i][1])
      $actor.item_hotkeys[$actor.item_hotkeys.keys[i]] = 0
      refresh
    end
  end
  
  def update_drag
    return if $actor == nil
    return unless Input.trigger?(Keys::Mouse_Left)
    return unless in_area?
    return if $mouse.object != nil
    for i in 0...$actor.item_hotkeys.size
      next unless $mouse.in_area?(self.x+@items[i][0], self.y+@items[i][1])
      $mouse.object = $data_items[$actor.item_hotkeys.values[i]]
    end
    $mouse.parent = self
  end
  
  def update_drop
    return if $actor == nil
    return if Input.press?(Keys::Mouse_Left)
    return unless in_area?
    return if $mouse.object == nil
    return if $mouse.parent == nil
    return if $mouse.parent == self
    return unless $mouse.object.is_a?(RPG::Item)
    for i in 0...$actor.item_hotkeys.size
      next unless $mouse.in_area?(self.x+@items[i][0], self.y+@items[i][1])
      $actor.item_hotkeys[$actor.item_hotkeys.keys[i]] = $mouse.object.id
    end
    refresh
  end
  
  def something_changed?
    return false if $actor == nil
    return true if @hotkeys != $actor.item_hotkeys
    return false
  end
  
  def dispose
    self.bitmap.dispose
    super
  end
  
end

#------------------------------------------------------------------------------
class Vampyr_HUD4 < Sprite
  
  def initialize(viewport)
    super(viewport)
    @bg = Cache.system("Shortcuts Base")
    self.x = 262
    self.y = Graphics.height-@bg.height
    self.bitmap = Bitmap.new(@bg.width, @bg.height)
    $windows << self
    create_buttons
    refresh
  end
  
  def create_buttons
    return if $actor == nil
    @buttons = []
    @buttons[0] = Icon.new(nil, self.x, self.y, "System Icons", 4)      { $inventory_window.trigger; $equip_window.trigger }
    @buttons[1] = Icon.new(nil, self.x+32, self.y, "System Icons", 5)   { call_status }
    @buttons[2] = Icon.new(nil, self.x+64, self.y, "System Icons", 6)   { call_skill }
    @buttons[3] = Icon.new(nil, self.x+96, self.y, "System Icons", 7)   { call_quest }
    @buttons[4] = Icon.new(nil, self.x+128, self.y, "System Icons", 11) { $chat_window.trigger }
    @buttons[0].always = true
    @buttons[1].always = true
    @buttons[2].always = true
    @buttons[3].always = true
    @buttons[4].always = true
    @buttons[0].tip_text = ["#{Vocab.item} (I)"]
    @buttons[1].tip_text = ["#{Vocab.status} (C)"]
    @buttons[2].tip_text = ["#{Vocab.skill} (K)"]
    @buttons[3].tip_text = ["#{Vocab::Quests} (P)"]
    @buttons[4].tip_text = ["Chat (F5)"]
  end
  
  def call_status
    $character_window.trigger
    $skill_window.on_close
    $guild_window.on_close
    $friends_window.on_close
    $quests_window.on_close
    $questinfos_window.on_close
  end
  
  def call_skill
    $skill_window.trigger
    $guild_window.on_close
    $friends_window.on_close
    $character_window.on_close
    $quests_window.on_close
    $questinfos_window.on_close
  end
  
  def call_quest
    $quests_window.trigger
    $skill_window.on_close
    $guild_window.on_close
    $friends_window.on_close
    $character_window.on_close
    $questinfos_window.on_close unless $quests_window.visible
  end
  
  def refresh
    return if $actor == nil
    self.bitmap.clear
    self.bitmap.blt(0, 0, @bg, @bg.rect)
  end
  
  def update
    super
    return if $actor == nil
    for i in @buttons
      i.update
    end
  end
  
  def dispose
    if @buttons != nil
      for i in @buttons
        i.dispose
      end
    end
    super
  end
  
end

#------------------------------------------------------------------------------
class Vampyr_HUD5 < Sprite
  
  def initialize(viewport)
    super(viewport)
    @bg = Cache.system("Options Base")
    self.x = Graphics.width-@bg.width
    self.y = 1
    self.bitmap = Bitmap.new(@bg.width, @bg.height)
    $windows << self
    create_buttons
    refresh
  end
  
  def create_buttons
    return if $actor == nil
    @buttons = []
    @buttons[0] = Icon.new(nil, self.x, self.y, "System Icons", 1)    { call_guild }
    @buttons[1] = Icon.new(nil, self.x+32, self.y, "System Icons", 2)
    @buttons[2] = Icon.new(nil, self.x+64, self.y, "System Icons", 3) { call_friend }
    @buttons[3] = Icon.new(nil, self.x+96, self.y, "System Icons", 8) { $options_window.trigger }
    @buttons[0].always = true
    @buttons[1].always = true
    @buttons[2].always = true
    @buttons[3].always = true
    @buttons[0].tip_text = ["#{Vocab::Guild} (P)"]
    @buttons[1].tip_text = ["#{Vocab::Party}"]
    @buttons[2].tip_text = ["#{Vocab::Friends} (F)"]
    @buttons[3].tip_text = [Vocab::Options]
  end
  
  def call_guild
    $guild_window.trigger
    $skill_window.on_close
    $friends_window.on_close
    $character_window.on_close
    $quests_window.on_close
    $questinfos_window.on_close
  end
  
  def call_friend
    $friends_window.trigger
    $skill_window.on_close
    $guild_window.on_close
    $character_window.on_close
    $quests_window.on_close
    $questinfos_window.on_close
  end
  
  def refresh
    return if $actor == nil
    self.bitmap.clear
    self.bitmap.blt(0, 0, @bg, @bg.rect)
  end
  
  def update
    super
    return if $actor == nil
    for i in @buttons
      i.update
    end
  end
  
  def dispose
    if @buttons != nil
      for i in @buttons
        i.dispose
      end
    end
    super
  end
  
end

#------------------------------------------------------------------------------
class Vampyr_HUD6 < Sprite
  
  def initialize(viewport)
    super(viewport)
    @bg = Cache.system("Ammo Base")
    self.x = Graphics.width-@bg.width
    self.y = Graphics.height-@bg.height
    self.bitmap = Bitmap.new(@bg.width, @bg.height)
    $windows << self
    refresh
  end
  
  def refresh
    return if $actor == nil
    @ammos = {}
    @weapon = $actor.weapons[0]
    $actor.ammos.each { |k, v| @ammos[k] = v }
    self.bitmap.clear
    self.bitmap.blt(0, 0, @bg, @bg.rect)
    draw_ammo
  end
  
  def update
    super
    update_drop
    return if $actor == nil
    refresh if something_changed?
  end
  
  def draw_ammo
    return if $actor == nil
    $actor.ammos.each { |key, value|
      next if $actor.weapons[0] == nil
      next if $actor.weapons[0].id != key
      next if value == nil
      @ammo = value
      @quantity = $game_party.item_number(@ammo)
      draw_icon(value.icon_index, 4, 4)
      self.bitmap.draw_outlined_text(0, self.bitmap.height-16, 32, 16, sprintf("%2d", @quantity), 1, "FFFFFF".to_rgb)
    }
  end
  
  def update_drop
    return if $actor == nil
    return if Input.press?(Keys::Mouse_Left)
    return unless in_area?
    return if $mouse.object == nil
    return if $mouse.parent == nil
    return if $mouse.parent == self
    return unless $mouse.object.is_a?(RPG::Item)
    $actor.ammos[$actor.weapons[0].id] = $mouse.object
    refresh
  end
  
  def something_changed?
    return false if $actor == nil
    return true if @weapon != $actor.weapons[0]
    return true if @ammos != $actor.ammos
    return true if @ammo != nil and $game_party.item_number(@ammo) != @quantity
    return false
  end
  
end

#------------------------------------------------------------------------------
class Spriteset_Map
  
  alias vampyr_hud_create_viewports create_viewports
  alias vampyr_hud_update update
  alias vampyr_hud_dispose dispose
  
  def create_viewports
    vampyr_hud_create_viewports
    create_hud
  end
  
  def update
    vampyr_hud_update
    update_hud
  end
  
  def dispose
    vampyr_hud_dispose
    dispose_hud
  end
  
  def create_hud
    @vampyr_hud1 = Vampyr_HUD1.new(@viewport3)
    @vampyr_hud2 = Vampyr_HUD2.new(@viewport3)
    @vampyr_hud3 = Vampyr_HUD3.new(@viewport3)
    @vampyr_hud4 = Vampyr_HUD4.new(@viewport3)
    @vampyr_hud5 = Vampyr_HUD5.new(@viewport3)
    @vampyr_hud6 = Vampyr_HUD6.new(@viewport3)
  end
  
  def update_hud
    @vampyr_hud1.update
    @vampyr_hud2.update
    @vampyr_hud3.update
    @vampyr_hud4.update
    @vampyr_hud5.update
    @vampyr_hud6.update
  end
  
  def dispose_hud
    @vampyr_hud1.dispose
    @vampyr_hud2.dispose
    @vampyr_hud3.dispose
    @vampyr_hud4.dispose
    @vampyr_hud5.dispose
    @vampyr_hud6.dispose
  end
  
end

#------------------------------------------------------------------------------
end


--------------------


QUOTE
"You die a lot. That's not healthy."


QUOTE
Real life contains glitches, what the %&$@?
Go to the top of the page
 
+Quote Post
   
Jet
post Jan 9 2010, 07:24 PM
Post #18


He Who Jets
Group Icon


Type: Coder
Alignment: Lawful Neutral




Oh, the vampyr HUD. I'll make sure to write up a patch for you soon. Where do you want the alignment name to appear?

EDIT: Fixed some script-breaking bugs in v.2. Please obtain the newest version.

This post has been edited by Jet10985: Jan 10 2010, 02:27 AM


--------------------
Go to the top of the page
 
+Quote Post
   
zercker
post Jan 10 2010, 04:26 AM
Post #19



Group Icon






Can someone help me

Every time i start the game an error pops up.









I dont know if it because i added a few alignment names but this is what i have in my script.


CODE

ALIGNMENT_NAME = ["Scourge of Humanity", "Evil", "Fiend", "Outlaw", "Neutral", "Good", "Defender", "Saint", "Legand"]

ALIGNMENT_CONDITION = [-100, -50, -25, -10, 0, 10, 25, 50, 100] # What the value of $game_system.alignment
# needs to be to correspond to the alignment name

NAME_OF_ALIGNMENT = "Alignment" # This is what alignment will be called altogether



--------------------
Go to the top of the page
 
+Quote Post
   
Jet
post Jan 10 2010, 05:06 AM
Post #20


He Who Jets
Group Icon


Type: Coder
Alignment: Lawful Neutral




That's complete my fault. I apologize, but i spelled initialize wrong. AGAIN. The script has been fixed of THAT bug, but there is another that will be fixed soon. Please get the new version.


--------------------
Go to the top of the page
 
+Quote Post
   

5 Pages V   1 2 3 > » 
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 30th September 2014 - 11:04 PM

RPGMakerVX.net is an Privacy Policy, Legal.