Symphony (Change holder)

Nosleinad

Storyteller
Veteran
Joined
Dec 12, 2012
Messages
351
Reaction score
29
First Language
Portuguese
Primarily Uses
This is a simple request but i didnt see the answer for it yet. The question is short...how can i change the holder spritesheet of a given actor, with a script call or by changing its class.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,004
First Language
Tagalog
Primarily Uses
RMVXA
link to symphony? if the holder one is obtained via notetags or via a specific name, it needs modification of the script to actually allow this...


because if via specific name, then you need to make it not work that way


because if via notetags, most notetags doesn't save in the save file (unless you save the database too, which is not always a good idea) and are reloaded when the database is reloaded so it will revert back to the old one
 

Nosleinad

Storyteller
Veteran
Joined
Dec 12, 2012
Messages
351
Reaction score
29
First Language
Portuguese
Primarily Uses
Yeah sry about the lack of links, it was really a rushed post as i am not in my home now rsrs. The holder sprite sheet to be used for an ACTOR (not class) is set by writing a notetag.

Here's the link to the battle symphony script and it's holder add-on:

Simphony Engine:

https://dl.dropboxusercontent.com/u/38072264/Symphony/Build/Battle%20Symphony%20v1.15.txt

Holder sprite sheets (add-on):

https://dl.dropboxusercontent.com/u/38072264/Symphony/Add-on/Holder-Battlers.txt

I was wondering if there's a script call that can be used to change the holder spritesheet of an actor, or if the only way to do this is by modyfing the script.
 

Selchar

Veteran
Veteran
Joined
Dec 28, 2012
Messages
299
Reaction score
82
First Language
English
Primarily Uses
There isn't a way built in(as far as I can tell), so I put this together.

#===============================================================================# Script: Customizable Holder Battlers# Author: Selchar# Requestor: Nosleinad# Credits: Yami#================================================================================beginThis is an extention of Yami's Holder Battler addon for Battle Engine Symphony.It allows for different battlers based on class id, as well as changing it viascriptcall. Scriptcall changes take priority over class specific, which takespriority over the default holder notetag.#-------------------------------------------------------------------------------# Actor Notetag#-------------------------------------------------------------------------------<class holder battler class_id: filename>#-------------------------------------------------------------------------------# Scriptcall#-------------------------------------------------------------------------------$game_actors[actor_id].new_holders_name = 'filename'Replace class_id or actor_id with the relevant number, and filename with thename of the holder style image you want to use.=end#===============================================================================# The script#===============================================================================module Selchar module Symphony def self.holder_class(class_id) /<class[-_ ]?holder[-_ ]?battler[-_ ]?#{class_id}:\s*(.*)\s*>/i end endendclass Game_Actor < Game_Battler attr_accessor :new_holders_name def holders_name if @new_holders_name != nil return @new_holders_name if @new_holders_name != '' end return actor.class_holder_name(@class_id) if actor.class_holder_name(@class_id) return actor.holders_name endendclass RPG::Actor def class_holder_name(class_id) if @class_holder_name.nil? @class_holder_name = {} $data_classes.each do |i| next unless i @class_holder_name[i.id] = $1 if @note =~ Selchar::Symphony.holder_class(i.id) end end @class_holder_name[class_id] endend#===============================================================================# End of File#===============================================================================
Edit: Decided to go all out and add class specific notetags for actors, and keep the scriptcall change.
 
Last edited by a moderator:
  • Like
Reactions: BCj

Nosleinad

Storyteller
Veteran
Joined
Dec 12, 2012
Messages
351
Reaction score
29
First Language
Portuguese
Primarily Uses
It's working as intended Selchar, and you even made options to use via actor notetags or script calls.

Thanks a lot and i will be sure to send you a copy of my current project when it's finished. Expect a public demo a few days after the release of the monster legacy package from PV Games, it will be posted here in this forum.  :)
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,804
Reaction score
6,780
First Language
Indonesian
Primarily Uses
RMVXA
Code:
#===============================================================================
# Script: Customizable Holder Battlers
# Author: Selchar
# Requestor: Nosleinad
# Credits: Yami
#===============================================================================
=begin
This is an extention of Yami's Holder Battler addon for Battle Engine Symphony.
It allows for different battlers based on class id, as well as changing it via
script call. Script call changes take priority over class specific, which takes
priority over the default holder notetag.
#-------------------------------------------------------------------------------
# Actor Notetag
#-------------------------------------------------------------------------------
<class holder battler class_id: filename>
#-------------------------------------------------------------------------------
# Scriptcall
#-------------------------------------------------------------------------------
$game_actors[actor_id].new_holders_name = 'filename'
Replace class_id or actor_id with the relevant number, and filename with the
name of the holder style image you want to use.
=end
#===============================================================================
# The script
#===============================================================================
module Selchar 
  module Symphony 
    def self.holder_class(class_id) 
      /<class[-_ ]?holder[-_ ]?battler[-_ ]?#{class_id}:\s*(.*)\s*>/i 
    end 
  end
end

class Game_Actor < Game_Battler 
  attr_accessor :new_holders_name 
  def holders_name 
    if @new_holders_name != nil 
      return @new_holders_name if @new_holders_name != '' 
    end 
    return actor.class_holder_name(@class_id) if actor.class_holder_name(@class_id) 
    return actor.holders_name 
  end
end

class RPG::Actor 
  def class_holder_name(class_id) 
    if @class_holder_name.nil? 
      @class_holder_name = {} 
      $data_classes.each do |i| 
        next unless i 
        @class_holder_name[i.id] = $1 if @note =~ Selchar::Symphony.holder_class(i.id) 
      end 
    end 
    @class_holder_name[class_id] 
  end
end
#===============================================================================
# End of File
#===============================================================================
Unjumbled the script.
 
  • Like
Reactions: BCj

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

A part of me wants to return back to the beginning and first two chapters and remake them with parallax map. But I have decided not to. Every chapter is just another step in the journey. No need to walk back unless I have to revise dialouge.
Hey guys! Good news!
I just released the Games from Brazil - Part 2 on my Youtube Channel! I am really happy that part 1 had 100 views and I hope more people will be interested to see the potencial of Brazilian Game Devs!
Effervesce Fallacy™ - Attract Mode (proto)
Almost to the finish line!... or the starting... since it's just the demo. :kaomad2:

Forum statistics

Threads
107,570
Messages
1,030,633
Members
139,671
Latest member
WDRS
Top