neutale

Random Rename

Sep 29th, 2018
719
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 2.67 KB | None | 0 0
  1. #==============================================================================
  2. # RGSS3 Random Rename for Actor Ver1.01
  3. #==============================================================================
  4. =begin
  5.  
  6.   Author:ぷり娘 (prico)
  7. web site:Sister's Eternal 4th(Ancient)
  8.      URL:http://pricono.whitesnow.jp/
  9. Permission to use: Not required, but please mention in the game, Readme, etc.
  10.  
  11. There's a way to randomly change the name of the actor.
  12. It's done through event command → script
  13. You can randomly name the actor from the name list below.
  14.  
  15. ChangeNameMale(X)
  16. Will randomly assign male name to actor ID specified with X.
  17. For X, specify the actor ID (number to the left of the actor's name)
  18.  
  19. Example:ChangeNameMale(3)
  20. Will randomly give the male name to actor #3 from database.
  21.  
  22. ChangeNameFemale(X)
  23. Will randomly assign a female name to actor ID specified by X.
  24. For X, specify the actor ID (number to the left of the actor's name)
  25.  
  26. Example:ChangeNameFemale(7)
  27. Will randomly give the female name to actor #7 from database.
  28.  
  29. Also, if you put a variable ($game_variables[variable ID]) in X
  30. You can change the name of the actor whose number is (variable ID)
  31.  
  32. ※I did not check for duplicates
  33.  
  34. 2014.04.29  Fixed description, script remain unchanged
  35. 2013.04.15  Ver1.01 Fixed a bug where female name assigned as male name
  36. 2012.12.06  Ver1.00 Initial release
  37. =end
  38.  
  39. #==============================================================================
  40. # Name list, feel free to add on/ modify however you like
  41. #==============================================================================
  42. module Prico
  43.   #male name
  44.   NameDB_Male = [
  45.   "Alex",
  46.   "Bryan",
  47.   "Enryuu",
  48.   "Falcon",
  49.   "Gomez",
  50.   "Zack",
  51.   "Albert",
  52.   "Burns",
  53.   "Klaus",
  54.   "Arthur"
  55.   ]
  56.  
  57.   #female name
  58.   NameDB_Female = [
  59.   "Carol",
  60.   "Daisy",
  61.   "Helen",
  62.   "Erdith",
  63.   "Fey-Lin",
  64.   "Alyssa",
  65.   "Mia",
  66.   "Elene",
  67.   "Cynthia",
  68.   "Melissa"
  69.   ]
  70. end
  71.  
  72. #==============================================================================
  73. # ■ Game_Interpreter
  74. #------------------------------------------------------------------------------
  75. # Game interpreter that executes event commands. This is Game_Map class,
  76. # Game_Troop class, used inside Game_Event class.
  77. #==============================================================================
  78. class Game_Interpreter
  79.   #change male name
  80.   def ChangeNameMale(actor_id)
  81.     @name = Prico::NameDB_Male[rand(Prico::NameDB_Male.size)]
  82.     $game_actors[actor_id].name = @name
  83.   end
  84.  
  85.   #change female name
  86.   def ChangeNameFemale(actor_id)
  87.     @name = Prico::NameDB_Female[rand(Prico::NameDB_Female.size)]
  88.     $game_actors[actor_id].name = @name
  89.   end
  90. end
Advertisement
Add Comment
Please, Sign In to add comment