Some RPG-related macros?

0 votes
asked Mar 20 by SmuJamesB (2,650 points)
edited Mar 21 by SmuJamesB

I want a macro that creates an inventory. It will work like this:

<<inventory [width] [height] [variable]>>

Items will be draggable within the inventory and the [height] is it's height, [width] is it's width, and [variable] is the variable it modifies. It should not be reset with the reloading of a page, and items should be draggable between multiple inventories. The items in the inventory should be stored as a list. In other words, I want an inventory similar to the one in the sidebar of Adventures, but with an unlimited number of inventories availible at any one time. Navigating away from the page will save the current items in the inventory to the variable [variable].

And I want a macro that creates an item, like this:

<<item [name] [tag] [image url]>>

Items can be placed in inventories and dragged between multiple ones. The [image] will automatically be resized to fit within the inventories. What JavaScript do I need for this?

Edit: this might help, as it uses drag-and drop: Using drag and drop to set variables

2 Answers

0 votes
answered May 7 by Liamw104 (2,880 points)
I found this on the old forum, it's for linking keys and links. It's not exactly what you asked for but its a key component for making an RPG game.

https://twinery.org/forum/discussion/comment/21137/

Its also looks like you want an array of your inventory. I'm not very good with that so I'm going to leave that for someone else.

BTW

This may help if you want to make an RPG game, it's really easy to use and its free, you may want to use Aseprite for making sprites but that's 16$.

http://rpgboss.com/

https://www.aseprite.org/
+2 votes
answered May 8 by Chapel (51,430 points)
This isn't a question. This is a request for for someone to literally build a system for you. If you want that, hire a programmer.
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.
...