Advertisement
dsiver144

DSI Status Menu v1.02

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