1. Hey Guest, is it this your first time on the forums?

    Visit the Beginner's Box

    Introduce yourself, read some of the ins and outs of the community, access to useful links and information.

    Dismiss Notice

Is this possible with modding? Database..

Discussion in 'Modding [KAG]' started by BabyLeon, Feb 19, 2019.

  1. BabyLeon

    BabyLeon Shipwright

    Messages:
    3
    Can I save player data, so if the server restarts or the player leaves and comes back, their stats/class/position is restored?
     
    Blubahub likes this.
  2. Asu

    Asu THD Team THD Team Forum Moderator

    Messages:
    1,580
    You can serialize and deserialize data you want using ConfigFile. There is no builtin way to do what you describe though, so it might be a bit of a hassle to implement that depending on how much and what kind of data you want saved. For instance saving inventories may need some quirks say for blobs that store extra properties.
     
  3. Verrazano

    Verrazano Flat Chested Haggy Old Souless Witchy Witch Witch THD Team Global Moderator Forum Moderator Tester
    1. Practitioners of War Extreme Revolution - POWER

    Messages:
    477
    Yea saving blobs is pretty complicated there's a lot of random state info from properties done through scripts. You can definitely do very specific purpose stuff. And if you wanted to get more complicated you could use trpc to use a real database, but that sounds like a lot of work for something like position/class/stats
     
    jonipro and JaytleBee like this.