RPTools.net

Discussion and Support

Skip to content

It is currently Thu Jan 18, 2018 12:54 pm 






Reply to topic  [ 111 posts ]  Go to page 1, 2, 3, 4, 5 ... 8  Next

Previous topic | Next topic 

  Print view

Author Message
User avatar  Offline
Great Wyrm
 
Joined: Sat Jun 21, 2008 12:07 am
Posts: 1950
 Post subject: Plo's Inventory Manager
PostPosted: Tue Jun 29, 2010 7:42 pm 
EDIT: Here's the lastest pass at my inventory system with incorporated coinpurse function and weight-tracking/wand charges support. Installation has been greatly simplified, and hopefully all major bugs have been squashed.
Attachment:
Inventory Demo.jpg
Inventory Demo.jpg [ 101.94 KiB | Viewed 7545 times ]


Features:
-Add any number of items with data for item weight, number carried, and a description.
-Create "containers" that allow other items to be placed inside them (just to help you track where stuff is)
-Sort items by name (alphabetical with items in containers all placed indented after the container), or by weight, or by quantity.
-Total weight of all carried items
-Ability to tell the manager to ignore the weight of any entry (say for bags of holding, etc.)
-Add or ignore weight of coins from the coinpurse
-Set a reminder by the total weight as to how encumbered you are (current macro gives prompts according to 4E rules, but these prompts can be ignored).
-Full non-magic weapons/ammo/armor/gear pre-coded for D&D 4E (use of this entirely optional)
-Ability to create wands with any number of charges, use charges (1 at a time with a report of the use), and recharge.
-Item transfer function allows you to pass an item between tokens via a series of links sent between players.

At present, it uses data stored on the lib for quick additions of gear, and the info is from the D&D 4E players handbook, but additions can be made manually as well, so there's really no limitation here - just ignore the 4E data if you don't want it.

Installation (now with 62% more easy):
-Drop the lib into your campaign and make sure it's player-visible.
-Make sure the lib is called "Lib:inventory".
-Check the notes on the lib for a brief comment on the few possible-but-unlikely conflicts.
-Drag or copy the black "Open Inventory" macro button to tokens or to the global/campaign panels (make sure apply to selected is checked)
-Select a token then click said button and you should be off and running.


invlib4E_v1.1.rptok [68.07 KiB]
Downloaded 1174 times

_________________
Drop-In Utilities:
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).


Last edited by plothos on Thu Jul 08, 2010 12:19 am, edited 2 times in total.
Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 7983
Location: Bay Area
 Post subject: Re: Plo's Inventory Manager
PostPosted: Tue Jun 29, 2010 8:51 pm 
Lately, I've become a big fan of not using campaign properties. Can you put a check in your open code to check for the properties and if not there run a setup where they are defined. I find there is very little need for most properties to be manually edited.

edit: Maybe write a custom property like setProperty("h.inventoryManagerVersion",versionNumber,currentToken()) and do a check for that value. Also, if there is a future upgrade this property can be checked as well if more props or whatever needs to be done.

_________________
Downloads:


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Sat Jun 21, 2008 12:07 am
Posts: 1950
 Post subject: Re: Plo's Inventory Manager
PostPosted: Tue Jun 29, 2010 9:42 pm 
Not 100% sure what you're asking for or what the issue is. I mean, I could go through the code and replace all the prop calls/definitions with getProperty() and setProperty() stuff to use hidden props. Or are you asking me to check if there's a property called Coinpurse and if not to use a macro to define it so the GM doesn't have to do it via campaign properties? If so, not sure what the big deal is there.

_________________
Drop-In Utilities:
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 7983
Location: Bay Area
 Post subject: Re: Plo's Inventory Manager
PostPosted: Tue Jun 29, 2010 11:34 pm 
ah, nm... yeah, I typically always use the getProperty. I wasn't thinking that other people didn't. Don't bother on my account. Sounds like a lot of extra work.

_________________
Downloads:


Top
 Profile  
 
 Offline
Cave Troll
 
Joined: Wed Dec 03, 2008 5:13 pm
Posts: 93
 Post subject: Re: Plo's Inventory Manager
PostPosted: Tue Jun 29, 2010 11:44 pm 
This looks very interesting, especially since the use of the spell manager you created has, with some hiccups, made it easier to envision a day when I don't have to tab out of map tools to look something up on a character sheet or in the srd.

Some questions: can the items in this inventory interact or be made to interact with the item and mod sets in the lmarkus Pathfiinder framework? Or with the spell manager, even, allowing a wand or scroll to be deleted from the inventory when it is expended in the manager?

