Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

2 Pages V   1 2 >  
Reply to this topicStart new topic
> Spirits System, Version 1.1 (18th August)
332211
post Aug 13 2009, 03:49 PM
Post #1


Waiting for an epiphany
Group Icon

Group: Revolutionary
Posts: 180
Type: Scripter
RM Skill: Advanced




Spirits System

Version 1.1
Author 332211/uresk
Release Date 18th August


Introduction and Features
This script supplies game makers with a new way of developing their
characters. Each hero can equip spirits, which bring in several effects:
- stat bonuses
- new weapons
- new skills
- opcional features, like pharmacology
As a hero earns experience, so does its spirits. They count as a
normal party member. Spirits also have classes, they level up, learn
new skills, have stat growths.

To add a spirit to the party reserve, simply use the command
'Change Party Member...' which can also be used to remove spirits.

To explain how everything works, I'll use an example: Star (ID: 10)
Start gives stats bonues acording to the charts on the actor tabs and
its level (which starts at 1).
Star's a Fire Spirit, so it adds to its hero the skills it learns:
Fire at level 1, Fire II at level 2...
When Star is set to a hero, it can use the 'Legendary Falme Sword'
because it's ticked in Stars' class.
the hero also inherits Stars' options: Super Guard

Spirits can have a description/biography, whatever you feel like writing
about them. The amount of space increases if the Spirit has no special
feature.

Script
Attached File  Spirits_1.0.txt ( 33.9K ) Number of downloads: 145

Attached File  Spirits_1.1.txt ( 39.64K ) Number of downloads: 579


Customization
See script.

Compatibility
QUOTE (solodev @ Aug 21 2009, 11:43 PM) *
It seems incompatible with JobChanger for VX, Created by tkblackknight, with additions by Enelvon.
Just FYI.


Screenshot



DEMO
Version 1.1 Demo

FAQ
Still Empty

Terms and Conditions
Exclusive Script at RPG RPG Revolution
Which means, redirect other forums to this page.


__________________________
Go to the top of the page
 
+Quote Post
   
redyugi
post Aug 13 2009, 04:02 PM
Post #2


Python Programmer
Group Icon

Group: Revolutionary
Posts: 126
Type: Scripter
RM Skill: Intermediate




Looks good. Let me try out the demo.

EDIT: There is a problem with the script. When you go onto whoever has the flame fairy can't disequip or equip anything. Including the Legendary Flame Sword

EDIT 2: You clicked "Fix Equipment" for the fire girl and you shouldn't have.

This post has been edited by redyugi: Aug 13 2009, 04:15 PM


__________________________
Go to the top of the page
 
+Quote Post
   
Andrelvis
post Aug 13 2009, 07:34 PM
Post #3


Level 6
Group Icon

Group: Member
Posts: 84
Type: None
RM Skill: Undisclosed




Pretty cool thumbsup.gif

This could be very useful for someone wanting to make a Esper/GF/Djinn-like system.
Go to the top of the page
 
+Quote Post
   
quostin
post Aug 13 2009, 10:32 PM
Post #4


Level 4
Group Icon

Group: Member
Posts: 57
Type: None
RM Skill: Intermediate




Thanks for the Script, you just gave me more idea's that i can work with. biggrin.gif


__________________________
[Show/Hide] Hidden Sig
Go to the top of the page
 
+Quote Post
   
platipus
post Aug 14 2009, 02:55 AM
Post #5


Level 11
Group Icon

Group: Revolutionary
Posts: 191
Type: Event Designer
RM Skill: Skilled




checking out the demo. :]

edit
i love this script. it would be nice if you can put custom info about the spirit though.


__________________________
using xp now and will continue to until a better rpg maker
Go to the top of the page
 
+Quote Post
   
platipus
post Aug 17 2009, 11:40 AM
Post #6


Level 11
Group Icon

Group: Revolutionary
Posts: 191
Type: Event Designer
RM Skill: Skilled




the skills arent showing and its messed up for some reason.. does it not work with other scripts?


__________________________
using xp now and will continue to until a better rpg maker
Go to the top of the page
 
+Quote Post
   
332211
post Aug 17 2009, 01:50 PM
Post #7


Waiting for an epiphany
Group Icon

Group: Revolutionary
Posts: 180
Type: Scripter
RM Skill: Advanced




QUOTE (platipus @ Aug 17 2009, 08:40 PM) *
the skills arent showing and its messed up for some reason.. does it not work with other scripts?

Probably is incopatible with other scripts. Which ones are you using?


__________________________
Go to the top of the page
 
+Quote Post
   
platipus
post Aug 17 2009, 11:40 PM
Post #8


Level 11
Group Icon

Group: Revolutionary
Posts: 191
Type: Event Designer
RM Skill: Skilled




alot but i spotted a glitch. the last spirit u pick(as your spirit)'s info doesnt show up.
i really like this script, please fix it =k


__________________________
using xp now and will continue to until a better rpg maker
Go to the top of the page
 
+Quote Post
   
HeZ
post Aug 18 2009, 07:22 AM
Post #9


Level 1
Group Icon

Group: Member
Posts: 10
Type: None
RM Skill: Beginner




O.K. I'm having two problems with this script.
Firstly I'll put the script as I have it for reference.
I'm using RMVX

#===============================================================
==========
======
#
# Spirits System
# Last Date Updated: 13th August 2009
# Version: 1
#
# This script supplies game makers with a new way of developing their
# characters. Each hero can equip spirits, which bring in several effects:
# - stat bonuses
# - new weapons
# - new skills
# - opcional features, like pharmacology
# As a hero earns experience, so does its spirits. They count as a
# normal party member. Spirits also have classes, they level up, learn
# new skills, have stat growths.
#
# To add a spirit to the party reserve, simply use the command
# 'Change Party Member...' which can also be used to remove spirits.
#
# To explain how everything works, I'll use an example: Star (ID: 10)
# Start gives stats bonues acording to the charts on the actor tabs and
# its level (which starts at 1).
# Star's a Fire Spirit, so it adds to its hero the skills it learns:
# Fire at level 1, Fire II at level 2...
# When Star is set to a hero, it can use the 'Legendary Falme Sword'
# because it's ticked in Stars' class.
# the hero also inherits Stars' options: Super Guard
#
#===============================================================================
# Updates:
# ----------------------------------------------------------------------------
# o 2009.08.13 - Started script.
#===============================================================================

#===============================================================================
#
# Configuration
#
#===============================================================================
# The IDs of the actors who are meant to be spirits:
SPIRITS = [9,10,11,12,13,14]

# The max amount of Spirits that a party member can have.
# 0: no limit
Max_spirits = 2

module Vocab
# Appears above the siprits' skills in the spirits' status screen.
Spirit_Skills = "Spirit Magics"

# Appears above the siprits' traits in the spirits' status screen.
Specials = "Spirit Traits"

# Special traits:
Two_Swords_Style = "Dual Wield"
Fix_Equipment = "Fixed Equipment"
Auto_Battle = "Berserk"
Super_Guard = "Improved Guard"
Pharmacology = "Pharmacology"
Critical_Bonus = "High Critical"
end

#===============================================================================
#
# End of Configuration
#
#===============================================================================

#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
# This class handles actors. It's used within the Game_Actors class
# ($game_actors) and referenced by the Game_Party class ($game_party).
#==============================================================================

class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :spirits # spirits
#--------------------------------------------------------------------------
# * Setup
# actor_id : actor ID
#--------------------------------------------------------------------------
alias spirit_setup setup
def setup(actor_id)
@spirits = []
spirit_setup(actor_id)
end

#--------------------------------------------------------------------------
# * Add Spirit
# spirit_id : actor ID
#--------------------------------------------------------------------------
def add_spirit(spirit_id)
@spirits.push($game_actors[spirit_id]) if SPIRITS.include?(spirit_id)
@spirits.sort!
end

#--------------------------------------------------------------------------
# * Remove Spirit
# spirit_i : spirit index
#--------------------------------------------------------------------------
def remove_spirit(spirit_id)
@spirits.delete($game_actors[spirit_id])
end
#--------------------------------------------------------------------------
# * Get Skill Object Array
#--------------------------------------------------------------------------
alias spirit_skills skills
def skills
result = []
spirit_skills.each { |skill| result.push(skill.id)}
for spirit in @spirits
for i in spirit.spirit_skills
result.push(i.id)
end
end
result.sort!.uniq!
skills = []
result.each { |id| skills.push($data_skills[id])}
return skills
end
#--------------------------------------------------------------------------
# * Get Basic Maximum HP
#--------------------------------------------------------------------------
alias spirit_base_maxhp base_maxhp
def base_maxhp
result = spirit_base_maxhp
for spirit in @spirits
result += spirit.base_maxhp
end
return result
end
#--------------------------------------------------------------------------
# * Get basic Maximum MP
#--------------------------------------------------------------------------
alias spirit_base_maxmp base_maxmp
def base_maxmp
result = spirit_base_maxmp
for spirit in @spirits
result += spirit.base_maxmp
end
return result
end
#--------------------------------------------------------------------------
# * Get Basic Attack
#--------------------------------------------------------------------------
alias spirit_base_atk base_atk
def base_atk
result = spirit_base_atk
for spirit in @spirits
result += spirit.base_atk
end
return result
end
#--------------------------------------------------------------------------
# * Get Basic Defense
#--------------------------------------------------------------------------
alias spirit_base_def base_def
def base_def
result = spirit_base_def
for spirit in @spirits
result += spirit.base_def
end
return result
end
#--------------------------------------------------------------------------
# * Get Basic Spirit
#--------------------------------------------------------------------------
alias spirit_base_spi base_spi
def base_spi
result = spirit_base_spi
for spirit in @spirits
result += spirit.base_spi
end
return result
end
#--------------------------------------------------------------------------
# * Get Basic Agility
#--------------------------------------------------------------------------
alias spirit_base_agi base_agi
def base_agi
result = spirit_base_agi
for spirit in @spirits
result += spirit.base_agi
end
return result
end
#--------------------------------------------------------------------------
# * Get [Dual Wield] Option
#--------------------------------------------------------------------------
alias spirits_two_swords_style two_swords_style
def two_swords_style
return spirits_two_swords_style if SPIRITS.include?(@actor_id)
for spirit in @spirits
result = true if spirit.two_swords_style
end
result = spirits_two_swords_style unless result
return result
end
#--------------------------------------------------------------------------
# * Get [Fixed Equipment] Option
#--------------------------------------------------------------------------
alias spirits_fix_equipment fix_equipment
def fix_equipment
return spirits_fix_equipment if SPIRITS.include?(@actor_id)
for spirit in @spirits
result = true if spirit.fix_equipment
end
result = spirits_fix_equipment unless result
return result
end
#--------------------------------------------------------------------------
# * Get [Automatic Battle] Option
#--------------------------------------------------------------------------
alias spirits_auto_battle auto_battle
def auto_battle
return spirits_auto_battle if SPIRITS.include?(@actor_id)
for spirit in @spirits
result = true if spirit.auto_battle
end
result = spirits_auto_battle unless result
return result
end
#--------------------------------------------------------------------------
# * Get [Super Guard] Option
#--------------------------------------------------------------------------
alias spirits_super_guard auto_battle
def super_guard
return spirits_super_guard if SPIRITS.include?(@actor_id)
for spirit in @spirits
result = true if spirit.super_guard
end
result = spirits_super_guard unless result
return result
end
#--------------------------------------------------------------------------
# * Get [Pharmacology] Option
#--------------------------------------------------------------------------
alias spirits_pharmacology pharmacology
def pharmacology
for spirit in @spirits
result = true if spirit.pharmacology
end
result = spirits_pharmacology unless result
return result
end
#--------------------------------------------------------------------------
# * Get Critical Ratio
#--------------------------------------------------------------------------
alias spirit_cri cri
def cri
n = spirit_cri
for spirit in @spirits
n += 4 if spirit.critical_bonus
end
return n
end

#--------------------------------------------------------------------------
# * Has Critical Hit Bonus
#--------------------------------------------------------------------------
def critical_bonus
return $data_actors[@actor_id].critical_bonus
end
#--------------------------------------------------------------------------
# * Determine if Equippable
# item : item
#--------------------------------------------------------------------------
alias spirits_equippable? equippable?
def equippable?(item)
result = spirits_equippable?(item)
for spirit in @spirits
result = true if spirit.spirits_equippable?(item)
end
return result
end
#--------------------------------------------------------------------------
# * Change Experience
# exp : New experience
# show : Level up display flag
#--------------------------------------------------------------------------
alias spirits_change_exp change_exp
def change_exp(exp, show)
spirits_change_exp(exp, show)
for spirit in @spirits
spirit.change_exp(exp, false)
end
end
#--------------------------------------------------------------------------
# * Determine Usable Skills
# skill : skill
#--------------------------------------------------------------------------
alias spirits_skill_can_use? skill_can_use?
def skill_can_use?(skill)
return super
return true if skills.include?(skill)
return spirits_skill_can_use?(skill)
end
end

#==============================================================================
# ** Game_Party
#------------------------------------------------------------------------------
# This class handles the party. It includes information on amount of gold
# and items. The instance of this class is referenced by $game_party.
#==============================================================================

