Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - PrinceEndymion88

1
In the standard Battle System, when a battle end or when Escape there is a standard fade out transition. Is it possible to show the same transition specified in System -> Battle transition graphic ?

Thanks :)
2
Script Requests / [RMXP] DEX to HP
November 17, 2021, 05:44:58 am
Is it possible to convert DEX value to HP?

E.g.
I have an hero at level 10 with 100HP and I equip him/her with a Weapon with a "DEX +" value of "5".
Then the MAX HP will be increased of 5 and the final HP of my hero will be 105

Thanks :)
3
Script Requests / [RMXP] Revive Item
February 14, 2021, 01:05:40 pm
Hi, in RMXP when I create a Revive item (Tools -> Database -> Items -> Scope -> One Ally (HP 0) or All allies (HP 0)) it can be used in battle also when no characters have 0 HP. It makes no sense... Is it possible to disable "revive items" from the item menu when no characters with 0 HP are available?

Thanks in advance :)
4
Hi guys, I'm searching a way to edit the default Item menu and organyze it in pages. For example, if I have less than 8 item I can see them in a single page with a single column, otherwise the first 8 items will be shown in the first page an the other items in the other pages (with Q/W or LEFT/RIGHT I can navigate through the pages and each page can have only 8 items).

I hope that it's clear 😅 it would be possible to do this?

Thanks in advance
5
Hi guys, I just want to ask you if, with RMXP, is possible to call a message box (the one created with "Show text..." event) inside a script.
And if yes, how can I call a message box with a pre-setted text?

Thanks in advance :)

P.s.: I use the Universal Message System v1.8.0 by Ccoa
6
Script Requests / [RMXP] Actor follower
January 15, 2020, 11:56:28 am
Hi guys, I'm searching for a script that allow to an actor to follow the hero.
I found Zeriab's Caterpillar Script but it works only with actors in the party. For i.e. I want that when the script is enable actor with id "005" will appear in the map and follows the hero (it doesn't matter if the actor is in the party or not).

Is it possible?

Thanks in advanca
7
Attack without Weapon and personal ATK/PDEF/MDEF/EVA statistics
Authors: PrinceEndymion88
Version: 0.2
Type: More Actor Base Stats
Key Term: Actor Add-on



Introduction

This script was created for those who want to add in their project the possibility to have a base attack, physical defense, magical defense, and evasion. So your hero, for example, can attack without a weapon and can defend himself without armor.


Features


  • You can customize your hero base attack power

  • You can customize your hero base phisical defence

  • You can customize your hero base magical defence

  • You can customize your hero base evasion

  • You can select a personal animation for the attack without weapon or you can choose a default one.





Updates
v0.2

  • Now you could define a default base attack value, a default phisical defence value, a default magical defence value and a default evasion value for those heroes which haven't a personalized value for the calculation of statistics.





Screenshots

None.


Demo

http://sailormoonanotherstory2.altervista.org/attack-without-weapon-and-personal-atkpdefmdefeva-statistics/


Script

v0.2
Spoiler: ShowHide

##Attack without Weapon and personal ATK/PDEF/MDEF/EVA statistics
##Created by PrinceEndymion88
##http://sailormoonanotherstory2.altervista.org
##version 0.2
##Thanks to ValentinoAvon for his base script

#{ID_HERO => ID ANIMATION}
#Instruction:
#First of all copy the script above Main
#This define the animation displayed when an hero have no weapon assigned.
#For example, if you want to assign the animation 386 at hero 1 you have to insert 1=>386
#You have to use comma to separe every personal animation.
#For example ANIMATION_NO_WEAPON = {1=>386, 2=>300, 3=>150}
#Istruzioni:
#Prima di tutto copiare lo script sopra Main
#Questa parte definisce l'animazione visualizzata quando un eroe attacca e non ha un'arma assegnata.
#Per esempio, se vuoi assegnare l'animazione 386 all'eroe 1 dovrai inserire 1=>386
#Devi usare la virgola per separare ogni animazione personalizzata
#Per esempio ANIMATION_NO_WEAPON = {1=>386, 2=>300, 3=>150}
ANIMATION_NO_WEAPON = {1=>10, 5=>11}

#Here you can define the default animation for the heroes which have no animation assigned.
#Qui potrai definire l'animazione personalizzata per gli eroi che non ne hanno una assegnata
ANIMATION_NO_WEAPON_DEFAULT = 12

#Here you have to insert the multiplier for your personal statistics.
#ATK, PDEF, MDEF and EVA will be calculated with the following formula:
#ATK= HERO_LEVEL * MULTIPLIER_ATK (for example if your hero level is 25 and your MULTIPLIER_ATK is 2, at level 25 your hero will have a base attack = 50)
#PDEF = HERO_LEVEL * MULTIPLIER_PDEF (for example if your hero level is 25 and your MULTIPLIER_PDEF is 3, at level 25 your hero will have a base phisical defence = 75)
#MDEF = HERO_LEVEL * MULTIPLIER_MDEF (for example if your hero level is 25 and your MULTIPLIER_MDEF is 2, at level 25 your hero will have a base magical defence = 50)
#EVA = HERO_LEVEL * MULTIPLIER_EVA (for example if your hero level is 25 and your MULTIPLIER_EVA is 4, at level 25 your hero will have a base evasion = 100)
#Naturally if you equip your hero with weapons or armor, statistics will be summet to base statistics (base statistics + additional statistics)
#Qui dovrai inserire i moltiplicatori per le tue statistiche personali
#Attacco (ATK), Difesa fisica (PDEF), Difesa magica (MDEF) ed evasione (EVA) verranno calcolate con la formula seguente:
#ATK= HERO_LEVEL * MULTIPLIER_ATK (per esempio se il tuo eroe è al livello 25 e il valore MULTIPLIER_ATK è 2, al livello 25 avrà un attacco base pari a = 50)
#PDEF = HERO_LEVEL * MULTIPLIER_PDEF (per esempio se il tuo eroe è al livello 25 e il valore MULTIPLIER_PDEF è 3, al livello 25 avrà una difesa fisica pari a = 75)
#MDEF = HERO_LEVEL * MULTIPLIER_MDEF (per esempio se il tuo eroe è al livello 25 e il valore MULTIPLIER_MDEF è 2, al livello 25 avrà una difesa magica pari a = 50)
#EVA = HERO_LEVEL * MULTIPLIER_EVA (per esempio se il tuo eroe è al livello 25 e il valore MULTIPLIER_EVA è 4, al livello 25 avrà un valore di evasione pari a = 100)
#Naturalmente se equipaggerai il tuo eroe con armi o armature le statistiche verranno sommate a quelle base
MULTIPLIER_ATK =  {1=>2, 5=>3}
MULTIPLIER_PDEF =  {1=>3, 5=>2}
MULTIPLIER_MDEF = {1=>2, 5=>3}
MULTIPLIER_EVA =  {1=>4, 5=>5}
#In base puoi definire un valore di attacco di base, un valore di difesa fisica di base, un valore di difesa magica di base e un valore di evasione di base per quegli
#eroi che non hanno alcun valore personalizzato per il calcolo delle statistiche
#Below you could define a default base attack value, a default phisical defence value, a default magical defence value and a default evasion value for those heroes
#which haven't a personalized value for the calculation of statistics.
MULTIPLIER_ATK_DEF = 5
MULTIPLIER_PDEF_DEF = 5
MULTIPLIER_MDEF_DEF = 5
MULTIPLIER_EVA_DEF = 5

class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Define Attack Power with and without weapon
#--------------------------------------------------------------------------

  def base_atk
    n = 0
    weapon = $data_weapons[@weapon_id]
    n += weapon.atk if weapon != nil
if MULTIPLIER_ATK[@actor_id] != nil
    n += (@level *MULTIPLIER_ATK[@actor_id])
else
n += (@level * MULTIPLIER_ATK_DEF)
end
    return n
  end
  alias personal_animation2_id animation2_id
   def animation2_id
    weapon = $data_weapons[@weapon_id]
  if ANIMATION_NO_WEAPON[@actor_id] != nil
    return ANIMATION_NO_WEAPON[@actor_id] if weapon == nil
  else
    return ANIMATION_NO_WEAPON_DEFAULT if weapon == nil
  end
    personal_animation2_id
  end
 
#--------------------------------------------------------------------------
# * Define Physical Defense with and without weapon/armor
#--------------------------------------------------------------------------
  def base_pdef
n = 0
    weapon = $data_weapons[@weapon_id]
    armor1 = $data_armors[@armor1_id]
    armor2 = $data_armors[@armor2_id]
    armor3 = $data_armors[@armor3_id]
    armor4 = $data_armors[@armor4_id]
    pdef1 = weapon
    pdef2 = armor1 != nil ? armor1.pdef : 0
    pdef3 = armor2 != nil ? armor2.pdef : 0
    pdef4 = armor3 != nil ? armor3.pdef : 0
    pdef5 = armor4 != nil ? armor4.pdef : 0
    n += weapon.pdef if weapon != nil
if MULTIPLIER_PDEF[@actor_id] != nil
    n += (@level *MULTIPLIER_PDEF[@actor_id])
else
n += MULTIPLIER_PDEF_DEF
end
return n + pdef2 + pdef3 + pdef4 + pdef5
  end
 
#--------------------------------------------------------------------------
# * Define Magic Defense with and without weapon/armor
#--------------------------------------------------------------------------
  def base_mdef
n = 0
    weapon = $data_weapons[@weapon_id]
    armor1 = $data_armors[@armor1_id]
    armor2 = $data_armors[@armor2_id]
    armor3 = $data_armors[@armor3_id]
    armor4 = $data_armors[@armor4_id]
    mdef1 = weapon
    mdef2 = armor1 != nil ? armor1.mdef : 0
    mdef3 = armor2 != nil ? armor2.mdef : 0
    mdef4 = armor3 != nil ? armor3.mdef : 0
    mdef5 = armor4 != nil ? armor4.mdef : 0
n += weapon.mdef if weapon != nil
if MULTIPLIER_MDEF[@actor_id] != nil
    n += (@level *MULTIPLIER_MDEF[@actor_id])
else
n += MULTIPLIER_MDEF_DEF
end
    return n + mdef2 + mdef3 + mdef4 + mdef5
  end
 
#--------------------------------------------------------------------------
# * Define Evasion Correction with and without armor
#--------------------------------------------------------------------------
  def base_eva
n = 0
    armor1 = $data_armors[@armor1_id]
    armor2 = $data_armors[@armor2_id]
    armor3 = $data_armors[@armor3_id]
    armor4 = $data_armors[@armor4_id]
    eva1 = armor1 != nil ? armor1.eva : 0
    eva2 = armor2 != nil ? armor2.eva : 0
    eva3 = armor3 != nil ? armor3.eva : 0
    eva4 = armor4 != nil ? armor4.eva : 0
if MULTIPLIER_EVA[@actor_id] != nil
    n += (@level *MULTIPLIER_EVA[@actor_id])
else
n += MULTIPLIER_EVA_DEF
end
    return n + eva1 + eva2 + eva3 + eva4
  end
end

v0.1
Spoiler: ShowHide

##Attack without Weapon and personal ATK/PDEF/MDEF/EVA statistics
##Created by PrinceEndymion88
##http://sailormoonanotherstory2.altervista.org
##version 0.1
##Thanks to ValentinoAvon for his base script

#{ID_HERO => ID ANIMATION}
#Instruction:
#First of all copy the script above Main
#This define the animation displayed when an hero have no weapon assigned.
#For example, if you want to assign the animation 386 at hero 1 you have to insert 1=>386
#You have to use comma to separe every personal animation.
#For example ANIMATION_NO_WEAPON = {1=>386, 2=>300, 3=>150}
ANIMATION_NO_WEAPON = {1=>10}

#Here you can define the default animation for the heroes which have no animation assigned.
ANIMATION_NO_WEAPON_DEFAULT = 11

#Here you have to insert the multiplier for your personal. Statistics.
#ATK, PDEF, MDEF and EVA will be calculated with the following formula:
#ATK= HERO_LEVEL * MULTIPLIER_ATK (for example if your hero level is 25 and your MULTIPLIER_ATK is 2, at level 25 your hero will have a base attack = 50)
#PDEF = HERO_LEVEL * MULTIPLIER_PDEF (for example if your hero level is 25 and your MULTIPLIER_PDEF is 3, at level 25 your hero will have a base phisical defence = 75)
#MDEF = HERO_LEVEL * MULTIPLIER_MDEF (for example if your hero level is 25 and your MULTIPLIER_MDEF is 2, at level 25 your hero will have a base magical defence = 50)
#EVA = HERO_LEVEL * MULTIPLIER_EVA (for example if your hero level is 25 and your MULTIPLIER_EVA is 4, at level 25 your hero will have a base evasion = 100)
#Naturally if you equip your hero with weapons or armor you have to sum base statistics + additional statistics
MULTIPLIER_ATK =  {1=>2}
MULTIPLIER_PDEF =  {1=>3}
MULTIPLIER_MDEF = {1=>2}
MULTIPLIER_EVA =  {1=>4}

class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Define Attack Power with and without weapon
#--------------------------------------------------------------------------

  def base_atk
    n = 0
    weapon = $data_weapons[@weapon_id]
    n += weapon.atk if weapon != nil
    n += (@level *MULTIPLIER_ATK[@actor_id])
    return n
  end
  alias personal_animation2_id animation2_id
   def animation2_id
    weapon = $data_weapons[@weapon_id]
  if ANIMATION_NO_WEAPON[@actor_id] != nil
    return ANIMATION_NO_WEAPON[@actor_id] if weapon == nil
  else
    return ANIMATION_NO_WEAPON_DEFAULT if weapon == nil
  end
    personal_animation2_id
  end
 
#--------------------------------------------------------------------------
# * Define Physical Defense with and without weapon/armor
#--------------------------------------------------------------------------
  def base_pdef
