Ir a contenido

0

nivel de maestria


  • No puede responder a este tema
No hay respuestas a este tema

#1 DeathRPG

    Tercermundista 4evah!!

  • voidzonero
  • 787 Mensajes:
  • Interests:nuse...
  • Genero:Chico
  • Nivel maker: Crack
  • Especialidad: Guion

Publicado el 02 September 2006 - 02:39 PM

Descripción:
Con este script, según acumulas experiencia subirá, aparte del nivel normal, el Nivel de Maestría de los personajes. Cada nivel de maestría sube un cierto porcentaje a los parámetros de los personajes según esté indicado en el script.

Script:Inserta esto debajo de Game_Actor:
CODE
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# ? ??????????
#--------------------------------------------------------------------------
attr_reader :ap
attr_reader :mastery_level
#--------------------------------------------------------------------------
# define AP
#--------------------------------------------------------------------------
def ap
@ap = [[$game_variables[3], 9999].min, 0].max
return @ap
end
#--------------------------------------------------------------------------
# define mastery level
#--------------------------------------------------------------------------
def mastery_level
if @ap < 32 or nil
return 1
elsif @ap >= 32 and @ap < 74
return 2
elsif @ap >= 74 and @ap < 186
return 3
elsif @ap >= 186 and @ap < 324
return 4
elsif @ap >= 324 and @ap < 512
return 5
elsif @ap >= 512 and @ap < 747
return 6
elsif @ap >= 747 and @ap < 938
return 7
elsif @ap >= 938 and @ap < 1320
return 8
elsif @ap >= 1320 and @ap < 1860
return 9
elsif @ap >= 1860 and @ap < 2174
return 10
elsif @ap >= 2174 and @ap < 2512
return 11
elsif @ap >= 2512 and @ap < 3238
return 12
elsif @ap >= 3238 and @ap < 4174
return 13
elsif @ap >= 4174 and @ap < 5747
return 14
elsif @ap >= 5747 and @ap < 6938
return 15
elsif @ap >= 6938 and @ap < 7643
return 16
elsif @ap >= 7643 and @ap < 8128
return 17
elsif @ap >= 8128 and @ap < 8702
return 18
elsif @ap >= 9002 and @ap < 9999
return 19
elsif @ap == 9999
return 20
end
end
#----------------------------------------------------------------------------
# Ap to Mastery Level Up
#-----------------------------------------------------------------------------
def next_ap_s
if @ap >= 0 and @ap < 35
return @mastery_level > 0 [email protected]_ap.to_s : "35"
elsif @ap >= 35 and @ap < 74
return @mastery_level > 0 [email protected]_ap.to_s : "74"
elsif @ap >= 74 and @ap < 186
return @mastery_level > 0 [email protected]_ap.to_s : "186"
elsif @ap >= 186 and @ap < 324
return @mastery_level > 0 [email protected]_ap.to_s : "324"
elsif @ap >= 324 and @ap < 512
return @mastery_level > 0 [email protected]_ap.to_s : "512"
elsif @ap >= 512 and @ap < 747
return @mastery_level > 0 [email protected]_ap.to_s : "747"
elsif @ap >= 747 and @ap < 938
return @mastery_level > 0 [email protected]_ap.to_s : "938"
elsif @ap > 938 and @ap < 1320
return @mastery_level > 0 [email protected]_ap.to_s : "1320"
elsif @ap >= 1320 and @ap < 1860
return @mastery_level > 0 [email protected]_ap.to_s : "1860"
elsif @ap >= 1860 and @ap < 2174
return @mastery_level > 0 [email protected]_ap.to_s : "2174"
elsif @ap >= 2174 and @ap < 2512
return @mastery_level > 0 [email protected]_ap.to_s : "2512"
elsif @ap >= 2512 and @ap < 3238
return @mastery_level > 0 [email protected]_ap.to_s : "3238"
elsif @ap >= 3238 and @ap < 4174
return @mastery_level > 0 [email protected]_ap.to_s : "4174"
elsif @ap >= 4174 and @ap < 5747
return @mastery_level > 0 [email protected]_ap.to_s : "5747"
elsif @ap >= 5747 and @ap < 6938
return @mastery_level > 0 [email protected]_ap.to_s : "6938"
elsif @ap >= 6938 and @ap < 7643
return @mastery_level > 0 [email protected]_ap.to_s : "7643"
elsif @ap >= 7643 and @ap < 8128
return @mastery_level > 0 [email protected]_ap.to_s : "8128"
elsif @ap >= 8128 and @ap < 8702
return @mastery_level > 0 [email protected]_ap.to_s : "8702"
elsif @ap >= 9002 and @ap < 9999
return @mastery_level > 0 [email protected]_ap.to_s : "9999"
elsif @ap == 9999
return @mastery_level > 0 [email protected]_ap.to_s : "9999"
end
end
end


