RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Various Battle commands & Request a Battle Command

0 Members and 3 Guests are viewing this topic.

**
Rep:
Level 90
note: You need to have added Individual Battle Commands
 
Name: Smoke Screen
Description: Defends but also when attacked the evasion rating is increased by 30%

Add this method to Game_Battler 1
Code: [Select]

def smoke?
return (@current_action.kind == 0 and @current_action.basic == 5)
end


class Game_Battler 3 method attack_effect(attacker)
Replace
Code: [Select]

eva = 8 * self.agi / attacker.dex + self.eva
hit = self.damage < 0 ? 100 : 100 - eva
hit = self.cant_evade? ? 100 : hit
hit_result = (rand(100) < hit)

with

if self.smoke?
eva = 8 * self.agi / attacker.dex + (self.eva + 13 / 10)
else
eva = 8 * self.agi / attacker.dex + self.eva
end
hit = self.damage < 0 ? 100 : 100 - eva
hit = self.cant_evade? ? 100 : hit
hit_result = (rand(100) < hit)

in method skiil_effect (same class) replace
Code: [Select]

eva = 8 * self.agi / user.dex + self.eva
hit = self.damage < 0 ? 100 : 100 - eva * skill.eva_f / 100
hit = self.cant_evade? ? 100 : hit
hit_result = (rand(100) < hit)

with

if self.smoke?
eva = 8 * self.agi / user.dex + (self.eva * 13 / 10)
else
eva = 8 * self.agi / user.dex + self.eva
end
hit = self.damage < 0 ? 100 : 100 - eva * skill.eva_f / 100
hit = self.cant_evade? ? 100 : hit
hit_result = (rand(100) < hit)

class Scene_Battle 3 method update_phase3_basic_command add after start_item_select
Code: [Select]

when "Smoke Screen"
$game_system.se_play($data_system.decision_se)
@active_battler.current_action.kind = 0
@active_battler.current_acton.basic = 5
#[b]delete the next command and uncomment the next for an attack[/b]
#[b]uncomment the next command and delete the next for a do nothing action [/b]
#phase3_next_actor  
#atart_enemy_select

If you choose the person using this command to attack then in method end_enemy_select change if x == "Attack" to if x == "Attack" or x == "Smoke Screen"


ALMOST DONE Class scene_battle 4 method make basic_action_result
for people who want the battler to attack
Code: [Select]

make a copy of the if block that starts and end like this
if @active_battler.current_action.basic == 0
@animation1_id = @active_battler.animation1_id
[b] ... [/b]
for target in @target_battlers
target.attack_effect(@active_battler)
end
return
end
paste the block so you'll have two
edit if @active_battler.current_action.basic == 0 to this
if @active_battler.current_action.basic == 5
remover the if block
if @active_battler.is_a?(Game_Enemy) all the way to the lines

end
end


for people who want this command to do nothing put increase evade
make a copy of the if block that starts and end like this
Code: [Select]

if @active_battler.current_action.basic == 1
@help_window.set_text($data_system.words.guard, 1)
return
end

edit if @active_battler.current_action.basic == 1
to if @active_battler.current_action.basic == 5

OPTIONAL
edit @help_window.set_text($data_system.words.guard, 1)
to @help_window.set_text("WHAT TO SAY WHEN USING", 1)

OPTIONAL (ICING ON THE CAKE)add
@active_battler.animation_id = WHATEVER ANIMATION you want to see
after @help_window.set_text


LAST PART (still working on this part) all of the other stuff was easy, but this is the hard part
actually implementing the battle command within your game many ways

1) create armor that you want the effect to be added to in a turn 0 battle event make a conditional branch if the character has that armor equipped then call script with this in it $game_actors[THE PERSON WITH IT].battle_commands.push("Smoke Screen") DO a test battle with one of the battlers with the equipment and see if the new command was added
If it wasn't then create a status effect with a rating of 0 (It will not show up) and set the armor to auto inflict the status effect now change the condition branch to say if the battler has this status effect then call script $game_actors[THE PERSON WITH IT].battle_commands.push("Smoke Screen")

this method works but you have to put this battle event in every battle  currently working on a script for linking battle commands to armor and weapons

2) use a parallel process common event to add the effect

EDIT
3) In the beginning of the game call a script with this in it
Code: [Select]

temp = $game_actors[THE PERSON WITH IT].battle_commands + ["Smoke Screen"]
$game_actors[THE PERSON WITH IT].battle_commands = temp


or

Code: [Select]

temp = $game_actors[THE PERSON WITH IT].battle_commands << "Smoke Screen"
$game_actors[THE PERSON WITH IT].battle_commands = temp

*******
I am epic, you are not.
Rep:
Level 93
Defender of Justice
what excatly do these do?

**
Rep:
Level 90
Quote from: Lord Dante
what excatly do these do?

In a battle you see the commands "Attack" "Skills" "Defend" and "Item" the two scripts above are for the code to make the database recognize two new commands and when it's selected in battle it executes a different effect like evade a attack, counterattacking, and other stuff.

**
Rep:
Level 90
Name: Magic Defense (EDIT)
Description: This defense only works on spells divides the damage by 3 and heals sp according to the sp cost of the spell

0) Add this variable to Game_Temp
  attr_accessor :magicaldefend #true if magical defending
  @magicaldefend = false


1) Game_Battler 1 add these variables
Code: [Select]

  attr_accessor :second_damage
  attr_accessor :second_critical
  attr_accessor :second_damage_pop
    @second_damage_pop = false
    @second_damage = nil
    @second_critical = false


and add anywhere

Code: [Select]

def mg_defense?
return (@current_action.kind == 0 and @current_action.basic == 7)
end


2)class Game_Battler 3 method skill_effect
Add after the self.guarding? if block
Code: [Select]

       if self.mgdefense?
        $game_temp.magicaldefend = true
        self.damage /= 3
        end

3)class Scene_Battle 3 method update_phase3_basic_command add in appropiate place
Code: [Select]

when "Magic Defense"
$game_system.se_play($data_system.decision_se)
@active_battler.current_action.kind = 0
@active_battler.current_acton.basic = 7

4) OPTIONAL
Code: [Select]

if @active_battler.current_action.basic == 7
@help_window.set_text("The text goes here", 1)
return
end


5) add this in update_phase4_step5 after the for block
Code: [Select]

      if $game_temp.magicaldefend
        $game_temp.targetsaver.second_damage_pop = true
        $game_temp.targetsaver.second_restorative = true
          $game_temp.targetsaver.second_damage = -@skill.sp_cost
          $game_temp.targetsaver.sp -= $game_temp.targetsaver.second_damage
        end
          $game_temp.magicaldefend = false


6) add this in when 3 of the Game Enemy portion of set target battlers (scope)
Code: [Select]

$game_temp.targetsaver =  @target_battlers


7) Last step in Color_Fix add after the first damage pop
Code: [Select]

if @battler.second_damage_pop
damage(@battler.second_damage, @battler.second_critical, @battler.second_restorative)
@battler.second_damage = nil
@battler.second_critical = false
@battler.second_damage_pop = false
@battler.second_restorative = false
end

note: the healed sp in this script and the regen script are not shown I have a fix for this I'll post it later

**
Rep:
Level 90
name: Regenerate EDIT
description: when attacked heals a portion of the damage taken the lesser the hp you have the more you'll recover

0) Add the magical defense command first

1) Game_Battler 1
Code: [Select]

def regenerate?
return (@current_action.kind == 0 and @current_action.basic == 8)
end


2)class Game_Battler 3 method skill_effect and attack_effect
Find self.hp -= self.damage in both of the methods and add this before it
Code: [Select]

        if self.regenerate?
          $game_temp.regenerate = true
        end


3)class Scene_Battle 3 method update_phase3_basic_command add in appropiate place
Code: [Select]

when "Regenerate"
$game_system.se_play($data_system.decision_se)
@active_battler.current_action.kind = 0
@active_battler.current_acton.basic = 8


4) OPTIONAL
Code: [Select]

if @active_battler.current_action.basic == 8
@help_window.set_text("The text goes here", 1)
return
end


