Advertisement
TheSixth

Biography Scene + Morality System by Sixth

Sep 2nd, 2015
2,603
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 64.59 KB | None | 0 0
  1. #===============================================================================
  2. # * [ACE] Biography Scene + Morality System
  3. #===============================================================================
  4. # * Made by: Sixth (www.rpgmakervxace.net, www.forums.rpgmakerweb.com)
  5. # * Version: 1.3
  6. # * Updated: 22/01/2015
  7. # * Requires: -------
  8. #-------------------------------------------------------------------------------
  9. # * < Change Log >
  10. #-------------------------------------------------------------------------------
  11. # * Version 0.1 (16/01/2015)
  12. #   - Initial release (Alpha version).
  13. # * Version 1.0 (18/01/2015)
  14. #   - Full version release.
  15. # * Version 1.1 (20/01/2015)
  16. #   - Added multiple pages for the biography data.
  17. #     Pages can be toggled on the Biography scene. Infinite pages available!
  18. #     New script calls for adding or deleting any page from the biography data.
  19. # * Version 1.2 (20/01/2015)
  20. #   - Prevented every crash issue which could happen with the biography pages.
  21. #   - A page will only be added to the biography if there is no page in the
  22. #     current biography like the page entered into the script call!
  23. #     This means that there is no chance to get duplicates!
  24. #   - A page will only be deleted if there is at least 1 page left in the
  25. #     biography after the deletion of the page! This means that there will
  26. #     always be at least 1 page in the biography!
  27. # * Version 1.3 (22/01/2015)
  28. #   - Added a new option to set the starting page of the biography.
  29. #-------------------------------------------------------------------------------
  30. # * < Description >
  31. #-------------------------------------------------------------------------------
  32. # * This script makes a Biography scene for your game.
  33. #   The Biography shows various information about the selected actors.
  34. # * This script will also add a morality status for your actors.
  35. #   I say morality, but it can be used for anything you want for.
  36. # * The following data is available to be shown on the Biography scene:
  37. #   - The actor's name, nickname, class, level, XP, HP, MP, TP and state info.
  38. #   - Aside from the above default data, you can setup 5 custom text to be shown
  39. #     for each actor. In the sample settings, I named them age, gender, weight,
  40. #     height and the last one I used to show the actor's full name.
  41. #   - Of course, you can write a fully customizable biography text for each
  42. #     actor too. And from v1.1, you can even have multiple pages for your
  43. #     biography data! Yayy!
  44. #   - Two custom pictures can be shown for each actors.
  45. #   - And the last one: the morality data. This comes with a unique gauge which
  46. #     goes in two directions (left and right). The middle of the bar represents
  47. #     neutrality, the left side of the gauge represents evil alignment, and the
  48. #     right side of the bar represents good alignment. These are just examples,
  49. #     it can be setup to be a faction alignment, a Love/Hate meter, etc.
  50. #     Use your imagination!
  51. # * All of the data shown is optional! Any of them can be turned off easily in
  52. #   the script's settings.
  53. # * Ability to use images for the scene!
  54. #   You can build up the visuals of the scene with images too.
  55. #   Infinite amount of images can be set up for the scene!
  56. # * Script calls to change the actor's portrait, custom picture, biography text
  57. #   and morality points during the game!
  58. # * Script call to check for the actor's morality points!
  59. #   Script call to check for the party's total morality level!
  60. # * Tons of settings to configure!
  61. #   Make your own unique scene however you want to!
  62. #-------------------------------------------------------------------------------
  63. # * < Script Calls >
  64. #-------------------------------------------------------------------------------
  65. # * To call the Biography scene in an event, you can use the following script
  66. #   call:
  67. #
  68. #     SceneManager.call(Scene_SBio)
  69. #
  70. #   This will open the Biography scene.
  71. #- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  72. # * To change the biography text for an actor during the game, you can use the
  73. #   following script call:
  74. #
  75. #     bio_change(id,[text],page)
  76. #
  77. #   id = The ID of the actor.
  78. #   [text] = An array of strings. The strings are separated by commas!
  79. #            Follows the same rules like the initial bio_text setup!
  80. #   page = The specific biography page to be changed.
  81. #          If you omit this setting, the new text will be added as a new page
  82. #          and won't change any other pages in the biography.
  83. #- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  84. # * To delete a biography page for an actor during the game, you can use the
  85. #   following script call:
  86. #
  87. #     bio_delete(id,page)
  88. #
  89. #   id = The ID of the actor.
  90. #   page = The specific biography page to be deleted.
  91. #          If you omit this setting, the last page will be deleted from the
  92. #          biography.
  93. #- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  94. # * To change the portrait for an actor during the game, you can use the
  95. #   following script call:
  96. #
  97. #     port_change(id,pic)
  98. #
  99. #   id = The ID of the actor.
  100. #   pic = The name of the image file used for the new portrait.
  101. #- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  102. # * To change the custom picture for an actor during the game, you can use the
  103. #   following script call:
  104. #
  105. #     pic_change(id,pic,index)
  106. #
  107. #   id = The ID of the actor.
  108. #   pic = The name of the image file used for the new actor pic.
  109. #   index = The index for the new actor pic used.
  110. #- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  111. # * To add/subtract morality points for an actor, you can use the following
  112. #   script call:
  113. #
  114. #     moral_add(id,val)
  115. #
  116. #   id = The ID of the actor.
  117. #   val = The amount of morality points to be added or subtracted.
  118. #         Use negative values to subtract points!
  119. #- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  120. # * To set morality points to a specific value for an actor, you can use the
  121. #   following script call:
  122. #
  123. #     moral_set(id,val)
  124. #
  125. #   id = The ID of the actor.
  126. #   val = The value you want to set the morality of the actor to.
  127. #- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  128. # * To check for an actor's current morality level, you can use the following
  129. #   script call:
  130. #
  131. #     check_moral(id,val,type)
  132. #
  133. #   id = The ID of the actor.
  134. #   val = The value of the morality level you want to check for.
  135. #   type = The type of the check. Valid options available: :pos, :neg, :equ.
  136. #          :pos = The check will return true if the actor has equal or more
  137. #                 morality points than the value you check for.
  138. #          :neg = The check will return true if the actor has equal or less
  139. #                 morality points than the value you check for.
  140. #          :equ = The check will return true if the actor's morality points are
  141. #                 equal with the value you check for.
  142. #- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  143. # * To check for the party's total morality level, you can use the following
  144. #   script call:
  145. #
  146. #     check_party_moral(val,type,type2)
  147. #
  148. #   val = The value of the morality level you want to check for.
  149. #   type = The type of check. Valid options available: :pos, :neg, :equ.
  150. #          This means the same as for the above script call.
  151. #   type2 = You can set 2 values here: :all or :battle.
  152. #           :all = This check will include all party members in the calculation.
  153. #        :battle = Only the battle members will be counted in the calculation.
  154. #           If you omit this setting, :all will be selected by default.
  155. #- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  156. # * Examples:
  157. #
  158. #     bio_change(2,["text1 - 1st line.",
  159. #                   "text2 - 2nd line.",
  160. #                   "text3 - 3rd line."])
  161. #
  162. #   This would change the biography text used for the actor with the ID of 2.
  163. #   The new biography text would look like this on the scene:
  164. #   text1 - 1st line.
  165. #   text2 - 2nd line.
  166. #   text3 - 3rd line.
  167. #   This text would go into a new page in the biography data.
  168. #
  169. #     bio_change(2,["text1 - 1st line.",
  170. #                   "text2 - 2nd line.",
  171. #                   "text3 - 3rd line."],3)
  172. #
  173. #   This would do the same as the above, but instead of creating a new page, it
  174. #   would replace the 3rd page with the new text for the actor with the ID of 2.
  175. #
  176. #     bio_delete(1,2)
  177. #
  178. #   This would delete the second page from the biography for the actor with the
  179. #   ID of 2.
  180. #
  181. #     bio_delete(3)
  182. #
  183. #   This would delete the last page from the biography for the actor with the
  184. #   ID of 3.
  185. #
  186. #     port_change(3,"actor3port1")
  187. #
  188. #   This would change the portrait used for the actor with the ID of 3.
  189. #   The new portrait's file name is: actor3port1.
  190. #   The file name must be enclosed between quotation marks!
  191. #
  192. #     pic_change(1,"actor2",6)
  193. #
  194. #   This would change the pic picture used for the actor with the ID of 1.
  195. #   The new pic picture's file name is: actor2.
  196. #   The file name must be enclosed between quotation marks!
  197. #   The index will determine which picture will be used from the sheet.
  198. #   The index of 6 will take the 3rd picture from the bottom row.
  199. #   More info about the sheet can be found below at the scripts settings!
  200. #
  201. #     moral_add(2,12)     moral_add(3,-32)
  202. #
  203. #   The 1st call would add 12 morality points to the actor with the ID of 2.
  204. #   The 2nd call would subtract 32 morality points from the actor with the ID of 3.
  205. #
  206. #     moral_set(4,100)
  207. #
  208. #   This would set the morality points for the actor with the ID of 4 to 100.
  209. #
  210. #     check_moral(1,50,:pos)
  211. #
  212. #   This conditional check would return true if the actor with the ID of 1 has
  213. #   equal or more morality points than 50.
  214. #
  215. #     check_moral(1,-40,:neg)
  216. #
  217. #   This conditional check would return true if the actor with the ID of 1 has
  218. #   equal or less morality points than -40.
  219. #
  220. #     check_moral(1,-100,:equ)
  221. #
  222. #   This conditional check would return true if the actor with the ID of 1 has
  223. #   exactly -100 morality points.
  224. #
  225. #     check_party_moral(50,:pos,:all)
  226. #
  227. #   This checks if the party's total morality points added up is higher than 50.
  228. #   If it is, it returns true.
  229. #-------------------------------------------------------------------------------
  230. # * < Installation >
  231. #-------------------------------------------------------------------------------
  232. # * Place this script below Materials but above Main!
  233. #-------------------------------------------------------------------------------
  234. # * < Compatibility Info >
  235. #-------------------------------------------------------------------------------
  236. # * No known incompatibilities.
  237. #-------------------------------------------------------------------------------
  238. # * < Known Issues >
  239. #-------------------------------------------------------------------------------
  240. # * No known issues.
  241. #-------------------------------------------------------------------------------
  242. # * < Terms of Use >
  243. #-------------------------------------------------------------------------------
  244. # * Free to use for whatever purposes you want.
  245. # * Credit me (Sixth) in your game, pretty please! :P
  246. # * Posting modified versions of this script is allowed as long as you notice me
  247. #   about it with a link to it!
  248. #===============================================================================
  249. $imported = {} if $imported.nil?
  250. $imported["SixthBiography"] = true
  251. #===============================================================================
  252. # Settings:
  253. #===============================================================================
  254. # Basic notes:
  255. #
  256. # The color settings:
  257. #
  258. # You have two ways to setup every color options used for any settings:
  259. #   1. If you enter a single number for them, the color will be taken from your
  260. #      windowskin directly from the color palette.
  261. #   2. If you enter an array, the direct RGB values will be used to determine
  262. #      the color. The array must contain 4 numbers separated by commas, and they
  263. #      represent RGBA values with 'A' being the opacity level!
  264. #      Valid values for this range from 0 to 255 for each numbers!
  265. #      A simple example: [255,255,255,255] <-- This is fully white!
  266. #
  267. # The font type settings:
  268. #
  269. # In any font type setup in the script, you must use an array with font type
  270. # names in it. The font types must be separated by commas! These will be the
  271. # font types for the setting you have configured. If the system can't find the
  272. # 1st font type installed on the player's PC, it will look for the 2nd one. If
  273. # the system can't find the 2nd one, it will look for the 3rd one on the list,
  274. # and so on... You can setup as many font types for a setting as you want!
  275. # It is recommended to setup at least 2 text types for these settings!
  276. #===============================================================================
  277. module Sixth_Actor_Bio
  278. #===============================================================================
  279. # System Settings:
  280. #===============================================================================
  281. # Set various system options up for your Biography scene here.
  282. #===============================================================================
  283.  
  284.   # System folders for images used in the scene.
  285.   # The first one is for the backgrounds.
  286.   # The second one is for every other pictures for the actors (pics, portraits).
  287.   # You can use the same folders for them if you wish.
  288.   BioImg_Folder = "Graphics/Biography/System/"
  289.   ActorImgFolder = "Graphics/Biography/Actors/"
  290.  
  291.   # Buttons used to trigger various events on the Biography scene.
  292.   Button_Setup = { # <-- No touchy-touchy!
  293.     :exit => :B,      # Button for exiting the menu.
  294.     :prev => :LEFT,   # Button to switch to the previous actor.
  295.     :next => :RIGHT,  # Button to switch to the next actor.
  296.     :bio_prev => :L,  # Button to switch to the previous biography page.
  297.     :bio_next => :R,  # Button to switch to the next biography page.
  298.   } # <-- No touchy-touchy!
  299.  
  300.   # Sound settings.
  301.   # Format:
  302.   # :name => RPG::SE.new("file name",volume,pitch),
  303.   Sound_Setup = { # <-- No touchy-touchy!
  304.     :change => RPG::SE.new("Cursor2",  80, 100), # When switching actors.
  305.     :exit =>   RPG::SE.new("Cancel2",  80, 100), # Upon exiting the scene.
  306.     :change_bio => RPG::SE.new("Book2",  80, 100), # When switching bio pages.
  307.   } # <-- No touchy-touchy!
  308.  
  309.   # You can set on which page will your biography start when you open the scene.
  310.   # Two options are available:
  311.   # 1. :newest = The biography will always start on the last page added.
  312.   # 2. :first = The biography will always start on the first page.
  313.   Bio_StartPage = :newest
  314.  
  315. #===============================================================================
  316. # Page Indicator Settings:
  317. #===============================================================================
  318. # Setup the page indicator's properties here.
  319. #
  320. # Use 0 for the icon ID settings to disable icons.
  321. # Use "" for the text settings to disable the texts.
  322. #
  323. # Page_Indicator is the previous/next actor indicator in the :title window.
  324. # Page_Indicator2 is the biography page indicator in the :bio window.
  325. #
  326. # The prev/next actor indicator will show 2 configurable icons and
  327. # configurable 2 texts.
  328. # The biography page indicator will always show the currently selected page's
  329. # number as well as 2 configurable icons.
  330. #===============================================================================
  331.   Page_Indicator = { # <-- No touchy-touchy!
  332.     :icon1 => 588,  # Icon ID for the left icon.
  333.     :icon2 => 589,  # Icon ID for the right icon.
  334.     :ipos1 => [5,2],                 # Position for the left icon (x,y).
  335.     :ipos2 => [Graphics.width-53,2], # Position for the right icon (x,y).
  336.     :txt1 => "Prev Actor",  # Text for the left icon.
  337.     :txt2 => "Next Actor",  # Text for the right icon.
  338.     :tpos1 => [0,24],                 # Text position for the left side (x,y).
  339.     :tpos2 => [Graphics.width-87,24], # Text position for the right side (x,y).
  340.     :size => [120,24],           # Size reserved for the texts (width,height).
  341.     :font => [["Arial"],16,17],  # Font type, size and color for the texts.
  342.   } # <-- No touchy-touchy!
  343.  
  344.   Page_Indicator2 = { # <-- No touchy-touchy!
  345.     :icon1 => 630,  # Icon ID for the left icon.
  346.     :icon2 => 631,  # Icon ID for the right icon.
  347.     :ipos1 => [100,291], # Position for the left icon (x,y).
  348.     :ipos2 => [180,291], # Position for the right icon (x,y).
  349.     :tpos => [124,291], # Text position for the left side (x,y).
  350.     :size => [56,24],           # Size reserved for the texts (width,height).
  351.     :font => [["Arial"],18,17],  # Font type, size and color for the texts.
  352.   } # <-- No touchy-touchy!
  353.  
  354. #===============================================================================
  355. # Menu Command Settings:
  356. #===============================================================================
  357. # Set the properties of the command button in the main menu here.
  358. #
  359. # Extra note:
  360. #
  361. # For people using Yanfly's Menu Engine, you can simply disable the Menu_Enable
  362. # option here and do the following in Yanfly's script:
  363. #
  364. # Insert the following into the COMMANDS array setup anywhere you want the menu
  365. # to show up:
  366. #
  367. #   :biography
  368. #
  369. # Insert the following into the CUSTOM_COMMANDS array setup anywhere you want:
  370. #
  371. #   :biography => ["Biography", 0, 0, :command_biography],
  372. #
  373. # Configure the line above to your liking. Refer to the instructions in
  374. # Yanfly's script for the configuration options of that line. The command must
  375. # remain :biography and the handler must remain :command_biography !
  376. #===============================================================================
  377.   # Enable/disable the menu button for the Biography here.
  378.   Menu_Enable = true
  379.  
  380.   # Name of the Biography command in the main menu.
  381.   Menu_Name = "Profile"
  382.  
  383.   # Hide/show the Biography command with the switch setup here.
  384.   # Set it to 0 to always show the command.
  385.   Menu_Hide_Switch = 0
  386.  
  387.   # Enable/disable the access of the Biography with the switch setup here.
  388.   # Set it to 0 to always enable the access.
  389.   Menu_Enable_Switch = 0
  390.  
  391. #===============================================================================
  392. # Background Settings:
  393. #===============================================================================
  394. # You can setup unlimited amount of backgrounds for your Biography scene.
  395. #
  396. # Format:
  397. #
  398. #   :name => {
  399. #     :graphic: => "image name",
  400. #     :pos => [x,y],
  401. #     :opacity => value, # 0 = transparent, 255 = no transparency at all.
  402. #     :z => value,
  403. #   },
  404. #
  405. # If you give the same z value to all of your backgrounds, than the backgrounds
  406. # will be drawn on top of each other starting from the first one in the setup.
  407. # You can name them however you want, but the name must be a symbol and they
  408. # must use unique names, meaning no duplicates!
  409. # Symbols start with a ":" sign.
  410. #
  411. # If you don't want any backgrounds, remove every setup from the hash, but make
  412. # sure to leave the lines marked untouched!
  413. #===============================================================================
  414.   Background_Setup = { # <-- No touchy-touchy!
  415. #~     :back1 => {
  416. #~       :graphic => "actors background full1",
  417. #~       :pos => [0,0],
  418. #~       :opacity => 255,
  419. #~       :z => 50,
  420. #~     },
  421.     # Add more backround setups here if you want!
  422.   } # <-- No touchy-touchy!
  423.  
  424. #===============================================================================
  425. # Window Settings:
  426. #===============================================================================
  427. # This is where you will setup the properties of each windows on the scene.
  428. # You can shift and shape them however you want.
  429. #
  430. # Format:
  431. #
  432. #   :name => {
  433. #     :pos => [x,y],
  434. #     :size => [width,height],
  435. #     :skin => "windowskin name",
  436. #     :opacity => value, # 0 = transparent, 255 = no transparency at all.
  437. #   },
  438. #
  439. # :title = The settings for the title window.
  440. #          Used to display a single text and page indicators.
  441. # :info  = The settings for the actor info window.
  442. #          Used to display the actor's name, nickname, class, level, picture,
  443. #          HP, MP, TP, XP, state info and a custom text.
  444. # :bio   = The settings for the biography window.
  445. #          Used to display the actor's age, gender, weight, height, morality,
  446. #          biography text, portrait and a custom text.
  447. #===============================================================================
  448.   Window_Setup = { # <-- No touchy-touchy!
  449.     :title => {
  450.       :pos => [0,0],
  451.       :size => [Graphics.width,70],
  452.       :skin => "Window",
  453.       :opacity => 255,
  454.     },
  455.     :info => {
  456.       :pos => [0,70],
  457.       :size => [Graphics.width,74],
  458.       :skin => "Window",
  459.       :opacity => 255,
  460.     },
  461.     :bio => {
  462.       :pos => [0,144],
  463.       :size => [Graphics.width,Graphics.height-144],
  464.       :skin => "Window",
  465.       :opacity => 255,
  466.     },
  467.   } # <-- No touchy-touchy!
  468.  
  469. #===============================================================================
  470. # Text Settings:
  471. #===============================================================================
  472. # You can set various texts up here.
  473. # Each of the settings got obvious names, so I guess, it is not needed to explain
  474. # what each of them does and where will they show up.
  475. # Use "" if you don't want to show any descriptive text for an information.
  476. #===============================================================================
  477.   Text_Setup = { # <-- No touchy-touchy!
  478.     :title => "Profile",
  479.     :progress => "",
  480.     :name => "",
  481.     :class => "Class",
  482.     :level => "Lvl",
  483.     :state => "",
  484.     :hp_bar => "HP",
  485.     :mp_bar => "MP",
  486.     :tp_bar => "TP",
  487.     :xp_bar => "Exp",
  488.     :nickname => "Title",
  489.     :age => "Age",
  490.     :gender => "Gender",
  491.     :weight => "Weight",
  492.     :height => "Height",
  493.     :bio_text => "Biography",
  494.     :morality => "Morality",
  495.     :custom1 => "",
  496.   } # <-- No touchy-touchy!
  497.  
  498. #===============================================================================
  499. # Data Display Settings:
  500. #===============================================================================
  501. # Select what data you want to show on the Biography scene.
  502. # The following symbols are available:
  503. #
  504. #   :title    - Descriptive text, shown in the :title window. *
  505. #   :progress - Custom text, shown in the :info window. *
  506. #   :name     - Actor's name, shown in the :info window.
  507. #   :class    - Actor's class, shown in the :info window.
  508. #   :level    - Actor's level, shown in the :info window.
  509. #   :state    - Actor's state icons and text, shown in the :info window.
  510. #   :hp_bar   - Actor's HP with a gauge, shown in the :info window.
  511. #   :mp_bar   - Actor's MP with a gauge, shown in the :info window.
  512. #   :tp_bar   - Actor's TP with a gauge, shown in the :info window.
  513. #   :xp_bar   - Actor's XP with a gauge, shown in the :info window.
  514. #   :nickname - Actor's nickname, shown in the :info window.
  515. #   :age      - Actor's age, shown in the :bio window. *
  516. #   :gender   - Actor's gender, shown in the :bio window. *
  517. #   :weight   - Actor's weight, shown in the :bio window. *
  518. #   :height   - Actor's height, shown in the :bio window. *
  519. #   :bio_text - Actor's biography text, shown in the :bio window. *
  520. #   :morality - Actor's morality with a gauge, shown in the :bio window. *
  521. #   :custom1  - Actor's custom text, shown in the :bio window. *
  522. #   :pic     - Actor's picture, shown in the :info window.
  523. #   :portrait - Actor's portrait, shown in the :bio window.
  524. #
  525. # Any data with it's symbol not present in the 'Show_Data' array will not be
  526. # displayed.
  527. # While the descriptions I gave for some of the symbols are pretty exact, a lot
  528. # of them can be used however you want. These are marked with a * and are fully
  529. # customizable and can be used to display whatever you want.
  530. #===============================================================================
  531.   Show_Data = [
  532.     :title, :class, :level, :hp_bar, :mp_bar, :tp_bar, :xp_bar, :nickname,
  533.     :age, :gender, :weight, :height, :bio_text, :morality, :custom1, :pic,
  534.     :portrait,
  535.   ]
  536.  
  537. #===============================================================================
  538. # Font Settings:
  539. #===============================================================================
  540. # You can set up the fonts used for each type of information shown on the scene.
  541. #
  542. # Format:
  543. #
  544. #   :name => {
  545. #     :type => ["font name","font name","font name", ... ],
  546. #     :size => value,
  547. #     :color => [color1,color2]
  548. #   },
  549. #
  550. # color1 = The color of the descriptive texts you have setup above.
  551. # color2 = The color of the actual data texts.
  552. #
  553. # Note that some color setups will be useless due to the data setup not having
  554. # an actual second text. These will be marked, but just in case, I will write
  555. # the info about them here too:
  556. # All settings marked with this will use the 1st number in the array.
  557. # The 2nd number (if present) can be either deleted or ignored.
  558. # Make sure to keep the array brackets "[]" around them whatever you choose to do!
  559. #
  560. # The font setup for the :bio_text and :morality settings will use a different
  561. # format! Those are explained right besides the settings!
  562. # The :xp_bar setting will have an extra color option for the gauge color!
  563. #===============================================================================
  564.   Font_Setup = { # <-- No touchy-touchy!
  565.     :title => {
  566.       :type => ["Monotype Corsiva","Arial"],
  567.       :size => 30,
  568.       :color => [[185,100,255,255]], # Only 1 text available!
  569.     },
  570.     :progress => {
  571.       :type => ["Monotype Corsiva","Arial"],
  572.       :size => 26,
  573.       :color => [[100,180,220,255]], # Only 1 text available!
  574.     },
  575.     :name => {
  576.       :type => ["Monotype Corsiva","Arial"],
  577.       :size => 24,
  578.       :color => [[100,180,220,255],[255,255,255,255]],
  579.     },
  580.     :class => {
  581.       :type => ["Monotype Corsiva","Arial"],
  582.       :size => 24,
  583.       :color => [[100,180,220,255],[255,255,255,255]],
  584.     },
  585.     :level => {
  586.       :type => ["Monotype Corsiva","Arial"],
  587.       :size => 24,
  588.       :color => [[100,180,220,255],[255,255,255,255]],
  589.     },
  590.     :state => {
  591.       :type => ["Monotype Corsiva","Arial"],
  592.       :size => 24,
  593.       :color => [[100,180,220,255]], # Only 1 text available!
  594.     },
  595.     :hp_bar => {
  596.       :type => ["Monotype Corsiva","Arial"],
  597.       :size => 24,
  598.       :color => [[100,180,220,255]], # Only 1 text available!
  599.     },
  600.     :mp_bar => {
  601.       :type => ["Monotype Corsiva","Arial"],
  602.       :size => 24,
  603.       :color => [[100,180,220,255]], # Only 1 text available!
  604.     },
  605.     :tp_bar => {
  606.       :type => ["Monotype Corsiva","Arial"],
  607.       :size => 24,
  608.       :color => [[100,180,220,255]], # Only 1 text available!
  609.     },
  610.     :xp_bar => {
  611.       :type => ["Monotype Corsiva","Arial"],
  612.       :size => 24,
  613.       :color => [[100,180,220,255]], # Only 1 text available!
  614.       :gcolor => [30,31], # Colors for the XP gauge (left,right)!
  615.     },
  616.     :nickname => {
  617.       :type => ["Monotype Corsiva","Arial"],
  618.       :size => 24,
  619.       :color => [[100,180,220,255],[255,255,255,255]],
  620.     },
  621.     :custom1 => {
  622.       :type => ["Monotype Corsiva","Arial"],
  623.       :size => 30,
  624.       :color => [[100,180,220,255],[255,225,100,255]],
  625.     },
  626.     :age => {
  627.       :type => ["Monotype Corsiva","Arial"],
  628.       :size => 22,
  629.       :color => [[100,180,220,255],[255,255,255,255]],
  630.     },
  631.     :gender => {
  632.       :type => ["Monotype Corsiva","Arial"],
  633.       :size => 22,
  634.       :color => [[100,180,220,255],[255,255,255,255]],
  635.     },
  636.     :weight => {
  637.       :type => ["Monotype Corsiva","Arial"],
  638.       :size => 22,
  639.       :color => [[100,180,220,255],[255,255,255,255]],
  640.     },
  641.     :height => {
  642.       :type => ["Monotype Corsiva","Arial"],
  643.       :size => 22,
  644.       :color => [[100,180,220,255],[255,255,255,255]],
  645.     },
  646.     :bio_text => {
  647.       :type1 => ["Monotype Corsiva","Arial"], # Descriptive text font type
  648.       :size1 => 26,                           # Descriptive text font size
  649.       :type2 => ["Comic Sans MS","Arial"],    # Biography data text font type
  650.       :size2 => 18,                           # Biography data text font size
  651.       :color => [[100,180,220,255],[255,255,255,255]], # Color setups.
  652.     },
  653.     :morality => {
  654.       :type1 => ["Monotype Corsiva","Arial"], # Negative text font type
  655.       :type2 => ["Monotype Corsiva","Arial"], # Positive text font type
  656.       :type3 => ["Monotype Corsiva","Arial"], # Zero text font type
  657.       :type4 => ["Monotype Corsiva","Arial"], # Descriptive text font type
  658.       :size => [20,20,20,24], # Font size array, in order of the above type setup
  659.       :color => [100,180,220,255], # Color setup for the descriptive text
  660.     },
  661.   } # <-- No touchy-touchy!
  662.  
  663. #===============================================================================
  664. # Placement Settings:
  665. #===============================================================================
  666. # Set up the placement properties of each texts shown on the scene here.
  667. #
  668. # Format:
  669. #
  670. #   :name => {
  671. #     :pos => [x,y],
  672. #     :size => [width,height],
  673. #     :align => [align1,align2], # 0 = left, 1 = middle, 2 = right.
  674. #
  675. #   # For the :pic setting only:
  676. #     :opacity => value, # 0 = transparent, 255 = no transparency at all.
  677. #    
  678. #   # For the settings with gauges only:
  679. #     :offset => [x,y], # Offsets for the descriptive texts on the gauges.
  680. #
  681. #   # For the :bio_text setting only:
  682. #     :line_h => value, # Vertical distance between each texts for the bio info.
  683. #   },
  684. #
  685. # align1 = The alignment for the descriptive text shown.
  686. # align2 = The alignment for the actual data text shown.
  687. #
  688. # Note that some align setups will be useless due to the data setup not having
  689. # an actual second text. These will be marked, but just in case, I will write
  690. # the info about them here too:
  691. # All settings marked with this will use the 1st number in the array.
  692. # The 2nd number (if present) can be either deleted or ignored.
  693. # Make sure to keep the array brackets "[]" around them whatever you choose to do!
  694. #
  695. # Some options will be missing from certain settings.
  696. # Those are set automatically, so you don't have to set them up.
  697. #
  698. # The setup for the :bio_text and :morality settings will use a different
  699. # format! Those are explained right besides the settings!
  700. # Use odd numbers for the width of the morality bar to prevent display errors!
  701. # The display errors are minor, barely noticeable, but still!
  702. #===============================================================================
  703.   InfoPos_Setup = { # <-- No touchy-touchy!
  704.     :title => {
  705.       :pos => [-1,0],
  706.       :size => [Graphics.width-24,46],
  707.       :align => [1], # Only 1 text available!
  708.     },
  709.     :progress => {
  710.       :pos => [6,0],
  711.       :size => [120,50],
  712.       :align => [1], # Only 1 text available!
  713.     },
  714.     :pic => {
  715.       :pos => [-8,0],
  716.       :size => [50,50],
  717.       :opacity => 255,
  718.     },
  719.     :name => {
  720.       :pos => [200,0],
  721.       :size => [140,24],
  722.       :align => [0,0],
  723.     },
  724.     :class => {
  725.       :pos => [85,0],
  726.       :size => [170,24],
  727.       :align => [0,2],
  728.     },
  729.     :level => {
  730.       :pos => [34,4],
  731.       :pos2 => [34,22],
  732.       :size => [40,24],
  733.       :align => [1,1],
  734.     },
  735.     :state => {
  736.       :pos => [200,28],
  737.       :size => [50,24],
  738.       :align => [0], # Only 1 text available!
  739.     },
  740.     :hp_bar => {
  741.       :pos => [85,26],
  742.       :offset => [2,0],
  743.       :size => [170,24],
  744.       :align => [0], # Only 1 text available!
  745.     },              
  746.     :mp_bar => {
  747.       :pos => [265,26],
  748.       :offset => [2,0],
  749.       :size => [170,24],
  750.       :align => [0], # Only 1 text available!
  751.     },                
  752.     :tp_bar => {
  753.       :pos => [445,26],
  754.       :offset => [2,0],
  755.       :size => [170,24],
  756.       :align => [0], # Only 1 text available!
  757.     },                
  758.     :xp_bar => {
  759.       :pos => [445,0],
  760.       :offset => [2,0],
  761.       :size => [170,24],
  762.       :align => [0], # Only 1 text available!
  763.     },                
  764.     :nickname => {
  765.       :pos => [265,0],
  766.       :size => [170,24],
  767.       :align => [0,2],
  768.     },
  769.     :custom1 => {
  770.       :pos => [-4,4],
  771.       :size => [360,32],
  772.       :align => [1,1],
  773.     },
  774.     :age => {
  775.       :pos => [6,50],
  776.       :size => [135,24],
  777.       :align => [0,2],
  778.     },
  779.     :gender => {
  780.       :pos => [6,74],
  781.       :size => [135,24],
  782.       :align => [0,2],
  783.     },
  784.     :weight => {
  785.       :pos => [151,50],
  786.       :size => [135,24],
  787.       :align => [0,2],
  788.     },
  789.     :height => {
  790.       :pos => [151,74],
  791.       :size => [135,24],
  792.       :align => [0,2],
  793.     },
  794.     :bio_text => {
  795.       :pos1 => [2,110],  # For the 'Text_Setup' descriptive text (x,y).
  796.       :pos2 => [6,150],  # For the real actor biography data (x,y).
  797.       :size => [340,28], # For the 'Text_Setup' descriptive text (width,height).
  798.       :align => 1,       # For the 'Text_Setup' descriptive text.
  799.       :line_h => 24,     # For the real actor biography data. Vertical spacing.
  800.     },
  801.     :morality => {
  802.       :pos => [320,264],   # Gauge position (x,y).
  803.       :tpos1 => [320,254], # Position for the negative moral texts (x,y).
  804.       :tpos2 => [320,254], # Position for the positive moral texts (x,y).
  805.       :tpos3 => [320,288], # Position for the zero (neutral) moral texts (x,y).
  806.       :tpos4 => [320,244], # Descriptive text position (x,y).
  807.       :t_height => 24,     # Descriptive text height.
  808.       :size => [281,8],    # Gauge size (width,height) - odd values for width!
  809.       :align => [0,2,1,1], # Text alignments in the order of the position setups!
  810.     },
  811.   } # <-- No touchy-touchy!
  812.  
  813. #===============================================================================
  814. # Morality Info Settings:
  815. #===============================================================================
  816. # Setup the properties used for the morality display.
  817. # Although I refer to this setting as "morality", it can be used to show any
  818. # data you want, just use your imagination.
  819. #
  820. # The morality bar is an offset gauge, meaning the center of it is a neutral
  821. # point, the left side means the evil side, while the right side is the good one.
  822. # It uses 3 colors for the setup (left, middle and right colors).
  823. #
  824. # The morality setup looks like this:
  825. #
  826. #   :max => value,   # Maximum morality. Must use a positive number!
  827. #   :min => -value,  # Minimum morality. Must use a negative number!
  828. #   :limit => true/false, # Use limit for morality points?
  829. #   :default => 0,   # Default starting morality for actors.
  830. #   :max_color => color,  # Right side color for the gauge (positive moral).
  831. #   :min_color => color,  # Left side color for the gauge (negative moral).
  832. #   :zero_color => color, # Middle color for the gauge (zero moral).
  833. #   :back_color => color, # Back color for the gauge.
  834. #   :out_color => color,  # Outline color for the gauge.
  835. #   :def_out => true/false, # Use outline for min-/max+ text?
  836. #   :max_text => ["text",t.color,o.color], # Text setup for the max+ morale status.
  837. #   :min_text => ["text",t.color,o.color], # Text setup for the min- morale status.
  838. #   :text_setup => [  # Moral text setup.
  839. #     ["text" ,req.points,t.color,use outline?,o.color]
  840. #     ["text1", [min,max],  color,  true/false,  color],
  841. #     ["text2", [min,max],  color,  true/false,  color],
  842. #     ["text3", [min,max],  color,  true/false,  color],
  843. #     ["text4", [min,max],  color,  true/false,  color],
  844. #     ["text5", [min,max],  color,  true/false,  color],
  845. #       .....
  846. #   ],
  847. #
  848. # The min and max morality value must use the same integer numbers with min being
  849. # a negative and max being a positive number!
  850. #
  851. # If you enable the limit function, the maximum and minimum points for the
  852. # morality will be limited. It will never go above the value you have set up
  853. # for the :max setting plus 1, and it will never go below the value you have
  854. # set up for the :min setting minus 1!
  855. # Plus and minus one, because I wanted to keep the ability of displaying the
  856. # final texts in all circumstances.
  857. #
  858. # The actors will start with the default starting morality you have setup here
  859. # unless you change it below at the 'Actor_Info_Setup' settings!
  860. #
  861. # The :max_text will be displayed when the actor have more morality points than
  862. # the maximum value you have setup for the morality. The gauge color will also
  863. # change and will be filled with the :max_color completely on the right side!
  864. # The :min_text will be displayed when the actor have less morality points than
  865. # the minimum value you have setup for the morality. The gauge color will also
  866. # change and will be filled with the :min_color completely on the left side!
  867. # The settings for both of them uses this format:
  868. #
  869. #     ["text",text color,outline color]
  870. #
  871. # The texts used for them will be outlined with the outline color you have setup
  872. # for them if you have set the :def_out option to true.
  873. #
  874. # The text showing up on the morality gauge depends on your :text_setup settings.
  875. # You can use as many text setup arrays as you want, but you must follow the
  876. # same format for them as presented above and they must be separated with commas!
  877. # The required points must cover all possible morality levels, meaning if you
  878. # have setup 100 for max moral points and -100 for min moral points, than the
  879. # required points from all the array setups must contain all numbers between
  880. # -100 and +100! If some of them are missing, your text display won't be correct!
  881. #===============================================================================
  882.   Morality_Setup = { # <-- No touchy-touchy!
  883.     :max => 100,   # Max morality.
  884.     :min => -100,  # Min morality.
  885.     :limit => false, # Use limit for morality points?
  886.     :default => 0, # Default starting morality for actors.
  887.     :max_color => 11,  # Gauge right side color (positive moral).
  888.     :min_color => 10,  # Gauge left side color (negative moral).
  889.     :zero_color => 17, # Gauge middle color (zero moral).
  890.     :back_color => [30,30,30,180],    # Gauge back color.
  891.     :out_color => [160,160,160,200],  # Gauge outline color.
  892.     :def_out => true, # Use outline for min-/max+ text?
  893.     :max_text => ["Angel", 29, 30], # ["text",t.color,o.color]
  894.     :min_text => ["Devil", 10, 20], # ["text",t.color,o.color]
  895.     :text_setup => [  # Moral text settings.
  896.     # ["text",  req.points, t.color,outline,o.color]
  897.       ["Evil",   [-100,-51],     10,  false,     20],
  898.       ["Bad",      [-50,-1],      2,  false,      0],
  899.       ["Neutral",     [0,0],     17,  false,      0],
  900.       ["Good",       [1,50],     28,  false,      0],
  901.       ["Saint",    [51,100],     29,  false,     29],
  902.     ],
  903.   } # <-- No touchy-touchy!
  904.  
  905. #===============================================================================
  906. # Actor Info Settings:
  907. #===============================================================================
  908. # Set up information used on the scene for each actors here.
  909. #
  910. # Format:
  911. #
  912. #   ID => {
  913. #     :portrait => ["img name",[x pos,y pos],opacity],
  914. #     :pic => ["img name",index],
  915. #     :age => "text",
  916. #     :gender => "text",
  917. #     :weight => "text",
  918. #     :height => "text",
  919. #     :morality => value,
  920. #     :custom1 => "text",
  921. #     :bio_text => [ # <-- Starting the biography text here!
  922. #
  923. #       ["text1 - 1st line","text2 - 2nd line",  <--|
  924. #        "text3 - 3rd line","text4 - 4th line",     |-- 1st page of the biography!
  925. #               ...        ,"textn - nth line"], <--|
  926. #
  927. #       ["text1 - 1st line","text2 - 2nd line",  <--|
  928. #        "text3 - 3rd line","text4 - 4th line",     |-- 2nd page of the biography!
  929. #               ...        ,"textn - nth line"], <--|
  930. #
  931. #       # More pages like the above goes here if desired.
  932. #
  933. #     ], # <-- Ending the biography text here!
  934. #   },
  935. #
  936. # The ID represents the ID of the actors. You need to make a setup for each of
  937. # your actors here.
  938. # As you can see, the age, gender, weight, height and the custom1 data uses
  939. # simple texts. While I named them how I named them, you can use these to display
  940. # any data you want, so you are not restricted to age, weight, etc data only!
  941. #
  942. # The bio_text data uses an array with multiple small arrays.
  943. # Each small array will define a page for the biography data.
  944. # Each small array must be separated with a comma!
  945. # The small arrays will have texts set up in them.
  946. # Each text will be drawn on a new line. Separate each text with a comma!
  947. # You can use any valid message codes in the texts!
  948. # You can setup as many lines as you want!
  949. # You can setup as many pages as you want!
  950. #
  951. # The :morality will be the starting morality for the actor. If you don't set
  952. # this up for an actor, than the actor will take the default starting morality!
  953. #
  954. # The images for the portraits and pictures must be in the folder you have set
  955. # up at the 'ActorImgFolder' settings!
  956. #
  957. # The images for the portraits are simple images without any extra setup needed.
  958. # I haven't put them into any sheet, because depending on the size of them
  959. # (width and height), the sheet could reach some pretty big sizes both in width
  960. # and height and in bytes.
  961. #
  962. # The images for the pictures in the info window, however, use the same format
  963. # as the face picture images, meaning it must be a 4x2 sheet which looks like
  964. # this:
  965. #
  966. #   -----------------
  967. #   | 0 | 1 | 2 | 3 |   # The numbers mean the corresponding indexes for the
  968. #   |----------------   # pictures. You must assign an index for each picture
  969. #   | 4 | 5 | 6 | 7 |   # settings!
  970. #   -----------------
  971. #
  972. # I made it like that to reduce the amount of files for the custom pictures.
  973. # The width and height of each picture on the image must be the same width and
  974. # height you have set up for the :pic info at the 'InfoPos_Setup' settings!
  975. #===============================================================================
  976.   Actor_Info_Setup = { # <-- No touchy-touchy!
  977.     1 => {
  978.       :portrait => ["bust1-A",[325,0],255],
  979.       :pic => ["Actor2test",2],
  980.       :age => "44",
  981.       :gender => "Male",
  982.       :weight => "81 Kg",
  983.       :height => "179 Cm",
  984.       :morality => 0,
  985.       :custom1 => "Danny Salrock",
  986.       :bio_text => [
  987.             # 1st page.
  988.              ["Marveck Academy 1st class protic scientist.",
  989.               "He was the one who invented the protic stones.",
  990.               "Despite his invaluable product, the world forgot him.",
  991.               "Currently searching for the legendary Polarities.",
  992.               "Very stubborn person with high level of arrogance.",
  993.               "Food is the only thing that can melt his heart."],
  994.             # 2nd page.
  995.              ["Let's test the second page, alright?",
  996.               "So, apparently, this is the second page.",
  997.               "Third line, etc, etc yadda yadda..."],
  998.         ],
  999.     },
  1000.     2 => {
  1001.       :portrait => ["bust3-A",[325,0],255],
  1002.       :pic => ["Actor2test",0],
  1003.       :age => "28",
  1004.       :gender => "Male",
  1005.       :weight => "85 Kg",
  1006.       :height => "189 Cm",
  1007.       :morality => -70,
  1008.       :custom1 => "Raiden Lenorich",
  1009.       :bio_text => [
  1010.             # 1st page.
  1011.              ["A soldier from the Solitude Mercenary Center.",
  1012.               "He left the mercenary center, reasons unknown.",
  1013.               "Officially the best sniper in the year of 243 AC.",
  1014.               "Often gets violent without any provocation.",
  1015.               "Usually, the leading member of bar-fights.",
  1016.               "Friend or enemy? Can't say for sure yet."],
  1017.         ],
  1018.     },
  1019.     3 => {
  1020.       :portrait => ["bust2-A",[325,0],255],
  1021.       :pic => ["Actor2test",1],
  1022.       :age => "26",
  1023.       :gender => "Female",
  1024.       :weight => "56 Kg",
  1025.       :height => "164 Cm",
  1026.       :morality => 70,
  1027.       :custom1 => "Sophie Taramis",
  1028.       :bio_text => [
  1029.             # 1st page.
  1030.              ["A hunter from the Hordal Tribes living in the woods.",
  1031.               "A kind and selfless woman, helping those in need.",
  1032.               "It seems like she can talk with the animals.",
  1033.               "Knows a bit about curative herbs and poisons.",
  1034.               "She values life and peace over everything else.",
  1035.               "Never resorts to violence unless it's necessary."],
  1036.             # 2nd page.
  1037.              ["Let's test the second page, alright?",
  1038.               "So, apparently, this is the second page.",
  1039.               "Third line, etc, etc yadda yadda..."],
  1040.             # 3rd page.
  1041.              ["And this is the 3rd page?",
  1042.               "So, apparently, this is the 3rd page.",
  1043.               "Third line, etc, etc yadda yadda..."],
  1044.         ],
  1045.     },
  1046.   } # <-- No touchy-touchy!
  1047.    
  1048. end # <-- No touchy-touchy!
  1049. #===============================================================================
  1050. # End of Settings! Editing anything below may lead to... You know what, right?
  1051. #===============================================================================
  1052.  
  1053. module Cache
  1054.  
  1055.   def self.bio(filename)
  1056.     load_bitmap(Sixth_Actor_Bio::BioImg_Folder, filename)
  1057.   end
  1058.  
  1059.   def self.bio_pic(filename)
  1060.     load_bitmap(Sixth_Actor_Bio::ActorImgFolder, filename)
  1061.   end
  1062.  
  1063. end
  1064.  
  1065. module DataManager
  1066.  
  1067.   class << self
  1068.     alias sixth_bio_create_objects        create_game_objects
  1069.     alias sixth_bio_save_contents         make_save_contents
  1070.     alias sixth_bio_extract_contents      extract_save_contents
  1071.   end
  1072.  
  1073.   def self.create_game_objects
  1074.     sixth_bio_create_objects
  1075.     $bio = Game_Bio.new
  1076.   end
  1077.  
  1078.   def self.make_save_contents
  1079.     contents = sixth_bio_save_contents
  1080.     contents[:biography] = $bio
  1081.     contents
  1082.   end
  1083.  
  1084.   def self.extract_save_contents(contents)
  1085.     sixth_bio_extract_contents(contents)
  1086.     $bio = contents[:biography]
  1087.   end
  1088.  
  1089. end
  1090.  
  1091. class Game_Bio_Info
  1092.  
  1093.   attr_accessor  :text, :port, :pic, :morality, :tmax
  1094.  
  1095.   def initialize(bio_id)
  1096.     @bio_id = bio_id
  1097.     @bio_info = Sixth_Actor_Bio::Actor_Info_Setup[@bio_id]
  1098.     @text = @bio_info[:bio_text]
  1099.     @tmax = @bio_info[:bio_text].size
  1100.     @port = @bio_info[:portrait][0]
  1101.     @pic = @bio_info[:pic]
  1102.     @morality = !@bio_info[:morality].nil? ? @bio_info[:morality] : Sixth_Actor_Bio::Morality_Setup[:default]
  1103.   end
  1104.    
  1105. end
  1106.  
  1107. class Game_Bio
  1108.  
  1109.   def initialize
  1110.     @bio = {}
  1111.   end
  1112.    
  1113.   def [](bio_id)
  1114.     return nil unless Sixth_Actor_Bio::Actor_Info_Setup[bio_id]
  1115.     @bio[bio_id] ||= Game_Bio_Info.new(bio_id)
  1116.   end
  1117.  
  1118. end
  1119.  
  1120. class Game_Actor < Game_Battler
  1121.  
  1122.   def get_xp_info
  1123.     s1 = exp - current_level_exp
  1124.     s2 = exp_for_level(level + 1) - current_level_exp
  1125.     if max_level?
  1126.       exp_rate = 1.0
  1127.     else
  1128.       exp_rate = s1.to_f / s2
  1129.     end
  1130.     return [s1,s2,exp_rate]
  1131.   end
  1132.  
  1133. end
  1134.  
  1135. class Scene_SBio < Scene_Base
  1136.   include Sixth_Actor_Bio
  1137.  
  1138.   def start
  1139.     super
  1140.     create_variables
  1141.     create_backgrounds if Background_Setup != {}
  1142.     create_all_windows
  1143.   end
  1144.  
  1145.   def create_backgrounds
  1146.     Background_Setup.each_key do |sym|
  1147.       draw_the_background(sym)
  1148.     end
  1149.   end
  1150.  
  1151.   def draw_the_background(sym)
  1152.     @backs[sym] = Sprite.new
  1153.     @backs[sym].bitmap = Cache.bio(Background_Setup[sym][:graphic])
  1154.     @backs[sym].x = Background_Setup[sym][:pos][0]
  1155.     @backs[sym].y = Background_Setup[sym][:pos][1]
  1156.     @backs[sym].opacity = Background_Setup[sym][:opacity]
  1157.     @backs[sym].z = Background_Setup[sym][:z]
  1158.   end
  1159.  
  1160.   def create_all_windows
  1161.     create_title_window
  1162.     create_actor_info_window
  1163.     create_bio_window
  1164.   end
  1165.  
  1166.   def create_variables
  1167.     @current = 0
  1168.     @old = 0
  1169.     @max = $game_party.members.size - 1
  1170.     @backs = {}
  1171.     @bio_max = $bio[$game_party.members[@current].id].tmax - 1
  1172.     @start_bio = Bio_StartPage == :newest ? @bio_max : 0
  1173.     @old_bio = @start_bio
  1174.     @current_bio = @start_bio
  1175.   end
  1176.  
  1177.   def create_title_window
  1178.     @title = Bio_Title.new
  1179.   end
  1180.  
  1181.   def create_actor_info_window
  1182.     @info = Bio_Info.new
  1183.   end
  1184.  
  1185.   def create_bio_window
  1186.     @bio = Bio_Bio.new
  1187.   end
  1188.  
  1189.   def update
  1190.     super
  1191.     process_system_buttons
  1192.     process_change_actors if @max > 0
  1193.     process_change_bio_text if @bio_max > 0
  1194.   end
  1195.  
  1196.   def process_system_buttons
  1197.     if Input.trigger?(Button_Setup[:exit])
  1198.       Sound_Setup[:exit].play
  1199.       return_scene
  1200.     end
  1201.   end
  1202.  
  1203.   def process_change_actors
  1204.     if Input.trigger?(Button_Setup[:prev])
  1205.       Sound_Setup[:change].play
  1206.       @current -= 1
  1207.       if @current < 0
  1208.         @current = @max
  1209.       end
  1210.     elsif Input.trigger?(Button_Setup[:next])
  1211.       Sound_Setup[:change].play
  1212.       @current += 1
  1213.       if @current > @max
  1214.         @current = 0
  1215.       end
  1216.     end
  1217.     if @old != @current
  1218.       @bio_max = $bio[$game_party.members[@current].id].tmax - 1
  1219.       @start_bio = Bio_StartPage == :newest ? @bio_max : 0
  1220.       @title.refresh(@current)
  1221.       @info.refresh($game_party.members[@current])
  1222.       @bio.refresh($game_party.members[@current],@start_bio)
  1223.       @current_bio = @start_bio
  1224.       @old = @current
  1225.     end
  1226.   end
  1227.  
  1228.   def process_change_bio_text
  1229.     if Input.trigger?(Button_Setup[:bio_prev])
  1230.       Sound_Setup[:change_bio].play
  1231.       @current_bio -= 1
  1232.       if @current_bio < 0
  1233.         @current_bio = @bio_max
  1234.       end
  1235.       while $bio[$game_party.members[@current].id].text[@current_bio].nil?
  1236.         @current_bio -= 1
  1237.       end
  1238.     elsif Input.trigger?(Button_Setup[:bio_next])
  1239.       Sound_Setup[:change_bio].play
  1240.       @current_bio += 1
  1241.       if @current_bio > @bio_max
  1242.         @current_bio = 0
  1243.       end
  1244.       while $bio[$game_party.members[@current].id].text[@current_bio].nil?
  1245.         @current_bio += 1
  1246.       end
  1247.     end
  1248.     if @old_bio != @current_bio
  1249.       @bio.refresh($game_party.members[@current],@current_bio)
  1250.       @old_bio = @current_bio
  1251.     end
  1252.   end
  1253.  
  1254.   def dispose_backgrounds
  1255.     @backs.each_key do |sym|
  1256.       @backs[sym].bitmap.dispose
  1257.       @backs[sym].dispose
  1258.     end
  1259.   end
  1260.  
  1261.   def return_scene
  1262.     dispose_backgrounds
  1263.     super
  1264.   end
  1265.  
  1266. end
  1267.  
  1268. class Window_Base < Window
  1269.   include Sixth_Actor_Bio
  1270.  
  1271.   def get_color_sixth(color)
  1272.     if color.is_a?(Integer)
  1273.       return text_color(color)
  1274.     else
  1275.       return Color.new(*color)
  1276.     end
  1277.   end
  1278.  
  1279.   def change_the_font(type,size)
  1280.     contents.font.name = type
  1281.     contents.font.size = size
  1282.   end
  1283.  
  1284.   def draw_text_ex_s(x, y, text)
  1285.     text = convert_escape_characters(text)
  1286.     pos = {:x => x, :y => y, :new_x => x, :height => calc_line_height(text)}
  1287.     process_character(text.slice!(0, 1), text, pos) until text.empty?
  1288.   end
  1289.  
  1290.   def draw_bio_info(sym,data=nil,pos2=nil)
  1291.     return unless Show_Data.include?(sym)
  1292.     change_the_font(Font_Setup[sym][:type],Font_Setup[sym][:size])
  1293.     change_color(get_color_sixth(Font_Setup[sym][:color][0]))
  1294.     i = InfoPos_Setup[sym]
  1295.     draw_text(i[:pos][0],i[:pos][1],i[:size][0],i[:size][1],Text_Setup[sym],i[:align][0])
  1296.     if !data.nil?
  1297.       change_color(get_color_sixth(Font_Setup[sym][:color][1]))
  1298.       if !pos2.nil?
  1299.         draw_text(pos2[0],pos2[1],i[:size][0],i[:size][1],data,i[:align][1])
  1300.       else
  1301.         draw_text(i[:pos][0],i[:pos][1],i[:size][0],i[:size][1],data,i[:align][1])
  1302.       end
  1303.     end
  1304.   end
  1305.  
  1306. end
  1307.  
  1308. class Bio_Title < Window_Base
  1309.   include Sixth_Actor_Bio
  1310.  
  1311.   def initialize
  1312.     pos = Window_Setup[:title][:pos]
  1313.     size = Window_Setup[:title][:size]
  1314.     super(pos[0],pos[1],size[0],size[1])
  1315.     self.windowskin = Cache.system(Window_Setup[:title][:skin])
  1316.     self.opacity = Window_Setup[:title][:opacity]
  1317.     refresh(0)
  1318.   end
  1319.    
  1320.   def refresh(index)
  1321.     contents.clear
  1322.     draw_bio_info(:title)
  1323.     draw_page_indicator(index)
  1324.   end
  1325.  
  1326.   def draw_page_indicator(index)
  1327.     i = Page_Indicator
  1328.     change_the_font(i[:font][0],i[:font][1])
  1329.     change_color(get_color_sixth(i[:font][2]))
  1330.     if $game_party.members.size == 1
  1331.       a1 = a2 = translucent_alpha
  1332.       draw_icon(i[:icon1],i[:ipos1][0],i[:ipos1][1],false)
  1333.       draw_icon(i[:icon2],i[:ipos2][0],i[:ipos2][1],false)
  1334.     elsif index == $game_party.members.size - 1
  1335.       a1 = 255; a2 = translucent_alpha
  1336.       draw_icon(i[:icon1],i[:ipos1][0],i[:ipos1][1])
  1337.       draw_icon(i[:icon2],i[:ipos2][0],i[:ipos2][1],false)
  1338.     elsif index == 0
  1339.       a2 = 255; a1 = translucent_alpha
  1340.       draw_icon(i[:icon1],i[:ipos1][0],i[:ipos1][1],false)
  1341.       draw_icon(i[:icon2],i[:ipos2][0],i[:ipos2][1])
  1342.     else
  1343.       a1 = 255; a2 = 255
  1344.       draw_icon(i[:icon1],i[:ipos1][0],i[:ipos1][1])
  1345.       draw_icon(i[:icon2],i[:ipos2][0],i[:ipos2][1])
  1346.     end
  1347.     contents.font.color.alpha = a1
  1348.     draw_text(i[:tpos1][0],i[:tpos1][1],i[:size][0],i[:size][1],i[:txt1])
  1349.     contents.font.color.alpha = a2
  1350.     draw_text(i[:tpos2][0],i[:tpos2][1],i[:size][0],i[:size][1],i[:txt2])
  1351.   end
  1352.  
  1353. end
  1354.  
  1355. class Bio_Info < Window_Base
  1356.   include Sixth_Actor_Bio
  1357.  
  1358.   def initialize
  1359.     pos = Window_Setup[:info][:pos]
  1360.     size = Window_Setup[:info][:size]
  1361.     super(pos[0],pos[1],size[0],size[1])
  1362.     self.windowskin = Cache.system(Window_Setup[:info][:skin])
  1363.     self.opacity = Window_Setup[:info][:opacity]
  1364.     refresh($game_party.members[0])
  1365.   end
  1366.  
  1367.   def refresh(actor)
  1368.     contents.clear
  1369.     xp = actor.get_xp_info
  1370.     xc1 = get_color_sixth(Font_Setup[:xp_bar][:gcolor][0])
  1371.     xc2 = get_color_sixth(Font_Setup[:xp_bar][:gcolor][1])
  1372.     draw_bio_pic(actor) if Show_Data.include?(:pic)
  1373.     draw_bio_info_i(actor,:state)
  1374.     draw_bio_info_g(:hp_bar,actor.hp,actor.mhp,actor.hp_rate,
  1375.                     hp_gauge_color1,hp_gauge_color2,hp_color(actor),normal_color)
  1376.     draw_bio_info_g(:mp_bar,actor.mp,actor.mmp,actor.mp_rate,
  1377.                     mp_gauge_color1,mp_gauge_color2,mp_color(actor),normal_color)
  1378.     draw_bio_info_g(:tp_bar,actor.tp.to_i,actor.max_tp,actor.tp_rate,
  1379.                     tp_gauge_color1,tp_gauge_color2,tp_color(actor),normal_color)
  1380.     draw_bio_info_g(:xp_bar,xp[0],xp[1],xp[2],xc1,xc2,normal_color,normal_color)
  1381.     draw_bio_info(:progress)
  1382.     draw_bio_info(:state)
  1383.     draw_bio_info(:name,actor.name)
  1384.     draw_bio_info(:class,actor.class.name)
  1385.     draw_bio_info(:level,actor.level,InfoPos_Setup[:level][:pos2])
  1386.     draw_bio_info(:nickname,actor.nickname)
  1387.   end
  1388.  
  1389.   def draw_bio_pic(actor)
  1390.     return if $bio[actor.id].pic[0].nil? || $bio[actor.id].pic[0] == ""
  1391.     pic = Cache.bio_pic($bio[actor.id].pic[0])
  1392.     index = $bio[actor.id].pic[1]
  1393.     opa = InfoPos_Setup[:pic][:opacity]
  1394.     pos = InfoPos_Setup[:pic][:pos]
  1395.     size = InfoPos_Setup[:pic][:size]
  1396.     rect = Rect.new(index%4*size[0],index/4*size[1],size[0],size[1])
  1397.     contents.blt(pos[0],pos[1],pic,rect,opa)
  1398.     pic.dispose
  1399.   end
  1400.    
  1401.   def draw_bio_info_i(actor,sym)
  1402.     return unless Show_Data.include?(sym)
  1403.     i = InfoPos_Setup[sym]
  1404.     draw_actor_icons(actor,i[:pos][0],i[:pos][1],i[:size][0])
  1405.   end
  1406.  
  1407.   def draw_bio_info_g(sym,d1,d2,rate,c1,c2,c3,c4)
  1408.     return unless Show_Data.include?(sym)
  1409.     i = InfoPos_Setup[sym]
  1410.     draw_gauge(i[:pos][0],i[:pos][1],i[:size][0],rate,c1,c2)
  1411.     xi1 = i[:pos][0]+i[:offset][0]
  1412.     xi2 = i[:pos][0]
  1413.     yi = i[:pos][1]+i[:offset][1]
  1414.     change_the_font(Font_Setup[sym][:type],Font_Setup[sym][:size])
  1415.     change_color(get_color_sixth(Font_Setup[sym][:color][0]))
  1416.     draw_text(xi1,yi,i[:size][0],i[:size][1],Text_Setup[sym],i[:align][0])
  1417.     draw_current_and_max_values(xi2,yi,i[:size][0],d1,d2,c3,c4)  
  1418.   end
  1419.  
  1420. end
  1421.  
  1422. class Bio_Bio < Window_Base
  1423.   include Sixth_Actor_Bio
  1424.  
  1425.   def initialize
  1426.     pos = Window_Setup[:bio][:pos]
  1427.     size = Window_Setup[:bio][:size]
  1428.     super(pos[0],pos[1],size[0],size[1])
  1429.     self.windowskin = Cache.system(Window_Setup[:bio][:skin])
  1430.     self.opacity = Window_Setup[:bio][:opacity]
  1431.     s_bio = Bio_StartPage == :newest ? $bio[$game_party.members[0].id].tmax-1 : 0
  1432.     refresh($game_party.members[0],s_bio)
  1433.   end
  1434.  
  1435.   def refresh(actor,page)
  1436.     contents.clear
  1437.     if Show_Data.include?(:portrait) && !$bio[actor.id].port.nil?
  1438.       draw_actor_portrait(actor) if $bio[actor.id].port != ""
  1439.     end
  1440.     draw_bio_info(:custom1,Actor_Info_Setup[actor.id][:custom1])
  1441.     draw_bio_info(:age,Actor_Info_Setup[actor.id][:age])
  1442.     draw_bio_info(:gender,Actor_Info_Setup[actor.id][:gender])
  1443.     draw_bio_info(:weight,Actor_Info_Setup[actor.id][:weight])
  1444.     draw_bio_info(:height,Actor_Info_Setup[actor.id][:height])
  1445.     draw_bio_txt_page(actor,page) if Show_Data.include?(:bio_text)
  1446.     draw_full_bio_txt(actor,:bio_text,page) if Show_Data.include?(:bio_text)
  1447.     draw_morality_bar(actor) if Show_Data.include?(:morality)
  1448.     draw_moral_text(actor) if Show_Data.include?(:morality)
  1449.   end
  1450.  
  1451.   def draw_actor_portrait(actor)
  1452.     pic = Cache.bio_pic($bio[actor.id].port)
  1453.     x = Actor_Info_Setup[actor.id][:portrait][1][0]
  1454.     y = Actor_Info_Setup[actor.id][:portrait][1][1]
  1455.     opa = Actor_Info_Setup[actor.id][:portrait][2]
  1456.     rect = Rect.new(0,0,pic.width,pic.height)
  1457.     contents.blt(x,y,pic,rect,opa)
  1458.   end
  1459.  
  1460.   def draw_moral_text(actor)
  1461.     i = InfoPos_Setup[:morality]; f = Font_Setup[:morality]
  1462.     m = Morality_Setup
  1463.     # getting the morale info!
  1464.     if $bio[actor.id].morality < m[:min]
  1465.       @out = [m[:def_out],m[:min_text][2]]
  1466.       @text = m[:min_text][0]
  1467.       @col = m[:min_text][1]
  1468.     elsif $bio[actor.id].morality > m[:max]
  1469.       @out = [m[:def_out],m[:max_text][2]]
  1470.       @text = m[:max_text][0]
  1471.       @col = m[:max_text][1]
  1472.     else
  1473.       m[:text_setup].each_with_index do |mor,id|
  1474.         if $bio[actor.id].morality.between?(mor[1][0],mor[1][1])
  1475.           @text = mor[0]
  1476.           @col = mor[2]
  1477.           @out = [mor[3],mor[4]]
  1478.           break
  1479.         end
  1480.       end
  1481.     end
  1482.     tw = i[:size][0]; th = i[:t_height]
  1483.     # drawing the descriptive text!
  1484.     change_the_font(f[:type4],f[:size][3])
  1485.     change_color(get_color_sixth(f[:color]))
  1486.     draw_text(i[:tpos4][0],i[:tpos4][1],tw,th,Text_Setup[:morality],i[:align][3])
  1487.     # getting the morale text pos and properties
  1488.     if $bio[actor.id].morality < 0
  1489.       tx = i[:tpos1][0]; ty = i[:tpos1][1]
  1490.       tp = f[:type1]; al = i[:align][0]; fs = f[:size][0]
  1491.     elsif $bio[actor.id].morality > 0
  1492.       tx = i[:tpos2][0]; ty = i[:tpos2][1]
  1493.       tp = f[:type2]; al = i[:align][1]; fs = f[:size][1]
  1494.     else
  1495.       tx = i[:tpos3][0]; ty = i[:tpos3][1]
  1496.       tp = f[:type3]; al = i[:align][2]; fs = f[:size][2]
  1497.     end
  1498.     if @out[0] == true
  1499.       contents.font.outline = true
  1500.       contents.font.out_color = get_color_sixth(@out[1])
  1501.     end
  1502.     # drawing the morale text
  1503.     change_the_font(tp,fs)
  1504.     change_color(get_color_sixth(@col))
  1505.     draw_text(tx,ty,tw,th,@text,al)
  1506.     reset_font_settings
  1507.   end
  1508.  
  1509.   def draw_morality_bar(actor)
  1510.     i = InfoPos_Setup[:morality]
  1511.     m = Morality_Setup
  1512.     x = i[:pos][0]; y = i[:pos][1]
  1513.     w = i[:size][0]; h = i[:size][1]; rw = w/2
  1514.     c = (m[:max].abs+m[:min].abs)/2
  1515.     val = $bio[actor.id].morality
  1516.     cb = get_color_sixth(m[:back_color]); co = get_color_sixth(m[:out_color])
  1517.     cmin = get_color_sixth(m[:min_color]); cmax = get_color_sixth(m[:max_color])
  1518.     czero = get_color_sixth(m[:zero_color])
  1519.     rate = val.abs.to_f / c
  1520.     draw_gauge_back(x,y,w,h,cb,co)
  1521.     if val == 0 # zero fill
  1522.       draw_gauge_middle(x+rw-1,y,3,h,czero)
  1523.     elsif val < 0 && val < m[:min] # left fill, minimum
  1524.       rate = 1; czero = cmin
  1525.       draw_gauge_left(x,y,rw,h,rate,cmin,czero,true)
  1526.     elsif val > 0 && val > m[:max] # right fill, maximum
  1527.       rate = 1; czero = cmax
  1528.       draw_gauge_right(x+rw,y,rw,h,rate,czero,cmax,true)
  1529.     elsif val < 0 # left fill, normal
  1530.       draw_gauge_left(x,y,rw,h,rate,cmin,czero)
  1531.     else val > 0 # right fill, normal
  1532.       draw_gauge_right(x+rw,y,rw,h,rate,czero,cmax)
  1533.     end
  1534.   end
  1535.  
  1536.   def draw_gauge_back(x,y,w,h,color1,color2)
  1537.     w = w - 2
  1538.     y = y - 3
  1539.     gauge_y = y + line_height - 2 - h
  1540.     contents.fill_rect(x,gauge_y-1,w+2,h+2,color2)
  1541.     contents.fill_rect(x+1,gauge_y,w,h,color1)
  1542.   end
  1543.  
  1544.   def draw_gauge_middle(x,y,w,h,color)
  1545.     y = y - 3
  1546.     gauge_y = y + line_height - 2 - h
  1547.     contents.fill_rect(x,gauge_y,w,h,color)
  1548.   end
  1549.  
  1550.   def draw_gauge_left(x,y,w,h,rate,color1,color2,max=false)
  1551.     w = w - 1
  1552.     y = y - 3
  1553.     fill_w = [[(w * rate).to_i, w].min,3].max
  1554.     fill_2 = [w - fill_w, 0].max
  1555.     gauge_y = y + line_height - 2 - h
  1556.     new_x = x + fill_2
  1557.     contents.gradient_fill_rect(new_x+1,gauge_y,fill_w,h,color1,color2)
  1558.   end
  1559.  
  1560.   def draw_gauge_right(x,y,w,h,rate,color1,color2,max=false)
  1561.     w = w - 1
  1562.     y = y - 3
  1563.     fill_w = [[(w * rate).to_i, w].min,3].max
  1564.     gauge_y = y + line_height - 2 - h
  1565.     contents.gradient_fill_rect(x+1,gauge_y,fill_w,h,color1,color2)
  1566.   end
  1567.  
  1568.   def draw_full_bio_txt(actor,sym,page)
  1569.     change_the_font(Font_Setup[sym][:type1],Font_Setup[sym][:size1])
  1570.     change_color(get_color_sixth(Font_Setup[sym][:color][0]))
  1571.     bio = $bio[actor.id].text[page]
  1572.     pos1 = InfoPos_Setup[sym][:pos1]
  1573.     pos2 = InfoPos_Setup[sym][:pos2]
  1574.     size = InfoPos_Setup[sym][:size]
  1575.     align = InfoPos_Setup[sym][:align]
  1576.     draw_text(pos1[0],pos1[1],size[0],size[1],Text_Setup[sym],align)
  1577.     change_the_font(Font_Setup[sym][:type2],Font_Setup[sym][:size2])
  1578.     change_color(get_color_sixth(Font_Setup[sym][:color][1]))
  1579.     @h = InfoPos_Setup[sym][:line_h]
  1580.     bio.each_with_index do |txt,i|
  1581.       draw_text_ex_s(pos2[0],pos2[1]+i*@h,txt)
  1582.     end
  1583.   end
  1584.  
  1585.   def draw_bio_txt_page(actor,page)
  1586.     i = Page_Indicator2
  1587.     change_the_font(i[:font][0],i[:font][1])
  1588.     change_color(get_color_sixth(i[:font][2]))
  1589.     if $bio[actor.id].tmax == 1
  1590.       draw_icon(i[:icon1],i[:ipos1][0],i[:ipos1][1],false)
  1591.       draw_icon(i[:icon2],i[:ipos2][0],i[:ipos2][1],false)
  1592.     elsif page == $bio[actor.id].tmax - 1
  1593.       draw_icon(i[:icon1],i[:ipos1][0],i[:ipos1][1])
  1594.       draw_icon(i[:icon2],i[:ipos2][0],i[:ipos2][1],false)
  1595.     elsif page == 0
  1596.       draw_icon(i[:icon1],i[:ipos1][0],i[:ipos1][1],false)
  1597.       draw_icon(i[:icon2],i[:ipos2][0],i[:ipos2][1])
  1598.     else
  1599.       draw_icon(i[:icon1],i[:ipos1][0],i[:ipos1][1])
  1600.       draw_icon(i[:icon2],i[:ipos2][0],i[:ipos2][1])
  1601.     end
  1602.     draw_text(i[:tpos][0],i[:tpos][1],i[:size][0],i[:size][1],page+1,1)
  1603.   end
  1604.  
  1605. end
  1606.  
  1607. class Game_Interpreter
  1608.  
  1609.   def bio_change(id,text,page=nil)
  1610.     if page.nil?
  1611.       $bio[id].text.push(text) unless $bio[id].text.include?(text)
  1612.     else
  1613.       $bio[id].text[page-1] = text unless $bio[id].text.include?(text)
  1614.     end
  1615.     $bio[id].text.compact!
  1616.     $bio[id].tmax = $bio[id].text.size
  1617.   end  
  1618.  
  1619.   def bio_delete(id,page=nil)
  1620.     return if $bio[id].text[page-1].nil?
  1621.     if page.nil?
  1622.       $bio[id].text.delete_at(-1) unless $bio[id].tmax <= 1
  1623.     else
  1624.       $bio[id].text.delete_at(page-1) unless $bio[id].tmax <= 1
  1625.     end
  1626.     $bio[id].text.compact!
  1627.     $bio[id].tmax = $bio[id].text.size
  1628.   end
  1629.  
  1630.   def port_change(id,pic)
  1631.     $bio[id].port = pic
  1632.   end
  1633.  
  1634.   def pic_change(id,pic,index)
  1635.     $bio[id].pic = [pic,index]
  1636.   end
  1637.  
  1638.   def moral_add(id,val)
  1639.     $bio[id].morality += val
  1640.     if Sixth_Actor_Bio::Morality_Setup[:limit] == true
  1641.       if $bio[id].morality > Sixth_Actor_Bio::Morality_Setup[:max]+1
  1642.         $bio[id].morality = Sixth_Actor_Bio::Morality_Setup[:max]+1
  1643.       elsif $bio[id].morality < Sixth_Actor_Bio::Morality_Setup[:min]-1
  1644.         $bio[id].morality = Sixth_Actor_Bio::Morality_Setup[:min]-1
  1645.       end
  1646.     end
  1647.   end
  1648.  
  1649.   def moral_set(id,val)
  1650.     $bio[id].morality = val
  1651.   end
  1652.  
  1653.   def check_moral(id,val,type)
  1654.     if type == :pos
  1655.       return true if $bio[id].morality >= val
  1656.     elsif type == :neg
  1657.       return true if $bio[id].morality <= val
  1658.     else
  1659.       return true if $bio[id].morality == val
  1660.     end
  1661.     return false
  1662.   end
  1663.  
  1664.   def check_party_moral(val,type,type2=:all)
  1665.     if type2 == :all
  1666.       party = $game_party.members
  1667.     else
  1668.       party = $game_party.battle_members
  1669.     end
  1670.     total = 0
  1671.     party.each do |actor|
  1672.       total += $bio[actor.id].morality
  1673.     end
  1674.     if type == :pos
  1675.       return true if total >= val
  1676.     elsif type == :neg
  1677.       return true if total <= val
  1678.     else
  1679.       return true if total == val
  1680.     end
  1681.     return false
  1682.   end
  1683.  
  1684. end
  1685.  
  1686. if Sixth_Actor_Bio::Menu_Enable == true
  1687.   class Window_MenuCommand < Window_Command
  1688.  
  1689.     alias sixth_biography122 add_original_commands
  1690.     def add_original_commands
  1691.       sixth_biography122
  1692.       if Sixth_Actor_Bio::Menu_Hide_Switch == 0 ||
  1693.          $game_switches[Sixth_Actor_Bio::Menu_Hide_Switch] == true
  1694.         add_command(Sixth_Actor_Bio::Menu_Name, :biography, enable_biography)
  1695.       end
  1696.     end
  1697.    
  1698.     def enable_biography
  1699.       if Sixth_Actor_Bio::Menu_Enable_Switch == 0 ||
  1700.          $game_switches[Sixth_Actor_Bio::Menu_Enable_Switch] == true
  1701.         return true
  1702.       end
  1703.       return false
  1704.     end
  1705.    
  1706.   end
  1707. end
  1708.  
  1709. class Scene_Menu < Scene_MenuBase
  1710.  
  1711.   alias sixth_biography13211 create_command_window
  1712.   def create_command_window
  1713.     sixth_biography13211()
  1714.     @command_window.set_handler(:biography, method(:command_biography))
  1715.   end
  1716.  
  1717.   def command_biography
  1718.     dispose_selectors if defined?(dispose_selectors)
  1719.     SceneManager.call(Scene_SBio)
  1720.   end
  1721.  
  1722. end
  1723. #==============================================================================
  1724. # !!END OF SCRIPT - OHH, NOES!!
  1725. #==============================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement