Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[XP]Final Fantasy V Job and Ability Systems (Script Fusion)

I'm posting this to request for some script tweaking and fusion. Most of the things we would like to tweak are cosmetic. The scripts we’d like to fuse are Fomar0153’s FFV System Script, Moghunter’s Mog Menus, and Cogwheel’s RTAB (Real Time Active Battle) system. If that’s not feasible (or possible) we’re willing to go with something else.

I don't do these types of posts very often, so I hope that it doesn't turn out too lengthy--I researched how best to do this a lot before I finally posted, so hopefully I got it down! I’ve also included a demo and links to all scripts used for our game. They’ll be at the bottom of the post.

Introduction

The project name is Final Fantasy: Eternal Twilight. The game is a FFV fangame to be completed over the course of the summer. We’ve made good progress so far on the graphical end of things, but due to our limited amount of Ruby knowledge, we've been unable to work out some script conflicts and cosmetic issues with the menus.

Being a Final Fantasy V fangame, it includes a Job System (if you’re not familiar with FFV, it’s a class swapping system similar to the one featured in the Final Fantasy Tactics games, Final Fantasy III (JPN and DS), Disgaea, Phantom Brave, ect…). The Job System is probably the single most important aspect of the game, so we really want to do it right. Fomar’s is great, but there are some pretty severe conflicts that I’ll discuss below.

I've compiled a lot of screenshots, and can explain most of the conflicts and glitches we're encountering. I’ll break the request thread up into several categories to keep it nice and organized.

Known Conflicts and Glitches

Fomar0153’s FFV System

The Job System itself is the biggest problem. It’s script conflicts with both the RTAB and Mog Menu scripts (both were tested individually with the Job Code.) in multiple areas. I’ve tried tweaking the various scripts to get them to work together, but lack the ability to solve this problem (hence why I’ve come asking for help!). The conflicts are game crashing, and involve lots of different parts of the script, so I haven’t bothered with screenshots. If you guys would like some of the error messages, let me know—I can get them for you pretty quick.

I’m not sure if the script will even be usable at this rate, so if it would be easier to start from scratch, please let me know. All of our other scripts work in harmony nicely.

The Mog Menu scripts

The Mog Menu Script fused nicely with most of the RTAB scripts thus far.

UPDATE: Thanks to Gando's script editing, the Mog Menu no longer has its graphical glitches!


The RTAB

Also thanks to Gando's help, these problems have been taken care of.

Desired Features

Main Menu

Aside from the Job System, most of our preferences are cosmetic tweaks, and of course, the interfaces for the Job and Ability menus. I’ve included some screenshots below showing the different parts of the menu. 

http://www.aliasworkshop.com/transfer/landreia/MenuEX8.png[/img]
Fomar0153’s FFV System didn’t include an interface, and we’d love (if possible) to be able to make the interface look as close to FFV as possible (as in the picture).

The different job sprites would appear as the jobs become available in the game (as in FFV, the jobs are granted by the Crystals, so they would be activated by simple events). When not selected, the sprites appear in black and white. The information at the bottom displays the name of the job that you’re moused over, it’s current job level, and what items can be equipped (displayed by the icons assigned to their weapon classes)

http://www.aliasworkshop.com/transfer/l ... nuEX14.png[/img]

When selected, the sprite enters its victory animation, and a window pops up, asking if the player would like to confirm the job change.

http://www.aliasworkshop.com/transfer/l ... nuEX15.png[/img]

After the conformation, the character’s sprite changes to reflect the new job.

http://www.aliasworkshop.com/transfer/l ... enuEX9.png[/img]

We’re hoping to make the skills menu look as much like FFV as possible. Skills with a “!â€
 
Hi OmegaSkye,

First of all, i would like to tell you that this request is very detailed and well-made!
I see that you've put a lot of work into this request, and i hope that you'll get the help you need.

Now, lets get dirty shall we?
I cannot help you with everything, but i'll try to help you with some of the stuff.

1) To change it so that the Enemy is showing a "collapse" pose you change a line in the "1 - Configuration" script.
    In the RTAB demo, if you look at the "1 - Configuration" script, at line 19 there is an option that you
    can turn on/off.
This is the line:
Code:
DEFAULT_COLLAPSE_ENEMY  = false

false - This will make it so whenever an enemy dies, it will show the "collapse pose"
true  - This will make the enemy turn red and then fade out.

So if you want the enemies to show the "dead pose" when they die, your setup should be false.

