Jump to content
Rpg²S Forum
  • 0

Status Consumo MP


dosassj4
 Share

Question

Ciao Raga, sapete come creare uno status che consuma MP?

In pratica voglio trasformare un personaggio, un po' come in dragon ball, solo che questa trasformazione deve avere (oltre ai miglioramenti di attacco, difesa, mosse speciali disponibili, ecc) un pecca, cioè il consumo continuo di MP.

Per fare un'altro esempio c'è lo status POISON che consuma continuamente HP, invece io vorrei consumare MP.

 

GRAZIE

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0
Scusa, ma nella sezione dove si creano gli status non dovrebbe essere possibile scegliere anche gli MP? Nel senso che se lo status veleno è già impostato, puoi prenderlo come esempio e trasformare il consumo di HP in consumo di MP. Non so come sia il VX ma non credo abbiano tolto questa opzione.

Targhette
http://www.rpg2s.net/awards/mostpolite2.jpghttp://www.rpg2s.net/awards/mostpresent1.jpghttp://i51.tinypic.com/2mfnpt2.png

 

 

http://www.rpg2s.net/dax_games/r2s_regali5.png

Link to comment
Share on other sites

  • 0

KGC Slip Damage Extension.

Ricorda di dare crediti, con questo puoi anche fare stati che curano HP e MP invece che sottrarli. Incolla lo script sotto Materials e prima del Main

 

Per usarlo inserisci questa tag nelle note dello stato che vuoi far perdere PM:

e sostituisci a n la percentuale di MP che vuoi sottrarre a ogni turno. Altrimenti, se vuoi un costo fisso, non metti il simbolo %. Es. , così scala 10 MP ogni turno.

 

#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_
#_/ ◆ Slip Damage - KGC_SlipDamageExtension ◆ VX ◆
#_/ ◇  Last Update: 03/29/2008
#_/ ◆ Written by TOMY     
#_/ ◆ Translation by Mr. Anonymous                  
#_/ ◆ KGC Site:                                                   
#_/ ◆  [url="http://ytomy.sakura.ne.jp/"]http://ytomy.sakura.ne.jp/[/url]                                   
#_/ ◆ Translator's Blog:                                             
#_/ ◆  [url="http://mraprojects.wordpress.com"]http://mraprojects.wordpress.com[/url]     
#_/-----------------------------------------------------------------------------
#_/  This script allows you to make states with "slip damage" or continual 
#_/   damage/recovery outside of battle. This effect is accompanied by a screen
#_/   flash to indictate everytime the actor recieves damage/recovery.
#_/  Recall the "Poisoned" state in Pokemon.
#_/=============================================================================
#_/                         ◆ Instructions For Usage ◆
#_/  To make use of this function, you must insert the <slip> tag into the
#_/   "Notes" box located in the States section of the database. 
#_/   
#_/                Format: <slip [HP/MP] Modifier Rate (%), Steps> 
#_/   Where HP/MP: Designate HP or MP damage/recovery.
#_/   Where Modifier: Use [ - ] or damage or [ + ] for recovery.
#_/   Where Rate: The desired amount of damage/recovery.
#_/   Where %: [Optional] You may insert % after rate for Max HP or Max MP.
#_/   Where Steps: The amount of steps it takes for the effect to kick in.
#_/
#_/   Ex: <slip HP -5%, 5>
#_/    For every 5 steps, 5 percent of the actor's max hp is lost.
#_/   
#_/   Ex: <slip MP +20, 10>
#_/    For every 10 steps, 20 MP is recovered.
#_/
#_/   Ex: <slip MP -10%>
#_/    After every turn in battle, 10 percent of MP is lost.
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_

#==============================================================================#
#                            ★ Customization ★                                 #
#==============================================================================#

module KGC
module SlipDamageExtension
 #                     ◆ Damage Indictation Flash ◆
 #  This allows you to change the color of the flash that happens when the
 #   actor loses or gains health due to the Slip Damage state.
 DAMAGE_FLASH_COLOR    = Color.new(255, 0, 0, 64)
 #  This allows you to change the duration (in frames) the flash remains
 #   on-screen.
 DAMAGE_FLASH_DURATION = 4
end
end

#------------------------------------------------------------------------------#

$imported = {} if $imported == nil
$imported["SlipDamageExtension"] = true

# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * #
#  Unless you know what you're doing, it's best not to alter anything beyond  #
#  this point, as this only affects the tag used for "Notes" in database.     #
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * #

#  Whatever word(s) are after the separator ( | ) in the following lines are
#   what are used to determine what is searched for in the "Notes" section of a
#   skill to see if it is an Steal skill.
#  Default Slip Damage State tag is <slip>

module KGC::SlipDamageExtension
 # Regular Expression Module
 module Regexp
   # State Module
   module State
     # Slip Damage tag string
     SLIP_DAMAGE = /<(?:SLIP|slip)\s*([HM]P)?\s*([\-\+]?\d+)([%%])?
       (?:\s*,\s*([\-\+]?\d+))?>/ix
   end
 end
end

#==============================================================================
# ■ RPG::State
#==============================================================================

class RPG::State
 #--------------------------------------------------------------------------
 # ○ 「スリップダメージ拡張」のキャッシュ生成
 #--------------------------------------------------------------------------
 def create_slip_damage_extension_cache
   @__slip_damage = false
   @__slip_damage_hp_rate  = 0
   @__slip_damage_hp_value = 0
   @__slip_damage_hp_map   = 0
   @__slip_damage_mp_rate  = 0
   @__slip_damage_mp_value = 0
   @__slip_damage_mp_map   = 0

   self.note.split(/[\r\n]+/).each { |line|
     case line
     when KGC::SlipDamageExtension::Regexp::State::SLIP_DAMAGE
       # スリップダメージ
       @__slip_damage = true
       analyse_slip_damage($~)
     end
   }

   # デフォルトのスリップダメージ量を設定
   unless @__slip_damage
     @__slip_damage_hp_rate = 10
     @__slip_damage_hp_map = 1
   end
 end
 #--------------------------------------------------------------------------
 # ○ スリップダメージの解析
 #--------------------------------------------------------------------------
 def analyse_slip_damage(match)
   # タイプ判定
   if match[1] == nil
     type = :hp
   else
     if match[1] =~ /MP/i
       type = :mp
     else
       type = :hp
     end
   end
   # ダメージ量取得
   n = match[2].to_i
   # 即値 or 割合判定
   is_rate = (match[3] != nil)
   # マップダメージ取得
   map_n = (match[4] != nil ? match[4].to_i : 0)

   # スリップダメージ値加算
   case type
   when :hp
     if is_rate
       @__slip_damage_hp_rate -= n
     else
       @__slip_damage_hp_value -= n
     end
     @__slip_damage_hp_map -= map_n
   when :mp
     if is_rate
       @__slip_damage_mp_rate -= n
     else
       @__slip_damage_mp_value -= n
     end
     @__slip_damage_mp_map -= map_n
   end
 end
 #--------------------------------------------------------------------------
 # ● スリップダメージ
 #--------------------------------------------------------------------------
 unless $@
   alias slip_damage_KGC_SlipDamageExtension slip_damage
 end
 def slip_damage
   create_slip_damage_extension_cache if @__slip_damage == nil
   return (@__slip_damage || slip_damage_KGC_SlipDamageExtension)
 end
 #--------------------------------------------------------------------------
 # ○ HP スリップダメージ (割合)
 #--------------------------------------------------------------------------
 def slip_damage_hp_rate
   create_slip_damage_extension_cache if @__slip_damage_hp_rate == nil
   return @__slip_damage_hp_rate
 end
 #--------------------------------------------------------------------------
 # ○ HP スリップダメージ (即値)
 #--------------------------------------------------------------------------
 def slip_damage_hp_value
   create_slip_damage_extension_cache if @__slip_damage_hp_value == nil
   return @__slip_damage_hp_value
 end
 #--------------------------------------------------------------------------
 # ○ HP スリップダメージ (マップ)
 #--------------------------------------------------------------------------
 def slip_damage_hp_map
   create_slip_damage_extension_cache if @__slip_damage_hp_map == nil
   return @__slip_damage_hp_map
 end
 #--------------------------------------------------------------------------
 # ○ MP スリップダメージ (割合)
 #--------------------------------------------------------------------------
 def slip_damage_mp_rate
   create_slip_damage_extension_cache if @__slip_damage_mp_rate == nil
   return @__slip_damage_mp_rate
 end
 #--------------------------------------------------------------------------
 # ○ MP スリップダメージ (即値)
 #--------------------------------------------------------------------------
 def slip_damage_mp_value
   create_slip_damage_extension_cache if @__slip_damage_mp_value == nil
   return @__slip_damage_mp_value
 end
 #--------------------------------------------------------------------------
 # ○ MP スリップダメージ (マップ)
 #--------------------------------------------------------------------------
 def slip_damage_mp_map
   create_slip_damage_extension_cache if @__slip_damage_mp_map == nil
   return @__slip_damage_mp_map
 end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Game_Battler
#==============================================================================

class Game_Battler
 #--------------------------------------------------------------------------
 # ● スリップダメージの効果適用
 #--------------------------------------------------------------------------
 def slip_damage_effect
   return unless slip_damage?

   slip_damage_effect_hp
   slip_damage_effect_mp
 end
 #--------------------------------------------------------------------------
 # ○ HP スリップダメージの効果適用
 #--------------------------------------------------------------------------
 def slip_damage_effect_hp
   return if dead?

   n = 0
   self.states.each { |state|
     next unless state.slip_damage
     n += self.maxhp * state.slip_damage_hp_rate / 100
     n += state.slip_damage_hp_value
   }
   return if n == 0

   @hp_damage = [n, self.hp - 1].min
   self.hp -= @hp_damage
 end
 #--------------------------------------------------------------------------
 # ○ MP スリップダメージの効果適用
 #--------------------------------------------------------------------------
 def slip_damage_effect_mp
   return if dead?

   n = 0
   self.states.each { |state|
     next unless state.slip_damage
     n += self.maxmp * state.slip_damage_mp_rate / 100
     n += state.slip_damage_mp_value
   }
   return if n == 0

   @mp_damage = [n, self.mp - 1].min
   self.mp -= @mp_damage
 end
 #--------------------------------------------------------------------------
 # ○ 歩行時のスリップダメージの効果適用
 #--------------------------------------------------------------------------
 def slip_damage_effect_on_walk
   last_hp = self.hp
   last_mp = self.mp
   self.states.each { |state|
     next unless state.slip_damage
     self.hp -= state.slip_damage_hp_map
     self.mp -= state.slip_damage_mp_map
   }
   # ダメージを受けた場合はフラッシュ
   if self.hp < last_hp || self.mp < last_mp
     $game_map.screen.start_flash(
       KGC::SlipDamageExtension::DAMAGE_FLASH_COLOR,
       KGC::SlipDamageExtension::DAMAGE_FLASH_DURATION)
   end
 end
 #--------------------------------------------------------------------------
 # ○ 歩行時の自動回復の実行
 #--------------------------------------------------------------------------
 def do_auto_recovery_on_walk
   return if dead?

   if auto_hp_recover
     self.hp += 1
   end
 end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Game_Party
#==============================================================================

class Game_Party < Game_Unit
 #--------------------------------------------------------------------------
 # ● プレイヤーが 1 歩動いたときの処理
 #--------------------------------------------------------------------------
 def on_player_walk
   for actor in members
     if actor.slip_damage?
       actor.slip_damage_effect_on_walk
     end
     actor.do_auto_recovery_on_walk
   end
 end
end

"Io non volevo solo partecipare alle discussioni. Volevo avere il potere di farle fallire" [cit.]

http://holyres.altervista.org/UserBoard/BannerOverdrive35.png
http://holyres.altervista.org/UserBoard/Cap3.png

http://www.indiexpo.net/signature/578.png

Miei script per RPG Maker VX Ace:


