Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Random Namer 1.0
- # 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 ENEMY_NAMES 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!!!
- # The following hash is used to store enemy ids. These are enemies which will
- # be given random names upon encounter. Any id left out of the hash, will
- # resort back to the default way of creating names.
- ENEMY_NAMES = {#<<<<Don't delete this!
- 1 => ["Riccochet", "Weevil", "Badgeler", "Drollamere", "Skontz", "Rofford"],
- 2 => ["Mynx", "Evlighar", "Rhynecold", "Beegun", "Wishwar", "Foster"],
- 3 => ["Cryltagin", "Smutz", "Girghahk", "Brutchmoor", "Leinagogus"],
- 4 => ["Spash", "Mumlegodeen", "Smarzwhack", "Eildrew"],
- 5 => ["Kurtresimo", "Urd", "Kuuma", "Dranylvin", "Shmodtoker", "Rhankbreem"],
- 6 => ["Brokdaitos", "Skeem", "Pladakhar", "Mynutsk", "Implig"],
- 7 => ["Dwaveer", "Shuck", "Penpacali", "Domerbron", "Bread", "Cashigu"],
- 8 => ["Lemplig", "Vaskway", "Armskot", "Trumidge", "Clobernotes"],
- 9 => ["Diveque", "Hajku", "Everszway", "Aloom", "Cudolf"],
- 10 => ["Yeq", "Harf", "Ruk", "Stok", "Erk"]
- }#<<<<<Don't delete this!
- # This constant boolean reflects how you want the names to be displayed.
- # If this is set to false, the name will be displayed as JUST the random name.
- # If true, it will add the random name, following the actual name of the enemy.
- # Like this "Bat Freddy".
- SPECIES_PLUS_NAME = false
- # This constant is used to replace the old "An Enemy Emerged" that is displayed
- # on the outset of any battle with a new string, using the ENEMY NAMES.
- USE_NEW_EMERGED = true
- end
- #===============================================================================
- # END CONFIGURATION SECTION
- ################################################################################
- #===============================================================================
- ################################################################################
- # Game Enemy
- ################################################################################
- class Game_Enemy < Game_Battler
- include RandomNamer
- alias rn_ge_name name unless $@
- def name
- enkeys = ENEMY_NAMES.keys
- ranname = ENEMY_NAMES[@enemy_id].size - 1
- if enkeys.include?(@enemy_id)
- if SPECIES_PLUS_NAME
- return @original_name + " " + ENEMY_NAMES[@enemy_id][rand(ranname)]
- else
- return ENEMY_NAMES[@enemy_id][rand(ranname)]
- end
- else
- rn_ge_name
- 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
- #===============================================================================
- ################################################################################
- # Game Troop
- ################################################################################
- class Game_Troop < Game_Unit
- include RandomNamer
- alias rn_gt_enemy_names enemy_names unless $@
- def enemy_names
- if USE_NEW_EMERGED
- names = []
- for enemy in members
- names.push(enemy.name)
- end
- return names
- else
- rn_gt_enemy_names
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement