- Joined
- Dec 9, 2013
- Messages
- 195
- Reaction score
- 40
- First Language
- German
- Primarily Uses
Hello there.
Nearly a year ago I made a thread, asking for a plugin. I have started with the game by now, but it's still not much. Looking back, the whole thing with chests containing random items can easily be done with common events. However, I still need a plugin for a dynamic shop.
What it should do
The game I want to make is a dungeon crawler/rogue like. Similar to The Binding of Isaac the shops in the game should be able to sell you a few items, chosen at random from all available items you have unlocked. Let's say at the start of the game you have 10 out of 20 items unlocked, so the shop can only sell you these 10 items. However, after some time, opening a specific amount of chests or defeating the boss a few times, new items get unlocked. The shop can now sell you 15 out of the 20 available items. So for once, the shop should be able to look if a specific item is unlocked (with a switch or a variable) and if it is, it can be sold to the player.
The second thing it should be able to do, it should only sell a small number of items, but this can increase over time. So if you start a new game, the shop can only sell you 3 items. But after having beaten the boss with 3 classes, the shop can now sell you 4 items. And after beating the boss with 4 more classes, it can now sell you 5 items. All chosen at random like I described above. And this could increase to god knows what number (or in my case, something like 10 would be more than enough).
Lastly, some items should be "fixed" or have a fixed category. For example, the first item the shop sells is always a potion or an item from the potion category. The second item is always a weapon. The third item could be any unlocked item. And later the fourth item could also be any unlocked item, but the fifth one may be from a "stat booster" category. So I need to be able to give items either categories or choose a specific item range that is sellable.
Items can be bought more than once, so the plugin would also have to look if an item is already available, so the shop doesn't have duplicates (but this is not that important, if duplicates are available it could also be used to troll the player xD).
How it could be done
I do have an idea as for how it could be implemented, but no idea how to actually do it. The idea would be to use notetags for each item and use them to put an item into one or more categories as well as tieing them to a specific switch or variable. If the switch in the notetags is "On" or the variable is something other than "0", the item could appear in the shop in the specified category.
As an example, a "Minor Healing Potion" could have three categories: "Starting Gear", "Potions" and "All".
The first category I would use to make sure this item would always be the very first the shop sells, so the player always gets access to at least a Healing Potion. The second one could appear in any "Potion" category, so if the fourth sold item would be a potion choosen at random. The "All" category would simply be on any item, so it would be a category that sells all available items (like the third item sold, as I mentioned above).
Well, maybe this time I get a response. It's also less work than the whole chest thingy, which in retrospect was a stupid idea anyways. xD
Nearly a year ago I made a thread, asking for a plugin. I have started with the game by now, but it's still not much. Looking back, the whole thing with chests containing random items can easily be done with common events. However, I still need a plugin for a dynamic shop.
What it should do
The game I want to make is a dungeon crawler/rogue like. Similar to The Binding of Isaac the shops in the game should be able to sell you a few items, chosen at random from all available items you have unlocked. Let's say at the start of the game you have 10 out of 20 items unlocked, so the shop can only sell you these 10 items. However, after some time, opening a specific amount of chests or defeating the boss a few times, new items get unlocked. The shop can now sell you 15 out of the 20 available items. So for once, the shop should be able to look if a specific item is unlocked (with a switch or a variable) and if it is, it can be sold to the player.
The second thing it should be able to do, it should only sell a small number of items, but this can increase over time. So if you start a new game, the shop can only sell you 3 items. But after having beaten the boss with 3 classes, the shop can now sell you 4 items. And after beating the boss with 4 more classes, it can now sell you 5 items. All chosen at random like I described above. And this could increase to god knows what number (or in my case, something like 10 would be more than enough).
Lastly, some items should be "fixed" or have a fixed category. For example, the first item the shop sells is always a potion or an item from the potion category. The second item is always a weapon. The third item could be any unlocked item. And later the fourth item could also be any unlocked item, but the fifth one may be from a "stat booster" category. So I need to be able to give items either categories or choose a specific item range that is sellable.
Items can be bought more than once, so the plugin would also have to look if an item is already available, so the shop doesn't have duplicates (but this is not that important, if duplicates are available it could also be used to troll the player xD).
How it could be done
I do have an idea as for how it could be implemented, but no idea how to actually do it. The idea would be to use notetags for each item and use them to put an item into one or more categories as well as tieing them to a specific switch or variable. If the switch in the notetags is "On" or the variable is something other than "0", the item could appear in the shop in the specified category.
As an example, a "Minor Healing Potion" could have three categories: "Starting Gear", "Potions" and "All".
The first category I would use to make sure this item would always be the very first the shop sells, so the player always gets access to at least a Healing Potion. The second one could appear in any "Potion" category, so if the fourth sold item would be a potion choosen at random. The "All" category would simply be on any item, so it would be a category that sells all available items (like the third item sold, as I mentioned above).
Well, maybe this time I get a response. It's also less work than the whole chest thingy, which in retrospect was a stupid idea anyways. xD