This is it, the big one.
I finally added the functionality that allows Arashi to use one item on another item. This was a multi-tiered effort, as it started on the ground level by adding code when the player presses the B button (the default button to use abilities and items).
For the base example, here we have an empty bucket found lying around the Kinshutai campsite. Arashi decides to pick it up, naturally, since no RPG is without encouraging kleptomania.
Now this is just one option, but since I don’t want to post a million screenshots I’ll have to explain that you as the player are also more than capable of simply carrying the item you want to use rather than adding it to your inventory. That functionality is more of a direct method to interact with the world, and either way is totally valid. Use whatever you think is easiest 🙂
Now, what good is an empty bucket? We can equip it, but it doesn’t really have any uses aside from taking up space on its own.
Keep in mind that no item is truly useless; at the very least, you can sell off “junk” for some silver to buy things with. What sort of things? Well that’s for a later update, but keep in mind junk isn’t necessarily without merit even aside from its base silver value.
Now with bucket in hand and readied in the special item slot, Arashi goes to find something that gives the bucket meaning in life.
And she does a little bit to the north. Since I needed to test the functionality I didn’t really take the time to make the new water graphics, so reusing the old temporary pond I gave it the attribute of “water”. By pressing the B Button (since the bucket is the active special item) while facing the pond, Arashi promptly fills the bucket with the water in one fell swoop. Note I am using interactions like this as “keys” so to speak. Both the bucket and the pond share the key “water”, and if two items with the same key are used in tandem, they will each execute the script on each item linked to that key. So, I can add the “water” key to just about any object, and if I use the empty bucket on any item that has a water key, then it will fill up with water. This is just a basic example of interaction.
And here we can see the bucket has changed entirely to accomodate the fact that it is now a bucket of water.
This means it has its own scripts when used normally, and has its own “keys” to interact with other items. In this case, it now has the key “fire”, to interact with objects that also has the key “fire”. The bucket itself will empty out when used on a “fire”, while the “fire” item will (most likely) morph into an item that has had its fire put out. There can be several keys on every item for even deeper interactions.
I am really quite proud of this bit of programming, as it took awhile to sit down and do it. I hope that it really gives the game world much needed depth 🙂