Main Menu
  • Welcome to The RPG Maker Resource Kit.

[Solved] Sing command, Final Fantasy III Style

Started by DarkDjango, August 26, 2011, 11:08:13 PM

0 Members and 1 Guest are viewing this topic.

DarkDjango

Sing Command
26/08/2011

Summary
I tried eventing this. It called a Common Event that checked the weapon the Bard was using. Depending on his weapon, he sings a different song, Final Fantasy III DS style. However, I can't tell the program to make a specific actor use the skill. I can only make the actor in X position to use a skill, but that would make any actor in that position sing, and the Bard may be anywhere.
Features Desired
  • A custom Script command to force skill by an actor by ID rather than position.
Mockups
Yeah, no actual visual aspect.
Games its been in
  • Final Fantasy III (DS Version)
What other scripts are you using?
None. Default Battle System.

Did you search?
Yes, I did. I found equipment that teaches Skills when equipped, but that's not what I want.
Where did you search?
  • Here
  • RPG Maker VX Community
  • Google
  • Some minor brazilian forums.
What did you search for?
I searched in Google for "RPG Maker VX RGSS2 Sing command", "RPG Maker VX RGSS2 Specific Actor Skill Command" and "RPG Maker VX RGSS2 Equipment dependant skill". No real results. I also went through the script database of the sites listed above.

Well, thanks.

PS: I'm brazilian, my english is horrible. I learned it by playing games  :V

EDIT: Changed the "features desired" section. Sorry about that...
EDIT2: Yeah; hope its the last time. I suck at making descriptions.
EDIT3: Solved! Thanks for the attention, guys.
GOGOGOGOGOGOGO

TDS

Could you explain a little better?

From what I could understand, you want an actor to have skills that are based on weapons?

Or is it that the effect of a song skill varies with different weapons?

Mushu

conditional branch>(page2 of cond.) Actor (x) is using weapon (x)
play (x) song

DarkDjango

Quote from: Scalinger2 on August 27, 2011, 12:03:34 AM
conditional branch>(page2 of cond.) Actor (x) is using weapon (x)
play (x) song

I tried that. Thing is, there is no way to make "him" sing that. For example...
Condition: BARD has INSERT HARP NAME HERE equipped
Force CHARACTER ONE to use Skill SONG NAME HERE
That works well when he is the first character in the party.
But if he is the second, I don't want a KNIGHT or PRIEST to sing.
And since there is no way to know which position he is for sure...

@ TDS: Sorry about that. Thinking back, I should probably edit the first post. So much for reading the rules...
I think the 'simplest' way to do this would be to force a character by ACTOR ID rather than POSITION. I don't care it would crash if he isn't in the party, the event would be unavailable without him anyway...
Yeah, I'm gonna edit the first post.
GOGOGOGOGOGOGO

Mushu

If bard using bla bla weapon
set move route>change graphic to bard
play bgm 
:P

DarkDjango

Quote from: Scalinger2 on August 27, 2011, 02:13:23 AM
If bard using bla bla weapon
set move route>change graphic to bard
play bgm 
:P

No, no, its not, literally, a song, as in, game music. Its a battle skill.
GOGOGOGOGOGOGO

Adon

#6
If you are using VX, try the Force Action command.
You could have a skill the player uses to see what weapon is used, then depending on what weapon is used, in a conditional branch, you could force action of another skill.
So I would have in your skill database sing skills for every weapon is available.
It is actually pretty easy, for the Force Action command makes a certain user use the skill on a random, or certain
monster. (They can't choose.) Or if you mean instead of attacking, use a skill, you can take a look at some scripts in the database.

I'm back.

DarkDjango

Quote from: Adon on August 27, 2011, 10:15:25 AM
If you are using VX, try the Force Action command.
You could have a skill the player uses to see what weapon is used, then depending on what weapon is used, in a conditional branch, you could force action of another skill.
So I would have in your skill database sing skills for every weapon is available.
It is actually pretty easy, for the Force Action command makes a certain user use the skill on a random, or certain
monster. (They can't choose.) Or if you mean instead of attacking, use a skill, you can take a look at some scripts in the database.
Yeah, that's my problem. The "Force Action" does not make a specific actor do the sklill.
If I put, say, Force Char 1 use Skill SONG
Char 1: BARD
Char 2: WARRIOR
Char 3: PRIEST
Char 4: MAGICIAN
Then, the BARD would use the skill SONG.
However, if the party is like this...
Char 1: PRIEST
Char 2: MAGICIAN
Char 3: BARD
Char 4: WARRIOR
Then, the PRIEST would use the skill SONG.
And since the party is variable in-game, there is no way to check where he is. Unless there is.
Also, now that you brought it up, the targeting problem. Most songs would be Buffing/Healing. So, targeting the enemies would be no good.
So, what I'm actually wanting (probably editing the first post again. Great way to enter the forum...) is a custom Force Skill command using the (Third Page) "Script" command, that forces action by Actor ID. (If its not too much effort, an option to  target allies.)
Well guys, thanks for the attention.
GOGOGOGOGOGOGO

Adon

SO you mean, that Actor 1. Isn't the actor number one in the database?
Wow. I actually do not know how to get past that. :(

I'm back.

DarkDjango

#9
Quote from: Adon on August 27, 2011, 02:56:13 PM
SO you mean, that Actor 1. Isn't the actor number one in the database?
Wow. I actually do not know how to get past that. :(
Yeah, the Force Skill command is more for cinematics thingies. Like the Tellah VS Golbez in FFIV and Emperor VS Kefka in FFVI. When you know where the actor is. However, for more "everybattle" effects, it doesn't work.

Aaaand that's where the script comes in.
GOGOGOGOGOGOGO

TDS

Sorry about the delay.

I made a few different versions for this request, but I think this one might be the most fitting.


#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
#  This class performs battle screen processing.
#==============================================================================

class Scene_Battle < Scene_Base
  #--------------------------------------------------------------------------
  # * Execute Battle Action: Skill
  #--------------------------------------------------------------------------
  def execute_action_skill
    # Get Normal Skill
    skill = @active_battler.action.skill
    # If active battler is an actor and has weapons equipped
    if @active_battler.actor? and !@active_battler.weapons.empty?
      # Get Weapon Based Skill ID
      weapon_skill_id = skill.skill_by_weapon(@active_battler.id, @active_battler.weapons.first.id)     
      # If Weapon Based skill is not nil
      if !weapon_skill_id.nil?
        # Set Skill
        skill = $data_skills[weapon_skill_id]
        # Set Active Battler Action
        @active_battler.action.set_skill(skill.id)       
      end
    end   
    text = @active_battler.name + skill.message1
    @message_window.add_instant_text(text)
    unless skill.message2.empty?
      wait(10)
      @message_window.add_instant_text(skill.message2)
    end
    targets = @active_battler.action.make_targets
    display_animation(targets, skill.animation_id)
    @active_battler.mp -= @active_battler.calc_mp_cost(skill)
    $game_temp.common_event_id = skill.common_event_id
    for target in targets
      target.skill_effect(@active_battler, skill)
      display_action_effects(target, skill)
    end
  end
end


#==============================================================================
# ** RPG Module
#------------------------------------------------------------------------------
# Module for handling information.
#==============================================================================

module RPG
  #============================================================================
  # ** RPG::Skill
  #----------------------------------------------------------------------------
  # This module handles skill information.
  #============================================================================   
  class Skill < UsableItem
    #-------------------------------------------------------------------------
    # * Get Skill by Weapon ID
    #     actor_id  : actor id
    #     weapon_id : weapon id   
    #-------------------------------------------------------------------------
    def skill_by_weapon(actor_id, weapon_id)
      # Check for death level
      self.note[/WEAPON_SKILL_#{actor_id}_#{weapon_id}: ([-0-9]+)/]     
      # Return match value
      return $1 == nil ? nil : $1.to_i
    end
  end
end


What it does is, that it transforms a skill into another one based on the character and it's weapon.

For example if you are using the sing command and you want it to act like "Fire 2".

To use it put this into the skill note box you want to act differently based on the weapons equipped.


WEAPON_SKILL_ID1_ID2: ID3


ID1 is the Actor ID
ID2 is the weapon ID
ID3 is the ID of the skill it will transform into when the actor has the weapon equipped.

Example: (Using default database for example)


WEAPON_SKILL_1_1: 70


Ralph equipped with the Club and using the skill, would make it act as Spark II.

Let me know if this works out for you and if it's what you wanted or want anything changed or added.

Have a nice day.

DarkDjango

Quote from: TDS on August 28, 2011, 07:19:04 PM
Sorry about the delay.

I made a few different versions for this request, but I think this one might be the most fitting.

(SCRIPT)

(EXPLANATION)

Let me know if this works out for you and if it's what you wanted or want anything changed or added.

Have a nice day.

[Fangirl Mode] OHGODOHGODOHGODOHGOD [/Fangirl Mode]
It works perfectly! Just like I wanted!
And now that I test it, I just found more uses for it. Like some Final Fantasy IV (GBA/PSP version) ultimate weapons, which change the character skills when equipped.
Thanks a lot!
GOGOGOGOGOGOGO