Advertisement
dsiver144

DSI Status Menu v1.02

Jul 23rd, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.94 KB | None | 0 0
  1. #==============================================================================
  2. # DSI Status Menu v1.02
  3. # -- Last Updated: 2017.07.23
  4. # -- Author: dsiver144
  5. # -- Level: Easy
  6. # -- Requires: n/a
  7. #==============================================================================
  8. $imported = {} if $imported.nil?
  9. $imported["DSI-NewStatusMenu"] = true
  10. #==============================================================================
  11. # + Updates
  12. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  13. # 2017.07.23 - Finish first version.
  14. # - Fix not compatible with old save files.
  15. # - Add cancel SE.
  16. #==============================================================================
  17. # + Instructions
  18. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  19. # To install this script, open up your script editor and copy/paste this script
  20. # to an open slot below Materials but above Main. Remember to save.
  21. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  22. # Script call: SceneManager.call(Scene_NewStatusMenu) -> Open Status menu
  23. # + change_ass_image(filename)
  24. # + change_pussy_image(filename)
  25. # + change_breasts_image(filename)
  26. # + change_mouth_image(filename)
  27. # -> Use them to change image in squares to another one.
  28. #==============================================================================
  29. module DSIVER144
  30. module STATUS_MENU
  31.  
  32. Graphic_Path = "Graphics/Status Menu"
  33.  
  34. Main_status_var_id = 1
  35.  
  36. P_status_var_id = 20
  37. P_Status_Images = {}
  38. P_Status_Images[1] = "Status_P1"
  39. P_Status_Images[2] = "Status_P2"
  40.  
  41. Breasts_var_id = 61
  42. Oral_var_id = 62
  43. Vaginal_var_id = 63
  44. Anal_var_id = 64
  45.  
  46. Squares_Images = {}
  47. Squares_Images["Breasts"] = "Tits"
  48. Squares_Images["Mouth"] = "Mouth"
  49. Squares_Images["Ass"] = "Ass"
  50. Squares_Images["Pussy"] = "Pussy"
  51.  
  52. Spearm_Status = {} # Don't touch this line please
  53.  
  54. Spearm_Status["Sperm ABS"] = [121,"Status_S_Abs"] # [Switch ID, Pic Name]
  55. Spearm_Status["Sperm Chest"] = [122,"Status_S_Chest"]
  56. Spearm_Status["Sperm Face"] = [123,"Status_S_Face"]
  57. Spearm_Status["Sperm Legs"] = [124,"Status_S_Legs"]
  58. Spearm_Status["Sperm Lips"] = [125,"Status_S_Lips"]
  59. Spearm_Status["Sperm Mouth"] = [126,"Status_S_Mouth"]
  60. Spearm_Status["Sperm Nose"] = [127,"Status_S_Nose"]
  61. Spearm_Status["Sperm Pussy"] = [128,"Status_S_Pussy"]
  62.  
  63. Status_Images = {} # Don't touch this line please
  64.  
  65. Status_Images[100] = "Status_100"
  66. Status_Images[80] = "Status_80"
  67. Status_Images[60] = "Status_60"
  68. Status_Images[40] = "Status_40"
  69. Status_Images[20] = "Status_20"
  70. end # STATUS_MENU
  71.  
  72. end # DSIVER144
  73.  
  74. class Game_Interpreter
  75. #----------------------------------------------------------------------------
  76. # * new method: change_breasts_image
  77. #----------------------------------------------------------------------------
  78. def change_breasts_image(filename)
  79. $game_system.init_square_images if $game_system.ht_square_images.nil?
  80. $game_system.ht_square_images["Breasts"] = filename
  81. end
  82. #----------------------------------------------------------------------------
  83. # * new method: change_breasts_image
  84. #----------------------------------------------------------------------------
  85. def change_mouth_image(filename)
  86. $game_system.init_square_images if $game_system.ht_square_images.nil?
  87. $game_system.ht_square_images["Mouth"] = filename
  88. end
  89. #----------------------------------------------------------------------------
  90. # * new method: change_breasts_image
  91. #----------------------------------------------------------------------------
  92. def change_ass_image(filename)
  93. $game_system.init_square_images if $game_system.ht_square_images.nil?
  94. $game_system.ht_square_images["Ass"] = filename
  95. end
  96. #----------------------------------------------------------------------------
  97. # * new method: change_breasts_image
  98. #----------------------------------------------------------------------------
  99. def change_pussy_image(filename)
  100. $game_system.init_square_images if $game_system.ht_square_images.nil?
  101. $game_system.ht_square_images["Pussy"] = filename
  102. end
  103. end # Game_Interpreter
  104.  
  105. class Game_System
  106. include DSIVER144::STATUS_MENU
  107. attr_accessor :ht_square_images
  108. alias_method(:dsi_ht_square_images_init, :initialize)
  109. def initialize
  110. init_square_images
  111. dsi_ht_square_images_init
  112. end
  113. #----------------------------------------------------------------------------
  114. # * new method: init_square_images
  115. #----------------------------------------------------------------------------
  116. def init_square_images
  117. @ht_square_images = {}
  118. Squares_Images.each_pair do |key,filename|
  119. @ht_square_images[key] = filename
  120. end
  121. end
  122. end # Game_System
  123.  
  124. class Scene_NewStatusMenu < Scene_Base
  125. include DSIVER144::STATUS_MENU
  126. #----------------------------------------------------------------------------
  127. # * new method: start
  128. #----------------------------------------------------------------------------
  129. def start
  130. super
  131. create_sprites
  132. end
  133. #----------------------------------------------------------------------------
  134. # * new method: create_sprites
  135. #----------------------------------------------------------------------------
  136. def create_sprites
  137. @sprites = {}
  138. @sprites[:bg] = Sprite.new
  139. @sprites[:bg].bitmap = Cache.status("Menu_BG")
  140. @sprites[:bg].z = 0
  141. @sprites[:main] = Sprite.new
  142. case $game_variables[Main_status_var_id]
  143. when 0..20
  144. @sprites[:main].bitmap = Cache.status(Status_Images[20])
  145. when 21..40
  146. @sprites[:main].bitmap = Cache.status(Status_Images[40])
  147. when 41..60
  148. @sprites[:main].bitmap = Cache.status(Status_Images[60])
  149. when 61..80
  150. @sprites[:main].bitmap = Cache.status(Status_Images[80])
  151. when 81..100
  152. @sprites[:main].bitmap = Cache.status(Status_Images[100])
  153. end
  154. @sprites[:main].z = 5
  155. @sprites[:p_status] = Sprite.new
  156. @sprites[:p_status].z = 6
  157. case $game_variables[P_status_var_id]
  158. when 1
  159. @sprites[:p_status].bitmap = Cache.status(P_Status_Images[1])
  160. when 2
  161. @sprites[:p_status].bitmap = Cache.status(P_Status_Images[2])
  162. end
  163. if $game_system.ht_square_images
  164. $game_system.ht_square_images.each_pair do |key,filename|
  165. @sprites[key.to_sym] = Sprite.new
  166. @sprites[key.to_sym].z = 6
  167. @sprites[key.to_sym].bitmap = Cache.status(filename)
  168. end
  169. else
  170. $game_system.init_square_images
  171. $game_system.ht_square_images.each_pair do |key,filename|
  172. @sprites[key.to_sym] = Sprite.new
  173. @sprites[key.to_sym].z = 6
  174. @sprites[key.to_sym].bitmap = Cache.status(filename)
  175. end
  176. end
  177. @sprites[:outline] = Sprite.new
  178. @sprites[:outline].bitmap = Cache.status("Squares_Outline")
  179. @sprites[:outline].z = 7
  180. @sprites[:square_var] = Sprite.new
  181. @sprites[:square_var].bitmap = Bitmap.new(Graphics.width,Graphics.height)
  182. @sprites[:square_var].bitmap.font.name = ['Franklin Gothic Heavy']
  183. @sprites[:square_var].z = 8
  184. coors = [[175,78,Breasts_var_id],[520,10,Oral_var_id],[175,330,Vaginal_var_id],[522,250,Anal_var_id]]
  185. coors.each do |pos|
  186. value = $game_variables[pos[2]]
  187. @sprites[:square_var].bitmap.draw_text(pos[0],pos[1],200,24,value)
  188. end
  189. Spearm_Status.each_pair do |key,status|
  190. if $game_switches[status[0]]
  191. @sprites[key.to_sym] = Sprite.new
  192. @sprites[key.to_sym].bitmap = Cache.status(status[1])
  193. @sprites[key.to_sym].z = 7
  194. end
  195. end
  196. end
  197. #----------------------------------------------------------------------------
  198. # * new method: update
  199. #----------------------------------------------------------------------------
  200. def update
  201. super
  202. if Input.trigger?(:B)
  203. Sound.play_cancel
  204. return_scene
  205. end
  206. end
  207. #----------------------------------------------------------------------------
  208. # * new method: terminate
  209. #----------------------------------------------------------------------------
  210. def terminate
  211. super
  212. @sprites.values.each do |sprite|
  213. sprite.bitmap.dispose if sprite.bitmap
  214. sprite.dispose
  215. end
  216. end
  217. end # Scene_NewStatusMenu
  218.  
  219. module Cache
  220. #--------------------------------------------------------------------------
  221. # * Get Status Graphic
  222. #--------------------------------------------------------------------------
  223. def self.status(filename)
  224. load_bitmap(DSIVER144::STATUS_MENU::Graphic_Path+"/",filename)
  225. end
  226. end # Cache
  227.  
  228. class Scene_Menu
  229. #----------------------------------------------------------------------------
  230. # * new method: command_status
  231. #----------------------------------------------------------------------------
  232. def command_status
  233. SceneManager.call(Scene_NewStatusMenu)
  234. end
  235. end # Scene_Menu
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement