Neko Fondateur
Messages : 184 Date d'inscription : 14/07/2013 Age : 25 Localisation : Ici, la plupart du temps.
| Sujet: VX - Noms Aléatoires Mar 30 Juil - 23:30 | |
| VX - Noms AléatoiresAuteur : Ixfuru Description du script :Une fois installé en dessous de Main, lorsque vous lancez un nouevelle partie, le script va automatiquement choisir de manière aléatoire un nom pour les PNJ's, le Héros... - Code:
-
# Random Namer # By: Ixfuru # 9/1/12 ################################################################################
# This script renames actors and enemies with a script call.
# $game_actors[x].random_male_actor_name # or # $game_actors[x].random_female_actor_name
# Or you can replace $game_actors[x], with $game_party.members[x] to name the # member in the party in the x position. 0 is the leader.
# Replace x with actor's id from the database. Replace string with whatever # you wish to rename the actor. # Troop names will be changed automatically based on random enemy names # you supply. # # To change the original database name of the enemy, you'll need to set # up the RANDOM_ENEMY_NAME hash in the configuration section. ################################################################################
# Place above Main, below materials. # Credit Ixfuru ################################################################################
# CONFIGURATION SECTION #===============================================================================
module RandomNamer ACTOR_MALE_NAMES = [#<<<Don't be deleting this! "Illusio", "Mongraneer", "Vestucius", "Dogram", "Hashbicayo", "Mikael", "Stoltz", "Myron", "Baxter", "Handance", "Rinton", "Mavery", "Dooblyn", "Skyche", "Rex", "Bando" ]#<<<<Don't be deleting this either! ACTOR_FEMALE_NAMES = [#Don't delete this! "Shy", "Vola", "Geshnali", "Raishelle", "Erva", "Scarlet", "Heather", "Roma", "Tempest", "Roxanne", "Vera", "Lacy", "Katherine", "Maricela" ]#<<<<<Don't be deleting this one!!! TROOP_NAMES = [#<<<<Don't do it! "Riccochet", "Weevil", "Badgeler", "Drollamere", "Skontz", "Rofford", "Mynx", "Evlighar", "Rhynecold", "Beegun", "Wishwar", "Foster", "Cryltagin", "Smutz" ]#<<<Back off! #The following array is used to store enemy ids. These are enemies, # which will be given random name from onset of the game when they are first # created. Just place their database ids in the array. ENEMY_NAMES = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] end
#===============================================================================
# END CONFIGURATION SECTION ################################################################################
module RPG class Enemy include RandomNamer alias rn_rpge_initialize initialize unless $@ def initialize rn_rpge_initialize for enemy in TROOP_NAMES TROOP_NAMES.include?($data_enemies[enemy]) new_name = rand(TROOP_NAMES.size - 1) @name = TROOP_NAMES[new_name] end end end end
#===============================================================================
################################################################################
# !!!overwrites the make_unique_names method!!! ################################################################################
class Game_Troop include RandomNamer def make_unique_names for enemy in members next unless enemy.exist? next unless TROOP_NAMES.empty? n = @names_count[enemy.original_name] n = 0 if n == nil enemy.letter = TROOP_NAMES[n % TROOP_NAMES.size] @names_count[enemy.original_name] = n + 1 end for enemy in members n = @names_count[enemy.original_name] n = 0 if n == nil enemy.plural = true if n >= 2 end end end
#===============================================================================
################################################################################
class Game_Actor < Game_Battler include RandomNamer def random_male_actor_name rn = ACTOR_MALE_NAMES.size new_name = rand(rn - 1) @name = ACTOR_MALE_NAMES[new_name] end def random_female_actor_name rn = ACTOR_FEMALE_NAMES.size new_name = rand(rn - 1) @name = ACTOR_FEMALE_NAMES[new_name] end end | |
|