But i noticed a thing in the demo that is causing the problem.
In MOG's End script, there is an Sprite_Battler class which is overwriting the animated battlers collapse method, and that is why the enemies doesn't show a "collapse pose" when they die.
I've updated the End script so now it should work as you want it to. Replace your old "End" script with this:
Code:
#_______________________________________________________________________________
# MOG Scene End Sakura V2.0            
#_______________________________________________________________________________
# By Moghunter   
# http://www.atelier-rgss.com
#_______________________________________________________________________________
# Scene_End com movimento e layout em pictures.
# Apresenta a quantidade de batalhas, saves, loads, etc...
# Permite criar condições especiais de eventos.
#_______________________________________________________________________________
module MOG
#Transition Time.
ENDTT = 40  
#Transition Type(Name).
ENDTN = "004-Blind04"
#----------------------------------------------------------------
#Definição do texto da apresentação dos parâmetros.
ECOUNTER_TEXT = "Number of Battles."
SAVE_COUNT_TEXT = "Number of Saves."
LOAD_COUNT_TEXT = "Number of Loads."
ENEMY_DEFEATED_TEXT = "Number of enemies defeated."
ACTOR_DEFEATED_TEXT = "Number of times defeated."
#----------------------------------------------------------------
# Definição da variável que registrará o valor dos parâmetros.
#(Essa função serve para criar condições especiais no jogo. 
# Exemplo -> Mate 100 inimigos que você receberá a espada do
# dragão.)
#----------------------------------------------------------------
# Quantidade de batalhas feitas.
ENCOUNTER_COUNT = 26
# Valor de vezes que o jogo foi Salvo(Save).
SAVE_COUNT = 27
# Valor de vezes que o jogo foi carregado(Load).
LOAD_COUNT = 28
# Quantidade de inimigos mortos.
ENEMY_DEFEATED = 29
# Valor de vezes que o personagens foi abatido.
ACTOR_DEFEATED = 30
#----------------------------------------------------------------
end
$mogscript = {} if $mogscript == nil
$mogscript["menu_sakura"] = true
###############
# Game_System #
###############
class Game_System
include MOG
attr_accessor :encounter_count   
attr_accessor :enemy_defeated
attr_accessor :actor_defeated
attr_accessor :load_count
alias mog21_initialize initialize  
def initialize  
@encounter_count = 0  
@enemy_defeated = 0   
@actor_defeated = 0
@load_count = 0
mog21_initialize    
end
def encounter_count
$game_variables[ENCOUNTER_COUNT] = @encounter_count  
return @encounter_count
end
def enemy_defeated
$game_variables[ENEMY_DEFEATED] = @enemy_defeated 
return @enemy_defeated  
end
def actor_defeated
$game_variables[ACTOR_DEFEATED] = @enemy_defeated   
return @actor_defeated  
end
def load_count
$game_variables[LOAD_COUNT] = @load_count
return @load_count
end
def save_count
$game_variables[SAVE_COUNT] = @save_count
return @save_count
end
end
##############
# Scene_Load #
##############
class Scene_Load < Scene_File
alias mog21_read_save_data read_save_data
def read_save_data(file)
mog21_read_save_data(file)
$game_system.load_count += 1
end  
end    
##################
# Sprite_Battler #
##################
class Sprite_Battler < RPG::Sprite
alias mnk_collapse collapse
  def collapse
  mnk_collapse
    if @battler.is_a?(Game_Enemy)
      $game_system.enemy_defeated += 1
    else
      $game_system.actor_defeated += 1  
    end
  end
