Advertisement
dsiver144

DSI Status Menu v1.01

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