5) after where you put the effect code for Magical defense put this
Code: [Select]

            if $game_temp.regenerate
         $game_temp.targetsaver.second_damage_pop = true
        $game_temp.targetsaver.second_restorative = true
        healed = 0
        healed += $game_temp.targetsaver.damage
        randomregen = -rand(healed) - $game_temp.targetsaver.maxhp / ($game_temp.targetsaver.hp + 1)  - 2
        $game_temp.targetsaver.hp -= randomregen
        $game_temp.targetsaver.second_damage = randomregen
        $game_temp.targetsaver.hp -= $game_temp.targetsaver.second_damage
      end
      $game_temp.regenerate = false

This fix also removes a bug if your hp went to 0 (division by zero error)

*******
I am epic, you are not.
Rep:
Level 93
Defender of Justice
those r pretty cool...

**
Rep:
Level 90
Ok figured out the solution to why battle commands won't link to armor well battle commands will not link to accessories because the person who did the original coding in ruby (The Interpretor class) made a mistake and the conditional branch event will not detect accessories worn by the battler (hmmn)
to correct it

class Interpreter 3 method command_111
look for
when 4
result = (actor.armor1_id ...  == @parameters[3])

change the last ")" to " or " and add actor.armor4_id == @parameters[3])


note: This next part = a turn 0 battle event
There that fixes it now to autolink the battle command to it create armor or a weapon remember the ID of it goto scripts and goto Scene_Battle 1 method main add this anywhere (I placed it before start_phase1)

Item types
weapon_id for a weapon
armor1_id for a shield
armor2_id for a helmet
armor3_id for armor
armor4_id for an accessory

Code: [Select]

if $game_actors[BATTLER NUMBER].(item types) == ITEM ID
$game_actors[1].battle_commands.push("THE COMMAND")
end

**
Rep: +0/-0Level 90
Can you give a script that gives a skill a individual command other than in the skill menu
I haven't got time to write something witty so deal with it.

**
Rep:
Level 90
Quote from: Shanus
Can you give a script that gives a skill a individual command other than in the skill menu

The code is very short and depends if you want to attack one enemy or all enemies

ONE ENEMY
Scene battle 3 method update_phase3_basic_command
Code: [Select]

      when "commands name"
        $game_system.se_play($data_system.decision_se)
        @active_battler.current_action.kind = 0
        @active_battler.current_action.basic = (put any number here)
#make sure the number isn't the same as another command
        start_enemy_select



Scene_Battle 4 make_basic_action_result
Code: [Select]

        if @active_battler.current_action.basic == (same number)
          index = @active_battler.current_action.target_index
          target = $game_troop.smooth_target_enemy(index)
      @target_battlers = [target]
    @help_window.set_text("NAME OF COMMAND", 1)
     @skill = $data_skills[SKILL NUMBER]    
     @animation1_id = @skill.animation1_id
    @animation2_id = @skill.animation2_id
    for target in @target_battlers
      target.skill_effect(@active_battler, @skill)
    end
      return
    end


ALL ENEMIES
Scene battle 3 method update_phase3_basic_command
Code: [Select]

      when "commands name"
        $game_system.se_play($data_system.decision_se)
        @active_battler.current_action.kind = 0
        @active_battler.current_action.basic = (put any number here)
#make sure the number isn't the same as another command
        phase3_next_actor #no need to do enemy selection


Scene_Battle 4 make_basic_action_result
Code: [Select]

        if @active_battler.current_action.basic == (same number)
        for enemy in $game_troop.enemies
          if enemy.exist?
            @target_battlers.push(enemy)
          end
        end
    @help_window.set_text("NAME OF SKILL", 1)
     @skill = $data_skills[SKILLS ID]    
     @animation1_id = @skill.animation1_id
    @animation2_id = @skill.animation2_id
    for target in @target_battlers
      target.skill_effect(@active_battler, @skill)
    end
      return
    end

**
Rep:
Level 90
name: Counter :D
description: Attacks and then if an ENEMY attacks the battler then the battler will counterattack

This is a pretty long addition
1) New global variables class Game Temp in their appropiate places
Code: [Select]

  attr_accessor :docounter #equals true if a counter attack is needed
  attr_accessor :targetsaver #saves the last target who was attacked
...
  @docounter = false
  @targetsaver = 0


2) Game_Battler 1 yet again
Code: [Select]

    def counter1?
    return (@current_action.kind == 0 and @current_action.basic == 9)
    end


3) Game_Battler 3 attack_effect  right after self.hp -= self.damage
Code: [Select]

      if self.counter1?
        $game_temp.docounter = true
        end


if you want the character to counter even if the attacker miss
put the same thing after self.damage = "Miss"
you could also make the battle counter if attacked by a spell just put the same code in the same places in skill effect

4) Scene_Battle 3 update_phase3_basic_command put this in proper place
Code: [Select]

      when "Counter Strike" #whatever name you want goes here
        $game_system.se_play($data_system.decision_se)
        @active_battler.current_action.kind = 0
        @active_battler.current_action.basic = 9
        start_enemy_select


5) Scene_Battle 4  make_basic_action_result
Code: [Select]

    if @active_battler.current_action.basic == 9
      @animation1_id = @active_battler.animation1_id
      @animation2_id = @active_battler.animation2_id
        if @active_battler.restriction == 3
          target = $game_party.random_target_actor
        elsif @active_battler.restriction == 2
          target = $game_troop.random_target_enemy
        else
          index = @active_battler.current_action.target_index
          target = $game_troop.smooth_target_enemy(index)
      end
      @target_battlers = [target]
      for target in @target_battlers
        target.attack_effect(@active_battler)
      end
      return
    end


6) This next addition when put in the right place with make the effect work correctly I had to put this in many different places to get it to work same place method update_phase4_step5
Code: [Select]

              if $game_temp.docounter
            @animation1_id = $game_temp.targetsaver.animation1_id
            @animation2_id = $game_temp.targetsaver.animation2_id
            target = @active_battler
            @target_battlers = [@active_battler]
      for target in @target_battlers
      target.attack_effect($game_temp.targetsaver)
      end
      $game_temp.docounter = false
      #when testing This next command makes the help menu pop up  
      #but in this case it pops up then disappears very quickly
      #@help_window.set_text("Counter Attack ", 1)
      target.damage_pop = true
  end

****
Rep: +0/-0Level 91
Here's a challenge: Can you make a skill which opens a box. In the box, you enter a 6-digit code. Each skill in the game will then be assigned a code, and when you enter a correct code in the box, it uses the corresponding skill. Otherwise, it says "Skill not found" I hope that wasn't confusing.
At least I have chicken.
--------------------------------------------------------

**
Rep:
Level 90
Quote from: Leeroy_Jenkins
Here's a challenge: Can you make a skill which opens a box. In the box, you enter a 6-digit code. Each skill in the game will then be assigned a code, and when you enter a correct code in the box, it uses the corresponding skill. Otherwise, it says "Skill not found" I hope that wasn't confusing.

Am I creating a skill or a battle command it sounds easy to create

****
Rep: +0/-0Level 91
A skill if possible. I would try it on my own, but am completely overwhelmed with RGSS. I can make comments and... that's it...
At least I have chicken.
--------------------------------------------------------

**
Rep:
Level 90
Quote from: Leeroy_Jenkins
A skill if possible. I would try it on my own, but am completely overwhelmed with RGSS. I can make comments and... that's it...

Well this is just about the best I can do It was going to be all scripting but it will not give you any time to input the number I tried everything and now this is a half script - half common event code

name: Code Breaker
description: when used input a number if it matches a predefined set of numbers a spell will be automatically cast note: this only works on the first character so if you want any character to use this command you must go down to the EXTRAS section to get the script for that (as soon as I fix it)

First create a spell (name doesn't matter if you want a battle command effect rating 0) linking to a common event remember the spell id and the common event id (only if you want this to be a battle command)

goto common events
goto the common event id from the spell

Message Display Options Bottom Don't Show
(I'll make a tiny box for it later I have to study up on this first though)
Input Number : [XXXX: Name], Y Digits (remember variable id Y - any number you want)

Conditional Branch: Variable [0015: Name] == ZZZ (ZZZ is any number)
<>Force Action: Hero 1, [The Spell], Random, Execute Now (Best I can do)
<>End Event Processing
<>
End

REPEAT THIS FOR EACH CODE
AT THE END
Message: Skill Not Found OR Play SE: '057=Wrong01', 80, 100  

Do all of the above for a spell with this effect now if you want a Battle Command with this effect then let's continue

Scene_Battle 4 make_basic_action_result
Code: [Select]

    if @active_battler.current_action.basic == A NUMBER (make sure it matches the other one)
      @skill = $data_skills[SPELL ID]
      @status_window.refresh
      @help_window.set_text("Code Breaker ", 1)
      @common_event_id = @skill.common_event_id
      @target_battlers.push(@active_battler)
      for target in @target_battlers
        target.skill_effect(@active_battler, @skill)
      end
      return
    end


Scene_Battle 3 update_phase3_basic_command
Code: [Select]

      when "Code Breaker"
        $game_system.se_play($data_system.decision_se)
        @active_battler.current_action.kind = 0
        @active_battler.current_action.basic = A NUMBER (make sure it matches the above one and no other numbers match this)
        phase3_next_actor


EXTRAS
the code above only works for the first character so with some editing you can add this instead (you need to give up another variable) I don't know what to set that variable equal to as of yet (watch this spot for an edit)
weird that the correction involves subtracting by 1 actor[1] is actor[0] and so on   EDIT this edit isn't fully tested so if an actor doesn't exist I don't know what will happen (possible error)
Code: [Select]

    if @active_battler.current_action.basic == A NUMBER (make sure it matches the other one)
      if @active_battler == $game_party.actors[0]
      $game_variables[NUMBER OF VARIABLE) = 1
      end
      if @active_battler == $game_party.actors[1]
      $game_variables[NUMBER OF VARIABLE) = 2
      end
      if @active_battler == $game_party.actors[2]
      $game_variables[NUMBER OF VARIABLE) = 3
      end
      if @active_battler == $game_party.actors[3]
      $game_variables[NUMBER OF VARIABLE) = 4
      end
      @skill = $data_skills[SPELL ID]
      @status_window.refresh
      @help_window.set_text("Code Breaker ", 1)
      @common_event_id = @skill.common_event_id
      @target_battlers.push(@active_battler)
      for target in @target_battlers
        target.skill_effect(@active_battler, @skill)
      end
      return
    end


the new fork this is a double fork now
Conditional Branch: THE OTHER VARIABLE == 1
Conditional Branch: Variable [0015: Name] == ZZZ (ZZZ is any number)
<>Force Action: Hero 1, [The Spell], Random, Execute Now (Best I can do)
<>End Event Processing
End
More spells for player 1
End

Conditional Branch: THE OTHER VARIABLE == 2
Conditional Branch: Variable [0015: Name] == ZZZ (ZZZ is any number)
<>Force Action: Hero 2, [The Spell], Random, Execute Now (Best I can do)
<>End Event Processing
End
More spells for player 2
End

Conditional Branch: THE OTHER VARIABLE == 3
Conditional Branch: Variable [0015: Name] == ZZZ (ZZZ is any number)
<>Force Action: Hero 3, [The Spell], Random, Execute Now (Best I can do)
<>End Event Processing
End
More spells for player 3
End

Conditional Branch: THE OTHER VARIABLE == 4
Conditional Branch: Variable [0015: Name] == ZZZ (ZZZ is any number)
<>Force Action: Hero 4, [The Spell], Random, Execute Now (Best I can do)
<>End Event Processing
End
More spells for player 4
End

Done all I have to do is fix the Input number command's box in battle (may be awhile)

***
Rep:
Level 90
U did some cool stuff!! What about a Blitz battle command? Just like Sabin in FF6. When you select it, you have to input a combination (like  UP, DOWN, ENTER) and then the character will invoke a skill for that combination.
~ Love me... I want you to love me... ~

Scripting Academy || My Deviantart || Project: Tsol - Aishite Aishite

Tired of:
Main character being found in a cliff and not being human;
Angel characters against demon ones;
Vampire characters falling in love with humans;
Human rebelling against Dragons;
More than one world in ACTUALLY one world;
DNA transfusions and mutations;
Powerful races and humans who amazingly rule almost every part of the world having absolutely no super power;
Demons being released after some time in "slumber";
Titles with Legacy or the name of the world on it;

**
Rep:
Level 90
Quote from: Sir Edeon X
U did some cool stuff!! What about a Blitz battle command? Just like Sabin in FF6. When you select it, you have to input a combination (like  UP, DOWN, ENTER) and then the character will invoke a skill for that combination.


Easy since I already have the script, but the Key Input Processing event waits for a player to hit a key so I'm going to have to bypass that or write a script from scratch I'll see If I can do that, but If I can't then It might be *gasp* Impossible

*EDIT*  With a quick fix of the battle system It is possible  :^^:
Battle fix
Goto Scene Battle 1 and search for
    if $game_system.timer_working and $game_system.timer == 0
      $game_temp.battle_abort = true
    end

you can either make them comments or delete them choose one
Create a skill that links to a common event remember both id's

Scripting (THE SAME AS CODE_BREAKER)
Scene_Battle 4 make_basic_action
things to replace(3)
the current_action's id
The skill id linking to the common event
Variable THREE is one unused variable Id
Code: [Select]

    if @active_battler.current_action.basic == ???
      @skill = $data_skills[Skill Id]
      @status_window.refresh
      @help_window.set_text("Name ", 1)
      if @active_battler == $game_party.actors[0]
      $game_variables[Variable THREE] = 1
      end
      if @active_battler == $game_party.actors[1]
      $game_variables[Variable THREE] = 2
      end
      if @active_battler == $game_party.actors[2]
      $game_variables[Variable THREE] = 3
      end
      if @active_battler == $game_party.actors[3]
      $game_variables[Variable THREE] = 4
      end
      @common_event_id = @skill.common_event_id
      @target_battlers.push(@active_battler)
      for target in @target_battlers
        target.skill_effect(@active_battler, @skill)
      end
      return
    end

Scene_Battle 3 put in proper place and replace current action id
Code: [Select]

      when "Blitz"
        $game_system.se_play($data_system.decision_se)
        @active_battler.current_action.kind = 0
        @active_battler.current_action.basic = ???
        phase3_next_actor


Goto the common event you created and put this there


Now create another common event (making sure that it links where it says in the first common event "Common Event :Make one digit" ) put all of this in it


a little explaining
 
Key   Number     
Down   2     
Left   4     
Right   6     
Up   8     
Shift(A)   11     
X(B)   12     
Space(C)    13     
A(X)   14     
s(Y)   15     
d(Z)   16     
Button L   17     
Button R   18   

These are the normal key codes in order to get a maximum length of 8 you can't have double digits so the second common event reassigns the key's code (with the exception of Button L and Button R)

so now the new key codes as reassigned by me
 
Key   Number     
Shift(A)   0     
X(B)   1     
Down   2     
Space(C)    3     
Left   4     
A(X)   5     
Right   6     
s(Y)   7     
Up   8     
d(Z)   9     
Button L   17     
Button R   18   

And if the code for the skill is less than 8 say you only have to press Left, Down, and Right. There are two ways you can do this Press Left Right Down and then ButtonL(R) or Press Left Right Down (LET TIME EXPIRE & press another key) 3 seconds is ample time to press the keys for the skill[/img]

*EDIT* There is another blitz script at dubealex.com

****
Rep: +0/-0Level 91
Thanks so much for filling my request, but I'm a bit confused... could you use screenshots to show me how to fill out the common events? Also, where exactly do I put those scripts...

Sorry for sounding like a n00b...

EDIT: I only wanted the first character to have it anyway, so don't bother explaining the extras stuff.
At least I have chicken.
--------------------------------------------------------

**
Rep:
Level 90
Quote from: Leeroy_Jenkins
Thanks so much for filling my request, but I'm a bit confused... could you use screenshots to show me how to fill out the common events? Also, where exactly do I put those scripts...

Sorry for sounding like a n00b...

EDIT: I only wanted the first character to have it anyway, so don't bother explaining the extras stuff.


I'll answer your question with a couple of pictures



Look for this in your class Scene Battle 3 method make basic action


And you can put this before the first commented line # in Scene_Battle 4 method make_basic_action_result
[/img]

**
Rep:
Level 90
The Coming up Next List in order
4) A steal command
5)A Charge command that powers up next attack
6)The jump command off FF6
7)The X Magic off FF6 use magic twice
8)Separating spells into two categories