n = 0
    weapon = $data_weapons[@weapon_id]
    armor1 = $data_armors[@armor1_id]
    armor2 = $data_armors[@armor2_id]
    armor3 = $data_armors[@armor3_id]
    armor4 = $data_armors[@armor4_id]
    pdef1 = weapon
    pdef2 = armor1 != nil ? armor1.pdef : 0
    pdef3 = armor2 != nil ? armor2.pdef : 0
    pdef4 = armor3 != nil ? armor3.pdef : 0
    pdef5 = armor4 != nil ? armor4.pdef : 0
    n += weapon.pdef if weapon != nil
    n += (@level *MULTIPLIER_PDEF[@actor_id])
return n + pdef2 + pdef3 + pdef4 + pdef5
  end
 
#--------------------------------------------------------------------------
# * Define Magic Defense with and without weapon/armor
#--------------------------------------------------------------------------
  def base_mdef
n = 0
    weapon = $data_weapons[@weapon_id]
    armor1 = $data_armors[@armor1_id]
    armor2 = $data_armors[@armor2_id]
    armor3 = $data_armors[@armor3_id]
    armor4 = $data_armors[@armor4_id]
    mdef1 = weapon
    mdef2 = armor1 != nil ? armor1.mdef : 0
    mdef3 = armor2 != nil ? armor2.mdef : 0
    mdef4 = armor3 != nil ? armor3.mdef : 0
    mdef5 = armor4 != nil ? armor4.mdef : 0
n += weapon.mdef if weapon != nil
    n += (@level *MULTIPLIER_MDEF[@actor_id])
    return n + mdef2 + mdef3 + mdef4 + mdef5
  end
 
#--------------------------------------------------------------------------
# * Define Evasion Correction with and without armor
#--------------------------------------------------------------------------
  def base_eva
n = 0
    armor1 = $data_armors[@armor1_id]
    armor2 = $data_armors[@armor2_id]
    armor3 = $data_armors[@armor3_id]
    armor4 = $data_armors[@armor4_id]
    eva1 = armor1 != nil ? armor1.eva : 0
    eva2 = armor2 != nil ? armor2.eva : 0
    eva3 = armor3 != nil ? armor3.eva : 0
    eva4 = armor4 != nil ? armor4.eva : 0
    n += (@level *MULTIPLIER_EVA[@actor_id])
    return n + eva1 + eva2 + eva3 + eva4
  end
end



Instructions

Instructions are in the script.


Compatibility

No issue found.


Credits and Thanks


  • ValentinoAvon




Author's Notes
-None-
8
Projects / Games / [XP]Sailor Moon Another Story 2
September 02, 2015, 10:27:28 am
Sailor Moon Another Story 2

Why Another Story 2?
This game is a (unofficial) sequel to the famous game "Sailor Moon Another Story" for Super Nintendo.

History:
After the defeat of Galaxia the senshi live their lives quietly on earth when some enemies already defeated in the past reappear with the sole purpose of defeating the senshi and sowing chaos. Tiamat, Nanna and Ningal are the architects of this. But who are they really?

Characters (Playable):
Spoiler: ShowHide

Sailor Moon
Sailor Mercury
Sailor Mars
Sailor Jupiter
Sailor Venus
Sailor Pluto
Sailor Chibi-Moon
Sailor Neptune
Sailor Uranus
Sailor Saturn
Sailor Pallas
Sailor Vesta
Sailor Juno
Sailor Ceres
Sailor Star Fighter
Sailor Star Maker
Sailor Star Healer
Sailor Kakyuu.
All characters can be part of a party of up to 5 Sailors.


Differences with the first version of the game:
The first version was released way back in 2008 and differed a lot from the current one (both in the gameplay and in the story). Due to university commitments, first, and then work, the development of the game took a lot (maybe too long). But now I can say that the big one is done :) the game also has a port on android systems (potentially unstable).

Screenshots:
Spoiler: ShowHide

Title Screen + Lang Selector


Battle System:



Game maps:


Game Menu (Inventory, Formation, Puzzles, Settings and Party)




Last demo:
You can download the latest version of the game from here:
- Windows: https://bit.ly/3SXujpn
- Android: https://bit.ly/3FuEpv5


Full game (old version):
You can download the old version of the game (released in 2010) here: https://mega.nz/file/6VdnTbSB#GItW-PDp-DuP5N1MaXZQUPuBugMb0JQ2jQ3xdLu5gZk

Follow me:
You can follow me on the following pages:
Facebook: https://www.facebook.com/smas2perfectedition
Youtube: https://www.facebook.com/smas2perfectedition
Instagram: https://www.instagram.com/smas2perfectedition


Credits:
All the people who collaborated, helping me in the realization of this project, were credited in the game.


Notify me of any problems. Any feedback is appreciated.[/center]
9
Script Requests / [XP] Split BGM into two parts.
June 03, 2015, 04:48:34 pm
Currently to each map can be associated a BGM (.ogg or .mp3 or .wav) that will be repeated endlessly after they finish playing until you'll go to a map with a different BGM.
What I seek is a script that allows to have not one but two BGM for every map. The first file (for example Sad_Theme_01.ogg) will represent the introduction, while the latter file (for example Sad_Theme_02.ogg) will represent the next part which will be repeated indefinitely, until you'll go to a map with a different BGM.
I do not know if such a thing already exists or is feasible, but I hope so :)
10
Script Requests / Black/White Magic and Items/Key Items
February 10, 2015, 04:58:38 am
Hello guys, I would like to add two features to system Scene_Skill and system Scene_Item !

In Scene_Skill I want to separate Black and White Magic... like in picture(I've created it with photoshop and I've forgotten help_window XD )
Spoiler: ShowHide





For example if a skill had "White" attribute I can see it in White list, otherwise if a skill had "Black" attribute I can see it in Black.

In Scene_Item, I want to split items in "Items" and "Key Items"...like in picture(I've created it with photoshop and I've forgotten help_window XD )
Spoiler: ShowHide





For example if an item had "NoKey" attribute I can see it in Items list, otherwise if an item had "Key" attribute I can see it in "Key Item". In both categories I want to hide Equipment items.

I hope it's an easy thing to realize. :D
11
Script Requests / Random error with Sfonts script....
February 08, 2015, 01:26:02 pm
I'm using this script in my project. Sometimes it works good and other times I get the following error:
Script 'Sfonts' line 147: RGSSError occured.

failed to create bitmap.


I don't know why... Is there something wrong into the script?

Sfonts:
#=============================================================================
# * SFonts
#=============================================================================
# Trickster
# Version 1.0
# 12.19.07
#=============================================================================
# Introduction
#  - This script adds SFont support for rmxp. An sfont is a image file with
#    characters already drawn onto it. The top row of pixels in this image shows
#    where the characters are and where the breaks are.
# Setting up images
#  - The top left hand pixel (0, 0) is the skip color and tells if a column
#    of pixels is empty or contain data
#  - Images should be placed in Graphics/SFonts
#  - For more reference see the example image Arial_Text
# To Use
#  - You can use this script in one of two ways
#    - 1) Set <Bitmap>.sfont to an SFont object then call <Bitmap>.draw_text
#    - 2) Call <SFont>.render(<String>) and then blt it to a Bitmap object
# Documentation
#  - SFont.new(<String/Bitmap>, <Array>, <Integer/String>)
#  - Where the first parameter is a filename (in Graphics/SFonts) or a Bitmap
#     object containing the Font data
#  - the second parameter is an Array of all of the characters in order in the
#    file the default is specified in @@glyphs below you
#  - the last parameter is either the width that should be used for the space
#    character or the character whose width you want to use for the space
#    character the default is " which is the width of the " character if "
#    character is not in the glyph then the height of the bitmap will be used
# Credits
#  - John Croisant for the original code for Rubygame which I used as a base for
#    this script
#  - Adam Bedore for the example sfont image more of his sfont work is given
#    here - http://www.zlurp.com/irq/download.html
# Websites
#  - Official SFont Page with sample fonts - http://www.linux-games.com/sfont
#  - SFont generator utility - http://www.nostatic.org/sfont
#  - SFont generator script for GIMP by Roger Feese
#       http://www.nostatic.org/sfont/render-sfont22.scm
#=============================================================================

module RPG
module Cache
  #--------------------------------------------------------------------------
  # * SFont Load
  #--------------------------------------------------------------------------
  def self.sfont(file)
    self.load_bitmap("Graphics/SFonts/", file)
  end
end
end

class SFont
  #--------------------------------------------------------------------------
  # * Class Variables
  #--------------------------------------------------------------------------
  @@glyphs = [
    "!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/","0",
    "1","2","3","4","5","6","7","8","9",":",";","<","=",">","?","@",
    "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P",
    "Q","R","S","T","U","V","W","X","Y","Z","[","\\","]","^","_","`",
    "a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p",
    "q","r","s","t","u","v","w","x","y","z","{","|","}","~","∞",
    ]
  #--------------------------------------------------------------------------
  # * Get Glyphs
  #--------------------------------------------------------------------------
  def SFont.glyphs
    return @@glyphs
  end
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(file, glyphs = @@glyphs, space = '"')
    if file.is_a?(String)
      bitmap = RPG::Cache.sfont(file)
    elsif file.is_a?(Bitmap)
      bitmap = file
    else
      raise(ArgumentError, "File Must be a String or Bitmap")
    end
   
    @height = bitmap.height
    @skip = bitmap.get_pixel(0, 0)
    @glyphs = {}
   
    x = 2
    glyphs.each {|char| x = load_glyph(bitmap, char, x)}
   
    unless glyphs.include?(' ')
      if space.is_a?(Numeric)
        space = space.to_i
      elsif space.is_a?(String)
        if glyphs.include?(space)
          space = @glyphs[space].width
        elsif !@glyphs['"'].nil?
          space = @glyphs['"'].width
        else
          space = bitmap.height
        end
      else
        raise(ArgumentError, "Space must be either a String or Numeric")
      end
      @glyphs[" "] = Bitmap.new(space, @height)
    end
    @glyphs.default = @glyphs[" "]
  end
  #--------------------------------------------------------------------------
  # * Text Size
  #--------------------------------------------------------------------------
  def text_size(text)
    width = 0
    text.each_byte {|byte| width += @glyphs["%c" % byte].width}
    return width
  end
  #--------------------------------------------------------------------------
  # * Render
  #--------------------------------------------------------------------------
  def render(text)
    width = text_size(text)
    bitmap = Bitmap.new(width, @height)
    x = 0
    text.each_byte do |byte|
      glyph = @glyphs["%c" % byte]
      bitmap.blt(x, 0, glyph, glyph.rect)
      x += glyph.width
    end
    return bitmap
  end
  #--------------------------------------------------------------------------
  # * Private: Load glyph
  #--------------------------------------------------------------------------
  private
  def load_glyph(bitmap, char, xi)
    while bitmap.get_pixel(xi, 0) == @skip && xi < bitmap.width
      xi += 1
    end
    return -1 if xi >= bitmap.width
    xf = xi
    while bitmap.get_pixel(xf, 0) != @skip && xf < bitmap.width
      xf += 1
    end
    return -1 if xf >= bitmap.width
   
    rect = Rect.new(xi, 0, xf - xi, bitmap.height)
    @glyphs[char] = Bitmap.new(xf - xi, bitmap.height)
    @glyphs[char].blt(0, 0, bitmap, rect)
   
    return xf+1
  end
end


Bitmap:
class Rect
  #--------------------------------------------------------------------------
  # * Strict Conversion to Array
  #--------------------------------------------------------------------------
  def to_ary
    return x, y, width, height
  end
  alias bounds to_ary
end

 
class Bitmap
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :sfont
  #--------------------------------------------------------------------------
  # * Draw Text
  #--------------------------------------------------------------------------
  alias_method :trick_sfont_bitmap_draw_text, :draw_text
  def draw_text(*args)
    if self.sfont == nil
      trick_sfont_bitmap_draw_text(*args)
    else
      align = 0
      case args.size
      when 2
        rect, text = args
        x, y, width, height = rect
      when 3
        rect, text, align = args
        x, y, width, height = rect
      when 5
        x, y, width, height, text = args
      when 6
        x, y, width, height, text, align = args
      end
      bitmap = sfont.render(text)
      if align == 1
        x += (width - bitmap.width) / 2
      elsif align == 2
        x += width - bitmap.width
      end
      y += (height - bitmap.height) / 2
      blt(x, y, bitmap, bitmap.rect)
    end
  end
end


I've putted it above main and below Scene_debug...
12
I want to change the default font in Scene_Save (line 12)
#==============================================================================
# ** Scene_Save
#------------------------------------------------------------------------------
#  This class performs save screen processing.
#==============================================================================

class Scene_Save < Scene_File
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super("Which file would you like to save to?")
  end
  #--------------------------------------------------------------------------
  # * Decision Processing
  #--------------------------------------------------------------------------
  def on_decision(filename)
    # Play save SE
    $game_system.se_play($data_system.save_se)
    # Write save data
    file = File.open(filename, "wb")
    write_save_data(file)
    file.close
    # If called from event
    if $game_temp.save_calling
      # Clear save call flag
      $game_temp.save_calling = false
      # Switch to map screen
      $scene = Scene_Map.new
      return
    end
    # Switch to menu screen
    $scene = Scene_Menu.new(4)
  end
  #--------------------------------------------------------------------------
  # * Cancel Processing
  #--------------------------------------------------------------------------
  def on_cancel
    # Play cancel SE
    $game_system.se_play($data_system.cancel_se)
    # If called from event
    if $game_temp.save_calling
      # Clear save call flag
      $game_temp.save_calling = false
      # Switch to map screen
      $scene = Scene_Map.new
      return
    end
    # Switch to menu screen
    $scene = Scene_Menu.new(4)
  end
  #--------------------------------------------------------------------------
  # * Write Save Data
  #     file : write file object (opened)
  #--------------------------------------------------------------------------
  def write_save_data(file)
    # Make character data for drawing save file
    characters = []
    for i in 0...$game_party.actors.size
      actor = $game_party.actors[i]
      characters.push([actor.character_name, actor.character_hue])
    end
    # Write character data for drawing save file
    Marshal.dump(characters, file)
    # Wrire frame count for measuring play time
    Marshal.dump(Graphics.frame_count, file)
    # Increase save count by 1
    $game_system.save_count += 1
    # Save magic number
    # (A random value will be written each time saving with editor)
    $game_system.magic_number = $data_system.magic_number
    # Write each type of game object
    Marshal.dump($game_system, file)
    Marshal.dump($game_switches, file)
    Marshal.dump($game_variables, file)
    Marshal.dump($game_self_switches, file)
    Marshal.dump($game_screen, file)
    Marshal.dump($game_actors, file)
    Marshal.dump($game_party, file)
    Marshal.dump($game_troop, file)
    Marshal.dump($game_map, file)
    Marshal.dump($game_player, file)
  end
end


and Scene_Load (line 28)
#==============================================================================
# ** Scene_Load
#------------------------------------------------------------------------------
#  This class performs load screen processing.
#==============================================================================

class Scene_Load < Scene_File
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    # Remake temporary object
    $game_temp = Game_Temp.new
    # Timestamp selects new file
    $game_temp.last_file_index = 0
    latest_time = Time.at(0)
    for i in 0..3
      filename = make_filename(i)
      if FileTest.exist?(filename)
        file = File.open(filename, "r")
        if file.mtime > latest_time
          latest_time = file.mtime
          $game_temp.last_file_index = i
        end
        file.close
      end
    end
    super("Which file would you like to load?")
  end
  #--------------------------------------------------------------------------
  # * Decision Processing
  #--------------------------------------------------------------------------
  def on_decision(filename)
    # If file doesn't exist
    unless FileTest.exist?(filename)
      # Play buzzer SE
      $game_system.se_play($data_system.buzzer_se)
      return
    end
    # Play load SE
    $game_system.se_play($data_system.load_se)
    # Read save data
    file = File.open(filename, "rb")
    read_save_data(file)
    file.close
    # Restore BGM and BGS
    $game_system.bgm_play($game_system.playing_bgm)
    $game_system.bgs_play($game_system.playing_bgs)
    # Update map (run parallel process event)
    $game_map.update
    # Switch to map screen
    $scene = Scene_Map.new
  end
  #--------------------------------------------------------------------------
  # * Cancel Processing
  #--------------------------------------------------------------------------
  def on_cancel
    # Play cancel SE
    $game_system.se_play($data_system.cancel_se)
    # Switch to title screen
    $scene = Scene_Title.new
  end
  #--------------------------------------------------------------------------
  # * Read Save Data
  #     file : file object for reading (opened)
  #--------------------------------------------------------------------------
  def read_save_data(file)
    # Read character data for drawing save file
    characters = Marshal.load(file)
    # Read frame count for measuring play time
    Graphics.frame_count = Marshal.load(file)
    # Read each type of game object
    $game_system        = Marshal.load(file)
    $game_switches      = Marshal.load(file)
    $game_variables     = Marshal.load(file)
    $game_self_switches = Marshal.load(file)
    $game_screen        = Marshal.load(file)
    $game_actors        = Marshal.load(file)
    $game_party         = Marshal.load(file)
    $game_troop         = Marshal.load(file)
    $game_map           = Marshal.load(file)
    $game_player        = Marshal.load(file)
    # If magic number is different from when saving
    # (if editing was added with editor)
    if $game_system.magic_number != $data_system.magic_number
      # Load map
      $game_map.setup($game_map.map_id)
      $game_player.center($game_player.x, $game_player.y)
    end
    # Refresh party members
    $game_party.refresh
  end
end


How can I do this? :) thanks
13
Script Requests / Error without explanation.
October 19, 2014, 04:48:28 pm
Hi guys, I have a problem with a part of the script of my battle system.
I use CCOA 4.3 EX, until yesterday worked fine, today I take a test and when I start a battle I always get the following error:
Script 'Window_Base' line 136: NoMethodError occured.
undefined method 'name' for nil:NilClass


This is the part of the script where the error occurs ...
#==============================================================================
# ADD-ON - LAYOUT
#==============================================================================
# By Moghunter
#==============================================================================
class React < Window_Base
  attr_reader   :index                   
  attr_reader   :help_window             
  def initialize(x, y, width, height)
    super(x, y, width, height)
    @item_max = 1
    @row_max = 1
    @index = -1
  end
  def index=(index)
    @index = index
     refresh
    if self.active and @help_window != nil
      update_help
    end
    update_cursor_rect
    end
  def row_max
    return (@item_max + @column_max - 1) / @column_max
  end
  def top_row
    return self.oy / 32
  end
  def top_row=(row)
    if row < 0
      row = 0
    end
    if row > row_max - 1
      row = row_max - 1
    end
    self.oy = row * 32
  end
  def page_row_max
    return (self.height - 32) / 32
  end
  def page_item_max
    return page_row_max * @column_max
  end
  def help_window=(help_window)
    @help_window = help_window
    if self.active and @help_window != nil
      update_help
    end
  end
  def update_cursor_rect   
    if @index < 0
      self.cursor_rect.empty
      return
    end
    row = @index / @column_max
    if row < self.top_row
      self.top_row = row
    end
    if row > self.top_row + (self.page_row_max - 1)
      self.top_row = row - (self.page_row_max - 1)
    end
    cursor_width = 0
    x = @index / @column_max * 48 - self.oy
    y = 110 + @index % @column_max * (cursor_width + 100)
    self.cursor_rect.set(x, y, cursor_width, 32)
    t = @index / @column_max * 28 - self.oy
  end
  def update
    super
    if self.active and @item_max > 0 and @index >= 0
      if Input.repeat?(Input::C) or Input.repeat?(Input::B)
          refresh
      end
      if Input.repeat?(Input::RIGHT)
        if (@column_max == 1 and Input.trigger?(Input::RIGHT)) or
           @index < @item_max - @row_max
          $game_system.se_play($data_system.cursor_se)
          @index = (@index + @row_max) % @item_max
          refresh
          end
      end
      if Input.repeat?(Input::LEFT)
        if (@column_max == 1 and Input.trigger?(Input::LEFT)) or
           @index >= @row_max
          $game_system.se_play($data_system.cursor_se)
          @index = (@index - @row_max + @item_max) % @item_max
          refresh
          end
      end
      if Input.repeat?(Input::RIGHT)
        if @column_max >= 2 and @index < @item_max - 1
          $game_system.se_play($data_system.cursor_se)
          @index += 1
          refresh
          end
      end
      if Input.repeat?(Input::LEFT)
        if @column_max >= 2 and @index > 0
          $game_system.se_play($data_system.cursor_se)
          @index -= 1
          refresh
          end
      end
      if Input.repeat?(Input::R)
        if self.top_row + (self.page_row_max - 1) < (self.row_max - 1)
          $game_system.se_play($data_system.cursor_se)
          @index = [@index + self.page_item_max, @item_max - 1].min
          refresh
          self.top_row += self.page_row_max
        end
      end
      if Input.repeat?(Input::L)
        if self.top_row > 0
          $game_system.se_play($data_system.cursor_se)
          @index = [@index - self.page_item_max, 0].max
          refresh
          self.top_row -= self.page_row_max
        end
      end
    end
    if self.active and @help_window != nil
      update_help
    end
    update_cursor_rect
  end
end
class Window_Base < Window
  def draw_face(actor,x,y)
    face = RPG::Cache.picture(actor.name + "_face")
    cw = face.width
    ch = face.height
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x , y - ch, face, src_rect)   
  end
def draw_face2(actor,x,y)
    face = RPG::Cache.picture(actor.name + "_face2")
    cw = face.width
    ch = face.height
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x , y - ch, face, src_rect)   
end   
def draw_lay(actor,x,y)
    layout = RPG::Cache.picture(actor.name + "_lay")
    cw = layout.width
    ch = layout.height
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x , y - ch, layout, src_rect)   
end
def draw_hp(actor, x, y, width = 144)
    back = RPG::Cache.picture("BAR0")   
    cw = back.width 
    ch = back.height
    src_rect = Rect.new(0, 0, cw, ch)   
    self.contents.blt(x + 65, y - ch + 30, back, src_rect)
    meter = RPG::Cache.picture("HP_BAR")   
    cw = meter.width  * actor.hp / actor.maxhp
    ch = meter.height
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x + 65, y - ch + 30, meter, src_rect)
    text = RPG::Cache.picture("HP_T")   
    cw = text.width 
    ch = text.height
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x + 60, y - ch + 15, text, src_rect)
        self.contents.font.color = system_color
       if width - 32 >= 108
       hp_x = x + width - 108
       flag = true
       elsif width - 32 >= 48
       hp_x = x + width - 48
       flag = false
       end
       self.contents.font.color = Color.new(250,255,255,255)
       self.contents.draw_text(hp_x + 20, y - 8, 48, 32, actor.hp.to_s, 2)
end
def draw_hp2(actor, x, y, width = 144)
    back = RPG::Cache.picture("BAR0")   
    cw = back.width 
    ch = back.height
    src_rect = Rect.new(0, 0, cw, ch)   
    self.contents.blt(x + 65, y - ch + 25, back, src_rect)
    meter = RPG::Cache.picture("HP_BAR")   
    cw = meter.width  * actor.hp / actor.maxhp
    ch = meter.height
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x + 65, y - ch + 25, meter, src_rect)
    text = RPG::Cache.picture("HP_T")   
    cw = text.width 
    ch = text.height
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x + 33, y - ch + 20, text, src_rect)
        self.contents.font.color = system_color
       if width - 32 >= 108
       hp_x = x + width - 108
       flag = true
       elsif width - 32 >= 48
       hp_x = x + width - 48
       flag = false
     end
     self.contents.font.color = Color.new(250,255,255,255)
       self.contents.sfont = SFont.new("Arial_Battle")
       self.contents.draw_text(hp_x - 21, y - 4, 12, 32, "HP", 1)
       self.contents.draw_text(hp_x - 33, y - 4, 48, 32, actor.hp.to_s, 2)
       self.contents.font.color = normal_color
       self.contents.sfont = SFont.new("Arial_Battle")
       self.contents.draw_text(hp_x + 15, y - 4, 12, 32, "/", 1)
       self.contents.draw_text(hp_x + 27, y - 4, 48, 32, actor.maxhp.to_s)
       
end 
def draw_sp(actor, x, y, width = 144)
    back = RPG::Cache.picture("BAR0")   
    cw = back.width 
    ch = back.height
    src_rect = Rect.new(0, 0, cw, ch)   
    self.contents.blt(x + 65, y - ch + 30, back, src_rect)
    meter = RPG::Cache.picture("SP_BAR")   
    cw = meter.width  * actor.sp / actor.maxsp
    ch = meter.height
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x + 65, y - ch + 30, meter, src_rect)
    text = RPG::Cache.picture("SP_T")   
    cw = text.width 
    ch = text.height
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x + 60, y - ch + 15, text, src_rect)
        self.contents.font.color = system_color
       if width - 32 >= 108
       sp_x = x + width - 108
       flag = true
       elsif width - 32 >= 48
       sp_x = x + width - 48
       flag = false
       end
       self.contents.font.color = Color.new(250,255,255,255)
       self.contents.draw_text(sp_x + 20, y - 8, 48, 32, actor.sp.to_s, 2)
     end
def draw_sp2(actor, x, y, width = 144)
    back = RPG::Cache.picture("BAR0")   
    cw = back.width 
    ch = back.height
    src_rect = Rect.new(0, 0, cw, ch)   
    self.contents.blt(x + 65, y - ch + 25, back, src_rect)
    meter = RPG::Cache.picture("SP_BAR")   
    cw = meter.width  * actor.sp / actor.maxsp
    ch = meter.height
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x + 65, y - ch + 25, meter, src_rect)
    text = RPG::Cache.picture("SP_T")   
    cw = text.width 
    ch = text.height
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x + 33, y - ch + 20, text, src_rect)
        self.contents.font.color = system_color
       if width - 32 >= 108
       sp_x = x + width - 108
       flag = true
       elsif width - 32 >= 48
       sp_x = x + width - 48
       flag = false
       end
       self.contents.font.color = Color.new(250,255,255,255)
       self.contents.sfont = SFont.new("Arial_Battle")
       self.contents.draw_text(sp_x - 48, y - 4, 12, 32, "EP", 1)
       self.contents.draw_text(sp_x - 60, y - 4, 48, 32, actor.sp.to_s, 2)
       self.contents.font.color = normal_color
       self.contents.sfont = SFont.new("Arial_Battle")
       self.contents.draw_text(sp_x - 12, y - 4, 12, 32, "/", 1)
       self.contents.draw_text(sp_x, y - 4, 48, 32, actor.maxsp.to_s)
end     
  def draw_name(actor, x, y)
    self.contents.font.color = Color.new(238,46,218,255)
    self.contents.sfont = SFont.new("Arial_Battle")
    self.contents.draw_text(x , y, 100, 40, actor.name,15)    #self.contents.draw_text(x , y, 70, 40, actor.name,1)
  end       
 
def draw_commando(x,y)
    com = RPG::Cache.picture("commando")
    cw = com.width
    ch = com.height
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x , y - ch, com, src_rect)   
end
def draw_level(actor, x, y)
    self.contents.font.color = Color.new(238,46,218,255)
    self.contents.draw_text(x + 32, y, 20, 20, actor.level.to_s, 1)
  end 
 
  def draw_com(actor, x, y)
    action = RPG::Cache.picture(actor.name + "_com")
    cw = action.width
    ch = action.height
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x , y - ch, action, src_rect)   
  end   
end
def draw_select(x,y)
    com = RPG::Cache.picture("select")
    cw = com.width
    ch = com.height
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x , y - ch, com, src_rect)   
  end