end
################
# Scene_Battle #
################
class Scene_Battle
alias mog21_main main
def main
$game_system.encounter_count += 1
mog21_main  
end 
end
###############
# Window Data #
###############
class Window_Data < Window_Base
include MOG
def initialize
super(0, 100, 640, 280)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
self.contents.font.name = "Georgia"
refresh
end
def refresh
self.contents.clear
self.contents.draw_text(0, 0, 300, 64,ECOUNTER_TEXT + "    ->    " + $game_system.encounter_count.to_s,0)  
self.contents.draw_text(70, 50, 300, 64,SAVE_COUNT_TEXT + "    ->    " + $game_system.save_count.to_s ,0)  
self.contents.draw_text(140, 100, 300, 64,LOAD_COUNT_TEXT + "    ->    " + $game_system.load_count.to_s,0)  
self.contents.draw_text(210, 150, 300, 64,ENEMY_DEFEATED_TEXT + "    ->    " + $game_system.enemy_defeated.to_s,0)  
self.contents.draw_text(280, 200, 300, 64,ACTOR_DEFEATED_TEXT + "    ->    " + $game_system.actor_defeated.to_s,0)  
end  
end
#############
# Scene_End #
#############
class Scene_End
def main
s1 = "" 
s2 = "" 
s3 = ""
@command_window = Window_Command.new(100, [s1, s2, s3])
@command_window.visible = false
@window_data = Window_Data.new
@endback = Plane.new
@endback.bitmap = RPG::Cache.picture("MN_BK")
@endback.z = 10
@endback.opacity = 255
@endlayout = Plane.new
@endlayout.bitmap = RPG::Cache.picture("End_Layout")
@endlayout.z = 20
@endcom1 = Sprite.new
@endcom1.bitmap  = RPG::Cache.picture("End_Com01")
@endcom1.z = 30
@endcom1.x = 20
@endcom1.y = 340
@endcom1.zoom_x = 1
@endcom2 = Sprite.new
@endcom2.bitmap  = RPG::Cache.picture("End_Com02")
@endcom2.z = 30
@endcom2.x = 100
@endcom2.y = 395
@endcom3 = Sprite.new
@endcom3.bitmap  = RPG::Cache.picture("End_Com03")
@endcom3.z = 30
@endcom3.x = 190
@endcom3.y = 440
$ld = 0
@zc = 1
Graphics.transition(MOG::ENDTT, "Graphics/Transitions/" + MOG::ENDTN)
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@command_window.dispose
@window_data.dispose
@endback.dispose
@endcom1.dispose
@endcom2.dispose
@endcom3.dispose
@endlayout.dispose
if $scene.is_a?(Scene_Title)
Graphics.transition
Graphics.freeze
end
end
def update
@zc += 0.01
if @zc > 1.3
   @zc = 1
end   
@endback.ox += 1
@endback.oy += 1
@command_window.update
case @command_window.index
when 0
@endcom1.zoom_x = @zc  
@endcom2.zoom_x = 1 
@endcom3.zoom_x = 1  
when 1
@endcom1.zoom_x = 1  
@endcom2.zoom_x = @zc  
@endcom3.zoom_x = 1    
when 2  
@endcom1.zoom_x = 1 
@endcom2.zoom_x = 1 
@endcom3.zoom_x = @zc   
end
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Menu.new(5)
return
end
if Input.trigger?(Input::C)
case @command_window.index
when 0 
command_to_title
when 1 
command_load
when 2  
command_shutdown
end
return
end 
end
def command_to_title
$game_system.se_play($data_system.decision_se)
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
$scene = Scene_Title.new
end
def command_load
$ld = 1  
$scene = Scene_Load.new  
end 
def command_shutdown
$game_system.se_play($data_system.decision_se)
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
$scene = nil
end 
end
##############
# Scene_Load #
##############
class Scene_Load  
def on_cancel
$game_system.se_play($data_system.cancel_se)
if $ld == 1
$scene = Scene_End.new  
else  
$scene = Scene_Title.new
end 
end 
end 


2)  And for your Victory music problem, put this little script in a new section above main:
Code:
#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
#  This will stop the victory music from continue playing on the map.
#==============================================================================
class Scene_Battle
  alias me_end_main main
  def main
    me_end_main
    Audio.me_stop
  end
end

This will make the victory music stop when the player exits the battle and goes back to the map.

3) I've fixed the problem with the too small portraits. The problem was that both the menu and the skill/item used the exact same method in the class "Window_Base" which resulted in that the skills script overwrote the menus method. That is why it would only show the small pictures.
I also fixed a small cursor "problem" in the menu script.
Here is the updated demo:
Demo
The demo also includes the updated "End" script.

When i have more time, i'll try to help you with the other stuff.
And i think i've changed it so that it's like you wanted it, but if i have misunderstood you, just tell me and i'll change it. :thumb:

Btw, the link to the FFV Job Script doesn't work. :tongue:

Over and out - Gando
 
Thank you for helping us out! ^____^

The menu works awesome now--I had forgotten to mention the curser problem--thanks for catching and fixing it!

I did notice one thing though--I'd like to use mostly default-style monsters (non animated monsters, that is), so I need the default death to happen when they die. However, even when I set the "default enemy" cases in the animation script to "true", I get this error message whenever I kill one:

http://www.aliasworkshop.com/transfer/l ... essage.png[/img]

It is AWESOME to have the player character sprites not vanishing when they die, though! I couldn't for the life of me figure out why that one was happening.

Oh, and here's the FFV script--I couldn't get our server to cooperate, so I linked Fomar's original upload.