***
Rep: +0/-0Level 90
can you do one that allaws two attacks?
Current Game:
Jenther International: jentherinternational.9k.com
_____________________________________________
The Shadow
|||||||||||||||| 3% Complete
Maker: Illudar and Jenther International
______________________________________________

"Every man dies. Not every man really lives."
"CURAHEE!!"

**
Rep:
Level 90
Quote from: Illudar
can you do one that allaws two attacks?

sure

*EDIT* This one was harder (the hardest to date) to code than expected  :(  so I'll have to delay it until I figure out how

*EDIT EDIT* I made the script for it

**
Rep:
Level 90
Name: Auto counter (Counter fix 1)
Description: Autocounters when attack chance of working (default is 50%)

in Scene_Battle 4 find if $game_temp.docounter and put this above it
Code: [Select]

if @active_battler.is_a?(Game_Enemy)
if target.battle_commands.include?("Name of Counter")
if rand(100) >= 50 #percent chance of autocounter
  target.second_damage = target.damage
  target.second_damage_pop = true
  target.damage_pop = false
  $game_temp.docounter = false
  @animation1_id = $game_temp.targetsaver.animation1_id
  @animation2_id = $game_temp.targetsaver.animation2_id
  target = @active_battler
  @target_battlers = [@active_battler]
  for target in @target_battlers
  target.attack_effect($game_temp.targetsaver)
  end
  @help_window.set_text("Counter Attack ", 1)
  target.damage_pop = true
end
end
end

Name: Counter fix two
Description: shows damage on both enemies
in scene_battle 4 find if $game_temp.docounter and delete that whole block of code and add this
Code: [Select]

if $game_temp.docounter
 target.second_damage = target.damage
 target.second_damage_pop = true
 target.damage_pop = false
 $game_temp.docounter = false
@animation1_id = $game_temp.targetsaver.animation1_id
@animation2_id = $game_temp.targetsaver.animation2_id
target = @active_battler
@target_battlers = [@active_battler]
for target in @target_battlers
target.attack_effect($game_temp.targetsaver)
end
@help_window.set_text("Counter Attack ", 1)
target.damage_pop = true
end


And Finally
name: X Attack
description: When selected the attack will attack twice
note this is the same process as adding code breaker and blitz


Create a skill memorize id linking to a comon event memorize that too
in the common event put (VARIABLE THREE CAN BE ANY VARIABLE)

      if [Variable THREE] == 1
      Force an action of attack executing now on first hero on last target chosen x2
      end

      if [Variable THREE] == 2
      Force an action of attack executing now on second hero on last target chosen x2
      end

      if [Variable THREE] == 3
      Force an action of attack executing now on third hero on last target chosen x2
      end

      if [Variable THREE] == 4
      Force an action of attack executing now on fourth hero on last target chosen x2
      end

you should know where to put this Scene_battle 3 proper place
Code: [Select]

      when "X Attack"
        $game_system.se_play($data_system.decision_se)
        @active_battler.current_action.kind = 0
        @active_battler.current_action.basic = 13
        start_enemy_select


now scene_battle 4 make_basic_action_result
Code: [Select]

    if @active_battler.current_action.basic == 13
      @skill = $data_skills[Spell Id]
      @status_window.refresh
      @help_window.set_text("Name ", 1)
      if @active_battler == $game_party.actors[0]
      $game_variables[Variable THREE] = 1
      end
      if @active_battler == $game_party.actors[1]
      $game_variables[Variable THREE] = 2
      end
      if @active_battler == $game_party.actors[2]
      $game_variables[Variable THREE] = 3
      end
      if @active_battler == $game_party.actors[3]
      $game_variables[Variable THREE] = 4
      end
      @common_event_id = @skill.common_event_id
      @target_battlers.push(@active_battler)
      for target in @target_battlers
        target.skill_effect(@active_battler, @skill)
      end
      return
    end

**
Rep:
Level 90
Name: Magic Reversal
Description: Like a counter except when a enemy casts a spell (scope = 1) on the player then the player casts the same spell back at them uses 1/2 of the sp of the spell cast

Adding this will take a lot of steps

New variables (Game_Temp)
Code: [Select]

  attr_accessor :domcounter
...
  @domcounter = false



Game_battler 1 put this anywhere you want
Code: [Select]

    def counter2?
    return (@current_action.kind == 0 and @current_action.basic == 12)
  end


Game_Battler 3 paste this before the second to last command in skill_effect
Code: [Select]

          if self.counter2?
        $game_temp.domcounter = true
        end


Scene_Battle 3 update_phase3_basic_command if you've been using all these scripts you know where to put this
Code: [Select]

      when "Magic Reversal"
        $game_system.se_play($data_system.decision_se)
        @active_battler.current_action.kind = 0
        @active_battler.current_action.basic = 12
        # 12 is the number I'm at now
        phase3_next_actor


Scene_Battle 4 you should know where to put this also
Code: [Select]

    if @active_battler.current_action.basic == 12
      @help_window.set_text("Magic Reversal ", 1)
      return
    end


ALMOST THERE
same class set_target(scope)
Code: [Select]

when 1 of (Game_Enemy's) part
        index = @active_battler.current_action.target_index
        @target_battlers.push($game_party.smooth_target_actor(index))
        $game_temp.targetsaver =  $game_party.smooth_target_actor(index)


update_phase4_step4 put this after the counter stuff (if you haven't added counter add if after the if block)
Code: [Select]

if $game_temp.domcounter
$game_temp.targetsaver.second_damage = $game_temp.targetsaver.damage
$game_temp.targetsaver.second_damage_pop = true
$game_temp.targetsaver.damage_pop = false
$game_temp.targetsaver.sp -= @skill.sp_cost / 2
@status_window.refresh
@help_window.set_text("Copy Skill", 1)
@animation1_id = @skill.animation1_id
@animation2_id = @skill.animation2_id
@common_event_id = @skill.common_event_id
@target_battlers.push(@active_battler)
for target in @target_battlers
target.skill_effect($game_temp.targetsaver, @skill)
end
$game_temp.domcounter = false
target.damage_pop = true
end

if @active_battler.is_a?(Game_Enemy)
if target.battle_commands.include?("Magic Reversal")
if rand(100) >= 50 #percent chance of autocounter
$game_temp.targetsaver.second_damage = $game_temp.targetsaver.damage
$game_temp.targetsaver.second_damage_pop = true
$game_temp.targetsaver.damage_pop = false
$game_temp.targetsaver.sp -= @skill.sp_cost / 2
@status_window.refresh
@help_window.set_text("Copy Skill", 1)
@animation1_id = @skill.animation1_id
@animation2_id = @skill.animation2_id
@common_event_id = @skill.common_event_id
@target_battlers.push(@active_battler)
for target in @target_battlers
target.skill_effect($game_temp.targetsaver, @skill)
end
$game_temp.domcounter = false
target.damage_pop = true
end
end
end


And you're done  :^^:

**
Rep:
Level 90
Not much to add here and any battler with this command can learn the spells

0) Create an attribute called learning or whatever

0.5) all enemy spells that you what battlers to learn need to have the attribute you just made checked

1) Game_battler 1
Code: [Select]