there seems to be an error with actor.name, but I have not changed anything about it ... what can it be?
I've also tried to delete new scripts, but nothing =(
14
Script Requests / BGM without interruption
October 05, 2014, 11:49:04 am
I'm looking for a script which allows to delete the delay between the end of the bgm and its restarting. Can someone help me?
15
Hi guys my game is splitted in 6 chapters. When the player will start a new chapter a switch will be enabled! So in my scene save/load i want to show the proper chapter name!
This is my script, I've edited MOG scene file:
#_______________________________________________________________________________
# MOG Scene File Ayumi V1.0           
#_______________________________________________________________________________
# By Moghunter         
#_______________________________________________________________________________
if true # True = Enable / False = Disable (Script)
module MOG
#Transition Time.
MSVT = 30
#Transition Type.
MSVTT = "006-Stripe02"
end
$mogscript = {} if $mogscript == nil
$mogscript["menu_ayumi"] = true
###############
# Window_Base #
###############
class Window_Base < Window
def drw_win_file(x,y)
dwf = RPG::Cache.picture("Win_File")
cw = dwf.width
ch = dwf.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x , y - ch, dwf, src_rect) 
end   
end
###################
# Window_SaveFile #
###################
class Window_SaveFile < Window_Base
  attr_reader   :filename               
  attr_reader   :selected               
  def initialize(file_index, filename)
    super(0, 64 + file_index * 138, 640, 240)   
    self.contents = Bitmap.new(width - 32, height - 32) 
    self.opacity = 0
    @file_index = file_index
    @filename = "Save#{@file_index + 1}.rxdata"
    @time_stamp = Time.at(0)
    @file_exist = FileTest.exist?(@filename)
    if @file_exist
      file = File.open(@filename, "r")
      @time_stamp = file.mtime
      @characters = Marshal.load(file)
      @frame_count = Marshal.load(file)
      @game_system = Marshal.load(file)
      @game_switches = Marshal.load(file)
      @game_variables = Marshal.load(file)
      @game_self_switches = Marshal.load(file)
      @game_screen = Marshal.load(file)
      @game_actors = Marshal.load(file)
      @game_party = Marshal.load(file)
      @game_troop = Marshal.load(file)
      @game_map = Marshal.load(file)
      @total_sec = @frame_count / Graphics.frame_rate
      file.close
    end
    @wiref = 0
    refresh
    @selected = false
  end 
  def refresh
    self.contents.clear
    drw_win_file(0,190)
    name = "Page" + "#{@file_index + 1}"#nome page
    self.contents.draw_text(338, 23, 600, 32, name) #position of  page
    self.contents.draw_text(337, 22, 600, 32, name)    #position of  page
    @name_width = contents.text_size(name).width
    if @game_switches[820]
    chapter = "Chapter 1: Hellish Destiny"
    self.contents.draw_text(338, 58, 600, 32, chapter) #position of  CHAPTER
    self.contents.draw_text(337, 57, 600, 32, chapter)    #position of  CHAPTER
    @chapter_width = contents.text_size(chapter).width
    else if @game_switches[821]
    chapter = "Chapter 2: The ''Amazon Stones''"
    self.contents.draw_text(338, 58, 600, 32, chapter) #position of  CHAPTER
    self.contents.draw_text(337, 57, 600, 32, chapter)    #position of  CHAPTER
    @chapter_width = contents.text_size(chapter).width
    else if @game_switches[822]
    chapter = "Chapter 3: Dreams In Danger"
    self.contents.draw_text(338, 58, 600, 32, chapter) #position of  CHAPTER
    self.contents.draw_text(337, 57, 600, 32, chapter)    #position of  CHAPTER
    @chapter_width = contents.text_size(chapter).width
    else if @game_switches[823]
    chapter = "Chapter 4: Struggle For The Galaxy"
    self.contents.draw_text(338, 58, 600, 32, chapter) #position of  CHAPTER
    self.contents.draw_text(337, 57, 600, 32, chapter)    #position of  CHAPTER
    @chapter_width = contents.text_size(chapter).width
    else if @game_switches[824]
    chapter = "Chapter 5: The Last Battle"
    self.contents.draw_text(338, 58, 600, 32, chapter) #position of  CHAPTER
    self.contents.draw_text(337, 57, 600, 32, chapter)    #position of  CHAPTER
    @chapter_width = contents.text_size(chapter).width
    else if @game_switches[825]
    chapter = "Chapter 6: Ami's First Love"
    self.contents.draw_text(338, 58, 600, 32, chapter) #position of  CHAPTER
    self.contents.draw_text(337, 57, 600, 32, chapter)    #position of  CHAPTER
    @chapter_width = contents.text_size(chapter).width
  end
  end
end
end
end
  end
    if @file_exist
      for i in 0...@characters.size
       
        bitmap = RPG::Cache.character(@characters[i][0], @characters[i][1])
        cw = bitmap.rect.width / 4
        ch = bitmap.rect.height / 4
        src_rect = Rect.new(cw * @wiref + 1 , 0, cw, ch)
        x = 360 - @characters.size + i * 32 - cw / 4 #position of  sailor
        self.contents.blt(x - 10, 135 - ch, bitmap, src_rect) #135altezza sailor
        x = 116
        actors = @game_party.actors
        for i in 0...[actors.size, 5].min
        x     = i * 60
        actor = actors[i]       
        end         
      end     
      hour = @total_sec / 60 / 60
      min = @total_sec / 60 % 60
      sec = @total_sec % 60
      time_string = sprintf("%02d:%02d:%02d", hour, min, sec)
      self.contents.draw_text(5, 41, 397, 32, time_string, 2)
      self.contents.draw_text(4, 40, 397, 32, time_string, 2)   
   end
  end
  def selected=(selected)
    @selected = selected
  end
end
##############
# Scene_File #
##############
class Scene_File
  def initialize(help_text)
    @help_text = help_text
  end
  def main
    @mnback = Plane.new
    @mnback.bitmap = RPG::Cache.picture("MN_BK")
    @mnback.z = 1
    @mnlay = Sprite.new
    @mnlay.bitmap = RPG::Cache.picture("Lay_File")
    @mnlay.z = 2
    @help_window = Window_Help.new
    @help_window.set_text(@help_text)
    @help_window.opacity = 0
    @savefile_windows = []
    for i in 0..2
      @savefile_windows.push(Window_SaveFile.new(i, make_filename(i)))
    end
    @savefile_windows[0]
    @file_index = $game_temp.last_file_index
    @savefile_windows[@file_index].selected = true
    @savefile_windows[0].y = 40   
    @savefile_windows[1].y= 140
    @savefile_windows[2].y= 240   
    @win_move_time = 0
    @win_move = 0
    @win_dire = 0
    @win_opac = 255
    @win1_y = 0
    @win2_y = 0
    @win3_y = 0
    Graphics.transition(MOG::MSVT, "Graphics/Transitions/" + MOG::MSVTT)
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    for i in 0..50
    @mnback.ox += 1
    Graphics.update 
    end     
    Graphics.freeze
    @help_window.dispose
    @mnback.dispose
    @mnlay.dispose
    for i in @savefile_windows
      i.dispose
    end
  end
  def update
    if @file_index == 0
    @savefile_windows[0].z = 2 
    @savefile_windows[1].z = 1
    @savefile_windows[2].z = 0   
    @savefile_windows[0].x = @win_move
    @savefile_windows[1].x = 0
    @savefile_windows[1].x= 0
    @savefile_windows[2].x = 0   
    @savefile_windows[0].contents_opacity = @win_opac
    @savefile_windows[1].contents_opacity = 130
    @savefile_windows[2].contents_opacity =  130   
    elsif @file_index == 1
    @savefile_windows[0].z = 1 
    @savefile_windows[1].z = 2
    @savefile_windows[2].z = 1   
    @savefile_windows[0].x = 0
    @savefile_windows[1].x = @win_move
    @savefile_windows[2].x = 0     
    @savefile_windows[0].contents_opacity =  130
    @savefile_windows[1].contents_opacity = @win_opac
    @savefile_windows[2].contents_opacity =  130
    else
    @savefile_windows[0].z = 0 
    @savefile_windows[1].z = 1
    @savefile_windows[2].z = 2       
    @savefile_windows[0].x = 0
    @savefile_windows[1].x = 0
    @savefile_windows[2].x = @win_move 
    @savefile_windows[0].contents_opacity = 130
    @savefile_windows[1].contents_opacity = 130
    @savefile_windows[2].contents_opacity = @win_opac   
    end   
    @help_window.update   
    for i in @savefile_windows
      i.update
    end
    if Input.trigger?(Input::C)
      on_decision(make_filename(@file_index))
      $game_temp.last_file_index = @file_index
      return
    end
    if Input.trigger?(Input::B)
      on_cancel
      return
    end
    if Input.repeat?(Input::DOWN)
      if Input.trigger?(Input::DOWN) or @file_index < 3
        $game_system.se_play($data_system.cursor_se)
        @savefile_windows[@file_index].selected = false
        @file_index = (@file_index + 1) % 3
        @savefile_windows[@file_index].selected = true
        return
      end
    end
    if Input.repeat?(Input::UP)
      if Input.trigger?(Input::UP) or @file_index > 0
        $game_system.se_play($data_system.cursor_se)
        @savefile_windows[@file_index].selected = false
        @file_index = (@file_index - 1) % 3
        @savefile_windows[@file_index].selected = true
        return
      end
    end
  end
  def make_filename(file_index)
    return "Save#{file_index + 1}.rxdata"
  end
end
end


And this is the result I'm searching for =(


Can someone help me?
16
Script Requests / Scrolling Window Help
August 16, 2014, 06:45:03 pm
Hi guys, I've found this script for Rpg MakerVX, someone know if exist something similar for Rpg Maker XP or maybe is possible to convert it?
class Sprite

  def draw_icon(icon_index, x, y, enabled = true)
bitmap = Cache.system("Iconset")
rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
self.bitmap.blt(x, y, bitmap, rect, enabled ? 255 : 128)
  end

end

class Window_Help < Window_Base

  @@SCROLL_DELAY = 2  # seconds
  @@SCROLL_SPEED = 1  # pixels / frame (60 frames / sec)
  @@SHOW_ICONS   = true  # display icons for items and skills?

  alias :scroll_init :initialize
  def initialize(*args)
scroll_init(*args)
@internal_frame_count = 0
@text_is_long = false
@icon_sprite = Sprite.new
@icon_sprite.x = self.x + 16
@icon_sprite.y = self.y + 16
@icon_sprite.z = self.z + 1
@icon_sprite.bitmap = Bitmap.new(32, 32)
self.windowskin = get_altered_skin
  end

  def get_altered_skin
default = Cache.system('Window')
window = Bitmap.new(default.width, default.height)
window.blt(0, 0, default, default.rect)
window.fill_rect(80, 16, 32, 32, Color.new(0,0,0,0))
return window
  end

  def set_text(text, align = 0)
unless (text == @text) && (align == @align)
@internal_frame_count = 0
txt_width = self.contents.text_size(text).width
@text_is_long = txt_width > (self.width - 32) 
self.contents.dispose
w = @text_is_long ? (txt_width + self.width - 32) : self.width - 32
self.contents = Bitmap.new(w, self.height - 32)
self.contents.clear 
self.ox = 0
self.contents.font.color = normal_color
i = get_icon_index(text)
unless i.nil?
draw_sprite(i, 0, 0)
self.contents.draw_text(32, 0, self.contents.width, WLH, text, align)
else
@icon_sprite.bitmap.clear
self.contents.draw_text(4, 0, self.contents.width, WLH, text, align)
end
@text = text
@align = align
end
  end

  def draw_sprite(icon_index, x, y)
@icon_sprite.bitmap.clear
# get the background image at 'rect'
# so that text does not appear under the icon
bitmap = Graphics.snap_to_bitmap
rect = Rect.new(@icon_sprite.x, @icon_sprite.x,
@icon_sprite.bitmap.width, @icon_sprite.bitmap.height)
@icon_sprite.bitmap.blt(x, y, bitmap, rect)
@icon_sprite.draw_icon(icon_index, x, y)
  end

  def get_icon_index(desc)
return nil unless @@SHOW_ICONS
$data_items.each do |item|
return item.icon_index if !item.nil? && item.description == desc
end
$data_weapons.each do |weapon|
return weapon.icon_index if !weapon.nil? && weapon.description == desc
end
$data_armors.each do |armor|
return armor.icon_index if !armor.nil? && armor.description == desc
end
$data_skills.each do |skill|
return skill.icon_index if !skill.nil? && skill.description == desc
end
return nil
  end

  def update
super
@internal_frame_count += 1
if ((@internal_frame_count > @@SCROLL_DELAY * 60) && @text_is_long)
if self.ox >= (self.contents.width - self.width + 48)
self.ox = 0
@internal_frame_count = 0
else
self.ox += @@SCROLL_SPEED
end
end
  end

  def dispose
super
@icon_sprite.dispose
  end

end
17
I solved it by myself =)
18
Script Requests / Please, help me with CBS v3.04 EX
April 02, 2014, 07:13:31 pm
Hi guys, I'm using an edited version of CBS v3.04 EX adapted for my game. In this battle system if I press D, when escape is possible, I can escape from battle... But i want to delete this function and I want to add a new button, into the menu command, which allow the heroes to escape from battle when escape is possible! As you can see in picture!



this is the entire script I've used!
http://uploaded.net/file/c2pfprmo
19
In my game there are 4 formations and in according to which formation has been chosen, 5 special heroes can use together a combined technique which takes the name from the formation. I've created a menu to select the favourite formation, but I want to edit it or better i want to edit a graphic part.

This is the menu where you can select the formation:




Here you can find the demo: https://hotfile.com/dl/244801197/571331b/formazione.exe.html
You can select "Formazione" into the game menu.

Actually I use these scripts: ccoa's weather script, KH SAVE, ums by ccoa, mode7, CCOA 3.04 RTA, Mog Damage System, DRG - Scene Menu Animated Cursor, Scene into flash, mana title, MOG Scene Shop, mog scene story, Party Changer, Stop the victory ME, Skill Chrono Trigger, shadow text, ,dash, region system, mog battler effects, Light Effects XP 2.1
20
Script Requests / [RMXP] Puzzle Script!
September 08, 2013, 10:37:23 am
I want to add an extra feature to my game. During the game, the player can found some pieces of a puzzle and complete it! Maybe I can explain it with images...
The puzzle can be called by Scene_Puzzle.new into the game menu.
When no pieces were found, the player see an empy puzzle:


When the player found a piece of puzzle, a switch will be activated and he can see a new piece!


Anothe piece found? Another switch and a new image =)


and so on


I hope I was clear. =) Sorry for my english...
Actually I use these scripts: ccoa's weather script, KH SAVE, ums by ccoa, mode7, CCOA 3.04 RTA, Mog Damage System, DRG - Scene Menu Animated Cursor, Scene into flash, mana title, MOG Scene Shop, mog scene story, Party Changer, Stop the victory ME, Skill Chrono Trigger, shadow text, ,dash, region system, mog battler effects, Light Effects XP 2.1
21
Hi, I've found this script:
#=================================================================
# ? Battle Result by A3D Ver. 1.02
# Useful                       : show battle result in a different way
# Effect to default script : this code will replace methode "start_phase5" & "update_phase5"  in Scene_Battle
# How to install             : in script editor, insert all the code above main
# Note                          : this script is for non-commercial use only, give credit if use
# Contact                      : A3D (hyper_s@hotmail.com)
#=================================================================

module A3D
 WAIT_WINDOW_APPEAR = 60
 WAIT_RUNNING_NUMBER = 20
 STEP_EXP = 1
 STEP_GOLD = 1
 SE_LEVELUP = ["007-System07", 100, 100]
 SE_NEWSKILL = ["007-System07", 100, 100]
 FONT_NAME = "Tahoma"
 FONT_SIZE = 22
end

#==============================================================================
# ? Scene_Battle
#==============================================================================

class Scene_Battle

 #--------------------------------------------------------------------------
 # ? After battle phase start
 #--------------------------------------------------------------------------
 def start_phase5
   # It moves to phase 5
   @phase = 5
   # Performing battle end ME
   $game_system.me_play($game_system.battle_end_me)
   # You reset to BGM before the battle starting
   $game_system.bgm_play($game_temp.map_bgm)
   # Initializing EXP, the gold and the treasure
   exp = 0
   gold = 0
   treasures = []
   # Loop
   for enemy in $game_troop.enemies
     # When the enemy hides and it is not state
     unless enemy.hidden
       # Adding acquisition EXP and the gold
       exp += enemy.exp
       gold += enemy.gold
       # Treasure appearance decision
       if rand(100) < enemy.treasure_prob
         if enemy.item_id > 0
           treasures.push($data_items[enemy.item_id])
         end
         if enemy.weapon_id > 0
           treasures.push($data_weapons[enemy.weapon_id])
         end
         if enemy.armor_id > 0
           treasures.push($data_armors[enemy.armor_id])
         end
       end
     end
   end
   # Treasure acquisition
   for item in treasures
     case item
     when RPG::Item
       $game_party.gain_item(item.id, 1)
     when RPG::Weapon
       $game_party.gain_weapon(item.id, 1)
     when RPG::Armor
       $game_party.gain_armor(item.id, 1)
     end
   end
   # Create Variable & Window
   @phase5_step = 1
   @wait_window_appear = A3D::WAIT_WINDOW_APPEAR
   @wait_running_number = A3D::WAIT_RUNNING_NUMBER
   @resultreceive_window = Window_ResultReceive.new(exp, gold, treasures)
   @resultgold_window = Window_ResultGold.new
   @resultparty_window = Window_ResultParty.new
   @actor_level_before = []
   @resultlevel_window = []
   @resultskill_window = []
   for i in 0...$game_party.actors.size
     actor = $game_party.actors[i]
     @actor_level_before[i] = actor.level
     @resultlevel_window[i] = Window_ResultLevel.new(i)
     @resultskill_window[i] = Window_ResultSkill.new(i)
   end
 end
 #--------------------------------------------------------------------------
 # ? Update Phase 5
 #--------------------------------------------------------------------------
 def update_phase5
   case @phase5_step
   when 1  # EXP & Gold Phase
     update_phase5_step1
   when 2  # Skill Phase
     update_phase5_step2
   when 3  # Delete Window Phase
     update_phase5_step3
   end
 end
 #--------------------------------------------------------------------------
 # ? Update Phase 5 Step 1
 #--------------------------------------------------------------------------
 def update_phase5_step1
   # Wait Count Before Window Appear
   if @wait_window_appear > 0
     @wait_window_appear -= 1
     if @wait_window_appear == 0
       @resultreceive_window.visible = true
       @resultgold_window.visible = true
       @resultparty_window.visible = true
       $game_temp.battle_main_phase = false
     end
     return
   end
   # Wait Count Before Running Number
   if @wait_running_number > 0
     @wait_running_number -= 1
     return
   end
   # Change Item Page
   if Input.trigger?(Input::RIGHT)
     if @resultreceive_window.max_page != 1
       $game_system.se_play($data_system.cursor_se)
       @resultreceive_window.page = @resultreceive_window.page == 1 ? 2 : 1
       @resultreceive_window.refresh
     end
   end
   # EXP & Gold Rolling
   if (@resultreceive_window.exp != 0 || @resultreceive_window.gold != 0)
     # Input C to Shortcut Calculation
     if Input.trigger?(Input::C)
       for i in 0...$game_party.actors.size
         actor = $game_party.actors[i]
         level_before = actor.level
         actor.exp += @resultreceive_window.exp
         if actor.level > level_before
           @resultlevel_window[i].visible = true
           Audio.se_play("Audio/SE/" + A3D::SE_LEVELUP[0], A3D::SE_LEVELUP[1], A3D::SE_LEVELUP[2])
         end
       end
       $game_party.gain_gold(@resultreceive_window.gold)
       @resultreceive_window.exp = 0
       @resultreceive_window.gold = 0
       @resultreceive_window.refresh
       @resultgold_window.refresh
       @resultparty_window.refresh
     end
     # EXP
     if @resultreceive_window.exp != 0
       step_exp = @resultreceive_window.exp >= A3D::STEP_EXP.abs ? A3D::STEP_EXP.abs : @resultreceive_window.exp
       for i in 0...$game_party.actors.size
         actor = $game_party.actors[i]
         if actor.next_rest_exp <= step_exp && actor.next_rest_exp != 0
           @resultlevel_window[i].visible = true
           Audio.se_play("Audio/SE/" + A3D::SE_LEVELUP[0], A3D::SE_LEVELUP[1], A3D::SE_LEVELUP[2])
         end
         actor.exp += step_exp
       end
       @resultreceive_window.exp -= step_exp
       @resultreceive_window.refresh
       @resultparty_window.refresh
     end
     # Gold
     if @resultreceive_window.gold != 0
       step_gold = @resultreceive_window.gold >= A3D::STEP_GOLD.abs ? A3D::STEP_GOLD.abs : @resultreceive_window.gold
       $game_party.gain_gold(step_gold)
       @resultreceive_window.gold -= step_gold
       @resultreceive_window.refresh
       @resultgold_window.refresh
     end
     return
   end
   # Input C to Bypass Step
   if Input.trigger?(Input::C)
     @phase5_step = 2
     return
   end
 end
 #--------------------------------------------------------------------------
 # ? Update Phase 5 Step 2
 #--------------------------------------------------------------------------
 def update_phase5_step2
   # Change Item Page
   if Input.trigger?(Input::RIGHT)
     if @resultreceive_window.max_page != 1
       $game_system.se_play($data_system.cursor_se)
       @resultreceive_window.page = @resultreceive_window.page == 1 ? 2 : 1
       @resultreceive_window.refresh
     end
   end
   # Initialize Skill Phase
   if @initialized_skill_phase == nil
     for i in 0...$game_party.actors.size
       actor = $game_party.actors[i]
       for skill in $data_classes[actor.class_id].learnings
         if skill.level > @actor_level_before[i] && skill.level <= actor.level
           Audio.se_play("Audio/SE/" + A3D::SE_NEWSKILL[0], A3D::SE_NEWSKILL[1], A3D::SE_NEWSKILL[2])
           @resultskill_window[i].skill_id = skill.skill_id
           @resultskill_window[i].visible = true
           @resultskill_window[i].refresh
           @skill_phase_active = true
         end
       end
     end
     @initialized_skill_phase = true
   end
   # If Skill Phase Active, Show Window
   if @skill_phase_active != nil
     if @resultskill_window[0].x != 456
       for i in 0...$game_party.actors.size
         @resultskill_window[i].x -= 23
       end
       return
     end
   else
     @phase5_step = 3
     return
   end
   # Input C to Bypass Step
   if Input.trigger?(Input::C)
     @phase5_step = 3
     return
   end
 end
 #--------------------------------------------------------------------------
 # ? Update Phase 5 Step 3
 #--------------------------------------------------------------------------
 def update_phase5_step3
   # Delete All Result-Window
   @resultreceive_window.dispose
   @resultgold_window.dispose
   @resultparty_window.dispose
   for i in 0...$game_party.actors.size
     @resultlevel_window[i].dispose
     @resultskill_window[i].dispose
   end
   battle_end(0)
 end

end

#==============================================================================
# ? Game_Actor
#==============================================================================

class Game_Actor

 def next_rest_exp
   return @exp_list[@level+1] > 0 ? (@exp_list[@level+1] - @exp) : 0
 end

end

#==============================================================================
# ? Window_ResultReceive
#==============================================================================

class Window_ResultReceive < Window_Base
 #--------------------------------------------------------------------------
 # ? Attr
 #--------------------------------------------------------------------------
 attr_accessor         :exp
 attr_accessor         :gold
 attr_accessor         :page
 attr_reader            :max_page
 #--------------------------------------------------------------------------
 # ? Initialize
 #--------------------------------------------------------------------------
 def initialize(exp, gold, treasures)
   super(40, 28, 224, 212)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.contents.font.name = A3D::FONT_NAME
   self.contents.font.size = A3D::FONT_SIZE
   self.back_opacity = 160
   self.visible = false
   @exp = exp
   @gold = gold
   @treasures = treasures
   @page = 1
   @max_page = treasures.size > 4 ? 2 : 1
   refresh
 end
 #--------------------------------------------------------------------------
 # ? Refresh
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   self.contents.font.color = system_color
   self.contents.draw_text(0, -8, self.width - 32, 32, "Exp")
   self.contents.draw_text(0, 16, self.width - 32, 32, $data_system.words.gold)
   self.contents.draw_text(0, 40, self.width - 32, 32, $data_system.words.item + " [" + @page.to_s + "/" + @max_page.to_s + "]" )
   self.contents.font.color = normal_color
   self.contents.draw_text(0, -8, self.width - 32, 32, @exp.to_s, 2)
   self.contents.draw_text(0, 16, self.width - 32, 32, @gold.to_s, 2)
   if @treasures.size == 0
     self.contents.draw_text(0, 68, self.width - 32, 32, "< Nothing. >")
   elsif @treasures.size > 4
     bitmap = RPG::Cache.windowskin($game_system.windowskin_name)
     self.contents.blt(184, 116, bitmap, Rect.new(168, 24, 16, 16), 255)
   end
   y = 68
   item_start_index = @page == 1 ? 0 : 4
   for i in item_start_index...@treasures.size
     item = @treasures[i]
     draw_item_name(item, 0, y)
     y += 28
   end
 end

end

#==============================================================================
# ? Window_ResultGold
#==============================================================================

class Window_ResultGold < Window_Base
 #--------------------------------------------------------------------------
 # ? Initialize
 #--------------------------------------------------------------------------
 def initialize
   super(40, 240, 224, 52)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.contents.font.name = A3D::FONT_NAME
   self.contents.font.size = A3D::FONT_SIZE
   self.back_opacity = 160
   self.visible = false
   refresh
 end
 #--------------------------------------------------------------------------
 # ? Refresh
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   self.contents.font.color = system_color
   self.contents.draw_text(0, -8, self.width - 32, 32, "Total " + $data_system.words.gold)
   self.contents.font.color = normal_color
   self.contents.draw_text(0, -8, self.width - 32, 32, $game_party.gold.to_s, 2)
 end

end

#==============================================================================
# ? Window_ResultParty
#==============================================================================

class Window_ResultParty < Window_Base
 #--------------------------------------------------------------------------
 # ? Initialize
 #--------------------------------------------------------------------------
 def initialize
   super(264, 28, 336, 264)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.contents.font.name = A3D::FONT_NAME
   self.contents.font.size = A3D::FONT_SIZE
   self.back_opacity = 160
   self.visible = false
   refresh
 end
 #--------------------------------------------------------------------------
 # ? Refresh
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   for i in 0...5$game_party.actors.size
     actor = $game_party.actors[i]
     y = 60 * i + 22
     draw_actor_graphic(actor, 24, y + 28 )
     draw_actor_name(actor, 64, y - 28)
     self.contents.font.color = system_color
     self.contents.draw_text(116, y, (self.width - 32), 32, "Lv.")
     self.contents.draw_text(188, y, (self.width - 32), 32, "Next")
     self.contents.font.color = normal_color
     self.contents.draw_text(-140, y, (self.width - 32), 32, actor.level.to_s ,2)
     self.contents.draw_text(0     , y, (self.width - 32), 32, actor.next_rest_exp_s ,2)
   end
 end

end

#==============================================================================
# ? Window_ResultLevel
#==============================================================================

class Window_ResultLevel < Window_Base
 #--------------------------------------------------------------------------
 # ? Initialize
 #--------------------------------------------------------------------------
 def initialize(id)
   super(332, 60 * id + 40, 124, 60)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.contents.font.name = A3D::FONT_NAME
   self.contents.font.size = A3D::FONT_SIZE
   self.back_opacity = 160
   self.visible = false
   self.z = 200
   refresh
 end
 #--------------------------------------------------------------------------
 # ? Refresh
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   self.contents.draw_text(0, -2, self.width - 32, 32, "Level-Up !", 1)
 end

end

#==============================================================================
# ? Window_ResultSkill
#==============================================================================