http://fomar0153.awardspace.co.uk/rpg/ffv.txt
 
No problem! 
Hmm, so what you're saying that you want all the non animated monsters to become red and fade out, and then the animated battlers should show the "collapse pose"? Or am i misunderstanding you? ^^

EDIT:
Oh btw, the problem was in the "End" script.  I used the same alias in the End script that was being used in the "2 - Sprite System" script.. :P
Here is the Updated "End" script:
Code:
#_______________________________________________________________________________
# MOG Scene End Sakura V2.0            
#_______________________________________________________________________________
# By Moghunter   
# http://www.atelier-rgss.com
#_______________________________________________________________________________
# Scene_End com movimento e layout em pictures.
# Apresenta a quantidade de batalhas, saves, loads, etc...
# Permite criar condições especiais de eventos.
#_______________________________________________________________________________
module MOG
#Transition Time.
ENDTT = 40  
#Transition Type(Name).
ENDTN = "004-Blind04"
#----------------------------------------------------------------
#Definição do texto da apresentação dos parâmetros.
ECOUNTER_TEXT = "Number of Battles."
SAVE_COUNT_TEXT = "Number of Saves."
LOAD_COUNT_TEXT = "Number of Loads."
ENEMY_DEFEATED_TEXT = "Number of enemies defeated."
ACTOR_DEFEATED_TEXT = "Number of times defeated."
#----------------------------------------------------------------
# Definição da variável que registrará o valor dos parâmetros.
#(Essa função serve para criar condições especiais no jogo. 
# Exemplo -> Mate 100 inimigos que você receberá a espada do
# dragão.)
#----------------------------------------------------------------
# Quantidade de batalhas feitas.
ENCOUNTER_COUNT = 26
# Valor de vezes que o jogo foi Salvo(Save).
SAVE_COUNT = 27
# Valor de vezes que o jogo foi carregado(Load).
LOAD_COUNT = 28
# Quantidade de inimigos mortos.
ENEMY_DEFEATED = 29
# Valor de vezes que o personagens foi abatido.
ACTOR_DEFEATED = 30
#----------------------------------------------------------------
end
$mogscript = {} if $mogscript == nil
$mogscript["menu_sakura"] = true
###############
# Game_System #
###############
class Game_System
include MOG
attr_accessor :encounter_count   
attr_accessor :enemy_defeated
attr_accessor :actor_defeated
attr_accessor :load_count
alias mog21_initialize initialize  
def initialize  
@encounter_count = 0  
@enemy_defeated = 0   
@actor_defeated = 0
@load_count = 0
mog21_initialize    
end
def encounter_count
$game_variables[ENCOUNTER_COUNT] = @encounter_count  
return @encounter_count
end
def enemy_defeated
$game_variables[ENEMY_DEFEATED] = @enemy_defeated 
return @enemy_defeated  
end
def actor_defeated
$game_variables[ACTOR_DEFEATED] = @enemy_defeated   
return @actor_defeated  
end
def load_count
$game_variables[LOAD_COUNT] = @load_count
return @load_count
end
def save_count
$game_variables[SAVE_COUNT] = @save_count
return @save_count
end
end
##############
# Scene_Load #
##############
class Scene_Load < Scene_File
alias mog21_read_save_data read_save_data
def read_save_data(file)
mog21_read_save_data(file)
$game_system.load_count += 1
end  
end    
##################
# Sprite_Battler #
##################
class Sprite_Battler < RPG::Sprite
alias gando_collapse collapse
  def collapse
    if @battler.is_a?(Game_Enemy)
      $game_system.enemy_defeated += 1
    else
      $game_system.actor_defeated += 1  
    end
  gando_collapse
  end