def learning?
return (@current_action.kind == 0 and @current_action.basic == 14)
end


2) Game_battler 3 make these two blocks of code before the return effective (last statement) in skill_effect
Code: [Select]

          if self.learning? and self.damage.is_a?(Numeric) and skill.element_set.include?("THE ID YOU CREATED")
          self.learn_skill(skill.id)
        end
      unless self.is_a?(Game_Enemy)
        if self.battle_commands.include?("Learning") and rand(100) > 50 and skill.element_set.include?("THE ID YOU CREATED")
          self.learn_skill(skill.id)
        end
      end


3)Scene_battle 3 you know where
Code: [Select]

      when "Learning"
        $game_system.se_play($data_system.decision_se)
        @active_battler.current_action.kind = 0
        @active_battler.current_action.basic = 14
        phase3_next_actor


4)Scene_battle 4 you should know where
Code: [Select]

       if @active_battler.current_action.basic == 14
      @help_window.set_text("Learning", 1)
      return
    end


And you're done  :)

****
Rep:
Level 91
thanks a lot, i need this!!  :lol:
I'm the Alpha and the Omega, the First and the Last, the Beginning and the End.

http://qualquek.miniville.fr/
http://www.dailymotion.com/bookmarks/ojah/video/x27l78_jake-simpson-stevie-wonder-isnt-she_music

My padawan (Tsunokiette) and me :p
http://www.team-aaa.com/root/profile.php?enter_id=614556
http://www.esl.eu/fr/player/2609080/
I'm French so forgive my bad english!