Coloca esto debajo de Game_Enemy
CODE
class Game_Enemy < Game_Battler
#--------------------------------------------------------------------------
# ? ????AP ???
#--------------------------------------------------------------------------
def plus_ap
str = $data_enemies[@enemy_id].str
mag = $data_enemies[@enemy_id].int
plus_ap = 0
if str >= mag
if str > 1 and str < 20
plus_ap = 1
elsif str >= 20 and str < 40
plus_ap = 2
elsif str >= 40 and str < 60
plus_ap = 3
elsif str >= 60 and str < 80
plus_ap = 4
elsif str >= 80 and str < 100
plus_ap = 5
elsif str >= 100 and str < 120
plus_ap = 6
elsif str >= 120 and str < 140
plus_ap = 7
elsif str >= 140 and str < 160
plus_ap = 8
elsif str >= 160 and str < 180
plus_ap = 10
elsif str >= 180 and str < 200
plus_ap = 12
elsif str >= 200 and str < 300
plus_ap = 15
elsif str >= 300
plus_ap = 20
end
elsif mag > str
if mag > 1 and mag < 20
plus_ap = 1
elsif mag >= 20 and mag < 40
plus_ap = 2
elsif mag >= 40 and mag < 60
plus_ap = 3
elsif mag >= 60 and mag < 80
plus_ap = 4
elsif mag >= 80 and mag < 100
plus_ap = 5
elsif mag >= 100 and mag < 120
plus_ap = 6
elsif mag >= 120 and mag < 140
plus_ap = 7
elsif mag >= 140 and mag < 160
plus_ap = 8
elsif mag >= 160 and mag < 180
plus_ap = 10
elsif mag >= 180 and mag < 200
plus_ap = 12
elsif mag >= 200 and mag < 300
plus_ap = 15
elsif mag >= 300
plus_ap = 20
end
end
return plus_ap
end
end


Añade esto a Window_Base:
CODE
def draw_actor_mastery_level(actor, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 32, 32, "M.Lv")
self.contents.font.color = normal_color
self.contents.draw_text(x + 20, y, 24, 32, actor.mastery_level.to_s, 2)
end

def draw_actor_ap(actor, x, y)
self.contents.font.color = system_color
self.contents.draw_text(x, y, 24, 32, "Ap")
self.contents.font.color = normal_color
self.contents.draw_text(x + 24, y, 84, 32, actor.ap.to_s, 2)
self.contents.draw_text(x + 108, y, 12, 32, "/", 1)
self.contents.draw_text(x + 120, y, 84, 32, actor.next_ap_s)
end


Reemplaza Window_BattleResult con:
CODE
#==============================================================================
# ¦ Window_BattleResult
#------------------------------------------------------------------------------
# ???????????? EXP ????????????????????
#==============================================================================

