Just working on the inner workings of an RPG system. No UI stuff yet, just the underpants system. I'm modeling it after Dragon Quest VIII with an intention and hope of making a turn-based RPG in that style as it is my favorite RPG.
- Screen Shot 2014-07-08 at 7.04.56 PM.png (72.39 KiB) Viewed 3841 times
What you can see above:
Inventory listings at the top. Two kinds of inventories. One type for each character in your party and another type for the bag of holding. The player inventories are limited in how much can be carried. While the bag is infinite. The party inventories are simple numbered table lists numbered 1 through item count with each sub-table having an item ID name and an equipped flag. For example: "herb", "herb", "shield", "pill", "pill". In the case above, the shield is equipped and its flag is true. While the bag inventory is a table with item ID named sub-tables each with an integer value of how many you have of each item. A simple inventory.bag["herb"] = 2 basically.
I wrote functions for adding to and removing from each inventory and one for transferring from one to another. When all instances of a specific item are removed from the "bag" then its entry is deleted. When one is added in, if it's not created yet, an entry is created and it is set to 1.
On the bottom you see a sample party member stats system. Each member's stats are calculated from their base stats entry for their corresponding level in the "base stats" table, which includes what stats a party member should have at a specific level, how much XP they need for that level, what spells they learn and how many Skill Points (If I end up using a Skill system that is) they gain when they level up to that level.
The left table shows the base stats numbers. The right table shows the recalculated stats. The recalculation takes into account how much of each stat extra the character should have gained from things like weapons and armor and other accessories. It adds all that extra stuff up and adds it to the base stats for the appropriate values. In this instance you see I currently have a "Shiny Magical Shield" equipped. Which in this case gives you extra defense, offense and magic point limits.
Next to that you also see a list of the spells I currently know.
In this example, I copied all the stats from a DQ8 FAQ for demonstration and testing purposes.
I have also leveled up in this example. I wrote a function for safely leveling up that counts how many levels you gained and what spells you now learned and returns them for use in the scripting system later. I made sure it's fail-proof so even if I were to add 1000XP to level 1, which would in essence level me up to a pretty high level all in one moment, I wrote it to make sure it steps through the process instead of just adding the XP and potentially accidentally skipping over a level if you get enough XP all at once.
I also added colorful floating bouncing squares just for the heck of it in the background.
I think the hardest part is going to be writing the battle system.