end
################
# Scene_Battle #
################
class Scene_Battle
alias mog21_main main
def main
$game_system.encounter_count += 1
mog21_main  
end 
end
###############
# Window Data #
###############
class Window_Data < Window_Base
include MOG
def initialize
super(0, 100, 640, 280)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
self.contents.font.name = "Georgia"
refresh
end
def refresh
self.contents.clear
self.contents.draw_text(0, 0, 300, 64,ECOUNTER_TEXT + "    ->    " + $game_system.encounter_count.to_s,0)  
self.contents.draw_text(70, 50, 300, 64,SAVE_COUNT_TEXT + "    ->    " + $game_system.save_count.to_s ,0)  
self.contents.draw_text(140, 100, 300, 64,LOAD_COUNT_TEXT + "    ->    " + $game_system.load_count.to_s,0)  
self.contents.draw_text(210, 150, 300, 64,ENEMY_DEFEATED_TEXT + "    ->    " + $game_system.enemy_defeated.to_s,0)  
self.contents.draw_text(280, 200, 300, 64,ACTOR_DEFEATED_TEXT + "    ->    " + $game_system.actor_defeated.to_s,0)  
end  
end
#############
# Scene_End #
#############
class Scene_End
def main
s1 = "" 
s2 = "" 
s3 = ""
@command_window = Window_Command.new(100, [s1, s2, s3])
@command_window.visible = false
@window_data = Window_Data.new
@endback = Plane.new
@endback.bitmap = RPG::Cache.picture("MN_BK")
@endback.z = 10
@endback.opacity = 255
@endlayout = Plane.new
@endlayout.bitmap = RPG::Cache.picture("End_Layout")
@endlayout.z = 20
@endcom1 = Sprite.new
@endcom1.bitmap  = RPG::Cache.picture("End_Com01")
@endcom1.z = 30
@endcom1.x = 20
@endcom1.y = 340
@endcom1.zoom_x = 1
@endcom2 = Sprite.new
@endcom2.bitmap  = RPG::Cache.picture("End_Com02")
@endcom2.z = 30
@endcom2.x = 100
@endcom2.y = 395
@endcom3 = Sprite.new
@endcom3.bitmap  = RPG::Cache.picture("End_Com03")
@endcom3.z = 30
@endcom3.x = 190
@endcom3.y = 440
$ld = 0
@zc = 1
Graphics.transition(MOG::ENDTT, "Graphics/Transitions/" + MOG::ENDTN)
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@command_window.dispose
@window_data.dispose
@endback.dispose
@endcom1.dispose
@endcom2.dispose
@endcom3.dispose
@endlayout.dispose
if $scene.is_a?(Scene_Title)
Graphics.transition
Graphics.freeze
end
end
def update
@zc += 0.01
if @zc > 1.3
   @zc = 1
end   
@endback.ox += 1
@endback.oy += 1
@command_window.update
case @command_window.index
when 0
@endcom1.zoom_x = @zc  
@endcom2.zoom_x = 1 
@endcom3.zoom_x = 1  
when 1
@endcom1.zoom_x = 1  
@endcom2.zoom_x = @zc  
@endcom3.zoom_x = 1    
when 2  
@endcom1.zoom_x = 1 
@endcom2.zoom_x = 1 
@endcom3.zoom_x = @zc   
end
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Menu.new(5)
return
end
if Input.trigger?(Input::C)
case @command_window.index
when 0 
command_to_title
when 1 
command_load
when 2  
command_shutdown
end
return
end 
end
def command_to_title
$game_system.se_play($data_system.decision_se)
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
$scene = Scene_Title.new
end
def command_load
$ld = 1  
$scene = Scene_Load.new  
end 
def command_shutdown
$game_system.se_play($data_system.decision_se)
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
$scene = nil
end 
end
##############
# Scene_Load #
##############
class Scene_Load  
def on_cancel
$game_system.se_play($data_system.cancel_se)
if $ld == 1
$scene = Scene_End.new  
else  
$scene = Scene_Title.new
end 
end 
end 

Oh, and one other thing..  I noticed that there is something wrong with the animated battlers script.
If you make the DEFAULT_ENEMY = true, then all the enemies will use the default battler, which means that all the animated battlers will look very wierd. (you can try it and see for yourself what i mean) And the same thing goes for DEFAULT_ACTOR.
But i also noticed that you don't have to change those lines. Leave both DEFAULT_ENEMY  and   DEFAULT_ACTOR   at false, then if you want to have any enemies to have the default battlers, just add there id's in the DEFAULT_ENEMY_ID. Somehow it will work anyways. :shock: :tongue2:
 
Nope, I think you've got it. All enemies fade out, all player characters don't. ^^

EDIT: Just tested it--this is AWESOME! Ha ha ha, it's so cool having it work so nicely. Thank you again for all your help, Gando! ^___^
 
@OmegaSkye
To make all enemy characters fade out, and make all the player characters show the "collapse pose", go to the "1 - Configuration" script.
Search for these lines and change them to this:
Code:
  DEFAULT_COLLAPSE_ACTOR  = false   # If true, restores the old 'red fade'
  DEFAULT_COLLAPSE_ENEMY  = true   #   collapse effect (using spritesheets)
(if they doesn't already look like that o.O)

@Theo
No problem, i'm happy to help! ^_-



Btw, i'll look into the job system tomorrow when i have the time. :thumb:

Over and out - Gando
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top