+1 vote
by (150 points)
Hey, I'm trying to figure out how I could make an inventory and a store where you can just buy things but I only really know beginner stuff when it comes to coding and when I try to search anything on it it just doesn't seem to make any sense to me or it just redirects the person to something else that still doesn't make any sense. Is someone able to show me through this or can someone show me some kind of text for me to paste or a story to look through to try and figure out the works of the code for myself?

2 Answers

0 votes
by (61.5k points)
You can try out my inventory system to get you started:

https://github.com/ChapelR/custom-macros-for-sugarcube-2/blob/master/docs/simple-inventory.md

You'll likely need to extend some of its functionality, though.
0 votes
by (36.8k points)

For working with an inventory/store/etc., I'm currently in the middle of making a "plugin" for Twine 2 / SugarCube 2 to make working with inventories easier.  Here's a slightly older version of the Universal Inventory System (UInv) that I'm working on with a bugfix in it.  The current version is too untested for even a pre-release at the moment, but the "UniversalInventorySystem.js" file has a little bugfix in it that you'll want to use to replace the JavaScript code in the two Twine files I've included (it should say v0.8.6b if you're looking at the right JavaScript code).

Universal_Inventory_System_v0.8.6b.zip  (link expires on 5/11/'18)

Take a look at the included help file (UInv_Help_File.html) and let me know if you have any questions, problems, or suggestions.  (You can PM me here.)

When it's actually ready for a full release I'll probably put it here.

Hope that helps!  :-)

Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.
...