class Window_BattleResult < Window_Base
#--------------------------------------------------------------------------
# ? ?????????
# exp : EXP
# gold : ????
# treasures : ?????
#--------------------------------------------------------------------------
def initialize(exp, ap, gold, treasures)
@exp = exp
@ap = ap
@gold = gold
@treasures = treasures
super(160, 0, 320, @treasures.size * 32 + 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype # "Battle Result" window font
self.contents.font.size = $defaultfontsize
self.y = 160 - height / 2
self.back_opacity = 160
self.visible = false
refresh
end
#--------------------------------------------------------------------------
# ? ??????
#--------------------------------------------------------------------------
def refresh
self.contents.clear
x = 4
self.contents.font.color = normal_color
cx = contents.text_size(@exp.to_s).width
self.contents.draw_text(x, 0, cx, 32, @exp.to_s)
x += cx + 4
self.contents.font.color = system_color
cx = contents.text_size("Exp").width
self.contents.draw_text(x, 0, 64, 32, "Exp")
x += cx + 16
self.contents.font.color = normal_color
cx = contents.text_size(@ap.to_s).width
self.contents.draw_text(x, 0, cx, 32, @ap.to_s)
x += cx + 4
self.contents.font.color = system_color
cx = contents.text_size("Ap").width
self.contents.draw_text(x, 0, 64, 32, "Ap")
x += cx + 16
self.contents.font.color = normal_color
cx = contents.text_size(@gold.to_s).width
self.contents.draw_text(x, 0, cx, 32, @gold.to_s)
x += cx + 4
self.contents.font.color = system_color
self.contents.draw_text(x, 0, 128, 32, $data_system.words.gold)
y = 32
for item in @treasures
draw_item_name(item, 4, y)
y += 32
end
end
end


Por último, en Scene_Battle2 haz lo siguiente:

Debajo de:
QUOTE
def start_phase5
add the following after exp = 0

pon:
CODE
ap = 0
plus_ap = 0


Detrás de:
QUOTE
gold+= enemy.gold

pon:
pl
CODE
us_ap += enemy.plus_ap


Después de esto:
QUOTE
for enemy in $game_troop.enemies
# ??????????????
unless enemy.hidden
# ?? EXP????????
exp += enemy.exp
gold += enemy.gold
plus_ap += enemy.plus_ap
# ?????????
if rand(100) < enemy.treasure_prob
if enemy.item_id > 0
treasures.push($data_items[enemy.item_id])
end
if enemy.weapon_id > 0
treasures.push($data_weapons[enemy.weapon_id])
end
if enemy.armor_id > 0
treasures.push($data_armors[enemy.armor_id])
end
end
end
end

Pon esto:
CODE
if exp > 0
ap = (exp / (20 + exp/85) + 1 + plus_ap)
end
$game_variables[3] = $game_variables[3] + ap


Y reemplaza esto:
QUOTE
@result_window = Window_BattleResult.new(exp, gold, treasures)

Con:
CODE
@result_window = Window_BattleResult.new(exp, ap, gold, treasures)


Instrucciones:
:flecha: En la primera parte del script, puedes cambiar el [3] en
QUOTE
$game_variables[3]
por la variable que quieras usar. Recuerda no usar esa variable para nada más en tu proyecto, o el script no funcionará correctamente.
:flecha: Dentro de Game_Actor, añade esta ecuación a los parámetros que quieres cambiar, sin paréntesis. “+ ((“dentro de estos paréntesis copia la ecuación para el parámetro que quieres cambiar " * mastery_level)/ 4) “
Ejemplo:
QUOTE
def base_maxhp
return $data_actors[@actor_id].parameters[0, @level] + (($data_actors[@actor_id].parameters[0, @level] * mastery_level)/ 4)
end

:flecha: Puedes cambiar cuántos puntos se necesitan para adquirir el siguiente nivel de maestría, etc. Sólo cámbialo en el script.

Crédito:
Script posteado originalmente por neoanimus, no pone nada de crédito, pero yo lo daría por si las moscas. xDD