class Game_Party < Game_Unit
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_writer :spirits # spirits
#--------------------------------------------------------------------------
# * Initial Party Setup
#--------------------------------------------------------------------------
alias spirits_setup_starting_members setup_starting_members
def setup_starting_members
spirits_setup_starting_members
@spirits = []
for i in $data_system.party_members
if SPIRITS.include?(i)
@spirits.push(i)
@actors.delete(i)
end
end
end
#--------------------------------------------------------------------------
# * Get Spirits
#--------------------------------------------------------------------------
def spirits
result = []
for i in @spirits
result.push($game_actors[i])
end
return result
end
#--------------------------------------------------------------------------
# * Add an Actor / Spirit
# actor_id : actor ID
#--------------------------------------------------------------------------
alias spirits_add_actor add_actor
def add_actor(actor_id)
if SPIRITS.include?(actor_id)
@spirits.push(actor_id)
@spirits.sort!
else
spirits_add_actor(actor_id)
end
end
#--------------------------------------------------------------------------
# * Remove Actor
# actor_id : actor ID
#--------------------------------------------------------------------------
alias spirits_remove_actor remove_actor
def remove_actor(actor_id)
if SPIRITS.include?(actor_id)
@spirits.delete(actor_id)
else
spirits_remove_actor(actor_id)
end
end
end

#==============================================================================
# ** Scene_Spirits
#------------------------------------------------------------------------------
# This class performs the spirits screen processing.
#==============================================================================

class Scene_Spirits < Scene_Base
#--------------------------------------------------------------------------
# * Object Initialization
# actor_index : actor index
#--------------------------------------------------------------------------
def initialize(actor_index = 0)
@actor_index = actor_index
end
#--------------------------------------------------------------------------
# * Start processing
#--------------------------------------------------------------------------
def start
super
create_menu_background
@actor = $game_party.members[@actor_index]
@status_window = Window_Short_Status.new(@actor)
@spirits_window = Window_Actor_Spirits.new(@actor)
@party_spirits = Window_Party_Spirits.new
@spirit_info = Window_Spirit_Info.new
@spirit_info.hide
end
#--------------------------------------------------------------------------
# * Termination Processing
#--------------------------------------------------------------------------
def terminate
super
dispose_menu_background
@status_window.dispose
@spirits_window.dispose
@party_spirits.dispose
@spirit_info.dispose
end
#--------------------------------------------------------------------------
# * Return to Original Screen
#--------------------------------------------------------------------------
def return_scene
$scene = Scene_Menu.new(3)
end
#--------------------------------------------------------------------------
# * Switch to Next Actor Screen
#--------------------------------------------------------------------------
def next_actor
@actor_index += 1
@actor_index %= $game_party.members.size
$scene = Scene_Spirits.new(@actor_index)
end
#--------------------------------------------------------------------------
# * Switch to Previous Actor Screen
#--------------------------------------------------------------------------
def prev_actor
@actor_index += $game_party.members.size - 1
@actor_index %= $game_party.members.size
$scene = Scene_Spirits.new(@actor_index)
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
update_menu_background
@spirit_info.update
@spirits_window.update
@status_window.update
@party_spirits.update
if @spirit_info.active
show_spirit_info
elsif @spirits_window.active
main_update
elsif @party_spirits.active
party_update
end
super
end

#--------------------------------------------------------------------------
# * Main Frame Update
#--------------------------------------------------------------------------
def main_update
if Input.trigger?(Input::A)
Sound.play_cursor
@spirit_info.show(true)
@spirit_info.spirit = @spirits_window.spirit
elsif Input.trigger?(Input::cool.gif
Sound.play_cancel
return_scene
elsif Input.trigger?(Input::C)
Sound.play_cursor
@spirits_window.active = false
@party_spirits.active = true
elsif Input.trigger?(Input::R)
Sound.play_cursor
next_actor
elsif Input.trigger?(Input::L)
Sound.play_cursor
prev_actor
end
end

#--------------------------------------------------------------------------
# * Show Spirit Info
#--------------------------------------------------------------------------
def show_spirit_info
if Input.trigger?(Input::A) or Input.trigger?(Input::cool.gif or Input.trigger?(Input::C)
Sound.play_cursor
@spirit_info.hide
end
end

#--------------------------------------------------------------------------
# * party Update
#--------------------------------------------------------------------------
def party_update
if Input.trigger?(Input::A)
Sound.play_cursor
@spirit_info.show(true)
@spirit_info.spirit = @party_spirits.spirit
elsif Input.trigger?(Input::cool.gif
Sound.play_cancel
@spirits_window.active = true
@party_spirits.active = false
elsif Input.trigger?(Input::C)
Sound.play_decision
@spirits_window.active = true
@party_spirits.active = false
perform_trade
end
end

#--------------------------------------------------------------------------
# * Trade Spirits
#--------------------------------------------------------------------------
def perform_trade
if @spirits_window.spirit.nil?
@actor.add_spirit(@party_spirits.spirit.id)
$game_party.remove_actor(@party_spirits.spirit.id)
elsif @party_spirits.spirit.nil?
$game_party.add_actor(@spirits_window.spirit.id)
@actor.remove_spirit(@spirits_window.spirit.id)
else
@actor.add_spirit(@party_spirits.spirit.id)
$game_party.remove_actor(@party_spirits.spirit.id)
$game_party.add_actor(@spirits_window.spirit.id)
@actor.remove_spirit(@spirits_window.spirit.id)
end
@party_spirits.refresh
@spirits_window.refresh
@status_window.refresh
end
end

#==============================================================================
# ** Window_Short_Status
#------------------------------------------------------------------------------
# This window displays short status specs on the status screen.
#==============================================================================

class Window_Short_Status < Window_Status
#--------------------------------------------------------------------------
# * Object Initialization
# actor : actor
#--------------------------------------------------------------------------
def initialize(actor)
super(actor)
self.height = 80
create_contents
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_name(@actor, 36, 0)
draw_actor_class(@actor, 36, 24)
draw_actor_graphic(@actor, 16, 40)
draw_actor_hp(@actor, 130, 0)
draw_actor_mp(@actor, 130, WLH)
draw_parameters_compact(280, 0)
end
#--------------------------------------------------------------------------
# * Draw Parameters
#--------------------------------------------------------------------------
def draw_parameters_compact(x, y)
draw_actor_parameter_short(@actor, x, y, 0)
draw_actor_parameter_short(@actor, x + 120, y, 1)
draw_actor_parameter_short(@actor, x, y + WLH, 2)
draw_actor_parameter_short(@actor, x + 120, y + WLH, 3)
end
#--------------------------------------------------------------------------
# * Draw Parameters
#--------------------------------------------------------------------------
def draw_actor_parameter_short(actor, x, y, type)
case type
when 0
parameter_name = Vocab::atk
parameter_value = actor.atk
when 1
parameter_name = Vocab::def
parameter_value = actor.def
when 2
parameter_name = Vocab::spi
parameter_value = actor.spi
when 3
parameter_name = Vocab::agi
parameter_value = actor.agi
end
self.contents.font.color = system_color
self.contents.draw_text(x, y, 60, WLH, parameter_name)
self.contents.font.color = normal_color
self.contents.draw_text(x + 60, y, 36, WLH, parameter_value, 2)
end
end

#==============================================================================
# ** Window_Spirit_Info
#------------------------------------------------------------------------------
# This window displays full status of spirits on the status screen.
#==============================================================================

class Window_Spirit_Info < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
# actor : actor
#--------------------------------------------------------------------------
def initialize(actor = nil)
super(0, 0, 544, 416)
@actor = actor
self.back_opacity = 255
end
#--------------------------------------------------------------------------
# * Define Spirit
#--------------------------------------------------------------------------
def spirit=(actor)
@actor = actor
refresh unless @actor.nil?
end

#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_name(@actor, 4, 0)
draw_actor_class(@actor, 128, 0)
draw_actor_face(@actor, 8, 32)
draw_basic_info(128, 32)
draw_parameters(32, 160)
draw_exp_info(288, 32)
draw_skill_list(240, 152) unless @actor.skills.nil?
draw_specials(4, 280)
end
#--------------------------------------------------------------------------
# * Draw Basic Information
# x : Draw spot X coordinate
# y : Draw spot Y coordinate
#--------------------------------------------------------------------------
def draw_basic_info(x, y)
draw_actor_level(@actor, x, y + WLH * 0)
draw_actor_state(@actor, x, y + WLH * 1)
draw_actor_hp(@actor, x, y + WLH * 2)
draw_actor_mp(@actor, x, y + WLH * 3)
end
#--------------------------------------------------------------------------
# * Draw Parameters
# x : Draw spot X coordinate
# y : Draw spot Y coordinate
#--------------------------------------------------------------------------
def draw_parameters(x, y)
draw_actor_parameter(@actor, x, y + WLH * 0, 0)
draw_actor_parameter(@actor, x, y + WLH * 1, 1)
draw_actor_parameter(@actor, x, y + WLH * 2, 2)
draw_actor_parameter(@actor, x, y + WLH * 3, 3)
end
#--------------------------------------------------------------------------
# * Draw Experience Information
# x : Draw spot X coordinate
# y : Draw spot Y coordinate
#--------------------------------------------------------------------------
def draw_exp_info(x, y)
s1 = @actor.exp_s
s2 = @actor.next_rest_exp_s
s_next = sprintf(Vocab::ExpNext, Vocab::level)
self.contents.font.color = system_color
self.contents.draw_text(x, y + WLH * 0, 180, WLH, Vocab::ExpTotal)
self.contents.draw_text(x, y + WLH * 2, 180, WLH, s_next)
self.contents.font.color = normal_color
self.contents.draw_text(x, y + WLH * 1, 180, WLH, s1, 2)
self.contents.draw_text(x, y + WLH * 3, 180, WLH, s2, 2)
end
#--------------------------------------------------------------------------
# * Draw Equipment
# x : Draw spot X coordinate
# y : Draw spot Y coordinate
#--------------------------------------------------------------------------
def draw_skill_list(x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y - WLH, 300, WLH, Vocab::Spirit_Skills, 1)
self.contents.font.color = normal_color
i = 0
for skill in @actor.skills
draw_item_name(skill, x + 16, y + WLH * (i / 2))
i += 1
x -= 130 if i % 2 == 0
x += 130 if i % 2 != 0
end
end
#--------------------------------------------------------------------------
# * Draw Special Traits
# x : Draw spot X coordinate
# y : Draw spot Y coordinate
#--------------------------------------------------------------------------
def draw_specials(x, y)
specials = []
specials.push(Vocab::Two_Swords_Style) if @actor.two_swords_style
specials.push(Vocab::Fix_Equipment) if @actor.fix_equipment
specials.push(Vocab::Auto_Battle) if @actor.auto_battle
specials.push(Vocab::Super_Guard) if $data_actors[@actor.id].super_guard
specials.push(Vocab::Pharmacology) if @actor.pharmacology
specials.push(Vocab::Critical_Bonus) if @actor.critical_bonus
unless specials.empty?
self.contents.font.color = system_color
self.contents.draw_text(x, y - WLH, 210, WLH, Vocab::Specials, 1)
self.contents.font.color = normal_color
specials.each{ |trait|
self.contents.draw_text(x, y, 200, WLH, trait)
y += WLH}
end
end
end

#==============================================================================
# ** Window_Party_Spirits
#------------------------------------------------------------------------------
# This window displays the faces of the spirits the party has.
#==============================================================================

class Window_Party_Spirits < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
# actor : actor
#--------------------------------------------------------------------------
def initialize
super(0, 284, 544, 132)
refresh
self.active = false
self.index = 0
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
@item_max = $game_party.spirits.size + 1
@column_max = @item_max
create_contents
x = 2
for spirit in $game_party.spirits
draw_actor_face(spirit, x, 2)
x += 130
end
sq = Rect.new(x, 2, 100, 100)
draw_empty_spirit(sq)
end
#--------------------------------------------------------------------------
# * Spirit
#--------------------------------------------------------------------------
def spirit
if 0 <= @index and @index < @item_max - 1
return $game_party.spirits[@index]
else
return nil
end
end
#--------------------------------------------------------------------------
# * Create Window Contents
#--------------------------------------------------------------------------
def create_contents
self.contents.dispose
self.contents = Bitmap.new([@item_max * 130 + 10, width-32].max, 96)
end
#--------------------------------------------------------------------------
# * Get Row Count
#--------------------------------------------------------------------------
def row_max
return 1
end
#--------------------------------------------------------------------------
# * Update cursor
#--------------------------------------------------------------------------
def update_cursor
if @index < 0 # If the cursor position is less than 0
self.cursor_rect.empty # Empty cursor
else # If the cursor position is 0 or more
rect = item_rect(@index) # Get rectangle of selected item
self.ox = @index / 4 * 130 * 4# Match rectangle to scroll position
self.cursor_rect = rect # Refresh cursor rectangle
end
end
#--------------------------------------------------------------------------
# * Get rectangle for displaying items
# index : item number
#--------------------------------------------------------------------------
def item_rect(index)
rect = Rect.new(index % 4 * 130, 0, 100, 98)
return rect
end
#--------------------------------------------------------------------------
# ? Draw Empty Spirit
# rect : space
#--------------------------------------------------------------------------
def draw_empty_spirit(rect)
self.contents.draw_text(rect, "EMPTY", 1)
end
end

#==============================================================================
# ** Window_Actor_Spirits
#------------------------------------------------------------------------------
# This window displays the faces of the spirits each actor has.
#==============================================================================

class Window_Actor_Spirits < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
# actor : actor
#--------------------------------------------------------------------------
def initialize(actor)
@actor = actor
@column_max = 4
super(0, 80, 544, 204)
create_contents
refresh
self.index = 0
self.active = true
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
@item_max = @actor.spirits.size + 1
@item_max -= 1 if spirit_maxed?
create_contents
x = 2
y = 1
for spirit in @actor.spirits
draw_actor_face(spirit, x, y)
x += 130
if x > 500
x = 2
y += 108
end
end
sq = Rect.new(x, y, 100, 100)
draw_empty_spirit(sq) if !spirit_maxed?
end
#--------------------------------------------------------------------------
# * Spirit
#--------------------------------------------------------------------------
def spirit
if 0 <= @index and @index < @item_max - 1
return @actor.spirits[@index]
else
return nil
end
end
#--------------------------------------------------------------------------
# * Create Window Contents
#--------------------------------------------------------------------------
def create_contents
self.contents.dispose
lines = 1 + @item_max / 4
self.contents = Bitmap.new(width - 32, [height - 32, lines * 108].max)
end
#--------------------------------------------------------------------------
# * Get rectangle for displaying items
# index : item number
#--------------------------------------------------------------------------
def item_rect(index)
rect = Rect.new(0, 0, 100, 98)
rect.x = index % 4 * 130
rect.y += 72 if index >= 4
return rect
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
if cursor_movable?
last_index = @index
if Input.repeat?(Input::DOWN)
@index += 3
@index %= @item_max
end
if Input.repeat?(Input::UP)
@index += - 3 + @item_max
@index %= @item_max
end
if Input.repeat?(Input::RIGHT)
@index += 1
@index %= @item_max
end
if Input.repeat?(Input::LEFT)
@index += - 1 + @item_max
@index %= @item_max
end
if @index != last_index
Sound.play_cursor
end
end
update_cursor
end
#--------------------------------------------------------------------------
# * Update cursor
#--------------------------------------------------------------------------
def update_cursor
if @index < 0 # If the cursor position is less than 0
self.cursor_rect.empty # Empty cursor
else # If the cursor position is 0 or more
rect = item_rect(@index) # Get rectangle of selected item
# Match rectangle to scroll position
if @index >= 4
self.oy = 36
self.oy += 108 * (@index / 4 - 1)
else
self.oy = 0
end
self.cursor_rect = rect # Refresh cursor rectangle
end
end

#--------------------------------------------------------------------------
# ? Return if an actor is already filled up with spirits
#--------------------------------------------------------------------------
def spirit_maxed?
return false if Max_spirits.nil? or Max_spirits == 0
return true if !Max_spirits.nil? and @actor.spirits.size == Max_spirits
return false
end
#--------------------------------------------------------------------------
# ? Draw Empty Spirit
# rect : space
#--------------------------------------------------------------------------
def draw_empty_spirit(rect)
self.contents.draw_text(rect, "EMPTY", 1)
end
end

#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
# This is a superclass of all windows in the game.
#==============================================================================

class Window_Base < Window

def hide
self.visible = false
self.active = false
end

def show(activate = true)
self.visible = true
self.active = activate
end

end # End: class Window_Base < Window



The first problem is that whenever I try to switch a currently "Equiped" spirit with another one without first emptying the slot, I get this error message and the game crashes :

CODE
Script 'Sprits' line 97: NoMethodError occurred.

undefined method '<=>' for #<Game_Actor:0x170cfa8>


I also recieve this message if I try to "Equip" more then one spirit to a character, although you can see in the Script I have the maximum number of spirits per character set to 2.


The second problem I'm having is that I cannot remove a spirit from the party using the "Change party members..." when the spirit is "equiped to a character.

I was also wondering if it is possible to allow only specific characters to be able to "Equip" the spirits rather then the entire party.

I'd like some help with this as soon as possible, any more information needed just let me know and I'll be sure to get it up as soon as I can.

Thanks in advance. biggrin.gif

This post has been edited by HeZ: Aug 18 2009, 07:46 AM


__________________________


Go to the top of the page
 
+Quote Post
   
platipus
post Aug 18 2009, 10:02 AM
Post #10


Level 11
Group Icon

Group: Revolutionary
Posts: 191
Type: Event Designer
RM Skill: Skilled




please fix the last spirit disapearing info glitch and the spirit skills not showing ;l

everything else works fine i think.


__________________________
using xp now and will continue to until a better rpg maker
Go to the top of the page
 
+Quote Post
   
332211
post Aug 18 2009, 01:21 PM
Post #11


Waiting for an epiphany
Group Icon

Group: Revolutionary
Posts: 180
Type: Scripter
RM Skill: Advanced




platipus
You seem to be is a hurry. So here's Version 1.1 just for you.

HeZ
Your first problem was fixed. Even the 1st version was corrected.
QUOTE
The second problem I'm having is that I cannot remove a spirit from the party using the "Change party members..." when the spirit is "equiped to a character.

I was also wondering if it is possible to allow only specific characters to be able to "Equip" the spirits rather then the entire party.

Next update.


__________________________
Go to the top of the page
 
+Quote Post
   
platipus
post Aug 18 2009, 04:10 PM
Post #12


Level 11
Group Icon

Group: Revolutionary
Posts: 191
Type: Event Designer
RM Skill: Skilled




ty 332211 i really love ur script and i just have a habbit of wanting things perfect for my game ^.^
..and thats having ur script working 100% xD


__________________________
using xp now and will continue to until a better rpg maker
Go to the top of the page
 
+Quote Post
   
SeeM
post Aug 18 2009, 05:15 PM
Post #13



Group Icon

Group: Member
Posts: 2
Type: Musician
RM Skill: Skilled




Hey, first post biggrin.gif

Got to say this is a nice script.

I'm sorry if I'm over-looking something here but, how do I call just the spirit menu from an event? Like what would the line of script be to call it?

I'll point out that I'm not using the other script you used in the demo. Is this a problem?

Cheers.

Edit : Thank you very much kind sir. One last question if possible.. is there a way to limit how many spirits that can be equipped to each character? Then after a quest has been completed, increase this number and so on?
Edit 2: Just realised you CAN set how many each person gets... sorry for not reading it properly. Still, could be an interesting addition to your script to make it so each person has a limit?

This post has been edited by SeeM: Aug 19 2009, 02:24 PM
Go to the top of the page
 
+Quote Post
   
332211
post Aug 18 2009, 05:46 PM
Post #14


Waiting for an epiphany
Group Icon

Group: Revolutionary
Posts: 180
Type: Scripter
RM Skill: Advanced




QUOTE (SeeM @ Aug 19 2009, 02:15 AM) *
Hey, first post biggrin.gif

Got to say this is a nice script.

I'm sorry if I'm over-looking something here but, how do I call just the spirit menu from an event? Like what would the line of script be to call it?

I'll point out that I'm not using the other script you used in the demo. Is this a problem?

Cheers.

Not a problem.
To call the script:
CODE
$scene = Scene_Spirits.new


__________________________
Go to the top of the page
 
+Quote Post
   
platipus
post Aug 19 2009, 05:21 PM
Post #15


Level 11
Group Icon

Group: Revolutionary
Posts: 191
Type: Event Designer
RM Skill: Skilled




hows the script going? the skills still wont show...what could be interfering with it? i have too many scripts to know.


__________________________
using xp now and will continue to until a better rpg maker
Go to the top of the page
 
+Quote Post
   
SeeM
post Aug 19 2009, 08:27 PM
Post #16



Group Icon

Group: Member
Posts: 2
Type: Musician
RM Skill: Skilled




Hello, me again.

I just wanted to ask if there's a script I could use to auto-equip someone with a spirit?

Thanks again in advance.

(ps. does this count as double-posting..? I didn't think it would be as it's a different question kinda.)

Edit 1 : Genius

This post has been edited by SeeM: Aug 20 2009, 06:50 AM
Go to the top of the page
 
+Quote Post
   
332211
post Aug 20 2009, 03:31 AM
Post #17


Waiting for an epiphany
Group Icon

Group: Revolutionary
Posts: 180
Type: Scripter
RM Skill: Advanced




QUOTE (SeeM @ Aug 20 2009, 05:27 AM) *
Hello, me again.

I just wanted to ask if there's a script I could use to auto-equip someone with a spirit?

Thanks again in advance.

(ps. does this count as double-posting..? I didn't think it would be as it's a different question kinda.)

CODE
$game_actors[ID].add_spirit(Spirit_ID)


__________________________
Go to the top of the page
 
+Quote Post
   
platipus
post Aug 21 2009, 04:55 AM
Post #18


Level 11
Group Icon

Group: Revolutionary
Posts: 191
Type: Event Designer
RM Skill: Skilled




so any tip on making the skills show up for me? >.>


__________________________
using xp now and will continue to until a better rpg maker
Go to the top of the page
 
+Quote Post
   
332211
post Aug 21 2009, 06:27 AM
Post #19


Waiting for an epiphany
Group Icon

Group: Revolutionary
Posts: 180
Type: Scripter
RM Skill: Advanced




QUOTE (platipus @ Aug 21 2009, 01:55 PM) *
so any tip on making the skills show up for me? >.>

Yap. Tell me which other scripts you're using.
Do they show on the regular hero's menu?


__________________________
Go to the top of the page
 
+Quote Post
   
solodev
post Aug 21 2009, 02:43 PM
Post #20



Group Icon

Group: Member
Posts: 2
Type: None
RM Skill: Undisclosed




It seems incompatible with JobChanger for VX, Created by tkblackknight, with additions by Enelvon.
Just FYI.
Go to the top of the page
 
+Quote Post
   

2 Pages V   1 2 >
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: 22nd May 2013 - 12:47 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker