Advertisement
TheSixth

Enchant System - Info & Manual by Sixth

Sep 2nd, 2015
1,120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 18.28 KB | None | 0 0
  1. #===============================================================================
  2. # * [ACE] Enchant System - Information
  3. #===============================================================================
  4. # * Made by: Sixth (www.rpgmakervxace.net, www.forums.rpgmakerweb.com)
  5. # * Version: 1.4
  6. # * Updated: 10/02/2015
  7. # * Requires: Vlue's W/A Randomizer script
  8. #             Sixth's Custom Feature Extension for Vlue's Randomizer
  9. #-------------------------------------------------------------------------------
  10. # * < Change Log >
  11. #-------------------------------------------------------------------------------
  12. # * Version 1.0 (25/12/2014)
  13. #   - Initial release.
  14. # * Version 1.1 (26/12/2014)
  15. #   - Fixed the help window's Y position settings, it should work now.
  16. #   - Fixed sound effects. Two sound effects were playing before sometimes.
  17. #   - While I was there, added some sound effect options for you to configure.
  18. #   - Reworked the item selection window. It now shows the enchant price of the
  19. #     item too and the name of the item got a bit more space to display.
  20. #   - Added background boxes for the item, prefix and suffix window.
  21. #     Each item/prefix/suffix will have their own little background boxes
  22. #     displayed behind them. A bit easier on the eye like this, I guess.
  23. # * Version 1.2 (26/12/2014)
  24. #   - Turns out, I used an outdated version of Vlue's Randomizer (v.1.6.7a).
  25. #     I updated this script to work with the new version (v.1.7)!
  26. #     If you are using an older version of Vlue's script, you will need to update
  27. #     his script too for this script to work!
  28. # * Version 1.3 (04/01/2015)
  29. #   - Added item requirements for the enchants. One item can be allocated to be
  30. #     required for each enchant. This makes it possible to use scrolls for the
  31. #     enchants, for example. If the player lacks the required item, the enchant
  32. #     can not be selected from the list.
  33. #   - Added success chance for items and enchants. Fully configurable, of course.
  34. #   - Default hidden affix list settings added for the random enchant feature.
  35. #   - Added separate settings for the random enchant and no enchant commands.
  36. #     Now you can have different settings for prefix and suffix for these.
  37. # * Version 1.4 (10/02/2015)
  38. #   - Minor performance fixes.
  39. #   - Formatted some settings and their descriptions to be easier to read,
  40. #     understand and edit them.
  41. #   - Separated the settings from the main script. Settings are further
  42. #     separated into two parts: enchant settings and other settings.
  43. #     This is to give the mouse scroll a little break. :P
  44. #   - Added optional text options which appear before and after all enchant
  45. #     names on the enchant scene.
  46. #   - Added a script call to generate a prefix/suffix list by defining excluded
  47. #     affix IDs, which will get deleted from the default prefix/suffix list.
  48. #     The resulted list can be used in the enchant scene script call afterwards.
  49. #   - Added a script call to set the available item categories on the enchant
  50. #     scene. Now you can make enchanter NPCs where the player could enchant only
  51. #     weapons and armors, or only regular items, etc.
  52. #   - Made the enchant scene skip not valid affix IDs from the prefix and suffix
  53. #     list automatically. This will prevent crashes from typos when calling the
  54. #     enchant scene, for example, but you will still get a crash as soon as you
  55. #     start the game if you made an enchant info with a non-existent affix setup
  56. #     in Vlue's script, so make sure that that won't happen!
  57. #   - Released a demo, wow! Should have do this long time ago, sorry!
  58. #     Excuse the color setups for most of the enchants, I kinda got tired of
  59. #     setting them up after a few dozens, so I ended up copy/pasting them,
  60. #     which resulted in a lot of purple colors! :D
  61. #-------------------------------------------------------------------------------
  62. # * < Description >
  63. #-------------------------------------------------------------------------------
  64. # * This script will let you make a complete enchant system in your game.
  65. # * On the enchant scene, the player can select the item to be enchanted, and
  66. #   the prefix and suffix to be added onto the item.
  67. #   Upon confirming the enchant, the item will be enchanted with the selected
  68. #   affixes.
  69. # * Enchanting should not be free, of course, right? :P
  70. #   You can define the enchanting fee for each item and affix separately.
  71. #   The enchant fee for the item and the enchant fee for the affixes will be
  72. #   added together and the result will make the final fee.
  73. #   The player must have the final fee to initiate the enchanting process.
  74. # * If simple gold requirements aren't enough, you can define item requirements
  75. #   for the enchants too!
  76. # * Configurable success chance for each enchant and even for each item!
  77. # * Boost success chance for items dynamically for each enchant scene!
  78. #   Maybe an armorer can add enchants on armors easily, but on weapons or potions,
  79. #   he might as well suck, right? :P
  80. # * But what if the player feels lucky enough to roll random affixes on the item?
  81. #   Fret not, because this is possible too with this system, yay!
  82. #   And you can do even more! Add hidden affixes to the random pool, so you can
  83. #   hide certain affixes from the player! These hidden affixes will not be
  84. #   available for selection, but getting them is possible with selecting the
  85. #   random option!
  86. # * And if I want to skip prefix and do suffix only, or vice verse?
  87. #   Well, what if I told you that that's not a problem either? Cool!
  88. # * Ability to hide items from the list!
  89. #   I certainly wouldn't let the player enchant a storyline weapon, for example.
  90. # * Ability to hide item categories from the list!
  91. #   Make enchanter NPCs where the player can enchant weapons only or items only!
  92. # * Ability to dynamically make different enchant scenes with simple script calls!
  93. #   Let your cities get unique enchant shops with different available affixes!
  94. # * Lotsa settings for you to set up!
  95. #   Define command names, icons, colors, prices, types, categories, descriptions,
  96. #   item requirements and success chance for each affixes!
  97. #   And a lot of settings for the visuals of the menu too!
  98. #-------------------------------------------------------------------------------
  99. # * < Note-Tags >
  100. #-------------------------------------------------------------------------------
  101. # * To set a custom enchant fee for an item, use the following note-tag:
  102. #
  103. #     <enc price: X>  # Examples: <enc price: 1200> or <enc price: 360>
  104. #
  105. #   Replace 'X' with the gold required to enchant the item.
  106. #   If no custom enchant fee is set for an item, it will take the default enchant
  107. #   fee instead. You can define the default fee in the settings below.
  108. #
  109. # * To set a custom success chance for an item, use the following note-tag:
  110. #
  111. #     <enc chance: X>  # Examples: <enc chance: 20> or <enc chance: 100>
  112. #
  113. #   Replace 'X' with the success chance for the item.
  114. #   The number means percentage, so 20 means 20% for success, 100 means 100%.
  115. #   If no custom success chance is set for an item, it will take the default
  116. #   success chance instead. You can define the default success chance in the
  117. #   settings below.
  118. #
  119. # * To hide an item from the available items on the enchant scene, use the
  120. #   following note-tag:
  121. #
  122. #     <enchant hide>
  123. #
  124. #   Any items with this note-tag will not be available for enchanting on the scene.
  125. #-------------------------------------------------------------------------------
  126. # * < Script Calls >
  127. #-------------------------------------------------------------------------------
  128. # * To call the enchant scene, use the following script call:
  129. #  
  130. #     enchant_scene([prefixes],[suffixes],random?,[p_hidden],[s_hidden])
  131. #
  132. #   [prefixes] = The array of prefixes available on the enchant scene.
  133. #                You can use a range of IDs to shorten the list like this:
  134. #                  *starting_id..ending_id # (example: [*1..6,*56..80])
  135. #   [suffixes] = The array of suffixes available on the enchant scene.
  136. #                You can use a range of IDs to shorten the list like this:
  137. #                  *starting_id..ending_id # (example: [*1..6,*56..80])
  138. #   random?    = Can be true or false.
  139. #                If true, the random enchant option will be available.
  140. #                If false, the random enchant option will not be available.
  141. #   [p_hidden], [s_hidden] = The arrays of hidden prefixes/suffixes for the list.
  142. #                            These affixes will be available for the random
  143. #                            enchant option only!
  144. #
  145. #   All of the arguments are optional only, but they will greatly increase your
  146. #   control over how will your enchant system work!
  147. #
  148. #   Any valid affix ID from Vlue's script can be used for both the prefixes and
  149. #   suffixes array, as long as you have set their enchant system settings up.
  150. #   For setting up the affixes for the enchant system, refer to the explanation
  151. #   below at the "Affix Setup" instructions.
  152. #  
  153. #   The random enchant option means, that if the player selects that for the
  154. #   prefix or suffix, the outcome can be any of the currently available affix
  155. #   from the enchant list and it will be selected randomly.
  156. #   You can set up the random option's properties in the settings below.
  157. #
  158. #   If you omit the prefixes array, the enchant scene will take the default prefix
  159. #   array which can be configured in the settings below.
  160. #   If you omit the suffixes array, the enchant scene will take the default suffix
  161. #   array which can be configured in the settings below.
  162. #   If you omit the random option setup, the enchant scene will either have the
  163. #   random option feature or not depending on the settings you defined for the
  164. #   default random enchant setup.
  165. #   If you omit the hidden prefix/suffix list, the enchant system will take the
  166. #   default lists of hidden affixes. You can setup the defaults further below.
  167. #
  168. #   If you choose to omit one or more setup from the script call, you need to
  169. #   make sure that the defined option is at the right place in the script call.
  170. #   For example, if you want to set the random option to true and don't bother
  171. #   with the rest of the settings, you can't simply use 'enchant_scene(true)'.
  172. #   That will throw an error!
  173. #   Instead, you must use 'enchant_scene(nil,nil,true)'.
  174. #   Similarly, if you want to set up the suffix list only, you must use
  175. #   'enchant_scene(nil,[suffix_list])'.
  176. #   But if you want to set the prefix list only, you can simply use
  177. #   'enchant_scene([prefix_list])', and the rest of the omitted settings will
  178. #   take their default value without any error, because they will be in the right
  179. #   order.
  180. #
  181. #   Some examples:
  182. #  
  183. #     prefixes = [*1..6]
  184. #     suffixes = [*7..9,13,44]
  185. #     enchant_scene(prefixes,suffixes,true)
  186. #
  187. #   This script call will open the enchant scene where the following affixes will
  188. #   be available for selecting:
  189. #   The prefix list will have the affixes with the ID of 1, 2, 3, 4, 5 and 6 listed.
  190. #   The suffix list will have the affixes with the ID of 7, 8, 9, 13 and 44 listed.
  191. #   Both the prefix and the suffix list will have an additional "affix" which will
  192. #   be the random enchant option.
  193. #   No other affixes will appear on the prefix/suffix list.
  194. #   The random enchant option will get the default list for prefix and suffix
  195. #   added to the possible enchant outcome pool.
  196. #
  197. #     pref = [50,51,81,82,35]
  198. #     suff = [61,62,91,92,12]
  199. #     hidp = [53,54,89,90,36]
  200. #     hids = [70,72,97,98,13]
  201. #     enchant_scene(pref,suff,true,hidp,hids)
  202. #
  203. #   Getting a pretty big script call here, ehh? :P
  204. #   So what happens with this script call? This happens:
  205. #   The prefix list will have the affixes with the ID of 50,51,81,82,35 listed.
  206. #   The suffix list will have the affixes with the ID of 61,62,91,92,12 listed.
  207. #   The random enchant option will be enabled.
  208. #   The random enchant option will have the following affixes added to the pool
  209. #   of possible affix list gotten:
  210. #   The hidden prefixes are the affixes with the ID of 53,54,89,90,36.
  211. #   The hidden suffixes are the affixes with the ID of 70,72,97,98,13.
  212. #   The hidden affixes will be carefully categorized, just like the normal affixes
  213. #   on the list, so you don't have to worry about a weapon getting an armor affix,
  214. #   for example. Awesome, right? :P
  215. #   This can be used to make some ultra rare and cool affixes, but can also be
  216. #   used to make some penalties for getting a "failure" on random enchant, and
  217. #   than a crappy enchant can be put onto the item. Extra useful!
  218. #
  219. #     enchant_scene
  220. #
  221. #   This script call will open the enchant scene where the following affixes will
  222. #   be available for selecting:
  223. #   The prefix list will have all the affixes from the default prefix array listed.
  224. #   The suffix list will have all the affixes from the default suffix array listed.
  225. #   The random enchant option will take the default value set in the script
  226. #   settings, so the random option will either appear or not.
  227. #   No other affixes will appear on the prefix/suffix list.
  228. #   The random enchant option will get the default list for prefix and suffix
  229. #   added to the possible enchant outcome pool.
  230. #- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  231. # * To increase/decrease the success chance for an item category, use the
  232. #   following script call:
  233. #
  234. #     edit_enc_bonus(category,value)
  235. #
  236. #   category = The category of the items.
  237. #              0 = items, 1 = weapons, 2 = armors.
  238. #   value = The value of the bonus added to the item's success chance from the
  239. #           specified category. The value means percentage, so entering 10 means
  240. #           that the success chance will be increased by 10%, and entering -24
  241. #           means that the success chance will be decreased by 24%.
  242. #
  243. # Some examples:
  244. #
  245. #     edit_enc_bonus(1,15)
  246. #
  247. #   This means that every weapon will get a 15% bonus added to their base success
  248. #   chance. Only weapons will get the bonus, items and armors will not!
  249. #   So, if a weapon got 75% base success chance, after this script call, that
  250. #   weapon will have 90% success chance (75+15=90).
  251. #
  252. #   The minimum success chance is 0% and the maximum is 100%, so the success
  253. #   chance can not go below 0% and can not go above 100% in any circumstances!
  254. #   By default, any bonus added will be cleared after you leave the enchant scene.
  255. #   However, you can change this in the settings further below.
  256. #
  257. #   The original purpose of this script call was to make it possible to give
  258. #   bonuses to specific enchanter NPC types, like armorers, weaponmakers, or
  259. #   alchemists, etc. But it can be used for other things as well, use your
  260. #   imagination! :P
  261. #- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  262. # * If it is easier to exclude some affixes from the default prefix/suffix list,
  263. #   and use the resulted list in the script call, instead of simply listing all
  264. #   affixes available with the default enchant scene script call, you can do
  265. #   the list quickly with the following script call:
  266. #
  267. #     exclude_enc(type,[list])
  268. #
  269. #   type = The type of the list used in the script call.
  270. #          Two options available:
  271. #           :pref = Will use the default prefix list.
  272. #           :suff = Will use the default suffix list.
  273. #   [list] = An array of affix IDs. These IDs will get deleted from the used list
  274. #            and the created list can be used for the enchant scene script call.
  275. #
  276. #   Examples:
  277. #
  278. #     exclude_enc(:pref,[*35..40,*65..70])
  279. #
  280. #   In this example, the default prefix list will be used, and from that list,
  281. #   the following affix IDs will get deleted: 35,36,37,38,39,40,65,66,67,68,69,70.
  282. #   The remaining affix IDs will form the new list and can be used in the enchant
  283. #   scene script call.
  284. #
  285. #   You can store the list in a variable and than use it in the enchant scene
  286. #   script call like this:
  287. #
  288. #     list1 = exclude_enc(:pref,[*35..40,*65..70])
  289. #     list2 = exclude_enc(:suff,[*85..90,*125..130])
  290. #     enchant_scene(list1,list2)
  291. #
  292. #   This script call will open the enchant scene.
  293. #   The available prefixes will contain the affixes from the first list generated,
  294. #   while the available suffixes will contain the affixes from the second list
  295. #   generated with the exclude script call.
  296. #
  297. #   You can use the exclude lists for the hidden prefix and suffix lists too.
  298. #- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  299. # * To make enchant scenes where the player can only enchant items from a
  300. #   specific category, you can use the following script call:
  301. #
  302. #     enc_categ([categ])
  303. #
  304. #   [categ] = An array of categories.
  305. #             Valid categories: :item, :weapon, :armor
  306. #
  307. #   For example, if you want an enchanter NPC who can only enchant weapons and
  308. #   armors, you can use this script call before making the enchant scene call:
  309. #
  310. #     enc_categ([:weapon,:armor])
  311. #
  312. #   The player will not be able to see any regular items on the enchant scene,
  313. #   only weapons and armors.
  314. #
  315. #   A new setting has been added which lets you configure if the enchant
  316. #   categories reset once the player has left the enchant scene or not.
  317. #-------------------------------------------------------------------------------
  318. # * < Installation >
  319. #-------------------------------------------------------------------------------
  320. # * In the script editor, place the Enchant System scripts below
  321. #   Vlue's W/A Randomizer but above Main.
  322. #-------------------------------------------------------------------------------
  323. # * < Compatibility Info >
  324. #-------------------------------------------------------------------------------
  325. # * No known incompatibilities.
  326. #-------------------------------------------------------------------------------
  327. # * < Known Issues >
  328. #-------------------------------------------------------------------------------
  329. # * No known issues.
  330. #-------------------------------------------------------------------------------
  331. # * < Terms of Use >
  332. #-------------------------------------------------------------------------------
  333. # * Free to use for whatever purposes you want.
  334. # * Credit me (Sixth) in your game, pretty please! :P
  335. # * Posting modified versions of this script is allowed as long as you notice me
  336. #   about it with a link to it!
  337. #===============================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement