Save-Point
Automatic Equipment Optimization - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Material Development (https://www.save-point.org/forum-8.html)
+--- Forum: Scripts Database (https://www.save-point.org/forum-39.html)
+---- Forum: RPGMaker XP (RGSS) Engine (https://www.save-point.org/forum-116.html)
+---- Thread: Automatic Equipment Optimization (/thread-2760.html)



Automatic Equipment Optimization - RPG Advocate - 03-02-2008

Automatic Equipment Optimization
by RPG Advocate
saved from Phylomortis.Com


Introduction
This script modifies the equip screen so that if you press "X", the equipment in the slot selected by the cursor will be optimized, and if you press "Y", then all equipment slots will be optimized. You can change how the algorithm chooses the best equipment by changing the weight constants included with the script. In some games, accessories are not used to boost stats, so optimizing them by stats is pointless. If your game is one of those games, change the constant NO_ACCESSORY_OPTIMIZATION to true to prevent accessories from being subject to the optimization algorithm.

Some lines of code in the optimize algorithm are provided for compatibility with my two-handed weapon script. If you're not using this script, comment out or delete the lines marked in red in the optimize method.

EDIT BY DERVVULFMAN: Lines of code have been added work better with either the two-handed weapon script or the cursed weapons/armor script. In either case, place this script below the other(s).

Optimization will not be possible if a player has a cursed item as that item is intentionally not removable.


Demo
>Click<


Script
Automatic Equipment Optimization