Right now I'm just now learning how to create more complex macros and my reach often exceeds my understanding of what the code can actually do.


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Sat Jun 21, 2008 12:07 am
Posts: 1950
 Post subject: Re: Plo's Inventory Manager
PostPosted: Wed Jun 30, 2010 12:36 am 
aliasmask wrote:
ah, nm... yeah, I typically always use the getProperty. I wasn't thinking that other people didn't. Don't bother on my account. Sounds like a lot of extra work.
I've started doing this when I have modularity and share-ability in mind. But a lot of the code here came out of my pre-existing FW-integrated stuff, so I didn't want to recode it. I don't think it's a big deal to ask people to establish props, but if you can code a lib to be just drop-in-able, it's definitely preferable.

_________________
Drop-In Utilities:
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Sat Jun 21, 2008 12:07 am
Posts: 1950
 Post subject: Re: Plo's Inventory Manager
PostPosted: Wed Jun 30, 2010 12:42 am 
Voltang wrote:
Some questions: can the items in this inventory interact or be made to interact with the item and mod sets in the lmarkus Pathfiinder framework? Or with the spell manager, even, allowing a wand or scroll to be deleted from the inventory when it is expended in the manager?
They absolutely can. In fact, if you peruse the lib, you'll find most of the buttons that are not colored blue are in fact not being used (in retrospect I should have deleted them and will in future releases), and are hold-overs from my FW-integrated version. That's 3.5, but gives you an idea of one way to do some of this. I am not familiar with even the use of lmarkus's FW, much less the coding, so I don't know what data you'd need, but the way I did it is I have the base weapon, and I have an enchantments/mwk/materials menu that you use to adjust stuff, etc., and the AB and dmg bonuses, along with the enchantments, 2H, double, light, etc., is all saved in a big json in the item's entry that I call "Useinfo". Then I have equip option when you click the item in the inventory, which sets the token to use the weapons/armor, etc.

So it's definitely doable, but how you do it depends very much on the FW you're working with. I'd have put some of that in, but I wanted the tool to be as FW agnostic as possible.

_________________
Drop-In Utilities:
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 9440
Location: Netherlands
 Post subject: Re: Plo's Inventory Manager
PostPosted: Wed Jun 30, 2010 1:56 am 
Very slick!

and erm
Quote:
Lately, I've become a big fan of not using campaign properties. Can you put a check in your open code to check for the properties and if not there run a setup where they are defined. I find there is very little need for most properties to be manually edited.

edit: Maybe write a custom property like setProperty("h.inventoryManagerVersion",versionNumber,currentToken()) and do a check for that value. Also, if there is a future upgrade this property can be checked as well if more props or whatever needs to be done.

<N00b>can I conclude from this that you can use setProperty(), without first having the property first defined on the respective token? And if so how do you detect whether it is or isn't predefined?</n00b>

_________________
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC

My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent and
DPI.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS


Last edited by wolph42 on Tue Jul 06, 2010 2:22 pm, edited 1 time in total.

Top
 Profile  
 
User avatar  Offline
Dragon
 
Joined: Mon May 31, 2010 6:03 am
Posts: 515
Location: Blagnac, France
 Post subject: Re: Plo's Inventory Manager
PostPosted: Wed Jun 30, 2010 2:16 am 
Great job plothos. I might borrow it for a framework I'm working on.

I've got a few questions regarding my own needs, but they may be of some interest for others :

    1) is it possible to have containers inside containers ?

    2) is it possible for a PC to drop a container on a temporary basis, aka a "drop" state ? (dropping a backpack to get rid of some encumbrance during a fight for instance)

    3) and the dropping idea leads me to wonder if it would be possible to exchange containers between tokens ? Which would allow to lend to others or even steal or being stolen :twisted:


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Sat Jun 21, 2008 12:07 am
Posts: 1950
 Post subject: Re: Plo's Inventory Manager
PostPosted: Wed Jun 30, 2010 2:33 am 
wolph42 wrote:
Very slick!
Thanks! :D
wolph42 wrote:
and erm
...
<N00b>can I conclude from this that you can use setProperty(), without first having the property first defined on the respective token? And if so how do you detect whether it is or isn't predefined?</n00b>
Yes, setProperty() and setLibProperty() can be used to store data in "hidden" properties. Their get correlates retrieve it. It's a good way to go, if you're looking to share a tool via a lib like this. For instance, my initiative window lib uses setLibProperty() all over the place and you never have to define anything to get it to work.

Determining if a prop is defined (one method): first find out what property set the token is using getPropertyType() and then getting a list of what props are defined for that type with getAllPropertyNames() (don't confuse this or what it does with the similar function getPropertyNames(); the names of these functions are very confusing, and it's unfortunate.)

_________________
Drop-In Utilities:
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 7983
Location: Bay Area
 Post subject: Re: Plo's Inventory Manager
PostPosted: Wed Jun 30, 2010 2:34 am 
wolph42 wrote:
<N00b>can I conclude from this that you can use setProperty(), without first having the property first defined on the respective token? And if so how do you detect whether it is or isn't predefined?</n00b>


When you get the property and it's "" when it should have some value is your first clue, but to know for sure you can use Wiki: getMatchingProperties() or Wiki: getMatchingLibProperties() to see if it exists.

_________________
Downloads:


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Fri Mar 20, 2009 4:40 am
Posts: 9440
Location: Netherlands
 Post subject: Re: Plo's Inventory Manager
PostPosted: Wed Jun 30, 2010 2:35 am 
thnx for the heads up!

_________________
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC

My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent and
DPI.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Sat Jun 21, 2008 12:07 am
Posts: 1950
 Post subject: Re: Plo's Inventory Manager
PostPosted: Wed Jun 30, 2010 2:37 am 
JML wrote:
Great job plothos. I might borrow it for a framework I'm working on.

I've got a few questions regarding my own needs, but they may be of some interest for others :

    1) is it possible to have containers inside containers ?

    2) is it possible for a PC to drop a container on a temporary basis, aka a "drop" state ? (dropping a backpack to get rid of some encumbrance during a fight for instance)

    3) and the dropping idea leads me to wonder if it would be possible to exchange containers between tokens ? Which would allow to lend to others or even steal or being stolen :twisted:
1. You can put a container inside a container, but the way it's set up right now if you put stuff inside the container in a container they won't be sorted quite right.

2. There's no drop state per se, but you can click on the item and choose "ignore weight" or whatever I called it, and the weight of the item will be ignored in the total - the weight entry will be surrounded by [] to indicate this.

3. Another option that should come up when you click an item is "give" and when you choose this it will send a link to another player that will let them accept it, up which you will be returned a link that if clicked will remove the item from your inventory. This works for anything in there, including containers, but it won't transfer the contents of the containers (as of yet).

_________________
Drop-In Utilities:
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).


Top
 Profile  
 
User avatar  Offline
Dragon
 
Joined: Mon May 31, 2010 6:03 am
Posts: 515
Location: Blagnac, France
 Post subject: Re: Plo's Inventory Manager
PostPosted: Wed Jun 30, 2010 4:04 am 
Which means I'll get all I dreamed of with only a few tweaking from my part or waiting for yours. :wink:

Thanks a lot.


Top
 Profile  
 
User avatar  Offline
Dragon
 
Joined: Sun Jun 15, 2008 1:40 pm
Posts: 444
Location: Montréal, QC
 Post subject: Re: Plo's Inventory Manager
PostPosted: Sun Jul 04, 2010 12:30 pm 
plothos wrote:
aliasmask wrote:
ah, nm... yeah, I typically always use the getProperty. I wasn't thinking that other people didn't. Don't bother on my account. Sounds like a lot of extra work.
I've started doing this when I have modularity and share-ability in mind. But a lot of the code here came out of my pre-existing FW-integrated stuff, so I didn't want to recode it. I don't think it's a big deal to ask people to establish props, but if you can code a lib to be just drop-in-able, it's definitely preferable.

I second this request: I do not want to have to add properties to my campaign properties, especially if I just want to try it out. getProperty() & setProperty() makes this unnecessary.
And Lib:Tokens should never require campaign properties (there was a thread ages ago that beat this into me when I didn't understand).

One other small suggestion: create a macro group that appears near the top of the macro panel for the lib: token that has the interface macros (the one you use to call the UDFs, etc.) already made-up. Then, people can just drag them over to their campaign properties / tokens. Entrepid folks can even write a simple 'installer' macro that does all the copying automatically, rather than creating the macros from scratch every time.

Making a Lib:Token as "Drop-in" as possible only takes a little extra effort in my experience, but it makes the result so much easier to use.

The tool looks great, I can't wait to try it out.

_________________
"The trouble with communicating is believing you have achieved it"
[ d20 StatBlock Importer ] [ Batch Edit Macros ] [ Canned Speech UI ] [ Lib: Math ]


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 111 posts ]  Go to page 1, 2, 3, 4, 5 ... 8  Next

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there are 0 users online :: 0 registered, 0 hidden and 0 guests (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 0 guests





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman