-
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
def smoke?
return (@current_action.kind == 0 and @current_action.basic == 5)
end
class Game_Battler 3 method attack_effect(attacker)
Replace
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
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
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
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
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
temp = $game_actors[THE PERSON WITH IT].battle_commands + ["Smoke Screen"]
$game_actors[THE PERSON WITH IT].battle_commands = temp
or
temp = $game_actors[THE PERSON WITH IT].battle_commands << "Smoke Screen"
$game_actors[THE PERSON WITH IT].battle_commands = temp
-
what excatly do these do?
-
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.
-
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
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
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
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
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
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
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)
$game_temp.targetsaver = @target_battlers
7) Last step in Color_Fix add after the first damage pop
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
-
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
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
if self.regenerate?
$game_temp.regenerate = true
end
3)class Scene_Battle 3 method update_phase3_basic_command add in appropiate place
when "Regenerate"
$game_system.se_play($data_system.decision_se)
@active_battler.current_action.kind = 0
@active_battler.current_acton.basic = 8
4) OPTIONAL
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
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)
-
those r pretty cool...
-
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
if $game_actors[BATTLER NUMBER].(item types) == ITEM ID
$game_actors[1].battle_commands.push("THE COMMAND")
end
-
Can you give a script that gives a skill a individual command other than in the skill menu
-
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
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
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
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
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
-
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
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
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
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
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
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
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
-
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.
-
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
-
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...
-
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
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
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)
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)
-
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.
-
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
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
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
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fshow.imagehosting.us%2Fshow%2F501516%2F0%2Fnouser_501%2FT0_-1_501516.PNG&hash=d62b8e851aa4d0518fe98b7d3e8088c9677b794e)
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
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fshow.imagehosting.us%2Fshow%2F501522%2F0%2Fnouser_501%2FT0_-1_501522.PNG&hash=4354d3662572a97632332381403df0ceb061e8e1) (http://www.imagehosting.us/index.php?action=show&ident=501522)
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
-
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.
-
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
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fshow.imagehosting.us%2Fshow%2F500517%2F0%2Fnouser_500%2FT0_-1_500517.png&hash=1eb4e785eb6545a4c120e980c407e3af34cc8a24)
Look for this in your class Scene Battle 3 method make basic action
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fshow.imagehosting.us%2Fshow%2F500522%2F0%2Fnouser_500%2FT0_-1_500522.png&hash=d0e4d932574ba4f8c1d3133e9f4d6e12ac92d2a8)
And you can put this before the first commented line # in Scene_Battle 4 method make_basic_action_result
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fshow.imagehosting.us%2Fshow%2F500528%2F0%2Fnouser_500%2FT0_-1_500528.png&hash=b119d583f57283872c6b5fcd5720133bc7e4717c)[/img]
-
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
-
can you do one that allaws two attacks?
-
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
-
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
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
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
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
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
-
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)
attr_accessor :domcounter
...
@domcounter = false
Game_battler 1 put this anywhere you want
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
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
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
if @active_battler.current_action.basic == 12
@help_window.set_text("Magic Reversal ", 1)
return
end
ALMOST THERE
same class set_target(scope)
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)
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 :^^:
-
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
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
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
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
if @active_battler.current_action.basic == 14
@help_window.set_text("Learning", 1)
return
end
And you're done :)
-
thanks a lot, i need this!! :lol:
-
thanks a lot, i need this!! :lol:
you're welcome 8)
-
U mean Welcome i think :lol:
-
Example for the defend command
if self.guarding
self.damage /= 2
end
now add this to it
unless self.is_a?(Game_Enemy) #<-- This is the most important part
if self.battle_commands.include?("Defend") and rand(100) > 50 #<- chance
self.damage /= 2 #< The effect is placed inside
end
end
-
with this last the cance is always 50%??
i'm searching for a hazard chance
-
with this last the cance is always 50%??
i'm searching for a hazard chance
If you mean the lower the hp the person has the greater the chance it'll work then substitute that fifty for this
Game_Battler 3
100 - (100 * self.hp / self.maxhp)
Scene_Battle 4 (my scripts)
100 - (100 * $game_temp.targetsaver.hp / $game_temp.targetsaver.maxhp)
-
name: Attack All
description: an attack command that attacks all enemies nifty for weapons that should attack all enemies
Scene_Battle 3
when "Attack All"
$game_system.se_play($data_system.decision_se)
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 15
phase3_next_actor
Scene_Battle 4
if @active_battler.current_action.basic == 15
@animation1_id = @active_battler.animation1_id
@animation2_id = @active_battler.animation2_id
if @active_battler.restriction == 3
for actor in $game_party.actors
if actor.exist?
@target_battlers.push(actor)
end
end
elsif @active_battler.restriction == 2
for enemy in $game_troop.enemies
if enemy.exist?
@target_battlers.push(enemy)
end
end
else
for enemy in $game_troop.enemies
if enemy.exist?
@target_battlers.push(enemy)
end
end
end
for target in @target_battlers
target.attack_effect(@active_battler)
end
return
end
And you're done :^^:
note: I'll check to see if I can make an Attack that would attack all enemies twice EDIT
I Don't think it's possible :cry:
-
Are there any problems with any of the scripts I've posted are there any bugs in them? So far I haven't seen any posts about problems with them so I'll take the silence as they are all working fine :lol:
The Coming up Next List in order
4) A steal/mug command (Finished)
7)The X Magic off FF6 use magic twice (Started over :cry: )
8)Separating spells into two categories (????)
-
Name: Steal
Description: Depending upon the stats of the spell may
1) Steal gold according to the effect rating
2) Steal an item (the item you get and amount depends on effect rating and variance and evasion)
3) Steal gold according to the enemy's drop gold
4) Steal an item according to the enemy's drop item the amount depends on evasion
Name: Mug
Description: Does the above and attacks
Alot of steps in this one so don't get confused
Create two spells steal gold and steal item don't set anything on them yet
two status effects (stolen gold and stolen item make their rating 0 so it won't show up these status effects are here so you can't steal from the same enemy twice and since the rating is zero it won't show up) Create a common event with this in it (If you did X Attack make a copy and edit it so that it is like this)
if [Variable THREE] == 1
Force an action of attack executing now on first hero on last target chosen
end
if [Variable THREE] == 2
Force an action of attack executing now on second hero on last target chosen
end
if [Variable THREE] == 3
Force an action of attack executing now on third hero on last target chosen
end
if [Variable THREE] == 4
Force an action of attack executing now on fourth hero on last target chosen
end
REMEMBER ALL ID'S OF THE THINGS YOU CREATED
Onto the script editor
You should know where to add these two (Scene_Battle 3)
when "Steal"
$game_system.se_play($data_system.decision_se)
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 16
start_enemy_select
when "Mug"
$game_system.se_play($data_system.decision_se)
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 17
start_enemy_select
Now goto Scene_Battle 4
if @active_battler.current_action.basic == 16
@skill = $data_skills[???] #<-- to steal gold or steal items id here
@status_window.refresh
@help_window.set_text("Steal", 1)
@animation1_id = @skill.animation1_id
@animation2_id = @skill.animation2_id
index = @active_battler.current_action.target_index
@target_battlers.push($game_troop.smooth_target_enemy(index))
for target in @target_battlers
target.steal_effect(@active_battler, @skill, @skill.int_f, false)
end
end
if @active_battler.current_action.basic == 17
@skill = $data_skills[???] #Steal gold or steal item goes here
if @active_battler == $game_party.actors[0]
$game_variables[??] = 1 #The variable in the common event goes here
end
if @active_battler == $game_party.actors[1]
$game_variables[??] = 2
end
if @active_battler == $game_party.actors[2]
$game_variables[??] = 3
end
if @active_battler == $game_party.actors[3]
$game_variables[??] = 4
end
@status_window.refresh
@help_window.set_text("Steal", 1)
@animation1_id = @skill.animation1_id
@animation2_id = @skill.animation2_id
@common_event_id = ??? #Common event id
index = @active_battler.current_action.target_index
@target_battlers.push($game_troop.smooth_target_enemy(index))
for target in @target_battlers
target.steal_effect(@active_battler, @skill, @skill.int_f, true)
end
Add this new method to game_battler 3 and now edit the skills to your desire
, that is after you read the commented section on how to edit it!
#--------------------------------------------------------------------------
# ? steal_effect (my first major method :) ) version 1
# the skill effects
# accurary determines the chance to steal modifier
# elements aren't used so you don't have to check them
# the agi(30%), dex(20%), and int(50%) stats determine how much more gold you get and chance
# magic defense (theft defense) is the enemies steal defense (DON'T SET TOO HIGH)
# status effects are used
# effect rating determines the item you get or the gold you get
# the evasion then determines the number of that item you get
# If "MAGIC" equals any of these (if it doen't nothing will be stolen) then either of the following will happen
# tosteal = 1 steals gold according to effect rating
# tosteal = 2 steals an item the item id is the effect rating
# tosteal = 3 steals gold according to the enemies drop gold
# tosteal = 4 steals an item the item is the enemies drop item
# variance tells the variance, but if tosteal = 2 then It determines
# the type of item 1 for weapon 2 for armor 3 for item
#
#Pointers
#I wouldn't set the agility and dexerity ratings too high or else you'll have some rich players
# set agility to (10-50) and dex to (5-30) for best results
# if MAGIC = 2 then you can ONLY steal the item the effect rating and variance is pointing to
# remember the enemies drop probability you can set it to 0%!!!
# If a enemy doesn't drop a (item,weapon,armor) then the steal automatically fails (I made it say NO ITEM)
# Example of a good steal
# effect rating 100
# dexerity 25
# agility 50
# MAGIC 1
# Magic defense 20
# variance 20
#--------------------------------------------------------------------------
def steal_effect(attacker, skill, tosteal, mug)
self.steal = true
self.damage = 0
self.critical = false
hit_result = (rand(100) > self.dex / attacker.agi * attacker.int / self.int * skill.hit / 100)
#need to fix hit result because the chance of success is too high
if hit_result == true
case tosteal
when 1
unless self.states.include?(STOLE GOLD ID)
add_state(STOLE GOLD ID)
power = skill.power + attacker.dex * skill.dex_f / 100
power += attacker.int * 100 / self.int + attacker.agi * skill.agi_f / 67
if power > 0
power -= self.int * skill.mdef_f / 100 + self.dex * skill.mdef_f / 200 + self.agi * skill.mdef_f / 133
power = [power, 0].max
end
self.damage = power
if skill.variance > 0 and self.damage.abs > 0
amp = [self.damage.abs * skill.variance / 100, 1].max
self.damage += rand(amp+1) + rand(amp+1) - amp
end
$game_party.gain_gold(self.damage)
if mug == true
self.steal = false
self.second_steal = true
self.second_damage = 0
self.second_damage += self.damage
self.second_damage_pop = true
self.damage = 0
mug
end
else
self.steal = false
self.damage = "Failed"
end
when 2
unless self.states.include?(STOLE ITEM ID)
add_state(STOLE ITEM ID)
case skill.variance
when 1
$game_party.gain_weapon(skill.power, skill.eva_f)
self.damage = skill.eva_f.to_s + " " +$data_weapons[skill.power].name
when 2
$game_party.gain_armor(skill.power, skill.eva_f)
self.damage = skill.eva_f.to_s + " " +$data_armors[skill.power].name
when 3
$game_party.gain_item(skill.power, skill.eva_f)
self.damage = skill.eva_f.to_s + " " +$data_items[skill.power].name
end
if mug == true
self.steal = false
self.second_steal = true
self.second_damage = 0
self.second_damage += self.damage
self.second_damage_pop = true
self.damage = 0
mug
end
else
self.steal = false
self.damage = "Failed"
end
when 3
unless self.states.include?(STOLE GOLD ID)
add_state(STOLE GOLD ID)
power = self.gold + attacker.dex * skill.dex_f / 100
power += attacker.int * skill.int_f / 50 + attacker.agi * skill.agi_f / 67
if power > 0
power -= self.int * skill.mdef_f / 100 + self.dex * skill.mdef_f / 200 + self.agi * skill.mdef_f / 133
power = [power, 0].max
end
self.damage = power
if skill.variance > 0 and self.damage.abs > 0
amp = [self.damage.abs * skill.variance / 100, 1].max
self.damage += rand(amp+1) + rand(amp+1) - amp
end
$game_party.gain_gold(self.damage)
if mug == true
self.steal = false
self.second_steal = true
self.second_damage = 0
self.second_damage += self.damage
self.second_damage_pop = true
self.damage = 0
mug
end
else
self.steal = false
self.damage = "Failed"
end
when 4
unless self.states.include?(STOLE ITEM ID)
add_state(STOLE ITEM ID)
if self.weapon_id != 0
$game_party.gain_weapon(self.weapon_id, skill.eva_f)
self.damage = skill.eva_f.to_s + " " +$data_weapons[skill.power].name
elsif self.armor_id != 0
$game_party.gain_armor(self.armor_id, skill.eva_f)
self.damage = skill.eva_f.to_s + " " +$data_armors[skill.power].name
elsif self.item_id != 0
$game_party.gain_item(self.item_id, skill.eva_f)
self.damage = skill.eva_f.to_s + " " +$data_items[skill.power].name
else
self.damage = "No Item"
end
if mug == true
self.steal = false
self.second_steal = true
self.second_damage = 0
self.second_damage += self.damage
self.second_damage_pop = true
self.damage = 0
mug
end
else
self.steal = false
self.damage = "Failed"
end
end #ends the first case statement
else
self.steal = false
self.damage = "Failed"
end
return true
end
some screenshots of the steal command in action
STEAL SUCCESS
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg304.imageshack.us%2Fimg304%2F6158%2Fshow2kc.png&hash=8793b3580575fae0ee424e3b5c2bdd068b201875) (http://imageshack.us)
enemy with a 0% chance get item
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg307.imageshack.us%2Fimg307%2F1845%2Fshow23dm.png&hash=7b28a488c38db26f4f65b0e8109bb8f6de6ac28e) (http://imageshack.us)
prying that item of its hands
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg278.imageshack.us%2Fimg278%2F1658%2Fshow30xx.png&hash=a61aa5a063918480d78719118fcc717706b3e147) (http://imageshack.us)
if you want the damage to display stolen blah blah like mine then do the following (If you don't then delete all instances of self.steal and self.second_steal) goto Color Fix (if you don't have this class get it)
edit the damage method's name to def damage(damage, critical, restorative, steal)
change this
if damage.is_a?(Numeric) and damage < 0
bitmap.font.color.set(176, 255, 144)
elsif restorative
bitmap.font.color.set(176, 255, 144)
else
bitmap.font.color.set(255, 255, 255)
end
to
if damage.is_a?(Numeric) and damage < 0
bitmap.font.color.set(176, 255, 144)
elsif restorative
bitmap.font.color.set(176, 255, 144)
elsif steal
bitmap.font.color.set(255, 215, 0) #A Golden color
else
bitmap.font.color.set(255, 255, 255)
end
add this after the if critical block
if steal
bitmap.font.size = 20
bitmap.font.color.set(0, 0, 0)
bitmap.draw_text(-1, -1, 160, 36, "STOLEN", 1)
bitmap.draw_text(+1, -1, 160, 36, "STOLEN", 1)
bitmap.font.color.set(255, 255, 255)
bitmap.draw_text(0, 0, 160, 20, "STOLEN", 1)
end
add these variables in Color fix ignore the second_(name) variables and delete them from my method (from Game_Battler 3) if you don't have the second_damage_pop if block
attr_accessor :steal
attr_accessor :second_steal
@steal = false
@second_steal = false
change the damage_pop if block to this
if @battler.damage_pop
damage(@battler.damage, @battler.critical, @battler.restorative, @battler.steal)
@battler.damage = nil
@battler.critical = false
@battler.damage_pop = false
@battler.restorative = false
@battler.steal = false
end
if you have my second_damage_pop block then change it to this
if @battler.second_damage_pop
damage(@battler.second_damage, @battler.second_critical, @battler.second_restorative, @battler.second_steal)
@battler.second_damage = nil
@battler.second_critical = false
@battler.second_damage_pop = false
@battler.second_restorative = false
@battler.second_steal = false
end
If this doesn't work post that it doesn't work and your email and I'll send a project file with the code in it
-
The X magic script will take me longer to make than expected (the code for it didn't work the way I wanted so I started over) And this is the last call for requests because after I finish the last script I will not be making any more commands (unless you ask me when I'm in a good mood)
-
Hmm.. I seem to have many problems with your last script, the steal and mug command. Would you mind putting it in a project so that I can download it?
-
Hmm.. I seem to have many problems with your last script, the steal and mug command. Would you mind putting it in a project so that I can download it?
could you tell me the problem/error
-
Ok, first of all I get an undefined method 'steal_effect' in Scene_Battle 4 for Game_Enemy. So I tried to put the definition steal_effect in Game_Enemy, however that didn't work very well... Maybe I'm just missing something, but could you tell me what to do to get it working? :?
-
[off topic] I can see you are using a program to take screenshots, and it is putting an annoying little thing on them. Just press the print screen key, then open paint and right-click, paste, and viola, screenshot. If you just want the currently opened window (like most people), use ctrl+alt+print screen, open paint, right-click, paste. Simple screenshots, no programs, no annoying stamps.[/off topic]
-
Or instead of pressing ctrl+alt+Print Screen Just press alt+Print Screen :lol:
-
[off topic] I can see you are using a program to take screenshots, and it is putting an annoying little thing on them. Just press the print screen key, then open paint and right-click, paste, and viola, screenshot. If you just want the currently opened window (like most people), use ctrl+alt+print screen, open paint, right-click, paste. Simple screenshots, no programs, no annoying stamps.[/off topic]
thanks I was getting tired of that stamp but I've never heard off using crtl alt print scrn to make screenshots wll I guess you learn something new everyday :D
-
Ok, first of all I get an undefined method 'steal_effect' in Scene_Battle 4 for Game_Enemy. So I tried to put the definition steal_effect in Game_Enemy, however that didn't work very well... Maybe I'm just missing something, but could you tell me what to do to get it working? :?
steal_effect belongs in Game_Battler 3 anywhere you want
-
Yeah, maybe. But the problem's still there... The line is like this:
target.steal_effect(@active_battler, @skill, @skill.int_f, false)
And because the target is defined as Game_Enemy there's an error... Maybe I put that code in the wrong place or something...
Please, would you put it in a project? I'd really like to have that code :cry:
-
Yeah, maybe. But the problem's still there... The line is like this:
target.steal_effect(@active_battler, @skill, @skill.int_f, false)
And because the target is defined as Game_Enemy there's an error... Maybe I put that code in the wrong place or something...
Please, would you put it in a project? I'd really like to have that code :cry:
Did you put the code at the very bottom (the end) of the Game_Battler 3 class if you did just put the code between the attack_effect and skill_effect methods I'm positive that there are no errors in the steal_effect method because I just reread that script for errors so it's either you added a script that conflicts with mine or you made a mistake adding the code If that doesn't work then I'll send the project with the code by email
-
Replace Game_Battler 3 method steal_effect with this one
#--------------------------------------------------------------------------
# ? steal_effect Version 1.2
# by trickster
#
# fixes in this version
# fixes the accuracy of the steal it used to always work
# if accuracy is 100 then it will always work
# but if accuracy is 0 doesn't mean it won't always work
#
# the skill effects
# accurary determines the chance to steal
# elements aren't used so you don't have to check them
# the agi(30%), dex(20%), and int(50%) ratings determine how much more gold you get
# magic defense (theft defense) is the enemies steal defense
# the dexerity and intelligence of the battler and the agility and intelligence of the enemy determines chance
# strength and attack power and physical defense determine the damage
# status effects aren't used (sorry about that)
# effect rating determines the item you get or the gold you get
# variance tells the variance, but if tosteal = 2 then It determines
# the type of item 1 for weapon 2 for armor 3 for item
# the evasion then determines the number you get
# agility|dexterity|result
# = = hard
# > < very hard
# < > very easy
# >> << impossible
# << >> always
# Third argument tosteal
# tosteal = 1 steals gold according to effect rating
# tosteal = 2 steals an item the item id is the effect rating
# tosteal = 3 steals gold according to the enemies drop gold
# tosteal = 4 steals an item the item is the enemies drop item
#Fourth argument mug
#set to true to attack and steal false to steal only
#Pointers
#I wouldn't set the agility and dexerity ratings too high or else you'll have some rich players :)
# set agility to (10-50) and dex to (5-30) for best results
# if MAGIC = 2 then you can ONLY steal the item the effect rating and variance is pointing to
# remember the enemies drop probability you can set it to 0%!!!
# If a enemy doesn't drop a (item,weapon,armor) then the steal automatically fails (I made it say NO ITEM)
# Example of a good steal
# effect rating 100
# dexerity 25
# agility 50
# MAGIC 1
# Magic defense 20
# variance 20
# Accuracy (30%-80%)
#--------------------------------------------------------------------------
def steal_effect(attacker, skill, tosteal, mug)
self.steal = true
self.damage = 0
self.critical = false
hit_result = (rand(100) > self.agi / attacker.dex * self.int / attacker.int * (100 - skill.hit))
if hit_result == true
case tosteal
when 1
unless self.states.include?(36) #YOUR STEAL GOLD ID HERE
add_state(36) #YOUR STEAL GOLD ID HERE
power = skill.power + attacker.dex * skill.dex_f / 100
power += attacker.int * 100 / self.int + attacker.agi * skill.agi_f / 67
if power > 0
power -= self.int * skill.mdef_f / 100 + self.dex * skill.mdef_f / 200 + self.agi * skill.mdef_f / 133
power = [power, 0].max
end
self.damage = power
if skill.variance > 0 and self.damage.abs > 0
amp = [self.damage.abs * skill.variance / 100, 1].max
self.damage += rand(amp+1) + rand(amp+1) - amp
end
$game_party.gain_gold(self.damage)
if mug == true
self.steal = false
self.second_steal = true
self.second_damage = 0
self.second_damage += self.damage
self.second_damage_pop = true
self.damage = 0
end
else
self.steal = false
self.damage = "Failed"
end
when 2
unless self.states.include?(37) #YOUR STEAL ITEM ID HERE
add_state(37) #YOUR STEAL ITEM ID HERE
case skill.variance
when 1
$game_party.gain_weapon(skill.power, skill.eva_f)
self.damage = skill.eva_f.to_s + " " +$data_weapons[skill.power].name
when 2
$game_party.gain_armor(skill.power, skill.eva_f)
self.damage = skill.eva_f.to_s + " " +$data_armors[skill.power].name
when 3
$game_party.gain_item(skill.power, skill.eva_f)
self.damage = skill.eva_f.to_s + " " +$data_items[skill.power].name
end
if mug == true
self.steal = false
self.second_steal = true
self.second_damage = 0
self.second_damage += self.damage
self.second_damage_pop = true
self.damage = 0
end
else
self.steal = false
self.damage = "Failed"
end
when 3
unless self.states.include?(36) #YOUR STEAL GOLD ID HERE
add_state(36)#YOUR STEAL GOLD ID HERE
power = self.gold + attacker.dex * skill.dex_f / 100
power += attacker.int * skill.int_f / 50 + attacker.agi * skill.agi_f / 67
if power > 0
power -= self.int * skill.mdef_f / 100 + self.dex * skill.mdef_f / 200 + self.agi * skill.mdef_f / 133
power = [power, 0].max
end
self.damage = power
if skill.variance > 0 and self.damage.abs > 0
amp = [self.damage.abs * skill.variance / 100, 1].max
self.damage += rand(amp+1) + rand(amp+1) - amp
end
$game_party.gain_gold(self.damage)
if mug == true
self.steal = false
self.second_steal = true
self.second_damage = 0
self.second_damage += self.damage
self.second_damage_pop = true
self.damage = 0
end
else
self.steal = false
self.damage = "Failed"
end
when 4
unless self.states.include?(37) #YOUR STEAL ITEM ID HERE
add_state(37) #YOUR STEAL ITEM ID HERE
if self.weapon_id != 0
$game_party.gain_weapon(self.weapon_id, skill.eva_f)
self.damage = skill.eva_f.to_s + " " +$data_weapons[self.weapon_id].name
elsif self.armor_id != 0
$game_party.gain_armor(self.armor_id, skill.eva_f)
self.damage = skill.eva_f.to_s + " " +$data_armors[self.armor_id].name
elsif self.item_id != 0
$game_party.gain_item(self.item_id, skill.eva_f)
self.damage = skill.eva_f.to_s + " " +$data_items[self.item_id].name
end
if mug == true
self.steal = false
self.second_steal = true
self.second_damage = 0
self.second_damage += self.damage
self.second_damage_pop = true
self.damage = 0
end
else
self.steal = false
self.damage = "Failed"
end
end #ends the first case statement
else
self.steal = false
self.damage = "Failed"
end
return true
end
-
In Programming it is better to have general methods than specific methods In order to make your methods more general you should use variables in your code so here's a better way to make battle command that links to a spell
add this variable to class Game_BattleAction
attr_accessor :spell
same class method clear
@spell = 0
now for the general spellcasting script
when "NAME"
$game_system.se_play($data_system.decision_se)
@active_battler.current_action.kind = 0
@active_battler.current_action.basic = 18 #This stays the same
@active_battler.current_action.spell = 303 #Skill ID HERE
start_enemy_select (1*)
note: 1* if the scope of the skill is all enemies or all actors then that should be phase3_next_actor if the scope is an actor then that should be start_actor_select
if @active_battler.current_action.basic == 18
#This is where the variable takes action
@skill = $data_skills[@active_battler.current_action.spell]
@status_window.refresh
@help_window.set_text(@skill.name, 1)
@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)
end
end
And you're done :^^:
-
I'm moving on to two separate skill commands and I'll have that ready later tomorrow (I know how to do it now :^^: ) They will be separated by their attribute
-
You only have to do this one unless you want three separate lists then you have to do this twice
Create an attribute called second skill list or something remeber the id
Make copies of Window_skill and Window_skillstatus and rename them to Window_name and Window_namestatus
now goto Window_name and look for this if block
for i in 0...@actor.skills.size
skill = $data_skills[@actor.skills[i]]
if skill != nil
@data.push(skill)
end
end
and replace it with this
for i in 0...@actor.skills.size
skill = $data_skills[@actor.skills[i]]
if skill != nil and skill.element_set.include?(ELEMENT ID)
@data.push(skill)
end
end
look for that same block in Window_skill and replace it with this
for i in 0...@actor.skills.size
skill = $data_skills[@actor.skills[i]]
if skill != nil and not skill.element_set.include?(ELEMENT ID)
@data.push(skill)
end
end
now skills with the element Id set on them will not appear on the battle command skills and they will appear in the new command
next make a copy of scene_skill and rename it to scene_name and replace all of the code in it to this
[code]
class Scene_Name
#--------------------------------------------------------------------------
# ? ?????????
# actor_index : ??????????
#--------------------------------------------------------------------------
def initialize(actor_index = 0, equip_index = 0)
@actor_index = actor_index
end
#--------------------------------------------------------------------------
# ? ?????
#--------------------------------------------------------------------------
def main
# ???????
@actor = $game_party.actors[@actor_index]
# ???????????????????????????????
@help_window = Window_Help.new
@status_window = Window_NameStatus.new(@actor)
@name_window = Window_Name.new(@actor)
# ?????????????
@name_window.help_window = @help_window
# ????????????? (???
-
Sorry, I haven't got it to work yet... :( If you wish to send me the project then my e-mail is tillman_matte@hotmail.com.
-
Sorry, I haven't got it to work yet... :( If you wish to send me the project then my e-mail is tillman_matte@hotmail.com.
email sent if you want to test it out then do a test battle with the monster group with a turn 0 battle event
-
Thank you very much! :D
It works! :)
-
Thank you very much! :D
It works! :)
you're welcome
-
mine dont work... can you please send me a prgect of it please.. mine is greatwhitedragon999@hotmail.com
-
wierd I just started a new project and followed my directions on the steal command and it worked fine, but If you have problems with it just post with your email
Last chance for requests you still have a long time before I'm done
*EDIT* And I mean a loooooooong time because I've taking a break from coding this :|
X Magic is progressing very slowly
-
I cannnot get the magical defence command to work i've tried everything. So if you can please send me the battle commands in a file if possible my e-mail is shanus_2@hotmail.com
p.s great scripts :D
-
I cannnot get the magical defence command to work i've tried everything. So if you can please send me the battle commands in a file if possible my e-mail is shanus_2@hotmail.com
p.s great scripts :D
Sure just give me time to actually put the code in a project
-
1) If you replace the battle system you *might* not be able to use these battle commands
EDIT Battle systems that for sure you will not be able to use these
Fukuyama, and 桜雅 在土 battle system (currently working on a compatible version
2) Giving these battle commands to enemies
-
Dude, you posted 4 times in a row! I don't think that's good!
-
Dude, you posted 4 times in a row! I don't think that's good!
Yeah but would you rather have one looooooooong post than four smaller ones :)
*Edit* Dude you are also off topic Hahaha :P
-
60th post :D Here it is Behold (http://rapidshare.de/files/4237013/Battle.zip.html)
-
The I got the error message "Script 'Scene_Battle 3' line 104: SyntaxError occurred.
-
Wow, 1 year, 5 months. Post the line on which the error occurs, not just the name - http://rmrk.net/index.php/topic,19774.0.html
-
That was the entire error message.
-
I know that was the error message. But:
"Script 'Scene_Battle 3' line 104
means that the error occurs on a specific line, line 104 in the Script Scene_Battle 3. So, go in the editor, and copy that line and post it.
-
Oh, okay. Here it is.
when "Counter Strike" #whatever name you want goes here
I've already added Counter Strike as a skill in the database as well.
-
Hmm, I don't see a problem with that line. Can you post all the lines surrounding it?
-
Here's everything surrounding it.
update_phase3_basic_command
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
end
Do I have to replace 9 with the ID of the skill?
-
note: You need to have added Individual Battle Commands
Hmm, I am guessing this is not the entire script :P
Search for Individual Battle Commands maybe - I have no idea where it might be. In any case you are getting the error because you are missing part of the case statement, but as I am not familiar with the script I do not know what it is conditioned on.
Try finding the Scripter - he's probably released a more coherent version of the script than this. I think I will move this out of the database.