ProPixel Fórum
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

Seu mundo de criatividade!


Você não está conectado. Conecte-se ou registre-se

Nível dos Inimigos

2 participantes

Ir para baixo  Mensagem [Página 1 de 1]

1Nível dos Inimigos Empty Nível dos Inimigos Ter Jan 16, 2018 11:24 am

Reborn

Reborn
Ocasional

Trago a vocês aqui na ProPixel um script que permite que você defina níveis para inimigos e modefies suas estatísticas de acordo
Esse script faz com que as estatísticas dos inimigos aumentem com uma configuração de nível. O script permite aos usuários definir o nível do inimigo usando uma variável ou usando o nível mais alto na festa. Por padrão, é definido para adquirir o nível inimigo da variável com número de identificação 1.
O nível é definido por variável usando o código na linha 46 'return $ game_variables [ID]'.
O nível pode ser definido pelo nível do jogador usando o código na linha 49 'return $ game_party.max_level'.

Você pode baixar a pasta do projeto abaixo. Eu modifiquei as estatísticas base da maioria dos inimigos no banco de dados para dar-lhes estatísticas apropriadas para o nível 1. Observe que eu fiz cada grupo de monstros mais poderoso do que o último para que você tenha mooks fracos, mooks fortes, minibosses, & Patrões. Eu também modifiquei e adicionei tropas para que você possa encontrar misturas de inimigos; Você pode notar que, enquanto os inimigos de nível superior são mais fortes do que seus homólogos mais fracos, eles ainda podem ser combatidos em níveis mais baixos, dependendo do que você definir seu próprio nível. Eu também criei NPCs de chefe no mapa; Conversar com eles permitirá que você acesse todas as tropas do respectivo tipo de chefe (as tropas são agrupadas por tipo, por exemplo, Zombie + Ghost * 2).
Código:
#==============================================================================
# ** Enemy_Levels
#------------------------------------------------------------------------------
#  This class handles how enemies' statistics are affected by their
#  experience level. Level is set using the first variable.
#
#  Enemy levels are controlled by enemy_level.
#  Enemy levels can be set using a variable via the line 'return
#  $game_variables[1]' where '1' represents a variable with an ID of 1.
#  You may change the variable ID to whatever variable you wish to use,
#  just remember which variable you set it to!
#  Alternately, you can set the enemies to grow stronger with the player
#  via the line 'return $game_party.max_level'. The enemies' strength
#  will be determined by the level of the highest leveled actor in the
#  party.
#  Note that if 'return $game_variables[1]' and 'return
#  $game_party.max_level' are both active that it will default to
#  '$game variables' because it appears first. Remember to hide the line
#  that you're not using with a hash (#) so that the code will work right.
#  'return $game_party.max_level' is hidden by default meaning that
#  enemy levels are set by a variable by default. You can easily switch
#  methods by adding a hash to the start of line 46 and removing the hash
#  from line 49.
#
#  Feel free to alter the equations below to how you see fit. By default
#  the equation '(stat - 400) x level + 400' is used for MaxHP & MaxSP; the
#  equation '(stat - 30) x level + 30' is used for STR, DEX, AGI, & INT;
#  the equation 'stat + level' is used for ATK, PDEF, & MDEF; the equation
#  '(stat - (stat / 10)) x level + (stat / 10)' is used for EXP earned; and
#  the equation '(stat - 5) x level + 5' is used for gold earned. These
#  equations work well for the default enemies in the game. I've also taken
#  the liberty of adjusting the default stats of most of the enemies to
#  lower their stats to level 1 so that common enemies such as Cobolds don't
#  become overpowered by the level increase. Each tier of enemies (Ghost
#  through Angel, Zombie through Archangel, etc) has higher base stats than
#  the previous tier so that you can still encounter stronger enemies at the
#  same level as weaker enemies.
#==============================================================================

class Game_Enemy < Game_Battler
  #--------------------------------------------------------------------------
  # * Get Level Data
  #--------------------------------------------------------------------------
  def enemy_level
    #Set enemy level using a variable
    return $game_variables[1]
   
    #Set enemy level using party level
#    return $game_party.max_level
  end
  #--------------------------------------------------------------------------
  # * Get Basic Maximum HP
  #--------------------------------------------------------------------------
  def base_maxhp
    return ($data_enemies[@enemy_id].maxhp - 400) * enemy_level + 400
  end
  #--------------------------------------------------------------------------
  # * Get Basic Maximum SP
  #--------------------------------------------------------------------------
  def base_maxsp
    return ($data_enemies[@enemy_id].maxsp - 400) * enemy_level + 400
  end
  #--------------------------------------------------------------------------
  # * Get Basic Strength
  #--------------------------------------------------------------------------
  def base_str
    return ($data_enemies[@enemy_id].str - 30) * enemy_level + 30
  end
  #--------------------------------------------------------------------------
  # * Get Basic Dexterity
  #--------------------------------------------------------------------------
  def base_dex
    return ($data_enemies[@enemy_id].dex - 30) * enemy_level + 30
  end
  #--------------------------------------------------------------------------
  # * Get Basic Agility
  #--------------------------------------------------------------------------
  def base_agi
    return ($data_enemies[@enemy_id].agi - 30) * enemy_level + 30
  end
  #--------------------------------------------------------------------------
  # * Get Basic Intelligence
  #--------------------------------------------------------------------------
  def base_int
    return ($data_enemies[@enemy_id].int - 30) * enemy_level + 30
  end
  #--------------------------------------------------------------------------
  # * Get Basic Attack Power
  #--------------------------------------------------------------------------
  def base_atk
    return $data_enemies[@enemy_id].atk + enemy_level
  end
  #--------------------------------------------------------------------------
  # * Get Basic Physical Defense
  #--------------------------------------------------------------------------
  def base_pdef
    return $data_enemies[@enemy_id].pdef + enemy_level
  end
  #--------------------------------------------------------------------------
  # * Get Basic Magic Defense
  #--------------------------------------------------------------------------
  def base_mdef
    return $data_enemies[@enemy_id].mdef + enemy_level
  end
  #--------------------------------------------------------------------------
  # * Get EXP
  #--------------------------------------------------------------------------
  def exp_db
    return $data_enemies[@enemy_id].exp
  end
  def exp
    return (exp_db - (exp_db / 10)) * enemy_level + (exp_db / 10)
  end
  #--------------------------------------------------------------------------
  # * Get Gold
  #--------------------------------------------------------------------------
  def gold
    return ($data_enemies[@enemy_id].gold - 5) * enemy_level + 5
  end
end

2Nível dos Inimigos Empty Re: Nível dos Inimigos Sáb Jan 20, 2018 3:19 pm

JackOS

JackOS
Semi-Experiente

bom tutorial Reborn, sempre tentando levantar o fórum

Ir para o topo  Mensagem [Página 1 de 1]

Permissões neste sub-fórum
Não podes responder a tópicos