Advertisement
Talonos

Shanghai's Large Enemy Party

Apr 25th, 2011
961
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 9.10 KB | None | 0 0
  1. #===============================================================================
  2. #
  3. # Shanghai Simple Script - Large Enemy Party
  4. # Last Date Updated: 2010.06.22
  5. # Level: Hard
  6. #
  7. # This script allows you to have more than 8 enemies in a single troop party.
  8. # Unfortunately, since troops in the database don't have noteboxes, all of the
  9. # work needs to be done inside of the module.
  10. #===============================================================================
  11. # Instructions
  12. # -----------------------------------------------------------------------------
  13. # To install this script, open up your script editor and copy/paste this script
  14. # to an open slot below ▼ Materials but above ▼ Main. Remember to save.
  15. #
  16. # The instructions are difficult so pay attention if you know what's good for
  17. # you. Just like the introduction said, to add more enemies to your troops, you
  18. # must edit the module itself. They are worked as follows:
  19. #
  20. #   X => [  #------------------------------------------------------------------
  21. #           # Add your troops in between these lines
  22. #           # [Enemy ID, X Position, Y Position, Hidden, Immortal],
  23. #           #------------------------------------------------------------------
  24. #             [       2,         70,        240,  false,    false],
  25. #           #------------------------------------------------------------------
  26. #           # This ends Troop # 1.
  27. #        ], #------------------------------------------------------------------
  28. #
  29. # X is the troop ID in the database that you want to edit to have the extra
  30. # members in. If you look in the database and Slime*2 is the first item on the
  31. # list, then X is 1. If it is the fifth item on the list, then X is 5. Easy.
  32. #
  33. # Next, you'll have to edit this array. This array makes the new enemy.
  34. #
  35. #      [Enemy ID, X Position, Y Position, Hidden, Immortal],
  36. #
  37. # Enemy ID is the ID of the enemy, plain and simple. If you want a Rat added in
  38. # and its number in the database is 5, then the ID is 5.
  39. #
  40. # X Position and Y Position are the screen positions of the enemy on the screen.
  41. # The X Position is the horizontal position and the Y Position is the vertical
  42. # position. Far left is 0. Far right is 544. Top is 0 while bottom should be
  43. # 288 at most (you can go further, but that goes below the status window).
  44. #
  45. # Hidden and Immortal are the right click options you get in the troops editor.
  46. # Setting either of these to true or false will make the enemy hidden or
  47. # immortal. I strongly suggest you don't mess with these and leave them as false
  48. # unless you know what you're doing, because the only way to alter these in
  49. # battle would be through some rather complicated script calls.
  50. #
  51. # There, you have your first enemy done. If you want to add more, just make a
  52. # new line under it and add in another one of those arrays like this:
  53. #
  54. #      [Enemy ID, X Position, Y Position, Hidden, Immortal],
  55. #      [Enemy ID, X Position, Y Position, Hidden, Immortal],
  56. #
  57. # There, now you've added another new enemy. Do the same thing you did before
  58. # to change how you want the enemy to appear for the first and you're done. If
  59. # you still can't figure it out, follow the examples below.
  60. #
  61. # And a slight warning, the more enemies you add, the more likely there is going
  62. # to be lag in your game. This is not something I can fix.
  63. #===============================================================================
  64.  
  65. $imported = {} if $imported == nil
  66. $imported["LargeEnemyParty"] = true
  67.  
  68. module SSS
  69.   # This hash is the very core of setting up certain troops to have more than
  70.   # 8 members. Follow the examples below and you can add an unlimited amount of
  71.   # extra toops.
  72.   EXTRA_TROOPS ={
  73.   # ---------------------------------------------------------------------------
  74.     1 => [  #------------------------------------------------------------------
  75.             # Add your troops in between these lines
  76.             # [Enemy ID, X Position, Y Position, Hidden, Immortal],
  77.             #------------------------------------------------------------------
  78.               [       2,         70,        240,  false,    false],
  79.               [       3,        170,        240,  false,    false],
  80.               [       4,        270,        240,  false,    false],
  81.               [       5,        370,        240,  false,    false],
  82.               [       6,        470,        240,  false,    false],
  83.               [       7,        122,        200,  false,    false],
  84.               [       8,        222,        200,  false,    false],
  85.               [       9,        320,        200,  false,    false],
  86.               [      10,        422,        200,  false,    false],
  87.               [      11,         70,        160,  false,    false],
  88.               [      12,        170,        160,  false,    false],
  89.               [      13,        270,        160,  false,    false],
  90.               [      14,        370,        160,  false,    false],
  91.               [      15,        470,        160,  false,    false],
  92.             #------------------------------------------------------------------
  93.             # This ends Troop #1.
  94.          ], #------------------------------------------------------------------
  95.   # ---------------------------------------------------------------------------
  96.     2 => [  #------------------------------------------------------------------
  97.             # Add your troops in between these lines
  98.             # [Enemy ID, X Position, Y Position, Hidden, Immortal],
  99.             #------------------------------------------------------------------
  100.               [      20,         70,        240,  false,    false],
  101.               [      19,        170,        240,  false,    false],
  102.               [      18,        270,        240,  false,    false],
  103.               [      17,        370,        240,  false,    false],
  104.               [      16,        470,        240,  false,    false],
  105.               [      15,        122,        200,  false,    false],
  106.               [      14,        222,        200,  false,    false],
  107.               [      13,        320,        200,  false,    false],
  108.               [      12,        422,        200,  false,    false],
  109.             #------------------------------------------------------------------
  110.             # This ends Troop #2.
  111.          ], #------------------------------------------------------------------
  112.   # ---------------------------------------------------------------------------
  113.     3 => [  #------------------------------------------------------------------
  114.             # Add your troops in between these lines
  115.             # [Enemy ID, X Position, Y Position, Hidden, Immortal],
  116.             #------------------------------------------------------------------
  117.               [      10,         70,        240,  false,    false],
  118.               [      15,        170,        240,  false,    false],
  119.               [      20,        270,        240,  false,    false],
  120.               [      12,        370,        240,  false,    false],
  121.               [      14,        470,        240,  false,    false],
  122.             #------------------------------------------------------------------
  123.             # This ends Troop #3.
  124.          ], #------------------------------------------------------------------
  125.   # ---------------------------------------------------------------------------
  126.   } # Remove this and perish.
  127. end
  128.  
  129. #==============================================================================
  130. # RPG::Troop
  131. #==============================================================================
  132.  
  133. class RPG::Troop
  134.   #--------------------------------------------------------------------------
  135.   # * Members
  136.   #--------------------------------------------------------------------------
  137.   def members
  138.     return @members if @added_extra_members
  139.     @added_extra_members = true
  140.     return @members unless SSS::EXTRA_TROOPS.include?(@id)
  141.     new_members = SSS::EXTRA_TROOPS[@id]
  142.     for array in new_members
  143.       new_member = RPG::Troop::Member.new
  144.       new_member.enemy_id = array[0]
  145.       new_member.x = array[1]
  146.       new_member.y = array[2]
  147.       new_member.hidden = array[3]
  148.       new_member.immortal = array[4]
  149.       @members.push(new_member)
  150.     end
  151.     return @members
  152.   end
  153. end
  154.  
  155. #==============================================================================
  156. # ** Window_TargetEnemy
  157. #==============================================================================
  158.  
  159. unless $imported["BattleEngineMelody"]
  160. class Window_TargetEnemy < Window_Command
  161.   #--------------------------------------------------------------------------
  162.   # * Object Initialization
  163.   #--------------------------------------------------------------------------
  164.   def initialize
  165.     commands = []
  166.     @enemies = []
  167.     for enemy in $game_troop.members
  168.       next unless enemy.exist?
  169.       commands.push(enemy.name)
  170.       @enemies.push(enemy)
  171.     end
  172.     super(Graphics.width-128, commands, 2)
  173.     self.height = 128
  174.   end
  175. end
  176. end
  177.  
  178. #===============================================================================
  179. #
  180. # END OF FILE
  181. #
  182. #===============================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement