Help - Search - Members - Calendar
Full Version: [Sub] FF12 random chest/item combo
RPG RPG Revolution Forums > Scripting > Event Emporium > Eventing Tutorials
Braska
For whatever reason today, while making soup, I thought it might be a cool thing for my game to have treasure chests similar to those found in FF12. That is, some chests in FF12 don't always appear when you enter an area. They have a certain probability of appearing. Following that the item within isn't always the same either, it too has a certain % chance to appear. Like getting a second/third/2435235 Zodiac Spear for example. There's a chest that allows you to do so, even though the chance of actually getting a Z-Spear from it is horrendously low, something like 1/1000 or 1/10000 if I recall. Anyhow, I figured it would be nifty to event this sort of thing for dungeons and such. For my setup it takes 4 event pages. Here are the pictures of the first 2 that I set up.

Page 1


Page 2



The first page handles whether or not the chest actually appears. If it doesn't it activates self switch C which leads to page 4, and contains no data at all, effectively making it no longer exist. If it does appear it kicks on switch A, going to page 2. Page 2 handles the random item inside and then activates page 3 which is the typical "open chest" page. So far this seems to work pretty well. Some folks liked this in FF12, some hated it. I just thought I'd share the idea.

Also, the one thing I -would- like some help with is a possible means to reset this every time you enter an area. I'm thinking maybe I'd have to create another variable set that dealt with the chest appearing when you enter an area each time. I think maybe if I seperate the first variable, whether or not the chest appears, and put it in a seperate event, then maybe I can achieve this. It would give the potential to reset the chances each time you enter the area, I think. I'll play around with it and see what happens..
Xigre
To make the event replay (appearance chance and item variable included) every time the player enters the map.

I'll use the event you created in the topic post as a starting point (so you can just copy and edit it because the effect is nearly the same).

Step 1: On event page 1, change "Control Self Switch C = ON" to "Erase Event".
Step 2: On event Page 2, BOTH "Control Self Switch B = ON" to "Erase Event".
Step 3: Erase event pages 3 and 4.
Step 4: To test the event, set the page 1 conditional branch to query the variable "Less than or equal to" your desired range maximum. This will make it appear every time you run the map, so you can determine if your event's "replay" function works for every time you enter/re-enter a map (and saves you time trying to get the variable to hit the conditional number)
Step5: Fin.

What is Erase Event?
Explanation of the "Erase Event" command from VX itself: "Temporarily removes an event being executed. If the player moves off the map and returns, the event will reappear."


Thank you, though. If someone hasn't already told you how to use Erase Event, I helped you. Similarly, I did not know how to create random/percent-chance treasure chests. The help here is mutual. biggrin.gif
Braska
Ahh, that's perfect then. I never actually used the Erase Event command so I guess I just figured it was permanent. But this way makes it work almost exactly like the FF12 system. It also wouldn't be terribly difficult to put in a conditional branch that would take into account something like the Diamond Armlet, which gave increased chances for the item inside or changed it entirely.
Xigre
QUOTE (Braska @ Jul 30 2010, 07:41 AM) *
Ahh, that's perfect then. I never actually used the Erase Event command so I guess I just figured it was permanent. But this way makes it work almost exactly like the FF12 system. It also wouldn't be terribly difficult to put in a conditional branch that would take into account something like the Diamond Armlet, which gave increased chances for the item inside or changed it entirely.


Yeah, just put a conditional branch that essentially states
Conditional branch: [chest item booster] in Inventory (OR Conditional branch: if [actor] is [chest item booster] equipped
>Variable [your 1...100 variable] +=[number]
>[Original item get conditional branch]
>Erase Event
else
>[Original item get conditional branch]
>Erase Event.

Bam. By adding to the variable after it's rolled, you automatically increase the chance of getting a better item (if you're using a simple, higher=better system). The same can be done by subtracting if the user has the opposite sort of item.

On a slightly more complex note, you could make it so that the character's alignment (using an alignment system) alters the outcome of the item roll - by either adding, subtracting or changing the roll over to a completely different set of items entirely, depending on the alignment class of the actor/character when they open the chest.

On an even more complex note:
You could also create events that +1 or -1 your item rolling variable throughout the game (if all of your chests rely on a single variable, of course), increasing or decreasing the likelihood of getting a good/bad item (as in the DS game "Glory of Heracles", where taking items from cabinets in shops/ houses lowers your chance of getting the ultimate weapons/armors, even to the point of permanently removing the chance if you take ALL of the items in cabinets - it's to prevent you from stealing, but the items in the cabinets boost stats and such as well).

The exact same thing can be done with the variable that allows the chest appear in the first place. So, instead of giving your players less of a chance to get an item from the chest, you could give your players less of a chance to have the chest appear entirely. Or both.
Kaimi
@Braska: Could you post a demo? Please. I don't quite understand...
Braska
I'll put one together real quick tonight sometime biggrin.gif
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.