I was recently wondering if there's a plugin or if its possible in the base engine. Like lets say you open a chest is there a way to make it so that the engine does a sort of "dice roll" to determine what type of item you get? I know Funger does something like this Im just interested in how they did it. Thanks yall 😛
Is a roguelike possible?
RPG Maker MV SupportDo you actually want a roguelike on-map turn based battle system or do you just want the random loot chest mechanic? For the latter you'd just declare an array of possible item ids that could be in the chest and pick a random index from it when you open it.
Yeah im mostly talking bout random items. Mind explaining how to like make the random item id chest thingie? Im sorry but i wanna implement it in my game as a sort of easy quest reward where you just clear a dungeon and get a random reward depending on the dungeon. :3
Code:
var itemPool = [1, 3, 15]; //possible item ids go here
var randomIndex = Math.floor(Math.random() * itemPool.length);
$gameParty.gainItem($dataItems[itemPool[randomIndex]], 1);
Ok thx I'll go test it out soon 😛
it could even be done without scripts because control variable can give you a random number.
that is normally just more work because you'll need a conditional branch fopr each possible item.
but you should be aware of that way with control variable for those cases where you don't need long lists.
that is normally just more work because you'll need a conditional branch fopr each possible item.
but you should be aware of that way with control variable for those cases where you don't need long lists.
Yeah I was thinking something like using branches. If possible can you show me a pic as an example? Even if it's just 3 items it would still be useful
I strongly suggest you work through several tutoprials on eventing, because this is rather basic eventing and you won't be able to get any game finished without knowing how the event commands work.
Ok thx I'm sorry I returned to RPG maker after like an year and I'm still kinda rusty I'll go check out some vids thx
Original thread: https://forums.rpgmakerweb.com/threads/is-a-roguelike-possible.170267/