class Window_ResultSkill < Window_Base
 #--------------------------------------------------------------------------
 # ? Attr
 #--------------------------------------------------------------------------
 attr_accessor         :skill_id
 #--------------------------------------------------------------------------
 # ? Initialize
 #--------------------------------------------------------------------------
 def initialize(id)
   super(640, 60 * id + 40, 200, 60)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.contents.font.name = A3D::FONT_NAME
   self.contents.font.size = A3D::FONT_SIZE
   self.back_opacity = 160
   self.visible = false
   self.z = 200
   @skill_id = nil
 end
 #--------------------------------------------------------------------------
 # ? Refresh
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   if @skill_id == nil
     return
   end
   skill = $data_skills[@skill_id]
   bitmap = RPG::Cache.icon(skill.icon_name)
   self.contents.blt(0, 2, bitmap, Rect.new(0, 0, 24, 24), 255)
   self.contents.font.color = normal_color
   self.contents.draw_text(32, -2, self.width - 64, 32, skill.name)
 end

end

and i want to use it in my game, but it only returns the result of the first 4 heroes in battle and I use 5 heroes in battle... can someone adapt this script for me?
22
Hi guys. I'm searching for some very simple script for my new Item, Equip, Status and Skill Menu. Actually I'm using Drago Scene Menu as my Scene Menu and other script like: ccoa's weather script, KH SAVE, ums by ccoa, mode7, CCOA 3.04 RTA, Mog Damage System, DRG - Scene Menu Animated Cursor, Scene into flash, mana title, MOG Scene Shop, mog scene story, Party Changer, Stop the victory ME, Skill Chrono Trigger, shadow text, ,dash, region system, mog battler effects, Light Effects XP 2.1...
These are some pictures with description of what I would.
Spoiler: ShowHide

Scene Item:




Scene Equip:


Scene Status:


Scene Skill (single tech):


I also use a Link Tech system. For example, an hero can use a "special" skill in battle only if there is other (one or more) heroes in battle...
An example: HERO1 can use in battle the tech MAGIC WIND only if HERO2 and HERO3 are in battle.
This is the script used for link tech:
Spoiler: ShowHide
#==============================================================================
# • Tecniche combinate stile Chrono Trigger
# di mikb89
# demo: 2 agosto 2009
# versione 1.2 - CCOA (3.04) compatible
#------------------------------------------------------------------------------
# Per creare una skill combo basta fare una skill normale e poi
# configurare qui ciò che viene richiesto.
# Da notare che nelle skill combo è utilizzato il sistema che c'era
# nell'rm2k, cioè che per usare una tecnica con un attributo, devi
# avere l'equipaggiamento con quell'attributo. Ad esempio lo skill
# "Colpo di spada" con l'attributo "Spada", richiede che devi avere
# equipaggiata un arma con l'attributo "Spada" (una spada, quindi);
# se non usate gli attributi non ci fate caso, ma nell'rm2k era così. Se
# invece li usate e volete lo stesso anche per gli skill normali, copiate
# alla fine di questo script lo script Skill Add-on che segue.
# NEW: Se non volete usare questo sistema degli attributi adesso potete
#      configurarlo tramite il USA_ATTRIBUTI_SKILL sotto impostato a 0
#==============================================================================
# • Configurazioni:
#------------------------------------------------------------------------------
module Impostazioni
class CTCombo

TASTO_CAMBIO_SKILL_E_COMBO = Input::A
# I combo vengono utilizzati scegliendo Skill dal menu (o come l'avete
# tradotto) e premendo un tasto.
# Premendolo nuovamente si torna alle skill normali. Con questa costante
# si specifica il tasto da premere.
# Input::A equivale a SHIFT
# Input::CTRL equivale a CONTROL
# Input::L e Input::R equivalgono a PageUp e PageDown
# e ce ne sono altri, l'importante è che c'è Input:: prima

ARCHIVIAZIONE_VIA_SWITCH = 0
# Occorre spendere due parole...
# In Chrono Trigger ci sono tre membri che vanno in battaglia ma i personaggi
# che sono nel party (oltre quei tre) dal menu possono usare i combo. Questa
# situazione può essere emulata tramite switch mettendo 1. Con 0 per il combo
# saranno considerati validi soltanto i personaggi che vanno in battaglia.

SWITCH_INIZIALE_MEMBRI = 11
# Se la constante sopra è settata a 1 questo valore specifica lo switch che
# viene attivato quando il PRIMO eroe è nel party. Gli altri eroi avranno gli switch
# seguenti a seconda del loro ordine nel database.
# Da notare che se questo metodo è attivo gli switch vanno impostati anche per
# i tre eroi che vanno in battaglia.

USA_ATTRIBUTI_SKILL = 0
# Attiva (1) o disattiva (0) il sistema di abilitazione skill per attributi.
# Dato che non tutti conoscono questa opzione (che era standard nei vecchi
# rpg maker) ho pensato di dare la possibilità di rimuoverla.
# Qualunque sia l'impostazione, varrà solo per le SKILL COMBO!
# Quindi per le skill normali basterà mettere sopra (attivo) o sotto (disattivo)
# il Main lo Skill AddOn incluso in questa demo.
end
end

$combo_skill = [53, 54, 55, 56, 57, 58, 59, 60, 61, 81, 82, 83, 84, 85, 86, 87, 118, 119, 120, 121, 122, 123, 124, 125, 126, 128, 147, 148, 149, 150, 151, 152, 153, 154]
# Contiene gli id delle skill che sono combo.
# In questo caso le skill dal n° 82 al n° 84 sono combo.
# Quindi vi chiederete: "Sono combo sì, ma chi le usa?"
# Questo viene specificato sotto.

$combo_hero = [[1, 2], [1, 3], [1, 4], [1, 5], [1, 6], [1, 9], [1, 8], [1, 7], [1, 10], [2, 3], [2, 4], [2, 5], [2, 6], [2, 8], [2, 7], [3, 4], [3, 5], [3, 7], [4, 5], [4, 6], [4, 9], [5, 10], [9, 8], [9, 7], [7, 8], [7, 9, 8], [1, 2, 3, 4, 5], [1, 2, 3, 4, 5], [1, 2, 3, 4, 5], [1, 2, 3, 4, 5], [1, 2, 3, 4, 5], [11, 12, 13, 14], [6, 11, 12, 13, 14], [15, 16, 17, 18]]
# Contiene gli id degli eroi che usano le combo (per ogni combo sono tra parentesi quadra).
# In questo caso la prima skill combo (la n° 82 come impostato sopra) sarà eseguita dagli eroi
# n°1 e 8; la seconda skill dagli eroi 5 e 8; la terza da 7 e 8.
# E a questo punto vi chiederete: "E come faccio a specificare gli MP necessari per ogni eroe?"
# E anche questo viene specificato sotto.

$combo_point = [[4, 4], [4, 4], [4, 4], [4, 4], [6, 6], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [8, 8, 8], [10, 10, 10, 10, 10], [12, 12, 12, 12, 12], [16, 16, 16, 16, 16], [20, 20, 20, 20, 20], [22, 22, 22, 22, 22], [16, 16, 16, 16], [16, 16, 16, 16, 16], [20, 20, 20, 20]]
# Contiene i punti necessari per eseguire la combo per ogni eroe.
# Identico a quello sopra, solo che dovete sostituire il numero dell'eroe con gli MP necessari per
# utilizzare la combo. In questo caso nella skill 82 l'eroe 1 necessiterà di 100 MP, l'eroe 8 di 75.
# Nota: gli MP specificati nella scheda della skill, se la skill è combo, non serviranno
#       ad un emerito niente.

# Fine configurazioni

#-----------------VALENTINO------------
SKILL_COMBO = {
147=>SHOOT, #shoot
148=>ARROW,  #arrow
149=>VICTORY, #victory
150=>CLUSTER, #cluster
152=>ARROW  #arrow
}
#----------------VALENTINO-------------


class Window_Combo < Window_Selectable
 #--------------------------------------------------------------------------
 # ● Inizializzazione
 #--------------------------------------------------------------------------
 def initialize(actor)
   super(0, 320, 640, 160)
   @actor = actor
   @column_max = 1
   refresh
   self.index = 0
   if $game_temp.in_battle
     self.y = 64
     self.height = 256
     self.back_opacity = 160
   end
 end
 #--------------------------------------------------------------------------
 # ● Riporta la combo selezionata
 #--------------------------------------------------------------------------
 def skill
   return @data[self.index]
 end
 #--------------------------------------------------------------------------
 # ● Conteggia i combo da disegnare
 #--------------------------------------------------------------------------
 def refresh
   if self.contents != nil
     self.contents.dispose
     self.contents = nil
   end
   @data = []
   for i in 0...@actor.skills.size
     skill = $data_skills[@actor.skills[i]]
     if skill != nil and $combo_skill.include?(skill.id)
       @data.push(skill)
     end
   end
   @item_max = @data.size
   if @item_max > 0
     self.contents = Bitmap.new(width - 32, row_max * 32)
     for i in 0...@item_max
       draw_item(i)
     end
   end
 end
 #--------------------------------------------------------------------------
 # ● Disegna la combo
 #--------------------------------------------------------------------------
 def draw_item(index)
   skill = @data[index]
   for i in 0...$combo_skill.size
     if $combo_skill[i] != nil
     if $combo_skill[i] == skill.id
       n = i
     end
     end
   end
   v = 0
   for h in 0...$combo_hero[n].size
     if $game_actors[$combo_hero[n][h]] != nil
     if $game_actors[$combo_hero[n][h]].combo_can_use?(skill.id)
       v += 1
     end
   end
   end
   
   #VALENTINO
    formation = SKILL_COMBO[skill.id]
    @colore = false
   if formation != nil
     if $battle_formation == formation
       self.contents.font.color = normal_color
     else
       @colore = true
       self.contents.font.color = disabled_color
     end
   end
   #VALENTINO
   
   if v == $combo_hero[n].size
     self.contents.font.color = normal_color
   else
     self.contents.font.color = disabled_color
   end
   
  self.contents.font.color = disabled_color if @colore
   
   
   x = 4
   y = index * 32
   rect = Rect.new(x, y, self.width - 32, 64)
   self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
   bitmap = RPG::Cache.icon(skill.icon_name)
   opacity = self.contents.font.color == normal_color ? 255 : 128
   self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
   self.contents.draw_text(x + 28, y, 204, 32, skill.name, 0)
   if not $game_temp.in_battle
     self.contents.draw_text(x + 232, y, 48, 32, $combo_point[n][0].to_s, 2)
     self.contents.draw_text(x + 288, y, 48, 32, $combo_point[n][1].to_s, 2) rescue nil
     self.contents.draw_text(x + 344, y, 48, 32, $combo_point[n][2].to_s, 2) rescue nil
     self.contents.draw_text(x + 400, y, 48, 32, $combo_point[n][3].to_s, 2) rescue nil
   else
     po = []
     for i in 0...$game_party.actors.size
       if $combo_hero[n].include?($game_party.actors[i].id)
         po.push $game_party.actors[i].id
       end
     end
     ex = po.size
     for r in 0...$combo_hero[n].size
       if $combo_hero[n][r] != nil
       if not po.include?($combo_hero[n][r])
         po.push $combo_hero[n][r]
       end
       end
     end
     for ach in 0...po.size
       if ach == ex
         self.contents.font.color = self.contents.font.color == normal_color ? knockout_color : Color.new(255, 64, 0, 128)
       end
       for h in 0...$combo_hero[n].size
         if $combo_point[n][h] != nil
         if $combo_hero[n][h] == po[ach]
           punti = $combo_point[n][h]
         end
         end
       end
       self.contents.draw_text(x + 232 + (ach * 56), y, 48, 32, punti.to_s, 2)
     end
   end
 end
 #--------------------------------------------------------------------------
 # ● Finestra con descrizione combo
 #--------------------------------------------------------------------------
 def update_help
   @help_window.set_text(self.skill == nil ? "" : self.skill.description)
 end
end

class Window_ComboStatus < Window_Base
 #--------------------------------------------------------------------------
 # ● Inizializzazione
 #--------------------------------------------------------------------------
 def initialize(actor, n)
   super(0, 64*n, 640, 64)
   self.contents = Bitmap.new(width - 32, height - 32)
   @actor = actor
   refresh
 end
 #--------------------------------------------------------------------------
 # ● Disegna i valori
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   if @actor != nil
     draw_actor_name(@actor, 4, 0)
     draw_actor_state(@actor, 140, 0)
     draw_actor_hp(@actor, 284, 0)
     draw_actor_sp(@actor, 460, 0)
   end
 end
 #--------------------------------------------------------------------------
 # ● Imposta il personaggio
 #--------------------------------------------------------------------------
 def actor=(actor)
   @actor = actor
   refresh
 end
end

class Scene_Combo
 #--------------------------------------------------------------------------
 # ● Inizializzazione
 #--------------------------------------------------------------------------
 def initialize(actor_index = 0, equip_index = 0)
   @actor_index = actor_index
 end
 #--------------------------------------------------------------------------
 # ● Ciclo principale
 #--------------------------------------------------------------------------
 def main
   @actor = $game_party.actors[@actor_index]
   @help_window = Window_Help.new
   @status_window = Window_ComboStatus.new(@actor, 1)
   @status_window2 = Window_ComboStatus.new(nil, 2)
   @status_window3 = Window_ComboStatus.new(nil, 3)
   @status_window4 = Window_ComboStatus.new(nil, 4)
   @skill_window = Window_Combo.new(@actor)
   @skill_window.help_window = @help_window
   @target_window = Window_Target.new
   @target_window.visible = false
   @target_window.active = false
   Graphics.transition
   loop do
     Graphics.update
     Input.update
     update
     if $scene != self
       break
     end
   end
   Graphics.freeze
   @help_window.dispose
   @status_window.dispose
   @status_window2.dispose
   @status_window3.dispose
   @status_window4.dispose
   @skill_window.dispose
   @target_window.dispose
 end
 #--------------------------------------------------------------------------
 # ● Aggiornamento
 #--------------------------------------------------------------------------
 def update
   @help_window.update
   @status_window.update
   @status_window2.update
   @status_window3.update
   @status_window4.update
   @skill_window.update
   @target_window.update
   if @skill_window.active
     update_skill
     return
   end
   if @target_window.active
     update_target
     return
   end
 end
 #--------------------------------------------------------------------------
 # ● Gestione combo
 #--------------------------------------------------------------------------
 def update_skill
   for i in 0...$combo_skill.size
     if $combo_skill[i] == @skill_window.skill.id
       n = i
     end
   end
   if n != nil
     v = 0
     for h in 0...$combo_hero[n].size
       if $game_actors[$combo_hero[n][h]] != nil
       if $game_actors[$combo_hero[n][h]].combo_can_use?(@skill_window.skill.id)
         v += 1
       end
       end
     end
   end
   @status_window.actor = $game_actors[$combo_hero[n][0]] rescue @status_window.actor = @actor
   @status_window2.actor = $game_actors[$combo_hero[n][1]] rescue @status_window2.actor = nil
   @status_window3.actor = $game_actors[$combo_hero[n][2]] rescue @status_window3.actor = nil
   @status_window4.actor = $game_actors[$combo_hero[n][3]] rescue @status_window4.actor = nil
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.cancel_se)
     $scene = Scene_Menu.new(1)
     return
   end
   if Input.trigger?(Input::C)
     @skill = @skill_window.skill
     if @skill == nil or not v == $combo_hero[n].size
       $game_system.se_play($data_system.buzzer_se)
       return
     end
     $game_system.se_play($data_system.decision_se)
     if @skill.scope >= 3
       @skill_window.active = false
       @target_window.x = (@skill_window.index + 1) % 2 * 304
       @target_window.visible = true
       @target_window.active = true
       if @skill.scope == 4 || @skill.scope == 6
         @target_window.index = -1
       elsif @skill.scope == 7
         @target_window.index = @actor_index - 10
       else
         @target_window.index = 0
       end
     else
       if @skill.common_event_id > 0
         $game_temp.common_event_id = @skill.common_event_id
         $game_system.se_play(@skill.menu_se)
         for s in 0...$combo_hero[n].size
           if $game_actors[$combo_hero[n][s]] != nil
           $game_actors[$combo_hero[n][s]].sp -= $combo_point[n][s]
         end
         
         end
         @status_window.refresh
         @status_window2.refresh
         @status_window3.refresh
         @status_window4.refresh
         @skill_window.refresh
         @target_window.refresh
         $scene = Scene_Map.new
         return
       end
     end
     return
   end
   if Input.trigger?(Input::R)
     $game_system.se_play($data_system.cursor_se)
     @actor_index += 1
     @actor_index %= $game_party.actors.size
     $scene = Scene_Combo.new(@actor_index)
     return
   end
   if Input.trigger?(Input::L)
     $game_system.se_play($data_system.cursor_se)
     @actor_index += $game_party.actors.size - 1
     @actor_index %= $game_party.actors.size
     $scene = Scene_Combo.new(@actor_index)
     return
   end
   if Input.trigger?(Impostazioni::CTCombo::TASTO_CAMBIO_SKILL_E_COMBO)
     $game_system.se_play($data_system.decision_se)
     $scene = Scene_Skill.new(@actor_index)
     return
   end
 end
 #--------------------------------------------------------------------------
 # ● Scelta personaggio per utilizzare combo di cura
 #--------------------------------------------------------------------------
 def update_target
   for i in 0...$combo_skill.size
     if $combo_skill[i] == @skill_window.skill.id
       n = i
     end
   end
   @status_window.actor = $game_actors[$combo_hero[n][0]] rescue @status_window.actor = @actor
   @status_window2.actor = $game_actors[$combo_hero[n][1]] rescue @status_window2.actor = nil
   @status_window3.actor = $game_actors[$combo_hero[n][2]] rescue @status_window3.actor = nil
   @status_window4.actor = $game_actors[$combo_hero[n][3]] rescue @status_window4.actor = nil
   v = 0
   for h in 0...$combo_hero[n].size
     if $game_actors[$combo_hero[n][h]] != nil
     if $game_actors[$combo_hero[n][h]].combo_can_use?(@skill_window.skill.id)
       v += 1
     end
     end
   end
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.cancel_se)
     @skill_window.active = true
     @target_window.visible = false
     @target_window.active = false
     return
   end
   if Input.trigger?(Input::C)
     unless v == $combo_hero[n].size
       $game_system.se_play($data_system.buzzer_se)
       return
     end
     if @target_window.index == -1
       used = false
       for i in $game_party.actors
         used |= i.skill_effect(@actor, @skill)
       end
     end
     if @target_window.index <= -2
       target = $game_party.actors[@target_window.index + 10]
       used = target.skill_effect(@actor, @skill)
     end
     if @target_window.index >= 0
       target = $game_party.actors[@target_window.index]
       used = target.skill_effect(@actor, @skill)
     end
     if used
       $game_system.se_play(@skill.menu_se)
       for s in 0...$combo_hero[n].size
         if $game_actors[$combo_hero[n][s]] != nil
         $game_actors[$combo_hero[n][s]].sp -= $combo_point[n][s]
         end
       end
       @status_window.refresh
       @status_window2.refresh
       @status_window3.refresh
       @status_window4.refresh
       @skill_window.refresh
       @target_window.refresh
       if $game_party.all_dead?
         $scene = Scene_Gameover.new
         return
       end
       if @skill.common_event_id > 0
         $game_temp.common_event_id = @skill.common_event_id
         $scene = Scene_Map.new
         return
       end
     end
     unless used
       $game_system.se_play($data_system.buzzer_se)
     end
     return
   end
 end
end

class Game_Actor < Game_Battler
   def combo_can_use?(skill_id)
   for i in 0...$combo_skill.size
     if $combo_skill[i] == skill_id
       n = i
     end
   end
   for i in 0...$combo_hero[n].size
     if $game_actors[$combo_hero[n][i]] != nil
     if not $game_actors[$combo_hero[n][i]].skills.include?(skill_id)
       return false
     end
   end
   end
 
   if Impostazioni::CTCombo::USA_ATTRIBUTI_SKILL == 0
     return super
   else
     @acc = 0
     @times = 0
     for a in $data_skills[skill_id].element_set
       @times +=1
       if ($combo_hero[n][0] != nil and $data_weapons[$game_actors[$combo_hero[n][0]].weapon_id] != nil and $data_weapons[$game_actors[$combo_hero[n][0]].weapon_id].element_set.include?(a)) or
         ($combo_hero[n][1] != nil and $data_weapons[$game_actors[$combo_hero[n][1]].weapon_id] != nil and $data_weapons[$game_actors[$combo_hero[n][1]].weapon_id].element_set.include?(a)) or
         ($combo_hero[n][2] != nil and $data_weapons[$game_actors[$combo_hero[n][2]].weapon_id] != nil and $data_weapons[$game_actors[$combo_hero[n][2]].weapon_id].element_set.include?(a))
         @acc += 1
       else
         if ($combo_hero[n][0] != nil and $data_armors[$game_actors[$combo_hero[n][0]].armor1_id] != nil and $data_armors[$game_actors[$combo_hero[n][0]].armor1_id].guard_element_set.include?(a)) or
           ($combo_hero[n][1] != nil and $data_armors[$game_actors[$combo_hero[n][1]].armor1_id] != nil and $data_armors[$game_actors[$combo_hero[n][1]].armor1_id].guard_element_set.include?(a)) or
           ($combo_hero[n][2] != nil and $data_armors[$game_actors[$combo_hero[n][2]].armor1_id] != nil and $data_armors[$game_actors[$combo_hero[n][2]].armor1_id].guard_element_set.include?(a))
           @acc += 1
         else
           if ($combo_hero[n][0] != nil and $data_armors[$game_actors[$combo_hero[n][0]].armor2_id] != nil and $data_armors[$game_actors[$combo_hero[n][0]].armor2_id].guard_element_set.include?(a)) or
             ($combo_hero[n][1] != nil and $data_armors[$game_actors[$combo_hero[n][1]].armor2_id] != nil and $data_armors[$game_actors[$combo_hero[n][1]].armor2_id].guard_element_set.include?(a)) or
             ($combo_hero[n][2] != nil and $data_armors[$game_actors[$combo_hero[n][2]].armor2_id] != nil and $data_armors[$game_actors[$combo_hero[n][2]].armor2_id].guard_element_set.include?(a))
             @acc += 1
           else
             if ($combo_hero[n][0] != nil and $data_armors[$game_actors[$combo_hero[n][0]].armor3_id] != nil and $data_armors[$game_actors[$combo_hero[n][0]].armor3_id].guard_element_set.include?(a)) or
               ($combo_hero[n][1] != nil and $data_armors[$game_actors[$combo_hero[n][1]].armor3_id] != nil and $data_armors[$game_actors[$combo_hero[n][1]].armor3_id].guard_element_set.include?(a)) or
               ($combo_hero[n][2] != nil and $data_armors[$game_actors[$combo_hero[n][2]].armor3_id] != nil and $data_armors[$game_actors[$combo_hero[n][2]].armor3_id].guard_element_set.include?(a))
               @acc += 1
             else
               if ($combo_hero[n][0] != nil and $data_armors[$game_actors[$combo_hero[n][0]].armor4_id] != nil and $data_armors[$game_actors[$combo_hero[n][0]].armor4_id].guard_element_set.include?(a)) or
                 ($combo_hero[n][1] != nil and $data_armors[$game_actors[$combo_hero[n][1]].armor4_id] != nil and $data_armors[$game_actors[$combo_hero[n][1]].armor4_id].guard_element_set.include?(a)) or
                 ($combo_hero[n][2] != nil and $data_armors[$game_actors[$combo_hero[n][2]].armor4_id] != nil and $data_armors[$game_actors[$combo_hero[n][2]].armor4_id].guard_element_set.include?(a))
                 @acc += 1
               else
                 return false
               end
             end
           end
         end
       end
     end
     if @times == @acc
       return super
     else
       return false
     end
   end
 end
end

class Game_Battler
 def combo_can_use?(skill_id)
   for i in 0...$combo_skill.size
     if $combo_skill[i] == skill_id
       n = i
     end
   end
   for i in 0...$combo_hero[n].size
     if $game_actors[$combo_hero[n][i]] != nil
     if $combo_point[n][i] > $game_actors[$combo_hero[n][i]].sp
       return false
     end
     end
   end
   for i in 0...$combo_hero[n].size
     if $game_actors[$combo_hero[n][i]] != nil
     if $game_actors[$combo_hero[n][i]].hp == 0 and not $game_actors[$combo_hero[n][i]].immortal
       return false
     end
     end
   end
   for i in 0...$combo_hero[n].size
     if $game_actors[$combo_hero[n][i]] != nil
     if $data_skills[skill_id].atk_f == 0 and $game_actors[$combo_hero[n][i]].restriction == 1
       return false
     end
     end
   end
   occasion = $data_skills[skill_id].occasion
   pl = 0
   if $game_temp.in_battle
     for i in 0...$combo_hero[n].size
       if $game_actors[$combo_hero[n][i]] != nil
       if $game_party.actors.include?($game_actors[$combo_hero[n][i]])
         pl += 1
       end
       end
     end
     if pl == $combo_hero[n].size
       return (occasion == 0 or occasion == 1)
     else
       return false
     end
   else
     for i in 0...$combo_hero[n].size
       if $combo_hero[n][i] != nil
       if Impostazioni::CTCombo::ARCHIVIAZIONE_VIA_SWITCH
         if $game_switches[$combo_hero[n][i] + Impostazioni::CTCombo::SWITCH_INIZIALE_MEMBRI - 1] == true
           pl += 1
         end
         end
       else
         if $game_party.actors.include?($combo_hero[n][i])
           pl += 1
         end
       end
     end
     if pl == $combo_hero[n].size
       return (occasion == 0 or occasion == 2)
     else
       return false
     end
   end
 end
end

class Scene_Skill
 alias ctbs_update_skill update_skill
 def update_skill
   ctbs_update_skill
   if Input.trigger?(Impostazioni::CTCombo::TASTO_CAMBIO_SKILL_E_COMBO)
     $game_system.se_play($data_system.decision_se)
     $scene = Scene_Combo.new(@actor_index)
     return
   end
 end
end

class Scene_Battle
 def main
   $game_temp.in_battle = true
   $game_temp.battle_turn = 0
   $game_temp.battle_event_flags.clear
   $game_temp.battle_abort = false
   $game_temp.battle_main_phase = false
   $game_temp.battleback_name = $game_map.battleback_name
   $game_temp.forcing_battler = nil
   $game_system.battle_interpreter.setup(nil, 0)
   @troop_id = $game_temp.battle_troop_id
   $game_troop.setup(@troop_id)
   @party_command_window = Window_PartyCommand.new
   @help_window = Window_Help.new
   @help_window.back_opacity = 160
   @help_window.visible = false
   @status_window = Window_BattleStatus.new
   @message_window = Window_Message.new
   #ccoa
   #s1 = $data_system.words.attack
   #s2 = $data_system.words.skill
   #s3 = $data_system.words.guard
   #s4 = $data_system.words.item
   #@actor_command_window = Window_Command.new(160, [s1, s2, s3, s4])
   #@actor_command_window.y = 160
   #@actor_command_window.back_opacity = 160
   #@actor_command_window.active = false
   #@actor_command_window.visible = false
   @help_window2 = Win_Help.new
   @help_window2.visible = false
   @help_window2.contents_opacity = 0
   @help_time = 0
   @actor_command_windows = []
   setup_actor_command_windows
   @cursor_bitmap = Sprite.new
   @cursor_bitmap.bitmap = RPG::Cache.windowskin($game_system.windowskin_name)
   @cursor_bitmap.src_rect.set(128, 96, 32, 32)
   @cursor_bitmap.visible = false
   @blink_count = 0
   #fine ccoa
   @spriteset = Spriteset_Battle.new
   @wait_count = 0
   # compatibilità CCOA
   @extra_sprites = [] if @extra_sprites == nil
  # cp_preset_party
  # @cp_meters = CP_Meters.new
  # @extra_sprites.push(@cp_meters)
   # fine compatibilità
   if $data_system.battle_transition == ""
     Graphics.transition(0)
   else
     Graphics.transition(40, "Graphics/Transitions/" +
       $data_system.battle_transition) #era 40 ora è 100 x ccoa
   end
   start_phase1
   loop do
     Graphics.update
     Input.update
     update
     if $scene != self
       break
     end
   end
   $game_map.refresh
   Graphics.freeze
   #ccoa
   for window in @actor_command_windows
     window.dispose
   end
   #@actor_command_window.dispose
   #fine ccoa
   @party_command_window.dispose
   @help_window.dispose
   @help_window2.dispose #ccoa
   @status_window.dispose
   @message_window.dispose
   if @skill_window != nil
     @skill_window.dispose
   end
   #ccoa
   if @skill_window2 != nil
     @skill_window2.dispose
   end
   #fine ccoa
   if @combo_window != nil
     @combo_window.dispose
   end
   if @item_window != nil
     @item_window.dispose
   end
   if @result_window != nil
     @result_window.dispose
   end
   @spriteset.dispose
   # compatibilità CCOA
   @cursor_bitmap.dispose
   #@cp_meters.dispose
   # fine compatibilità
   if $scene.is_a?(Scene_Title)
     Graphics.transition
     Graphics.freeze
   end
   if $BTEST and not $scene.is_a?(Scene_Gameover)
     $scene = nil
   end
 end

 def update_phase3
   if @enemy_arrow != nil
     update_phase3_enemy_select
     return #ccoa
   elsif @actor_arrow != nil
     update_phase3_actor_select
     return #ccoa
   elsif @skill_window != nil
     update_phase3_skill_select
     return #ccoa
   elsif @combo_window != nil
     update_phase3_combo_select
     return #ccoa
   elsif @item_window != nil
     update_phase3_item_select
     return #ccoa
   end #ccoa
   
   #ccoa
   #elsif @actor_command_window.active
   #  update_phase3_basic_command
   #end
   # If actor command window is enabled
   for i in 0..$game_party.actors.size - 1
     if @actor_command_windows[i].active
         update_phase3_basic_command
       return
     end
   end
   #fine ccoa
 end
 
 alias update_phase3_skill_select_combo update_phase3_skill_select
 def update_phase3_skill_select
   update_phase3_skill_select_combo
   if Input.trigger?(Impostazioni::CTCombo::TASTO_CAMBIO_SKILL_E_COMBO)
       $game_system.se_play($data_system.decision_se)
       @active_battler.current_action.kind = 1
       end_skill_select
       start_combo_select
     return
   end
 end

 def update_phase3_combo_select
   @combo_window.visible = true
   @combo_window.update
   for i in 0...$combo_skill.size
     if $combo_skill[i] == @combo_window.skill.id
       n = i
     end
   end
   for b in 0...$game_party.actors.size
     $game_party.actors[b].blink = false
   end
   if n != nil
     for h in 0...$combo_hero[n].size
       if $game_actors[$combo_hero[n][h]] != nil
       if $game_party.actors.include?($game_actors[$combo_hero[n][h]])
         $game_actors[$combo_hero[n][h]].blink = true
         end
       end
     end
   end
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.cancel_se)
     end_combo_select
     return
   end
   if Input.trigger?(Input::C)
     @skill = @combo_window.skill
     #VALENTINO
   formation = SKILL_COMBO[@skill.id]
   if formation != nil
     unless $battle_formation == formation
       $game_system.se_play($data_system.buzzer_se)
       return
     end
   end
     #VALENTINO
     
     if n == nil
       $game_system.se_play($data_system.buzzer_se)
       return
     end
     v = 0
     for h in 0...$combo_hero[n].size
       if $game_actors[$combo_hero[n][h]] != nil
       if $game_actors[$combo_hero[n][h]].combo_can_use?(@skill.id)
         v += 1
       end
       end
     end
     if @skill == nil or not v == $combo_hero[n].size
       $game_system.se_play($data_system.buzzer_se)
       return
     end
     $game_system.se_play($data_system.decision_se)
     @active_battler.current_action.skill_id = @skill.id
     @combo_window.visible = false
     if @skill.scope == 1
       start_enemy_select
     elsif @skill.scope == 3 or @skill.scope == 5
       start_actor_select
     else
       end_combo_select
       phase3_next_actor
     end
     return
   end
   if Input.trigger?(Impostazioni::CTCombo::TASTO_CAMBIO_SKILL_E_COMBO)
       $game_system.se_play($data_system.decision_se)
       @active_battler.current_action.kind = 1
       end_combo_select
       start_skill_select
     return
   end    
 end

 def update_phase3_enemy_select
   @enemy_arrow.update
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.cancel_se)
     end_enemy_select
     return
   end
   if Input.trigger?(Input::C)
     $game_system.se_play($data_system.decision_se)
     @active_battler.current_action.target_index = @enemy_arrow.index
     end_enemy_select
     if @skill_window != nil
       end_skill_select
     end
     if @combo_window != nil
       end_combo_select
     end
     if @item_window != nil
       end_item_select
     end
     phase3_next_actor
   end
 end

 def update_phase3_actor_select
   @actor_arrow.update
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.cancel_se)
     end_actor_select
     return
   end
   if Input.trigger?(Input::C)
     $game_system.se_play($data_system.decision_se)
     @active_battler.current_action.target_index = @actor_arrow.index
     end_actor_select
     if @skill_window != nil
       end_skill_select
     end
     if @combo_window != nil
       end_combo_select
     end
     if @item_window != nil
       end_item_select
     end
     phase3_next_actor
   end
 end

 def start_combo_select
   @combo_window = Window_Combo.new(@active_battler)
   @combo_window.help_window = @help_window
   #ccoa
   for i in 0..$game_party.actors.size - 1
     @actor_command_windows[i].active = false
     @actor_command_windows[i].visible = false
   end
   #@actor_command_window.active = false
   #@actor_command_window.visible = false
   #fine ccoa
 end
 
 def end_combo_select
   for b in 0...$game_party.actors.size
     $game_party.actors[b].blink = false
   end
   @active_battler.blink = true
   @combo_window.dispose
   @combo_window = nil
   @help_window.visible = false
   #ccoa
   @actor_command_windows[@actor_index].active = true
   @actor_command_windows[@actor_index].visible = true
   #@actor_command_window.active = true
   #@actor_command_window.visible = true
   #fine ccoa
 end

 def make_skill_action_result
   @animate = nil
   @skill = $data_skills[@active_battler.current_action.skill_id]
   for i in 0...$combo_skill.size
     if $combo_skill[i] == @skill.id
       n = i
     end
   end
   if not $combo_skill.include?(@skill.id)
     #ccoa
     if @active_battler.is_a?(Game_Actor)
       if $USING_INDIV_SKILL_ANIM
         @active_battler.set_pose(@active_battler.skill_hash[$data_skills[@active_battler.current_action.skill_id].name], false)
       else # get animation by skill type
         @active_battler.set_pose(@active_battler.skill_type_hash[@active_battler.skill_kind], false)
       end
     else
       @active_battler.set_pose($SKILL, false)
     end
     #fine ccoa
     unless @active_battler.current_action.forcing
       unless @active_battler.skill_can_use?(@skill.id)
         $game_temp.forcing_battler = nil
         @phase4_step = 1
         return
       end
     end
     @active_battler.sp -= @skill.sp_cost
     @status_window.refresh
     #ccoa
     @help_window2.contents_opacity = 0
     @help_window2.y = -200
     $name_help = CCOA_CBS::NAME_SKILL
     @help_window2.set_text(@skill.name, 1)
     #@help_window.set_text(@skill.name, 1)
     #fine ccoa
     @animation1_id = @skill.animation1_id
     @animation2_id = @skill.animation2_id
     @common_event_id = @skill.common_event_id
     set_target_battlers(@skill.scope)
     for target in @target_battlers
       target.skill_effect(@active_battler, @skill)
       #ccoa
       unless target == @active_battler
         reset_pose(target)
       end
       #fine ccoa
     end
   else
     #ccoa
     if n != nil
       for h in 0...$combo_hero[n].size
         if $game_actors[$combo_hero[n][h]] != nil
         if $game_actors[$combo_hero[n][h]].is_a?(Game_Actor)
           if $USING_INDIV_SKILL_ANIM
             $game_actors[$combo_hero[n][h]].set_pose($game_actors[$combo_hero[n][h]].skill_hash[$data_skills[@active_battler.current_action.skill_id].name], false)
           else # get animation by skill type
             $game_actors[$combo_hero[n][h]].set_pose($game_actors[$combo_hero[n][h]].skill_type_hash[$game_actors[$combo_hero[n][h]].skill_kind], false)
           end
           end
         else
           $game_actors[$combo_hero[n][h]].set_pose($SKILL, false) if $game_actors[$combo_hero[n][h]] != nil
         end
       end
     else
       if @active_battler.is_a?(Game_Actor)
         if $USING_INDIV_SKILL_ANIM
           @active_battler.set_pose(@active_battler.skill_hash[$data_skills[@active_battler.current_action.skill_id].name], false)
         else # get animation by skill type
           @active_battler.set_pose(@active_battler.skill_type_hash[@active_battler.skill_kind], false)
         end
       else
         @active_battler.set_pose($SKILL, false)
       end
     end
     #fine ccoa
     unless @active_battler.current_action.forcing
       if n != nil
         v = 0
         for h in 0...$combo_hero[n].size
           if $game_actors[$combo_hero[n][h]] != nil
           if $game_actors[$combo_hero[n][h]].combo_can_use?(@skill.id)
             v +=1
           end
           end
         end
       end
       unless v == $combo_hero[n].size
         $game_temp.forcing_battler = nil
         @phase4_step = 1
         return
       end
     end
     if n != nil
       for h in 0...$combo_hero[n].size
         if $game_actors[$combo_hero[n][h]] != nil
         $game_actors[$combo_hero[n][h]].sp -= $combo_point[n][h]
         @animate = $combo_hero[n]
       end
       end
     end
     @status_window.refresh
     #ccoa
     @help_window2.contents_opacity = 0
     @help_window2.y = -200
     $name_help = CCOA_CBS::NAME_SKILL
     @help_window2.set_text(@skill.name, 1)
     #@help_window.set_text(@skill.name, 1)
     #fine ccoa
     @animation1_id = @skill.animation1_id
     @animation2_id = @skill.animation2_id
     @common_event_id = @skill.common_event_id
     set_target_battlers(@skill.scope)
     for target in @target_battlers
       target.skill_effect(@active_battler, @skill)
       #ccoa
       if n != nil
         for h in 0...$combo_hero[n].size
           if $game_actors[$combo_hero[n][h]] != nil
           unless target == $game_actors[$combo_hero[n][h]]
             reset_pose(target)
           end
           end
         end
       else
         unless target == @active_battler
           reset_pose(target)
         end
       end
       #fine ccoa
     end
   end
 end

 def update_phase4_step3
   if @animate == nil
     if @animation1_id == 0
       @active_battler.white_flash = true
       #ccoa
       if @active_battler.animated
         @wait_count = [@active_battler.attack_frames * 10 - 10, 8].max
       else
         @wait_count = 8
       end
       #fine ccoa
     else
       @active_battler.animation_id = @animation1_id
       @active_battler.animation_hit = true
     end
     #ccoa
     if @active_battler.current_action.kind == 0 and @active_battler.current_action.basic == 0
       @active_battler.set_pose($ATTACK, false)
     end
     #fine ccoa
     @phase4_step = 4
   else
     if @animation1_id == 0
       for b in 0...@animate.size
         $game_actors[@animate[b]].white_flash = true
         #ccoa
         if $game_actors[@animate[b]].animated
           @wait_count = [$game_actors[@animate[b]].attack_frames * 10 - 10, 8].max
         else
           @wait_count = 8
         end
         #fine ccoa
       end
     else
       for b in 0...@animate.size
         $game_actors[@animate[b]].animation_id = @animation1_id
         $game_actors[@animate[b]].animation_hit = true
       end
     end
     #ccoa
     for b in 0...@animate.size
       if $game_actors[@animate[b]].current_action.kind == 0 and $game_actors[@animate[b]].current_action.basic == 0
         $game_actors[@animate[b]].set_pose($ATTACK, false)
       end
     end
     #fine ccoa
     @animate = nil
     @phase4_step = 4
   end
 end
end

class Window_Skill < Window_Selectable
 def refresh
   if self.contents != nil
     self.contents.dispose
     self.contents = nil
   end
   @data = []
   for i in 0...@actor.skills.size
     skill = $data_skills[@actor.skills[i]]
     #ccoa
     if (@skill_kind == -1)
       if skill != nil and not $combo_skill.include?(skill.id)
         @data.push(skill)
       end
     else
       if (skill != nil and skill.element_set.include?(@skill_kind)) and not $combo_skill.include?(skill.id)
         @data.push(skill)
       end
     end
     #if skill != nil and not $combo_skill.include?(skill.id)
     #  @data.push(skill)
     #end
     #fine ccoa
   end
   @item_max = @data.size
   if @item_max > 0
     self.contents = Bitmap.new(width - 32, row_max * 32)
     for i in 0...@item_max
       draw_item(i)
     end
   end
 end
end

#ccoa
class Win_Skill < Window_Selectable
   def refresh
   if self.contents != nil
     self.contents.dispose
     self.contents = nil
   end

   @data = []
   for i in 0...@actor.skills.size
     skill = $data_skills[@actor.skills[i]]
     if (@skill_kind == -1)
       if skill != nil and not $combo_skill.include?(skill.id)
         @data.push(skill)
       end
     else
       if (skill != nil and skill.element_set.include?(@skill_kind)) and not $combo_skill.include?(skill.id)
         @data.push(skill)
       end
     end
   end
   @item_max = @data.size
   if @item_max > 0
     self.contents = Bitmap.new(width - 32, row_max * 32)
     for i in 0...@item_max
       draw_item(i)
     end
   end
 end
end
#fine ccoa

and I would to group these skills in a separate menu if possible, otherwise it will not make them appear in the skill menu.
Spoiler: ShowHide

Scene Skill (Link Tech):