Happy Friday gang, hope you’ve all had a good week! It’s been another good week as far as my game goes – there’s the makings of a random encounter system!
I spent Tuesday messing about with the Advanced Random plugin, specifically the probability tables aspect of it. Probability tables are easy to get started with, but they’re surprisingly versatile. If you need a random value from a pool of weighted numbers, use a probability table!
In terms of my game, I’m going to be using them for the aforementioned encounter system, and probably also random item drops/boxes. I’ve got an idea to include a crafting system in this game, so it’d be nice to be able to find random crafting items in the overworld. Probability tables would be ideal for this!
In a nutshell, I’ll develop all of the probability tables I’m going to need – available Divimals per route, item sets for spawn points etc. Then they’ll all be loaded into the game on startup with their own IDs. Objects that use these tables will have an instance variable to tell the game which table to use, and random outcomes will be picked accordingly. We can also make changes to the tables at runtime, so once the player meets certain conditions, we could add a new divimal or item to an area for example. I’m quite excited about figuring out things to do with this!
I’m in the process of writing a tutorial to show how to use probability tables, with not one, but two example projects! A basic one demonstrating how to create and populate tables manually and draw values from them, and a more complex one showing how to load probability tables from a JSON file, use them in a dictionary, save them to local storage and so on. The projects are built, I just need to write the tutorial, so hopefully that’ll be ready soon.
Whenever I hit a wall with this, then I dip back into developing the lore and designing various bits and pieces for this game. So, as a quick update, the dex (or encyclopedia as it’ll probably be known) is starting to take shape. I’ve got ideas for the three divimals you’ll choose from during the Beginner’s Trial (avoiding the traditional fire/water/grass combo) as well as a couple of other divimals to feature later in the game. Once I’ve got some designs fleshed out, I’ll share them in the forum thread.
There are more bits of the advanced random system I need to build into the game, so that’ll keep me occupied for a bit. But I’m also now going to start looking at how to store stats and other bits of information regarding to our creatures – if we’re going to be encountering things, they need some information applied to them right? Arrays are probably the answer, but I need to look at how best to implement them. So, on that note, let’s wrap up this blog post for another week! Have a good weekend 👋