Wow, thank you so much for the quick and awesome reply @Naomi_Pentrel !
I’ve gone and made my schemas around that, and it looks like this now:
const mongoose = require(‘mongoose’);
const playerSchema = mongoose.Schema({
_id: mongoose.Schema.Types.ObjectId,
userID: String,
userStamina: Number,
monsterParty: [monsterSchema],
monsterStorage: [monsterSchema]
});
const monsterSchema = mongoose.Schema({
_id: mongoose.Schema.Types.ObjectId,
monsterSpecies: String,
level: Number,
xp: Number,
happiness: Number,
});
module.exports = mongoose.model(‘Users’, playerSchema, ‘users’);
module.exports = mongoose.model(‘Monster’, monsterSchema, ‘monsters’);
As for how the game works, the basics is this:
The game runs on the Discord chat service as a bot, and is intended to be played a few times a day in short bursts - Stamina is intended for this purpose, and all actions (fight a random trainer or fight a random monster) costs Stamina, which recharges by a certain amount each hour.
Fights are resolved immediately once started, there are no turns or further player interaction there. You press the button to fight and you then win or lose. Same with monsters, except you get the choice to catch them if you win.
I would like to eventually add a store and the ability to buy items to care for your monsters and items to catch new ones, later down the line once I’m more acquainted with everything.
About the general list monster collection, how would I approach making something like that? I was going to just code that into the bot’s javascripts, so that I don’t have to ask the database about it. But with that aside, I would actually like to learn how to do what you mention because I’d like to learn more of course! So, would it be just one “pokedexEntry” schema, which I then fill with information, yes? When in the code should I fill it in with the information?