Final fantasy RPG Maker

Auto-Combat



Description

Ajoute une nouvelle fonction de combat (du nom de "Auto Combat") qui, si elle est sélectionnée, permet à vos personnages de se battre automatiquement sans votre intervention.

Auteur(s) : Thousand Dragoon Link & Sir_KnightDragoon

Note du script: 3.5/10

Image

Auto-Combat

Installation


Copiez le code, ouvrez l'éditeur de script (F11) et créez en un nouveau au dessus de "Main".

Nommez ce script comme vous le souhaitez et collez-y ce code:



#==============================================================================
# ¦ Auto_Battle
#------------------------------------------------------------------------------
# Edited from default scripts by Thousand Dragoon Link and Sir_KnightDragoon
# Comments by Thousand Dragoon Link
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# ? Renewal of a frame (party command phase)
#--------------------------------------------------------------------------
def update_phase2
if Input.trigger?(Input::C)
case @party_command_window.index
when 0 # Fight
# Determine if a SE is performed.
$game_system.se_play($data_system.decision_se)
start_phase3
when 1 # Escape.
# escape is not possible
if $game_temp.battle_can_escape == false
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
update_phase2_escape
when 2 # Auto-Battle
$game_system.se_play($data_system.decision_se)
update_phase2_auto
end
return
end
end
#--------------------------------------------------------------------------
# Renewal of a frame (party command phase : auto)
#--------------------------------------------------------------------------
def update_phase2_auto
loop do
if @actor_index == $game_party.actors.size-1
start_phase4
return
end
@actor_index += 1
$game_party.actors[@actor_index].current_action.kind = 0
$game_party.actors[@actor_index].current_action.basic = 0
$game_party.actors[@actor_index].current_action.decide_random_target_for_actor
end
end
end
 
class Window_PartyCommand < Window_Selectable
#--------------------------------------------------------------------------
# object initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, 640, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.back_opacity = 160
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
#Change the commands to what you want them to say
@commands = ["Combat", "Fuite", "Auto-Combat"]
@item_max = 3
@column_max = 3
draw_item(0, normal_color)
draw_item(1, $game_temp.battle_can_escape ? normal_color : disabled_color)
draw_item(2, normal_color)
self.active = false
self.visible = false
self.index = 0
end
#--------------------------------------------------------------------------
def draw_item(index, color)
self.contents.font.color = color
rect = Rect.new(80 + index * 160 + 4, 0, 128 - 10, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.draw_text(rect, @commands[index], 1)
end
#--------------------------------------------------------------------------
# Renewal of the rectangle cursor
#--------------------------------------------------------------------------
def update_cursor_rect
self.cursor_rect.set(80 + index * 160, 0, 128, 32)
end
end



La nouvelle fonction "Auto-Combat" devrait alors apparaître à coter des commandes "Engager" et "Fuite".

Télécharger la démo du script
(Téléchargée 97 fois !)


Ajouté par Maitre Jiraya
le 13/07/2009 à 22:04:51
Vu 1037 fois
Dernière modification par Martial
le 09/12/2009 à 19:28:37


(édité 5 fois !)





Commentaires

Page : 1


Martial a écrit:

Tout à fait logique, Maitre Jiraya a crypté le projet ce qui empêche son édition.

Je modifie ça tout de suite !

EDIT: C'est bon :) :bien:

Message posté le 09/12/2009 à 19:05:34 IP: 81.56.65.7


1/10

Jénova a écrit:

Bonjour j'ai télécharger j'ai tester la démo . Pour la démo sa fonctionne mes pas pour l'ouvrir d'en mon r.p.g. xp voila je dit sa pour l'info ses tête moi ki a un beug mes tous les hotre tuto sa marche tres bien merci pour tes tuto et bonne continuation

Message posté le 09/12/2009 à 08:54:49 IP: 77.194.144.152


6/10

Martial a écrit:

C'est pas mal comme script ! Dommage que cette nouvelle fonction ne se résume qu'à faire attaquer les membres de l'équipe.

Un système du style "Gambit" de Final fantasy XII aurait été plus attrayant (mais la ça n'aurait pas été du même niveau de difficulté ! ^^)

En tout cas, merci pour ce script !

Message posté le 16/08/2009 à 16:18:37 IP: 88.186.172.45


Page : 1

Page générée en 0.7526 secondes
©2010 Site et design créés par Martial, le Webmaster
Me contacter - Livre d'or - Forum - Plan du site
Mentions légales - Remerciements
Final-RPG