Help - Search - Members - Calendar
Full Version: Runic Enchantment
RPG RPG Revolution Forums > Scripting > Script Tutorials > RGSS3
Kread-EX
Runic Enchantment


Version: 1.05

Author: Kread-EX


Introduction
This script is more or less inspired from the enchantment system as found in the game Dragon’s Age. To summarize, you have equipment, and you have runes with certain properties. And you can add or remove runes as will on specific enchant-able equipment pieces.

Important note: Once you enchant a piece of equipment, every copy will be enchanted too!
If you want different instances of the same piece, then please try the Individual Equipment Patch.
This script requires the Traits Namer!

Instructions

The equipment piece
By default, you can't enchant equipment at all. In order to enable it, you need to tag your weapon or armor using their notebox:
CODE
<enchant>

Additionally, you can specify the number of rune slots:
CODE
<rune_slots: x>

There is a default slot number that you can modify in the script configuration part:
CODE
RUNE_SLOTS_MAX = 5 # the default layout can support up to 5 runes


The runes
For convenience, runes are in fact armor type items with the <rune> notetag. Make sure that their armor type is set to None so they won't be able to be equipped. Now give to the rune whatever trait you want - every trait will be passed to the equipment piece. The default layout only displays 5 traits but even if you use more, they will all be active.
Three more options exist:
CODE
<weapon_rune>
<armor_rune>

These two tags make a rune weapon or armor-exclusive.
CODE
<unique>

This tag prevents inscribing two times the same rune on the same piece.

If you want to runes to be their own category, I recommend you to use Ace Item Menu.

The scene
Use a script call to enter the enchantment scene:
CODE
SceneManager.call(Scene_Enchant)

Alternatively, you can integrate it to the main menu using Ace Menu Engine and adding :enchant to the list of commands.

Screenshots


This highly inappropriate picture is brought to you by "One day in Kread & Nessy's MSN fantasies." Enjoy!

Script
Download

Compatibility
Should work with most YF menus.

Terms and Conditions
You are free to adapt this work to suit your needs.
You can use this work for commercial purposes if you like it.
Credit is appreciated.
Watfordj
when ever i go into the enchant scene i get a nomethod error at line 417.
Kread-EX
Hmmm... what did you do to trigger the error?

EDIT: wait got it, it happens if you hit the enter key on a nil item. It shouldn't do it anymore now. Yep, apparently I forgot to remove a test rune so my debugging has been messed up as a result. Sorry for the trouble ;__;
Watfordj
weapons and armor with the <enchant> note tag don't show up in the enchant scene.

EDIT: nevermind i figured out that equiped weapons and armor cant be enchanted.

can this script raise stats?
Kread-EX
No, it just adds traits.
kayden997
Interesting idea.
Bad picture.
Will try out.
Thank you.
Kread-EX
v1.04 - new options and optional compatibility patch for Fomar0153' Individual Equipment.
Kread-EX
v1.05 - fixed a game breaking bug.
lyrel18
Love this script.
Great idea. biggrin.gif
Raynex
I don't know what I am doing wrong... I have placed Runic Enchantment, the TraitsNamer script and the Individual Equipment script (Under the "Materials" section), but when Im going to load the game, a message box appears and says that "I need TraitsNamer in order to use Runic Enchantment. Loading Aborted.", and then "You need Runic Enchantment for this patch. Loading Aborted." What do I do wrong?

[Edited]
I fixed the problem with the scripts, but I can't make the weapons/armors with the <enchant> tag appear at the enchanting screen. I create a dagger and I add at the notebox:

<enchant>
<rune_slots: 2>

Then I make a rune for it, and I add in the notebox:

<rune>
<weapon_rune>

But when I launch the enchanting screen, there is no weapon there... What do I do wrong?

[Edited]
After many hours of searching, i found out that the problem was on Individual Equipment script. When I removed that script, all worked just fine. I'll use it only on special weapons then since it changes all weapons of the same ID. Thank you for the very nice script. It will make my game way more interesting! :-)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.