*NB Tutti i miei script sono protetti da licenza CC - BY http://i.creativecommons.org/l/by/3.0/88x31.png

Questa licenza permette a terzi di distribuire, modificare, ottimizzare ed utilizzare la tua opera come base, anche commercialmente, fino a che ti diano il credito per la creazione originale. Questa è la più accomodante delle licenze offerte. É raccomandata per la diffusione e l'uso massimo di materiali coperti da licenza.

 

 



I miei tutorial:


Come distribuire il gioco - e anche come creare un'installazione professionale!
RGSS in pillole - Guida completa e facile all'RGSS2 e RGSS3 per novizi ed esperti
Come mappare con VX (e VX Ace) - guida base all'uso degli strumenti del mapping
Loop delle musiche - come tagliarle in modo da far venire musiche continue senza interruzioni finali
Creare backup dei progetti - per evitare di uccidervi dopo un errore che ha fatto perdere tutto!

Link to comment
Share on other sites

  • 0

Salve ragazzi ho un'altra domanda su questo script.

Il PG che si trova sotto l'influenza di questo status, quando cammina non perde MP.

La mia domanda è:

è possibile fare in modo che venga influenzato dagli effetti di questo status anche al di fuori della battaglia? Cioè mentre cammina? (esattamente come fa lo status veleno che influgge danni sia durante la battaglia che al di fuori)

In pratica voglio fare in modo che perda MP sia in battaglia sia fuori durante la passeggiata.

Grazie in anticipo

Link to comment
Share on other sites

  • 0

Non sono sicuro, ma credo che si possano indicare più tipi diversi di slip damage, scrivendo il tag apposito per ciascuno nelle note di quello status . . .

 

Adesso non so se le note possano essere scritte su più righe, in tal caso basta segnalare ogni effetto su una riga differente . . .

 

Se invece c'è una riga sola per le note degli status, basta separarli con il codice \n, ad esempio

<slip MP -5%>n<slip MP -1, 10>

 

Come sempre, è solo un'ipotesi non testata, da provare a proprio rischio . . .

 


SCRIPT RGSS (RPG Maker XP) VINTAGE LIBRARY [2018+]


Breaking (in ogni senso) News: "Treno deraglia per via del seno di Sakurai Aoi . . ." - Info nello spoiler !!

 


http://afantasymachine.altervista.org/_altervista_ht/NOOOOOOOOOilMIOtreninooooo_500.gif


Non riesco a smettere di essere affascinato da immagini come questa . . .

http://anime.vl-vostok.ru/art/photos2011/17/78049800/wall_VladAnime_WWA_1885-1680x1050.jpg


Alcuni wallpapers che faccio ruotare sul mio vecchio PC . . .


http://afantasymachine.altervista.org/_altervista_ht/gits_window.jpg

http://afantasymachine.altervista.org/_altervista_ht/madoka_group01.jpg
http://afantasymachine.altervista.org/_altervista_ht/arisu_picipici_01.jpg
http://afantasymachine.altervista.org/_altervista_ht/phantom_wp01_einzwei.jpg


La parte più spassosa della mia vita è quando gli altri cercano di spiegarmi i miei pensieri . . .


BBCode Testing


Typeface & Size



Link to comment
Share on other sites

  • 0
Non sono sicuro, ma credo che si possano indicare più tipi diversi di slip damage, scrivendo il tag apposito per ciascuno nelle note di quello status . . .

 

Adesso non so se le note possano essere scritte su più righe, in tal caso basta segnalare ogni effetto su una riga differente . . .

 

Se invece c'è una riga sola per le note degli status, basta separarli con il codice \n, ad esempio

<slip MP -5%>n<slip MP -1, 10>

 

Come sempre, è solo un'ipotesi non testata, da provare a proprio rischio . . .

 

 

 

Ciao Giver ho provato e avevi ragione + o -, in pratica nelle note mi è bastato scrivere <slip MP -1, -10>, in questo modo mi toglie 1 MP per turno in battaglia e 10 MP per passo fuori battaglia.

Grazie mille

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...