playMaker

Author Topic: What should I tackle first when creating any kind of system?  (Read 1930 times)

rechronicle

  • Full Member
  • ***
  • Posts: 119
  • Mystvaldia
    • Indie RPG Creator
What should I tackle first when creating any kind of system?
« on: February 07, 2020, 08:00:49 AM »
Hello,
so I'm stuck here for a week trying to figuring out how to create a battle system. It's simple turn-base combat that use attack point to reduce target health.


Then thinking further, there's the inventory system. I have a slight picture of how is it going to be used in-game. Many games that I played are using this system. But again, I don't know how to build it from scratch.


Well, this data management/calculation is kind of abstract compared when I was making a 2D platformer game where I could just testing & tweaking until it's fine enough. In other words, play around with the variable & immediately see what is happening in real-time play mode.


How to solve this block?
Thanks!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: What should I tackle first when creating any kind of system?
« Reply #1 on: February 11, 2020, 12:44:15 AM »
Hi,

you have several options,

- you could check the ecosystem sample on how to read google sheets and extract data into arrayMaker arraylists: https://twitter.com/JeanAtPlayMaker/status/1037230277494558721

- you could check DataBox which offers PLayMaker support: https://assetstore.unity.com/packages/tools/utilities/databox-data-editor-save-solution-155189

- you also have BG Database, which is praised a lot as well: https://assetstore.unity.com/packages/tools/integration/bg-database-112262

Bye,

 Jean

rechronicle

  • Full Member
  • ***
  • Posts: 119
  • Mystvaldia
    • Indie RPG Creator
Re: What should I tackle first when creating any kind of system?
« Reply #2 on: February 11, 2020, 09:09:56 AM »
Hello,
I keep getting 'XML source is empty, or likely invalid' error message. All I do now is skipping the playerPref setup and get data from the spreadsheet URL using the format string action, like in the example.

Is setting playerPref a must? Can I just immediately get XML from google sheet and convert it into the arraylist?

Not sure where I get it wrong, I believe it should be at least found the XML data.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: What should I tackle first when creating any kind of system?
« Reply #3 on: February 12, 2020, 01:47:50 AM »
Hi,

 you likely broke the algorythm when you removed the playerprefs logic.

playerprefs is not a must, but indeed, highly recommanded to avoid processing stuff you already have. plus the magic with playerprefs is that should internet be not accessible, your game would still work. I even go as far now as having a text version of the googlesheet so that even without anything in the prefs, and should internet be unavailabe, I fall back and load the sheet from the text asset, so I have now an application that will get the latest data only if it can and will never actually require internet.

before you edit the fsm, you need to understand all the implications of it, and that's indeed some complex fsm logic, so go back to the original version, and try to understand how to remove playerpefs usage, however, I made this so that you don't need to worry about it, it's plug and play really after you've setup the access.

Bye,
 
Jean

rechronicle

  • Full Member
  • ***
  • Posts: 119
  • Mystvaldia
    • Indie RPG Creator
Re: What should I tackle first when creating any kind of system?
« Reply #4 on: February 12, 2020, 06:34:14 AM »
I manage to get the XML data from google sheet! It appears that the sheet must be published first, setting it to 'Anyone can view' is not enough.

The PlayerPrefs also has been set up as well to prevent error when there's no internet connection. Just wondering what is 'gsx:name'? It returns the wrong value if I don't use it.

And to confirm, does it will always get the data in a row to the bottom? (Ex: the Year row)

Thore

  • Sr. Member
  • ****
  • Posts: 480
Re: What should I tackle first when creating any kind of system?
« Reply #5 on: February 12, 2020, 09:23:46 AM »
Generally, for finding the starting numbers: you start with two out of three numbers, duration (of encounter), damage per turn, and total HP (= total damage dealt in duration). To set them in relation is some basic math, like so.

Example: an encounter takes 10 attacks (turns). Each attack deals 10 damage, thus the enemies in the encounter need to have 100 HP (damage x attacks).

Example: you want that enemies have 1000 HP, and the fight should last 5 turns, then you need 200 damage per turn.


Once you have some sensible basic numbers, you can complicate it. For instance, 1 STRength = 10 damage. So you derive some basic stats. Or you factor in 20% of attacks are misses. An encounter actually has 3 enemies, thus you divide the total HP between them and so on.

The numbers should be sound in an calculation sheet, and you can then see that you simulate how it plays out. This should be entirely numerical at first, to see that the predictions are right.

I would prototype visuals in a different scene, and hook it up with quick key down actions. This allows you to quickly test how the attacks etc look like and that they work. Finally, you put both together.

Start with the reduced complexity. E.g. no item use yet, only auto attacks and one example special attack etc. Then gradually bring in new features.

rechronicle

  • Full Member
  • ***
  • Posts: 119
  • Mystvaldia
    • Indie RPG Creator
Re: What should I tackle first when creating any kind of system?
« Reply #6 on: February 13, 2020, 09:08:04 AM »
@Thore got it, going to try making the basic stuff. Thanks a lot!
Speaking of reduced complexity, most of the time I know what I want, but don't know how to break it down into small chunks / see how it works behind the scene. Hopefully, it will become clearer the more I do.