Pine Towers

Knight Hospitaller
Veteran
Joined
Nov 11, 2015
Messages
467
Reaction score
227
First Language
Portuguese
Primarily Uses
RMMV
Hello guys!

I don't know if this would be better here at JS support or at MV subforum, so I apologize firsthand.

My idea is the quantum treasure chest. Let me explain:

The party enters a dungeon with 5 chests (A, B, C, D, E). Previously the game developer make a list of 7 items to be granted as treasure (1 per chest). He also noted that one chest will actually be a Mimic monster. The chests are always at the same spot, but when the party opens the first chest (be it A, B, C, D or E), it have a 1/8 chance of being a Mimic or getting one of the items. Whatever happens (item or monster) is removed from the list of possible outcomes, so when opeing the second chest they have a 1/7 chance of getting whatever remained. And so on for the others chests, making possible to not trigger the monster and have 5 items at the end, with said items being any of the 7 in the list (so in any playthrough, at least 2 items won't ever be acquired by that chests in that dungeon).

Can this already be done via variables or only through JS? And there is a way to improve on the odds? Like having 4 items, but item A is 50% more easy to find than item B and C, with item D being 50% harder?

This could be use to assign different behaviours to NPC or even interior of houses, since the main idea is the same.

Thanks for the input!
 

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
725
Reaction score
583
First Language
French
Primarily Uses
In a simple form it's probably possible to do with variables and switches. However, it becomes really tedious to do if you have a lot of options and even more if you want unequal probabilities. It's one of those things that's really easy to do with a plugin but really hard to do with pure eventing.

I had however made a plugin that allowed to do most of what you want. Adding monster encounters to loot tables and the possibility to remove the picked option from the loot table took me 5 minutes so I went ahead and created a new version because I liked the idea. You can check it in my signature, under random loot.
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,648
Reaction score
14,392
First Language
English
Primarily Uses
RMVXA
Actually, its pretty easy with pure eventing, as it is just mathematics. Figure out all the probabilities, make sure they add to 100. Then set them up in a list in order, then have a random variable roll between 0 and 100, and based on where that variable is, give the appropriate event.
 

Astfgl66

Veteran
Veteran
Joined
Jan 5, 2016
Messages
725
Reaction score
583
First Language
French
Primarily Uses
That part is indeed easy. What I couldn't get to work easily with eventing is the second part: removing already picked options. I mean I can get it to work but it's really tedious.

Maybe you have a way to do it I haven't seen though. I must admit beginning eventing it and thinking "screw it, it would be much easier to script it".
 

Pine Towers

Knight Hospitaller
Veteran
Joined
Nov 11, 2015
Messages
467
Reaction score
227
First Language
Portuguese
Primarily Uses
RMMV
Thank you, @Astfgl66 for the plugin, will check it out! The probability part, like @bgillisp said, is "easy" to event, but not the removing something already pick, which is the most important aspect of what I called the quantum treasure chest.
 

Latest Threads

Latest Posts

Latest Profile Posts

Next goal is to make pull & push + lift & throw systems with mouse support and have skill levels in them and action indicators!
>What's your avatar about? Is it yours?
I did not do that drawing. It's a screenshot taken from a comic featuring characters from Touhou such as Tenshi and Iku (the girl in the avatar). It's drawn by someone under the name of Yohane.
Link to the comic (SFW, but navigating around Dynasty Reader is NSFW)
Progress on my game is nearly done, so I figured I show you guys the title screen. I hope you like it!
Title Screen.png
Does this ever happen to anyone?: your making a battle sprite [or any sprite] then when you mess something up you then see it as something diff, then working with it? its hard to say in words but it happens to me all the time
found out how to change pfp, literally there's a hidden thingy on the bottom of it

Forum statistics

Threads
109,167
Messages
1,042,667
Members
141,665
Latest member
beauty143
Top