Steam'i Yükleyin
giriş
|
dil
简体中文 (Basitleştirilmiş Çince)
繁體中文 (Geleneksel Çince)
日本語 (Japonca)
한국어 (Korece)
ไทย (Tayca)
Български (Bulgarca)
Čeština (Çekçe)
Dansk (Danca)
Deutsch (Almanca)
English (İngilizce)
Español - España (İspanyolca - İspanya)
Español - Latinoamérica (İspanyolca - Latin Amerika)
Ελληνικά (Yunanca)
Français (Fransızca)
Italiano (İtalyanca)
Bahasa Indonesia (Endonezce)
Magyar (Macarca)
Nederlands (Hollandaca)
Norsk (Norveççe)
Polski (Lehçe)
Português (Portekizce - Portekiz)
Português - Brasil (Portekizce - Brezilya)
Română (Rumence)
Русский (Rusça)
Suomi (Fince)
Svenska (İsveççe)
Tiếng Việt (Vietnamca)
Українська (Ukraynaca)
Bir çeviri sorunu bildirin
I used three scripts to make this work - two I found online.
Manashield[forums.rpgmakerweb.com]
Passive States [yanflychannel.wordpress.com] <--- Only needed if you want equipment to create shields
I edited Manashield so it would transfer damage to TP, rather than MP:
85 if @battler.manashield && @battler.tp > 0 #@battler.mp changed to @battler.tp
86 dpm = @battler.manashield[0]
87 percent = @battler.manashield[1]
88 shield = (@hp_damage * percent.to_f) / 100.0
89 shield = shield / dpm.to_f
90 #shield = [shield, @battler.mp.to_f].min #line disabled
91 @hp_damage = 0 #@hp_damage set to zero
92 @tp_damage += shield.to_i #@mp_damage changed to @tp_damage
Lines 90 and 91 are used to calculate 'extra' damage your shield didn't block and transfer the extra to the actor (ex, if your shield has 3 TP and you take 5 damage, the other 2 is taken from HP). I don't want this to happen, so I disabled it. If you want this in your game, replace @battler.mp.to_f with @battler.tp.to_f on line 90, leaving line 91 alone.
Passive States is unchanged. I use it so the state Manashield specifies is applied to any actor wearing a shield.
The third script I cobbled together myself, to set the tp values to something appropriate for my game:
class Game_BattlerBase
def max_tp
return luk - 1
end
def tp_rate
@tp.to_f / max_tp #decides when tp bar is full (don't use init_tp)
end
end
class Game_Battler < Game_BattlerBase
def init_tp
self.tp = luk - 1 #decides starting tp at the beginning of battle
end
def execute_damage(user)
on_damage(@result.hp_damage) if @result.hp_damage > 0
self.hp -= @result.hp_damage
self.mp -= @result.mp_damage
user.hp += @result.hp_drain
user.mp += @result.mp_drain
on_damage(@result.tp_damage) #added to apply TP damage to actor
self.tp -= result.tp_damage #see above
end
end
max_tp is the most TP you're allowed to have. By default, it's 100. You can change 'luk - 1' to any value that makes sense in your game.
tp_rate is used for drawing the 'tp bar' (example: if you have a max tp of 50 but a tp_rate of the default 100, the bar will never fill past halfway). I recommend setting this to max_tp. DON'T set this to 'init_tp', it makes TP perpetually restore itself to full.
init_tp decides how much tp you start battle with. don't set above max_tp or tp_rate.