Search Unity

Question SinglePlayer RPG database

Discussion in 'Scripting' started by stychu, Mar 29, 2021.

  1. stychu

    stychu

    Joined:
    May 9, 2016
    Posts:
    62
    Hello,
    for a few days already I'm looking around for the best practice use case of making the Single Player Experience game. Later maybe some online capabilities.

    How I could handle the database for items in the game?

    Say I would like to have templates for items and somewhat infinite inventory.
    Items would have dynamic attributes that are randomly generated upon drop/pickup.

    So given an EquippableItem template that has:
    name
    type
    level
    strengthBonus
    agilityBonus
    luckOption
    percentageDefenseOption
    quality
    etc. etc.

    I want to generate x number of those items with randomized attributes so for example, I drop 3 items
    brave_4irfCKcv3w.png

    How to best handle randomization for such items and saving/loading.
    The player would be able to hold an infinite amount of given types of items as they would be used to feed main weapons to gain experience and level it up to increase stats/attributes. (not yet decided ofc)

    Preferably I would like to use some database with good visual support so adding/changing/removal/update would be easy and possibly able for online support in the future.


    I've looked into this project as ScriptableObjects seemed a good idea but I don't feel it especially.
    https://github.com/NuclearBand/UnityScriptableObjectDatabase (no support for SO creation at runtime)

    This one seems nice but can't see any maintenance anymore + I'm not sure if it supports runtime operations (adding new records/items at runtime)
    https://github.com/kkukshtel/castledb-unity-importer

    P.S.
    I would like to use a noSQL database if I had to choose between some good databases.

    Appreciate any opinions/suggetsions.

    Thanks!