Coder Social home page Coder Social logo

Saving inventory about gdinv HOT 6 CLOSED

zcaliptium avatar zcaliptium commented on June 11, 2024
Saving inventory

from gdinv.

Comments (6)

rishikiram avatar rishikiram commented on June 11, 2024

I have been writing json files which I store in a specified folder that the user must set in the GDInv settings(Project -> Project Settings -> General -> Plugin Setting -> GDInv). The plugin loads all of the json files into the data base when run. The only 'save' is creating these json files. To create the json files I wrote a python script which I run through Terminal on Mac. Hope this helps somewhat

from gdinv.

kimabjorkede avatar kimabjorkede commented on June 11, 2024

@rishikiram I don't think that would work for my usage case.

I have items being add to the inventory, taken out, stacks being deleted and such.

from gdinv.

kimabjorkede avatar kimabjorkede commented on June 11, 2024

My current implimentation works kind of okay. Stuff like having multiple stacks of the same item doesn't work, and breaks.

There has to be a better way of storing STACKS in a file.

from gdinv.

zcaliptium avatar zcaliptium commented on June 11, 2024

I didn't wrote any kind of inventory (de)serialization code. I put it on game developer. Because everybody has own game saving system that different from one game to another.

Somebody uses scene nodes saving via to_json, somebody make completelly own system that deals with binary data or dozens of JSONs.

If you really want I can make default implementation of JSON (de)serializing code for the item stacks.

from gdinv.

zcaliptium avatar zcaliptium commented on June 11, 2024

I added methods for (de)serializing stack and inventory data as JSONs.

from gdinv.

kimabjorkede avatar kimabjorkede commented on June 11, 2024

Cool.

I'll see if I can implement it soon.

from gdinv.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.