This script was designed to imitate an item charge effect on consumable items. I had this script created within my own project/game and I thought someone could find it useful. Easy and efficient. Click to expand...
Features
The ability to have an item charge count on a consumable item for multiple uses. By default the game engine works similar in this way without the concept of non-stacks. The script is designed/intended to be used with Hime - Instance Items and is also a requirement for this script run and work. Click to expand...
# If item charge equals 1 - remove the "1" number value on item name
if $reduced_charge.to_s == "1"
$item_name = $item_name.gsub!(/\d+/,"")
end
# Places item variable back into "item.name"
item.name = $item_name
@category_window.activate
# When no number in item name - treat item as normal usage
else
user.use_item(item)
# If consuming last item in list, move cursor to top of list
@item_window.select(0) if item == nil
end
use_item_to_actors
check_common_event
check_gameover
@actor_window.refresh
# Added to provide a true item charge usage feel
@actor_window.deactivate.unselect
else
# If switch is turned off - perform original use_item call
fg7_easy_item_charges_use_item
end
end
end
复制代码
How to Use
Add this script in the script editor under in the "Materials" section and above "Main Process".
The instructions and setup for the script are held within the script header itself. No need to repeat here. Click to expand...
Terms of Use
- Free to use in non-commercial projects and commercial projects
- Feel free to modify and improve the script. Credit is still required.
- Credit FamilyGamer7 Click to expand...